flavius01.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624
  1. //===== rAthena Script =======================================
  2. //= BattleGround System - Flavius
  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 pink crystal spawning as blue. [L0ne_W0lf]
  11. //= 1.2 Updated 'waitingroom' to support required zeny/lvl. [Kisuka]
  12. //= 1.3 Removed MaxLvl check in waitingrooms. Replaced setwall with setcell.
  13. //= 1.4 Label standardization. [Euphy]
  14. //= 1.5 Added GM management function. [Euphy]
  15. //= 1.6 Added VIP features and created a reward function. [Euphy]
  16. //= 1.7 Made Crystals immune to attacks until Guardians are defeated. [Cydh/Aleos]
  17. //= 1.8 Added battle_config checks to allow this script to use the new queue interface or the previous method. [Aleos]
  18. //============================================================
  19. // Waiting Room NPCs
  20. //============================================================
  21. bat_room,86,227,4 script Lieutenant Ator 418,{
  22. end;
  23. OnInit:
  24. waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
  25. end;
  26. OnEnterBG:
  27. set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",10,290,"start#bat_b01::OnGuillaumeQuit","");
  28. end;
  29. }
  30. bat_room,85,204,0 script Lieutenant Thelokus 414,{
  31. end;
  32. OnInit:
  33. waitingroom "Battle Station",11,"start#bat_b01::OnReadyCheck",1,0,80;
  34. end;
  35. OnEnterBG:
  36. set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",390,10,"start#bat_b01::OnCroixQuit","");
  37. end;
  38. }
  39. bat_room,85,220,0 warp back_bgroomb01a 1,1,bat_room,154,150
  40. bat_room,85,211,0 warp back_bgroomb01b 1,1,bat_room,154,150
  41. bat_room,2,151,3 script #bat_b01_timer 844,{
  42. end;
  43. OnInit:
  44. if (getbattleflag("feature.bgqueue"))
  45. end;
  46. OnEnable:
  47. initnpctimer;
  48. end;
  49. OnStop:
  50. stopnpctimer;
  51. end;
  52. OnTimer1000:
  53. stopnpctimer;
  54. if (bg_get_data($@FlaviusBG1_id1, 0) == 0 && bg_get_data($@FlaviusBG1_id2, 0) == 0) {
  55. donpcevent "countdown#bat_b01::OnStop";
  56. if (getbattleflag("feature.bgqueue"))
  57. bg_reserve "bat_b01", true;
  58. $@FlaviusBG1 = 0;
  59. if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; $@FlaviusBG1_id1 = 0; }
  60. if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; $@FlaviusBG1_id2 = 0; }
  61. if (getbattleflag("feature.bgqueue"))
  62. bg_unbook "bat_b01";
  63. end;
  64. }
  65. initnpctimer;
  66. end;
  67. }
  68. // Flavius Battleground Engine
  69. //============================================================
  70. bat_b01,15,15,3 script start#bat_b01 844,{
  71. OnInit:
  72. mapwarp "bat_b01","bat_room",154,150;
  73. end;
  74. OnReadyCheck:
  75. if( $@FlaviusBG1 )
  76. end;
  77. if (!getbattleflag("feature.bgqueue")) {
  78. set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator");
  79. set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus");
  80. if( !.@Guillaume && !.@Croix ) {
  81. donpcevent "#bat_b01_timer::OnStop";
  82. end;
  83. }
  84. if( .@Guillaume < 10 || .@Croix < 10 )
  85. end;
  86. }
  87. set $@FlaviusBG1, 1;
  88. set $@FlaviusBG1_Victory, 0;
  89. set $@Croix_ScoreBG1, 0;
  90. set $@Guill_ScoreBG1, 0;
  91. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  92. if (!getbattleflag("feature.bgqueue")) {
  93. donpcevent "Lieutenant Ator::OnEnterBG";
  94. donpcevent "Lieutenant Thelokus::OnEnterBG";
  95. }
  96. donpcevent "OBJ#bat_b01_a::OnKill";
  97. donpcevent "OBJ#bat_b01_a::OnEnable";
  98. donpcevent "OBJ#bat_b01_b::OnKill";
  99. donpcevent "OBJ#bat_b01_b::OnEnable";
  100. donpcevent "guardian#bat_b01_a::OnKill";
  101. donpcevent "guardian#bat_b01_b::OnKill";
  102. donpcevent "guardian#bat_b01_a::OnEnable";
  103. donpcevent "guardian#bat_b01_b::OnEnable";
  104. donpcevent "cell#bat_b01_a::OnRed";
  105. donpcevent "cell#bat_b01_b::OnRed";
  106. donpcevent "time#bat_b01::OnEnable";
  107. disablenpc "Guillaume Vintenar#b01_a";
  108. disablenpc "Croix Vintenar#b01_b";
  109. disablenpc "Vintenar#bat_b01_aover";
  110. disablenpc "Vintenar#bat_b01_bover";
  111. bg_warp $@FlaviusBG1_id1,"bat_b01",87,75;
  112. bg_warp $@FlaviusBG1_id2,"bat_b01",311,224;
  113. donpcevent "countdown#bat_b01::OnEnable";
  114. initnpctimer;
  115. end;
  116. OnReset:
  117. donpcevent "OBJ#bat_b01_a::OnKill";
  118. donpcevent "OBJ#bat_b01_a::OnEnable";
  119. donpcevent "OBJ#bat_b01_b::OnKill";
  120. donpcevent "OBJ#bat_b01_b::OnEnable";
  121. donpcevent "guardian#bat_b01_a::OnKill";
  122. donpcevent "guardian#bat_b01_b::OnKill";
  123. donpcevent "guardian#bat_b01_a::OnEnable";
  124. donpcevent "guardian#bat_b01_b::OnEnable";
  125. donpcevent "cell#bat_b01_a::OnRed";
  126. donpcevent "cell#bat_b01_b::OnRed";
  127. end;
  128. OnGuillaumeActive:
  129. warp "bat_b01",87,75;
  130. end;
  131. OnCroixActive:
  132. warp "bat_b01",311,224;
  133. end;
  134. OnGuillaumeQuit:
  135. OnCroixQuit:
  136. if (getbattleflag("feature.bgqueue"))
  137. bg_desert;
  138. else
  139. bg_leave;
  140. end;
  141. OnTimer10000:
  142. stopnpctimer;
  143. donpcevent "#bat_b01_timer::OnEnable";
  144. end;
  145. }
  146. bat_b01,1,1,3 script OBJ#bat_b01_a 844,{
  147. OnEnable:
  148. $@FlavBG1_C1_ID = bg_monster($@FlaviusBG1_id1,"bat_b01",61,150,"Pink Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead");
  149. setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  150. end;
  151. OnKill:
  152. killmonster "bat_b01","OBJ#bat_b01_a::OnMyMobDead";
  153. end;
  154. OnMyMobDead:
  155. if (mobcount("bat_b01","OBJ#bat_b01_a::OnMyMobDead") < 1) {
  156. mapannounce "bat_b01", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00";
  157. if ($@Croix_ScoreBG1 > 0) {
  158. set $@FlaviusBG1_Victory,2;
  159. set $@Croix_ScoreBG1,$@Croix_ScoreBG1+1;
  160. enablenpc "Guillaume Vintenar#b01_a";
  161. enablenpc "Croix Vintenar#b01_b";
  162. donpcevent "time#bat_b01::OnStop";
  163. if (getbattleflag("feature.bgqueue"))
  164. bg_reserve "bat_b01", true;
  165. }
  166. else {
  167. set $@Croix_ScoreBG1,1;
  168. donpcevent "time#bat_b01::OnEnable";
  169. donpcevent "start#bat_b01::OnReset";
  170. }
  171. donpcevent "#bat_b01_timer::OnStop";
  172. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  173. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  174. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  175. donpcevent "#bat_b01_timer::OnEnable";
  176. }
  177. end;
  178. }
  179. bat_b01,1,2,3 script OBJ#bat_b01_b 844,{
  180. OnEnable:
  181. $@FlavBG1_C2_ID = bg_monster($@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead");
  182. setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  183. end;
  184. OnKill:
  185. killmonster "bat_b01","OBJ#bat_b01_b::OnMyMobDead";
  186. end;
  187. OnMyMobDead:
  188. if (mobcount("bat_b01","OBJ#bat_b01_b::OnMyMobDead") < 1) {
  189. mapannounce "bat_b01", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00";
  190. if ($@Guill_ScoreBG1 > 0) {
  191. set $@FlaviusBG1_Victory,1;
  192. set $@Guill_ScoreBG1,$@Guill_ScoreBG1+1;
  193. enablenpc "Guillaume Vintenar#b01_a";
  194. enablenpc "Croix Vintenar#b01_b";
  195. donpcevent "time#bat_b01::OnStop";
  196. if (getbattleflag("feature.bgqueue"))
  197. bg_reserve "bat_b01", true;
  198. }
  199. else {
  200. set $@Guill_ScoreBG1,1;
  201. donpcevent "time#bat_b01::OnEnable";
  202. donpcevent "start#bat_b01::OnReset";
  203. }
  204. donpcevent "#bat_b01_timer::OnStop";
  205. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  206. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  207. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  208. donpcevent "#bat_b01_timer::OnEnable";
  209. }
  210. end;
  211. }
  212. bat_b01,1,3,3 script guardian#bat_b01_a 844,{
  213. OnEnable:
  214. bg_monster $@FlaviusBG1_id1,"bat_b01",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
  215. bg_monster $@FlaviusBG1_id1,"bat_b01",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
  216. end;
  217. OnKill:
  218. killmonster "bat_b01","guardian#bat_b01_a::OnMyMobDead";
  219. end;
  220. OnMyMobDead:
  221. if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) {
  222. donpcevent "cell#bat_b01_a::OnGreen";
  223. mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
  224. setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  225. }
  226. end;
  227. }
  228. bat_b01,1,3,3 script guardian#bat_b01_b 844,{
  229. OnEnable:
  230. bg_monster $@FlaviusBG1_id2,"bat_b01",307,160,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
  231. bg_monster $@FlaviusBG1_id2,"bat_b01",307,138,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
  232. end;
  233. OnKill:
  234. killmonster "bat_b01","guardian#bat_b01_b::OnMyMobDead";
  235. end;
  236. OnMyMobDead:
  237. if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) {
  238. donpcevent "cell#bat_b01_b::OnGreen";
  239. mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
  240. setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  241. }
  242. end;
  243. }
  244. bat_b01,1,4,3 script cell#bat_b01_a 844,{
  245. OnRed:
  246. setcell "bat_b01",62,149,60,151,cell_basilica,1;
  247. setcell "bat_b01",62,149,60,151,cell_walkable,0;
  248. end;
  249. OnGreen:
  250. setcell "bat_b01",62,149,60,151,cell_basilica,0;
  251. setcell "bat_b01",62,149,60,151,cell_walkable,1;
  252. end;
  253. }
  254. bat_b01,1,5,3 script cell#bat_b01_b 844,{
  255. OnRed:
  256. setcell "bat_b01",327,151,329,149,cell_basilica,1;
  257. setcell "bat_b01",327,151,329,149,cell_walkable,0;
  258. end;
  259. OnGreen:
  260. setcell "bat_b01",327,151,329,149,cell_basilica,0;
  261. setcell "bat_b01",327,151,329,149,cell_walkable,1;
  262. end;
  263. }
  264. bat_b01,1,6,1 script time#bat_b01 844,{
  265. OnEnable:
  266. donpcevent "Battle Therapist#b01_a::OnEnable";
  267. donpcevent "Battle Therapist#b01_b::OnEnable";
  268. end;
  269. OnStop:
  270. donpcevent "Battle Therapist#b01_a::OnStop";
  271. donpcevent "Battle Therapist#b01_b::OnStop";
  272. end;
  273. }
  274. bat_b01,10,294,3 script Battle Therapist#b01_a 95,{
  275. specialeffect2 EF_HEAL;
  276. mes "[Battle Therapist]";
  277. mes "Just close your eyes,";
  278. mes "and take a deep breath.";
  279. mes "You can be free from pain.";
  280. close;
  281. OnTimer25000:
  282. specialeffect EF_SANCTUARY;
  283. // enablenpc "bat_b01_rp1_a_warp";
  284. areapercentheal "bat_b01",0,280,20,300,100,100;
  285. areawarp "bat_b01",0,280,20,300,"bat_b01",87,73;
  286. end;
  287. // OnTimer26000:
  288. // disablenpc "bat_b01_rp1_a_warp";
  289. // end;
  290. OnTimer26500:
  291. stopnpctimer;
  292. donpcevent "Battle Therapist#b01_a::OnEnable";
  293. end;
  294. OnEnable:
  295. initnpctimer;
  296. enablenpc "Battle Therapist#b01_a";
  297. end;
  298. OnStop:
  299. // disablenpc "bat_b01_rp1_a_warp";
  300. disablenpc "Battle Therapist#b01_a";
  301. stopnpctimer;
  302. end;
  303. }
  304. /*
  305. // replaced by areapercentheal and areawarp to prevent enqueue issue
  306. bat_b01,10,290,0 script bat_b01_rp1_a_warp 45,10,10,{
  307. OnInit:
  308. disablenpc "bat_b01_rp1_a_warp";
  309. end;
  310. OnTouch:
  311. percentheal 100,100;
  312. warp "bat_b01",87,73;
  313. end;
  314. }
  315. */
  316. bat_b01,389,14,3 script Battle Therapist#b01_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. // enablenpc "bat_b01_rp1_b_warp";
  326. areapercentheal "bat_b01",379,0,399,20,100,100;
  327. areawarp "bat_b01",379,0,399,20,"bat_b01",312,225;
  328. end;
  329. // OnTimer26000:
  330. // disablenpc "bat_b01_rp1_b_warp";
  331. // end;
  332. OnTimer26500:
  333. stopnpctimer;
  334. donpcevent "Battle Therapist#b01_b::OnEnable";
  335. end;
  336. OnEnable:
  337. initnpctimer;
  338. enablenpc "Battle Therapist#b01_b";
  339. end;
  340. OnStop:
  341. // disablenpc "bat_b01_rp1_b_warp";
  342. disablenpc "Battle Therapist#b01_b";
  343. stopnpctimer;
  344. end;
  345. }
  346. /*
  347. bat_b01,389,10,0 script bat_b01_rp1_b_warp 45,10,10,{
  348. OnInit:
  349. disablenpc "bat_b01_rp1_b_warp";
  350. end;
  351. OnTouch:
  352. percentheal 100,100;
  353. warp "bat_b01",312,225;
  354. end;
  355. }
  356. */
  357. bat_b01,87,76,0 script A_CODE#bat_b01 -1,5,5,{
  358. OnTouch:
  359. if (checkquest(2070) < 0)
  360. setquest 2070;
  361. end;
  362. }
  363. bat_b01,312,224,0 script B_CODE#bat_b01 -1,5,5,{
  364. OnTouch:
  365. if (checkquest(2070) < 0)
  366. setquest 2070;
  367. end;
  368. }
  369. bat_b01,10,294,3 script Guillaume Vintenar#b01_a 934,{
  370. if ($@FlaviusBG1_id1 == getcharid(4)) {
  371. if ($@FlaviusBG1_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#b01_a";
  382. end;
  383. }
  384. bat_b01,389,14,3 script Croix Vintenar#b01_b 934,{
  385. if ($@FlaviusBG1_id2 == getcharid(4)) {
  386. if ($@FlaviusBG1_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#b01_b";
  397. end;
  398. }
  399. bat_b01,1,5,3 script countdown#bat_b01 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_b01", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900";
  412. end;
  413. OnTimer8000:
  414. mapannounce "bat_b01", "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_b01", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00";
  418. end;
  419. OnTimer1803000:
  420. mapannounce "bat_b01", "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_b01", "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_b01", "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_b01", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00";
  430. end;
  431. OnTimer1830000:
  432. donpcevent "time#bat_b01::OnStop";
  433. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  434. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  435. enablenpc "Vintenar#bat_b01_aover";
  436. enablenpc "Vintenar#bat_b01_bover";
  437. if (getbattleflag("feature.bgqueue"))
  438. bg_reserve "bat_b01", true;
  439. end;
  440. OnTimer1900000:
  441. mapwarp "bat_b01","bat_room",154,150;
  442. donpcevent "countdown#bat_b01::OnStop";
  443. end;
  444. }
  445. bat_b01,81,83,3 script Guillaume Camp#flag21 973,{ end; }
  446. bat_b01,94,83,3 script Guillaume Camp#flag22 973,{ end; }
  447. bat_b01,81,66,3 script Guillaume Camp#flag23 973,{ end; }
  448. bat_b01,94,66,3 script Guillaume Camp#flag24 973,{ end; }
  449. bat_b01,139,142,3 script Guillaume Camp#flag25 973,{ end; }
  450. bat_b01,139,158,3 script Guillaume Camp#flag26 973,{ end; }
  451. bat_b01,110,161,3 script Guillaume Camp#flag27 973,{ end; }
  452. bat_b01,110,137,3 script Guillaume Camp#flag28 973,{ end; }
  453. bat_b01,63,135,3 script Guillaume Camp#flag29 973,{ end; }
  454. bat_b01,63,165,3 script Guillaume Camp#flag30 973,{ end; }
  455. bat_b01,10,296,3 script Guillaume Camp#flag31 973,{ end; }
  456. bat_b01,306,233,3 script Croix Camp#flag21 974,{ end; }
  457. bat_b01,317,233,3 script Croix Camp#flag22 974,{ end; }
  458. bat_b01,306,216,3 script Croix Camp#flag23 974,{ end; }
  459. bat_b01,317,216,3 script Croix Camp#flag24 974,{ end; }
  460. bat_b01,257,158,3 script Croix Camp#flag25 974,{ end; }
  461. bat_b01,257,141,3 script Croix Camp#flag26 974,{ end; }
  462. bat_b01,297,164,3 script Croix Camp#flag27 974,{ end; }
  463. bat_b01,297,136,3 script Croix Camp#flag28 974,{ end; }
  464. bat_b01,336,161,3 script Croix Camp#flag29 974,{ end; }
  465. bat_b01,336,139,3 script Croix Camp#flag30 974,{ end; }
  466. bat_b01,389,16,3 script Croix Camp#flag31 974,{ end; }
  467. bat_b01,10,294,3 script Vintenar#bat_b01_aover 419,{
  468. set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
  469. if ($@FlaviusBG1_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_b01_aover";
  488. end;
  489. }
  490. bat_b01,389,14,3 script Vintenar#bat_b01_bover 415,{
  491. set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
  492. if ($@FlaviusBG1_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_b01_bover";
  511. end;
  512. }
  513. bat_b01,1,10,3 script Release all#b01 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_b01","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#flavius01 -1,{
  537. end;
  538. OnInit:
  539. if (getbattleflag("feature.bgqueue")) {
  540. unloadnpc "Lieutenant Ator";
  541. unloadnpc "Lieutenant Thelokus";
  542. unloadnpc "back_bgroomb01a";
  543. unloadnpc "back_bgroomb01b";
  544. unloadnpc "A_CODE#bat_b01";
  545. unloadnpc "B_CODE#bat_b01";
  546. }
  547. end;
  548. }