flavius02.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. //===== rAthena Script =======================================
  2. //= BattleGround System - Flavius Second
  3. //===== Description: =========================================
  4. //= [Official Conversion]
  5. //= Flavius Battleground.
  6. //= - Winning Team: 9 badges (11 if VIP)
  7. //= - Losing Team: 3 badges (5 if VIP)
  8. //===== Changelogs: ==========================================
  9. //= 1.0 First Version. [L0ne_W0lf]
  10. //= 1.1 Fixed NPCs being called for waiting rooms. (bugreport:4395)
  11. //= 1.2 Fixed pink crystal spawning as blue. [L0ne_W0lf]
  12. //= 1.3 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
  13. //= 1.4 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
  14. //= 1.5 Label standardization. [Euphy]
  15. //= 1.6 Added GM management function. [Euphy]
  16. //= 1.7 Added VIP features and created a reward function. [Euphy]
  17. //= 1.8 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
  18. //= 1.9 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
  19. //============================================================
  20. // Waiting Room NPCs
  21. //============================================================
  22. bat_room,142,227,4 script Lieutenant Huvas 418,{
  23. end;
  24. OnInit:
  25. waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
  26. end;
  27. OnEnterBG:
  28. set $@FlaviusBG2_id1, waitingroom2bg("bat_b02",10,290,"start#bat_b02::OnGuillaumeQuit","");
  29. end;
  30. }
  31. bat_room,142,204,0 script Lieutenant Yukon 414,{
  32. end;
  33. OnInit:
  34. waitingroom "Battle Station",11,"start#bat_b02::OnReadyCheck",1,0,80;
  35. end;
  36. OnEnterBG:
  37. set $@FlaviusBG2_id2, waitingroom2bg("bat_b02",390,10,"start#bat_b02::OnCroixQuit","");
  38. end;
  39. }
  40. bat_room,141,220,0 warp back_bgroomb02a 1,1,bat_room,154,150
  41. bat_room,141,211,0 warp back_bgroomb02b 1,1,bat_room,154,150
  42. bat_room,2,151,3 script #bat_b02_timer 844,{
  43. end;
  44. OnInit:
  45. if (getbattleflag("feature.bgqueue"))
  46. end;
  47. OnEnable:
  48. initnpctimer;
  49. end;
  50. OnStop:
  51. stopnpctimer;
  52. end;
  53. OnTimer1000:
  54. stopnpctimer;
  55. if (bg_get_data($@FlaviusBG2_id1, 0) == 0 && bg_get_data($@FlaviusBG2_id2, 0) == 0) {
  56. donpcevent "countdown#bat_b02::OnStop";
  57. if (getbattleflag("feature.bgqueue"))
  58. bg_reserve "bat_b02", true;
  59. $@FlaviusBG2 = 0;
  60. if( $@FlaviusBG2_id1 ) { bg_destroy $@FlaviusBG2_id1; $@FlaviusBG2_id1 = 0; }
  61. if( $@FlaviusBG2_id2 ) { bg_destroy $@FlaviusBG2_id2; $@FlaviusBG2_id2 = 0; }
  62. if (getbattleflag("feature.bgqueue"))
  63. bg_unbook "bat_b02";
  64. end;
  65. }
  66. initnpctimer;
  67. end;
  68. }
  69. // Flavius Battleground Engine
  70. //============================================================
  71. bat_b02,15,15,3 script start#bat_b02 844,{
  72. OnInit:
  73. if (getbattleflag("feature.bgqueue"))
  74. bg_unbook "bat_b02";
  75. mapwarp "bat_b02","bat_room",154,150;
  76. end;
  77. OnReadyCheck:
  78. if( $@FlaviusBG2 )
  79. end;
  80. if (!getbattleflag("feature.bgqueue")) {
  81. set .@Guillaume, getwaitingroomstate(0,"Lieutenant Huvas");
  82. set .@Croix, getwaitingroomstate(0,"Lieutenant Yukon");
  83. if( !.@Guillaume && !.@Croix ) {
  84. donpcevent "#bat_b02_timer::OnStop";
  85. end;
  86. }
  87. if( .@Guillaume < 10 || .@Croix < 10 )
  88. end;
  89. }
  90. set $@FlaviusBG2, 1;
  91. set $@FlaviusBG2_Victory, 0;
  92. set $@Croix_ScoreBG2, 0;
  93. set $@Guill_ScoreBG2, 0;
  94. bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
  95. if (!getbattleflag("feature.bgqueue")) {
  96. donpcevent "Lieutenant Huvas::OnEnterBG";
  97. donpcevent "Lieutenant Yukon::OnEnterBG";
  98. }
  99. donpcevent "OBJ#bat_b02_a::OnKill";
  100. donpcevent "OBJ#bat_b02_a::OnEnable";
  101. donpcevent "OBJ#bat_b02_b::OnKill";
  102. donpcevent "OBJ#bat_b02_b::OnEnable";
  103. donpcevent "guardian#bat_b02_a::OnKill";
  104. donpcevent "guardian#bat_b02_b::OnKill";
  105. donpcevent "guardian#bat_b02_a::OnEnable";
  106. donpcevent "guardian#bat_b02_b::OnEnable";
  107. donpcevent "cell#bat_b02_a::OnRed";
  108. donpcevent "cell#bat_b02_b::OnRed";
  109. donpcevent "time#bat_b02::OnEnable";
  110. disablenpc "Guillaume Vintenar#b02_a";
  111. disablenpc "Croix Vintenar#b02_b";
  112. disablenpc "Vintenar#bat_b02_aover";
  113. disablenpc "Vintenar#bat_b02_bover";
  114. bg_warp $@FlaviusBG2_id1,"bat_b02",87,75;
  115. bg_warp $@FlaviusBG2_id2,"bat_b02",311,224;
  116. donpcevent "countdown#bat_b02::OnEnable";
  117. initnpctimer;
  118. end;
  119. OnReset:
  120. donpcevent "OBJ#bat_b02_a::OnKill";
  121. donpcevent "OBJ#bat_b02_a::OnEnable";
  122. donpcevent "OBJ#bat_b02_b::OnKill";
  123. donpcevent "OBJ#bat_b02_b::OnEnable";
  124. donpcevent "guardian#bat_b02_a::OnKill";
  125. donpcevent "guardian#bat_b02_b::OnKill";
  126. donpcevent "guardian#bat_b02_a::OnEnable";
  127. donpcevent "guardian#bat_b02_b::OnEnable";
  128. donpcevent "cell#bat_b02_a::OnRed";
  129. donpcevent "cell#bat_b02_b::OnRed";
  130. end;
  131. OnGuillaumeActive:
  132. warp "bat_b02",87,75;
  133. end;
  134. OnCroixActive:
  135. warp "bat_b02",311,224;
  136. end;
  137. OnGuillaumeQuit:
  138. OnCroixQuit:
  139. if (getbattleflag("feature.bgqueue"))
  140. bg_desert;
  141. else
  142. bg_leave;
  143. end;
  144. OnTimer10000:
  145. stopnpctimer;
  146. donpcevent "#bat_b02_timer::OnEnable";
  147. end;
  148. }
  149. bat_b02,1,1,3 script OBJ#bat_b02_a 844,{
  150. OnEnable:
  151. $@FlavBG2_C1_ID = bg_monster($@FlaviusBG2_id1,"bat_b02",61,150,"Pink Crystal",1915,"OBJ#bat_b02_a::OnMyMobDead");
  152. setunitdata $@FlavBG2_C1_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  153. end;
  154. OnKill:
  155. killmonster "bat_b02","OBJ#bat_b02_a::OnMyMobDead";
  156. end;
  157. OnMyMobDead:
  158. if (mobcount("bat_b02","OBJ#bat_b02_a::OnMyMobDead") < 1) {
  159. mapannounce "bat_b02", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00";
  160. if ($@Croix_ScoreBG2 > 0) {
  161. set $@FlaviusBG2_Victory,2;
  162. set $@Croix_ScoreBG2,$@Croix_ScoreBG2+1;
  163. enablenpc "Guillaume Vintenar#b02_a";
  164. enablenpc "Croix Vintenar#b02_b";
  165. donpcevent "time#bat_b02::OnStop";
  166. if (getbattleflag("feature.bgqueue"))
  167. bg_reserve "bat_b02", true;
  168. }
  169. else {
  170. set $@Croix_ScoreBG2,1;
  171. donpcevent "time#bat_b02::OnEnable";
  172. donpcevent "start#bat_b02::OnReset";
  173. }
  174. donpcevent "#bat_b02_timer::OnStop";
  175. bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
  176. bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
  177. bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
  178. donpcevent "#bat_b02_timer::OnEnable";
  179. }
  180. end;
  181. }
  182. bat_b02,1,2,3 script OBJ#bat_b02_b 844,{
  183. OnEnable:
  184. $@FlavBG2_C2_ID = bg_monster($@FlaviusBG2_id2,"bat_b02",328,150,"Blue Crystal",1914,"OBJ#bat_b02_b::OnMyMobDead");
  185. setunitdata $@FlavBG2_C2_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  186. end;
  187. OnKill:
  188. killmonster "bat_b02","OBJ#bat_b02_b::OnMyMobDead";
  189. end;
  190. OnMyMobDead:
  191. if (mobcount("bat_b02","OBJ#bat_b02_b::OnMyMobDead") < 1) {
  192. mapannounce "bat_b02", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00";
  193. if ($@Guill_ScoreBG2 > 0) {
  194. set $@FlaviusBG2_Victory,1;
  195. set $@Guill_ScoreBG2,$@Guill_ScoreBG2+1;
  196. enablenpc "Guillaume Vintenar#b02_a";
  197. enablenpc "Croix Vintenar#b02_b";
  198. donpcevent "time#bat_b02::OnStop";
  199. if (getbattleflag("feature.bgqueue"))
  200. bg_reserve "bat_b02", true;
  201. }
  202. else {
  203. set $@Guill_ScoreBG2,1;
  204. donpcevent "time#bat_b02::OnEnable";
  205. donpcevent "start#bat_b02::OnReset";
  206. }
  207. donpcevent "#bat_b02_timer::OnStop";
  208. bg_updatescore "bat_b02",$@Guill_ScoreBG2,$@Croix_ScoreBG2;
  209. bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
  210. bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
  211. donpcevent "#bat_b02_timer::OnEnable";
  212. }
  213. end;
  214. }
  215. bat_b02,1,3,3 script guardian#bat_b02_a 844,{
  216. OnEnable:
  217. bg_monster $@FlaviusBG2_id1,"bat_b02",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead";
  218. bg_monster $@FlaviusBG2_id1,"bat_b02",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b02_a::OnMyMobDead";
  219. end;
  220. OnKill:
  221. killmonster "bat_b02","guardian#bat_b02_a::OnMyMobDead";
  222. end;
  223. OnMyMobDead:
  224. if (mobcount("bat_b02","guardian#bat_b02_a::OnMyMobDead") < 1) {
  225. donpcevent "cell#bat_b02_a::OnGreen";
  226. mapannounce "bat_b02", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
  227. setunitdata $@FlavBG2_C1_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  228. }
  229. end;
  230. }
  231. bat_b02,1,3,3 script guardian#bat_b02_b 844,{
  232. OnEnable:
  233. bg_monster $@FlaviusBG2_id2,"bat_b02",307,160,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead";
  234. bg_monster $@FlaviusBG2_id2,"bat_b02",307,138,"Croix Camp Guardian",1949,"guardian#bat_b02_b::OnMyMobDead";
  235. end;
  236. OnKill:
  237. killmonster "bat_b02","guardian#bat_b02_b::OnMyMobDead";
  238. end;
  239. OnMyMobDead:
  240. if (mobcount("bat_b02","guardian#bat_b02_b::OnMyMobDead") < 1) {
  241. donpcevent "cell#bat_b02_b::OnGreen";
  242. mapannounce "bat_b02", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
  243. setunitdata $@FlavBG2_C2_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  244. }
  245. end;
  246. }
  247. bat_b02,1,4,3 script cell#bat_b02_a 844,{
  248. OnRed:
  249. setcell "bat_b02",62,149,60,151,cell_basilica,1;
  250. setcell "bat_b02",62,149,60,151,cell_walkable,0;
  251. end;
  252. OnGreen:
  253. setcell "bat_b02",62,149,60,151,cell_basilica,0;
  254. setcell "bat_b02",62,149,60,151,cell_walkable,1;
  255. end;
  256. }
  257. bat_b02,1,5,3 script cell#bat_b02_b 844,{
  258. OnRed:
  259. setcell "bat_b02",327,151,329,149,cell_basilica,1;
  260. setcell "bat_b02",327,151,329,149,cell_walkable,0;
  261. end;
  262. OnGreen:
  263. setcell "bat_b02",327,151,329,149,cell_basilica,0;
  264. setcell "bat_b02",327,151,329,149,cell_walkable,1;
  265. end;
  266. }
  267. bat_b02,1,6,1 script time#bat_b02 844,{
  268. OnEnable:
  269. donpcevent "Battle Therapist#b02_a::OnEnable";
  270. donpcevent "Battle Therapist#b02_b::OnEnable";
  271. end;
  272. OnStop:
  273. donpcevent "Battle Therapist#b02_a::OnStop";
  274. donpcevent "Battle Therapist#b02_b::OnStop";
  275. end;
  276. }
  277. bat_b02,10,294,3 script Battle Therapist#b02_a 95,{
  278. specialeffect2 EF_HEAL;
  279. mes "[Battle Therapist]";
  280. mes "Just close your eyes,";
  281. mes "and take a deep breath.";
  282. mes "You can be free from pain.";
  283. close;
  284. OnTimer25000:
  285. specialeffect EF_SANCTUARY;
  286. // enablenpc "bat_b02_rp1_a_warp";
  287. areapercentheal "bat_b02",0,280,20,300,100,100;
  288. areawarp "bat_b02",0,280,20,300,"bat_b02",87,73;
  289. end;
  290. // OnTimer26000:
  291. // disablenpc "bat_b02_rp1_a_warp";
  292. // end;
  293. OnTimer26500:
  294. stopnpctimer;
  295. donpcevent "Battle Therapist#b02_a::OnEnable";
  296. end;
  297. OnEnable:
  298. initnpctimer;
  299. enablenpc "Battle Therapist#b02_a";
  300. end;
  301. OnStop:
  302. // disablenpc "bat_b02_rp1_a_warp";
  303. disablenpc "Battle Therapist#b02_a";
  304. stopnpctimer;
  305. end;
  306. }
  307. /*
  308. bat_b02,10,290,0 script bat_b02_rp1_a_warp 45,10,10,{
  309. OnInit:
  310. disablenpc "bat_b02_rp1_a_warp";
  311. end;
  312. OnTouch:
  313. percentheal 100,100;
  314. warp "bat_b02",87,73;
  315. end;
  316. }
  317. */
  318. bat_b02,389,14,3 script Battle Therapist#b02_b 95,{
  319. specialeffect2 EF_HEAL;
  320. mes "[Battle Therapist]";
  321. mes "Just close your eyes,";
  322. mes "and take a deep breath.";
  323. mes "You can be free from pain.";
  324. close;
  325. OnTimer25000:
  326. specialeffect EF_SANCTUARY;
  327. areapercentheal "bat_b02",379,0,399,20,100,100;
  328. areawarp "bat_b02",379,0,399,20,"bat_b02",312,225;
  329. // enablenpc "bat_b02_rp1_b_warp";
  330. end;
  331. // OnTimer26000:
  332. // disablenpc "bat_b02_rp1_b_warp";
  333. // end;
  334. OnTimer26500:
  335. stopnpctimer;
  336. donpcevent "Battle Therapist#b02_b::OnEnable";
  337. end;
  338. OnEnable:
  339. initnpctimer;
  340. enablenpc "Battle Therapist#b02_b";
  341. end;
  342. OnStop:
  343. // disablenpc "bat_b02_rp1_b_warp";
  344. disablenpc "Battle Therapist#b02_b";
  345. stopnpctimer;
  346. end;
  347. }
  348. /*
  349. bat_b02,389,10,0 script bat_b02_rp1_b_warp 45,10,10,{
  350. OnInit:
  351. disablenpc "bat_b02_rp1_b_warp";
  352. end;
  353. OnTouch:
  354. percentheal 100,100;
  355. warp "bat_b02",312,225;
  356. end;
  357. }
  358. */
  359. bat_b02,87,76,0 script A_CODE#bat_b02 -1,5,5,{
  360. OnTouch:
  361. if (checkquest(2070) < 0)
  362. setquest 2070;
  363. end;
  364. }
  365. bat_b02,312,224,0 script B_CODE#bat_b02 -1,5,5,{
  366. OnTouch:
  367. if (checkquest(2070) < 0)
  368. setquest 2070;
  369. end;
  370. }
  371. bat_b02,10,294,3 script Guillaume Vintenar#b02_a 934,{
  372. if ($@FlaviusBG2_id1 == getcharid(4)) {
  373. if ($@FlaviusBG2_Victory == 1)
  374. callfunc "F_BG_Badge",1,"Guillaume","Flavius";
  375. else
  376. callfunc "F_BG_Badge",0,"Guillaume","Flavius";
  377. }
  378. bg_leave;
  379. if (!getbattleflag("feature.bgqueue"))
  380. warp "bat_room",154,150;
  381. end;
  382. OnInit:
  383. disablenpc "Guillaume Vintenar#b02_a";
  384. end;
  385. }
  386. bat_b02,389,14,3 script Croix Vintenar#b02_b 934,{
  387. if ($@FlaviusBG2_id2 == getcharid(4)) {
  388. if ($@FlaviusBG2_Victory == 2)
  389. callfunc "F_BG_Badge",1,"Croix","Flavius";
  390. else
  391. callfunc "F_BG_Badge",0,"Croix","Flavius";
  392. }
  393. bg_leave;
  394. if (!getbattleflag("feature.bgqueue"))
  395. warp "bat_room",154,150;
  396. end;
  397. OnInit:
  398. disablenpc "Croix Vintenar#b02_b";
  399. end;
  400. }
  401. bat_b02,1,5,3 script countdown#bat_b02 844,{
  402. OnInit:
  403. stopnpctimer;
  404. end;
  405. OnEnable:
  406. stopnpctimer;
  407. initnpctimer;
  408. end;
  409. OnStop:
  410. stopnpctimer;
  411. end;
  412. OnTimer7000:
  413. mapannounce "bat_b02", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900";
  414. end;
  415. OnTimer8000:
  416. mapannounce "bat_b02", "Croix Vintenar Swandery : Even though Guillaume is struggling to win against us, the victory is ours. Let's show them our power.",bc_map,"0xFF99CC";
  417. end;
  418. OnTimer1800000:
  419. mapannounce "bat_b02", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00";
  420. end;
  421. OnTimer1803000:
  422. mapannounce "bat_b02", "Marollo VII : Both camps are competitive, so it's hard to judge which team is superior.",bc_map,"0x99CC00";
  423. end;
  424. OnTimer1808000:
  425. mapannounce "bat_b02", "Marollo VII : This battle of Flavian is such a waste of time. I will decide victory and defeat by your progress.",bc_map,"0x99CC00";
  426. end;
  427. OnTimer1822000:
  428. mapannounce "bat_b02", "Marollo VII : If you can't accept the results, try again in another valley battle!",bc_map,"0x99CC00";
  429. end;
  430. OnTimer1825000:
  431. mapannounce "bat_b02", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00";
  432. end;
  433. OnTimer1830000:
  434. donpcevent "time#bat_b02::OnStop";
  435. bg_warp $@FlaviusBG2_id1,"bat_b02",10,290;
  436. bg_warp $@FlaviusBG2_id2,"bat_b02",390,10;
  437. enablenpc "Vintenar#bat_b02_aover";
  438. enablenpc "Vintenar#bat_b02_bover";
  439. if (getbattleflag("feature.bgqueue"))
  440. bg_reserve "bat_b02", true;
  441. end;
  442. OnTimer1900000:
  443. mapwarp "bat_b02","bat_room",154,150;
  444. donpcevent "countdown#bat_b02::OnStop";
  445. end;
  446. }
  447. bat_b02,81,83,3 script Guillaume Camp#flag32 973,{ end; }
  448. bat_b02,94,83,3 script Guillaume Camp#flag33 973,{ end; }
  449. bat_b02,81,66,3 script Guillaume Camp#flag34 973,{ end; }
  450. bat_b02,94,66,3 script Guillaume Camp#flag35 973,{ end; }
  451. bat_b02,139,142,3 script Guillaume Camp#flag36 973,{ end; }
  452. bat_b02,139,158,3 script Guillaume Camp#flag37 973,{ end; }
  453. bat_b02,110,161,3 script Guillaume Camp#flag38 973,{ end; }
  454. bat_b02,110,137,3 script Guillaume Camp#flag39 973,{ end; }
  455. bat_b02,63,135,3 script Guillaume Camp#flag40 973,{ end; }
  456. bat_b02,63,165,3 script Guillaume Camp#flag41 973,{ end; }
  457. bat_b02,10,296,3 script Guillaume Camp#flag42 973,{ end; }
  458. bat_b02,306,233,3 script Croix Camp#flag32 974,{ end; }
  459. bat_b02,317,233,3 script Croix Camp#flag33 974,{ end; }
  460. bat_b02,306,216,3 script Croix Camp#flag34 974,{ end; }
  461. bat_b02,317,216,3 script Croix Camp#flag35 974,{ end; }
  462. bat_b02,257,158,3 script Croix Camp#flag36 974,{ end; }
  463. bat_b02,257,141,3 script Croix Camp#flag37 974,{ end; }
  464. bat_b02,297,164,3 script Croix Camp#flag38 974,{ end; }
  465. bat_b02,297,136,3 script Croix Camp#flag39 974,{ end; }
  466. bat_b02,336,161,3 script Croix Camp#flag40 974,{ end; }
  467. bat_b02,336,139,3 script Croix Camp#flag41 974,{ end; }
  468. bat_b02,389,16,3 script Croix Camp#flag42 974,{ end; }
  469. bat_b02,10,294,3 script Vintenar#bat_b02_aover 419,{
  470. set .@A_B_gap,$@Guill_ScoreBG2 - $@Croix_ScoreBG2;
  471. if ($@FlaviusBG2_id1 == getcharid(4)) {
  472. if (.@A_B_gap > 0)
  473. callfunc "F_BG_Badge",1,"Guillaume","Flavius"; //Guillaume wins
  474. else if (.@A_B_gap == 0)
  475. callfunc "F_BG_Badge",0,"Guillaume","Flavius"; //Tie
  476. else
  477. callfunc "F_BG_Badge",0,"Guillaume","Flavius"; //Croix wins
  478. }
  479. else {
  480. mes "[Axl Rose]";
  481. mes "Why are you here, Croix mercenary? I am definitely sure of victory against foolish Croix such as you. Ha!";
  482. close;
  483. }
  484. bg_leave;
  485. if (!getbattleflag("feature.bgqueue"))
  486. warp "bat_room",154,150;
  487. end;
  488. OnInit:
  489. disablenpc "Vintenar#bat_b02_aover";
  490. end;
  491. }
  492. bat_b02,389,14,3 script Vintenar#bat_b02_bover 415,{
  493. set .@A_B_gap,$@Guill_ScoreBG2 - $@Croix_ScoreBG2;
  494. if ($@FlaviusBG2_id2 == getcharid(4)) {
  495. if (.@A_B_gap > 0)
  496. callfunc "F_BG_Badge",0,"Croix","Flavius"; //Guillaume wins
  497. else if (.@A_B_gap == 0)
  498. callfunc "F_BG_Badge",0,"Croix","Flavius"; //Tie
  499. else
  500. callfunc "F_BG_Badge",1,"Croix","Flavius"; //Croix wins
  501. }
  502. else {
  503. mes "[Swandery]";
  504. mes "Why do you come here as a Guillaume? You will be sent to where you should be!";
  505. close;
  506. }
  507. bg_leave;
  508. if (!getbattleflag("feature.bgqueue"))
  509. warp "bat_room",154,150;
  510. end;
  511. OnInit:
  512. disablenpc "Vintenar#bat_b02_bover";
  513. end;
  514. }
  515. bat_b02,1,10,3 script Release all#b02 81,{
  516. set .@i, callfunc("F_GM_NPC",1854,0);
  517. if (.@i == -1) {
  518. mes "Cancelled.";
  519. close;
  520. } else if (.@i == 0) {
  521. end;
  522. } else {
  523. mes "May I help you?";
  524. next;
  525. switch(select("Release all.:Cancel.")) {
  526. case 1:
  527. mes "Bye.";
  528. close2;
  529. mapwarp "bat_b02","bat_room",154,150;
  530. end;
  531. case 2:
  532. mes "Cancelled.";
  533. close;
  534. }
  535. }
  536. }
  537. // BG Queue makes these scripts useless
  538. - script BGQueueInit#flavius02 -1,{
  539. end;
  540. OnInit:
  541. if (getbattleflag("feature.bgqueue")) {
  542. unloadnpc "Lieutenant Huvas";
  543. unloadnpc "Lieutenant Yukon";
  544. unloadnpc "back_bgroomb02a";
  545. unloadnpc "back_bgroomb02b";
  546. unloadnpc "A_CODE#bat_b02";
  547. unloadnpc "B_CODE#bat_b02";
  548. }
  549. end;
  550. }