flavius02.txt 17 KB

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