flavius01.txt 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626
  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. if (getbattleflag("feature.bgqueue"))
  73. bg_unbook "bat_b01";
  74. mapwarp "bat_b01","bat_room",154,150;
  75. end;
  76. OnReadyCheck:
  77. if( $@FlaviusBG1 )
  78. end;
  79. if (!getbattleflag("feature.bgqueue")) {
  80. set .@Guillaume, getwaitingroomstate(0,"Lieutenant Ator");
  81. set .@Croix, getwaitingroomstate(0,"Lieutenant Thelokus");
  82. if( !.@Guillaume && !.@Croix ) {
  83. donpcevent "#bat_b01_timer::OnStop";
  84. end;
  85. }
  86. if( .@Guillaume < 10 || .@Croix < 10 )
  87. end;
  88. }
  89. set $@FlaviusBG1, 1;
  90. set $@FlaviusBG1_Victory, 0;
  91. set $@Croix_ScoreBG1, 0;
  92. set $@Guill_ScoreBG1, 0;
  93. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  94. if (!getbattleflag("feature.bgqueue")) {
  95. donpcevent "Lieutenant Ator::OnEnterBG";
  96. donpcevent "Lieutenant Thelokus::OnEnterBG";
  97. }
  98. donpcevent "OBJ#bat_b01_a::OnKill";
  99. donpcevent "OBJ#bat_b01_a::OnEnable";
  100. donpcevent "OBJ#bat_b01_b::OnKill";
  101. donpcevent "OBJ#bat_b01_b::OnEnable";
  102. donpcevent "guardian#bat_b01_a::OnKill";
  103. donpcevent "guardian#bat_b01_b::OnKill";
  104. donpcevent "guardian#bat_b01_a::OnEnable";
  105. donpcevent "guardian#bat_b01_b::OnEnable";
  106. donpcevent "cell#bat_b01_a::OnRed";
  107. donpcevent "cell#bat_b01_b::OnRed";
  108. donpcevent "time#bat_b01::OnEnable";
  109. disablenpc "Guillaume Vintenar#b01_a";
  110. disablenpc "Croix Vintenar#b01_b";
  111. disablenpc "Vintenar#bat_b01_aover";
  112. disablenpc "Vintenar#bat_b01_bover";
  113. bg_warp $@FlaviusBG1_id1,"bat_b01",87,75;
  114. bg_warp $@FlaviusBG1_id2,"bat_b01",311,224;
  115. donpcevent "countdown#bat_b01::OnEnable";
  116. initnpctimer;
  117. end;
  118. OnReset:
  119. donpcevent "OBJ#bat_b01_a::OnKill";
  120. donpcevent "OBJ#bat_b01_a::OnEnable";
  121. donpcevent "OBJ#bat_b01_b::OnKill";
  122. donpcevent "OBJ#bat_b01_b::OnEnable";
  123. donpcevent "guardian#bat_b01_a::OnKill";
  124. donpcevent "guardian#bat_b01_b::OnKill";
  125. donpcevent "guardian#bat_b01_a::OnEnable";
  126. donpcevent "guardian#bat_b01_b::OnEnable";
  127. donpcevent "cell#bat_b01_a::OnRed";
  128. donpcevent "cell#bat_b01_b::OnRed";
  129. end;
  130. OnGuillaumeActive:
  131. warp "bat_b01",87,75;
  132. end;
  133. OnCroixActive:
  134. warp "bat_b01",311,224;
  135. end;
  136. OnGuillaumeQuit:
  137. OnCroixQuit:
  138. if (getbattleflag("feature.bgqueue"))
  139. bg_desert;
  140. else
  141. bg_leave;
  142. end;
  143. OnTimer10000:
  144. stopnpctimer;
  145. donpcevent "#bat_b01_timer::OnEnable";
  146. end;
  147. }
  148. bat_b01,1,1,3 script OBJ#bat_b01_a 844,{
  149. OnEnable:
  150. $@FlavBG1_C1_ID = bg_monster($@FlaviusBG1_id1,"bat_b01",61,150,"Pink Crystal",1915,"OBJ#bat_b01_a::OnMyMobDead");
  151. setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  152. end;
  153. OnKill:
  154. killmonster "bat_b01","OBJ#bat_b01_a::OnMyMobDead";
  155. end;
  156. OnMyMobDead:
  157. if (mobcount("bat_b01","OBJ#bat_b01_a::OnMyMobDead") < 1) {
  158. mapannounce "bat_b01", "Guillaume's Crystal has been destroyed.",bc_map,"0xFFCE00";
  159. if ($@Croix_ScoreBG1 > 0) {
  160. set $@FlaviusBG1_Victory,2;
  161. set $@Croix_ScoreBG1,$@Croix_ScoreBG1+1;
  162. enablenpc "Guillaume Vintenar#b01_a";
  163. enablenpc "Croix Vintenar#b01_b";
  164. donpcevent "time#bat_b01::OnStop";
  165. if (getbattleflag("feature.bgqueue"))
  166. bg_reserve "bat_b01", true;
  167. }
  168. else {
  169. set $@Croix_ScoreBG1,1;
  170. donpcevent "time#bat_b01::OnEnable";
  171. donpcevent "start#bat_b01::OnReset";
  172. }
  173. donpcevent "#bat_b01_timer::OnStop";
  174. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  175. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  176. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  177. donpcevent "#bat_b01_timer::OnEnable";
  178. }
  179. end;
  180. }
  181. bat_b01,1,2,3 script OBJ#bat_b01_b 844,{
  182. OnEnable:
  183. $@FlavBG1_C2_ID = bg_monster($@FlaviusBG1_id2,"bat_b01",328,150,"Blue Crystal",1914,"OBJ#bat_b01_b::OnMyMobDead");
  184. setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,1; // Make Crystal immune to damage until Guardians are defeated
  185. end;
  186. OnKill:
  187. killmonster "bat_b01","OBJ#bat_b01_b::OnMyMobDead";
  188. end;
  189. OnMyMobDead:
  190. if (mobcount("bat_b01","OBJ#bat_b01_b::OnMyMobDead") < 1) {
  191. mapannounce "bat_b01", "Croix's Crystal has been destroyed.",bc_map,"0xFFCE00";
  192. if ($@Guill_ScoreBG1 > 0) {
  193. set $@FlaviusBG1_Victory,1;
  194. set $@Guill_ScoreBG1,$@Guill_ScoreBG1+1;
  195. enablenpc "Guillaume Vintenar#b01_a";
  196. enablenpc "Croix Vintenar#b01_b";
  197. donpcevent "time#bat_b01::OnStop";
  198. if (getbattleflag("feature.bgqueue"))
  199. bg_reserve "bat_b01", true;
  200. }
  201. else {
  202. set $@Guill_ScoreBG1,1;
  203. donpcevent "time#bat_b01::OnEnable";
  204. donpcevent "start#bat_b01::OnReset";
  205. }
  206. donpcevent "#bat_b01_timer::OnStop";
  207. bg_updatescore "bat_b01",$@Guill_ScoreBG1,$@Croix_ScoreBG1;
  208. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  209. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  210. donpcevent "#bat_b01_timer::OnEnable";
  211. }
  212. end;
  213. }
  214. bat_b01,1,3,3 script guardian#bat_b01_a 844,{
  215. OnEnable:
  216. bg_monster $@FlaviusBG1_id1,"bat_b01",108,159,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
  217. bg_monster $@FlaviusBG1_id1,"bat_b01",108,141,"Guillaume Camp Guardian",1949,"guardian#bat_b01_a::OnMyMobDead";
  218. end;
  219. OnKill:
  220. killmonster "bat_b01","guardian#bat_b01_a::OnMyMobDead";
  221. end;
  222. OnMyMobDead:
  223. if (mobcount("bat_b01","guardian#bat_b01_a::OnMyMobDead") < 1) {
  224. donpcevent "cell#bat_b01_a::OnGreen";
  225. mapannounce "bat_b01", "The Guardian protecting Guillaume's Crystal has been slain.",bc_map,"0xFFCE00";
  226. setunitdata $@FlavBG1_C1_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  227. }
  228. end;
  229. }
  230. bat_b01,1,3,3 script guardian#bat_b01_b 844,{
  231. OnEnable:
  232. bg_monster $@FlaviusBG1_id2,"bat_b01",307,160,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
  233. bg_monster $@FlaviusBG1_id2,"bat_b01",307,138,"Croix Camp Guardian",1949,"guardian#bat_b01_b::OnMyMobDead";
  234. end;
  235. OnKill:
  236. killmonster "bat_b01","guardian#bat_b01_b::OnMyMobDead";
  237. end;
  238. OnMyMobDead:
  239. if (mobcount("bat_b01","guardian#bat_b01_b::OnMyMobDead") < 1) {
  240. donpcevent "cell#bat_b01_b::OnGreen";
  241. mapannounce "bat_b01", "The Guardian protecting Croix's Crystal has been slain.",bc_map,"0xFFCE00";
  242. setunitdata $@FlavBG1_C2_ID,UMOB_DMGIMMUNE,0; // Make Crystal damageable again
  243. }
  244. end;
  245. }
  246. bat_b01,1,4,3 script cell#bat_b01_a 844,{
  247. OnRed:
  248. setcell "bat_b01",62,149,60,151,cell_basilica,1;
  249. setcell "bat_b01",62,149,60,151,cell_walkable,0;
  250. end;
  251. OnGreen:
  252. setcell "bat_b01",62,149,60,151,cell_basilica,0;
  253. setcell "bat_b01",62,149,60,151,cell_walkable,1;
  254. end;
  255. }
  256. bat_b01,1,5,3 script cell#bat_b01_b 844,{
  257. OnRed:
  258. setcell "bat_b01",327,151,329,149,cell_basilica,1;
  259. setcell "bat_b01",327,151,329,149,cell_walkable,0;
  260. end;
  261. OnGreen:
  262. setcell "bat_b01",327,151,329,149,cell_basilica,0;
  263. setcell "bat_b01",327,151,329,149,cell_walkable,1;
  264. end;
  265. }
  266. bat_b01,1,6,1 script time#bat_b01 844,{
  267. OnEnable:
  268. donpcevent "Battle Therapist#b01_a::OnEnable";
  269. donpcevent "Battle Therapist#b01_b::OnEnable";
  270. end;
  271. OnStop:
  272. donpcevent "Battle Therapist#b01_a::OnStop";
  273. donpcevent "Battle Therapist#b01_b::OnStop";
  274. end;
  275. }
  276. bat_b01,10,294,3 script Battle Therapist#b01_a 95,{
  277. specialeffect2 EF_HEAL;
  278. mes "[Battle Therapist]";
  279. mes "Just close your eyes,";
  280. mes "and take a deep breath.";
  281. mes "You can be free from pain.";
  282. close;
  283. OnTimer25000:
  284. specialeffect EF_SANCTUARY;
  285. // enablenpc "bat_b01_rp1_a_warp";
  286. areapercentheal "bat_b01",0,280,20,300,100,100;
  287. areawarp "bat_b01",0,280,20,300,"bat_b01",87,73;
  288. end;
  289. // OnTimer26000:
  290. // disablenpc "bat_b01_rp1_a_warp";
  291. // end;
  292. OnTimer26500:
  293. stopnpctimer;
  294. donpcevent "Battle Therapist#b01_a::OnEnable";
  295. end;
  296. OnEnable:
  297. initnpctimer;
  298. enablenpc "Battle Therapist#b01_a";
  299. end;
  300. OnStop:
  301. // disablenpc "bat_b01_rp1_a_warp";
  302. disablenpc "Battle Therapist#b01_a";
  303. stopnpctimer;
  304. end;
  305. }
  306. /*
  307. // replaced by areapercentheal and areawarp to prevent enqueue issue
  308. bat_b01,10,290,0 script bat_b01_rp1_a_warp 45,10,10,{
  309. OnInit:
  310. disablenpc "bat_b01_rp1_a_warp";
  311. end;
  312. OnTouch:
  313. percentheal 100,100;
  314. warp "bat_b01",87,73;
  315. end;
  316. }
  317. */
  318. bat_b01,389,14,3 script Battle Therapist#b01_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. // enablenpc "bat_b01_rp1_b_warp";
  328. areapercentheal "bat_b01",379,0,399,20,100,100;
  329. areawarp "bat_b01",379,0,399,20,"bat_b01",312,225;
  330. end;
  331. // OnTimer26000:
  332. // disablenpc "bat_b01_rp1_b_warp";
  333. // end;
  334. OnTimer26500:
  335. stopnpctimer;
  336. donpcevent "Battle Therapist#b01_b::OnEnable";
  337. end;
  338. OnEnable:
  339. initnpctimer;
  340. enablenpc "Battle Therapist#b01_b";
  341. end;
  342. OnStop:
  343. // disablenpc "bat_b01_rp1_b_warp";
  344. disablenpc "Battle Therapist#b01_b";
  345. stopnpctimer;
  346. end;
  347. }
  348. /*
  349. bat_b01,389,10,0 script bat_b01_rp1_b_warp 45,10,10,{
  350. OnInit:
  351. disablenpc "bat_b01_rp1_b_warp";
  352. end;
  353. OnTouch:
  354. percentheal 100,100;
  355. warp "bat_b01",312,225;
  356. end;
  357. }
  358. */
  359. bat_b01,87,76,0 script A_CODE#bat_b01 -1,5,5,{
  360. OnTouch:
  361. if (checkquest(2070) < 0)
  362. setquest 2070;
  363. end;
  364. }
  365. bat_b01,312,224,0 script B_CODE#bat_b01 -1,5,5,{
  366. OnTouch:
  367. if (checkquest(2070) < 0)
  368. setquest 2070;
  369. end;
  370. }
  371. bat_b01,10,294,3 script Guillaume Vintenar#b01_a 934,{
  372. if ($@FlaviusBG1_id1 == getcharid(4)) {
  373. if ($@FlaviusBG1_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#b01_a";
  384. end;
  385. }
  386. bat_b01,389,14,3 script Croix Vintenar#b01_b 934,{
  387. if ($@FlaviusBG1_id2 == getcharid(4)) {
  388. if ($@FlaviusBG1_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#b01_b";
  399. end;
  400. }
  401. bat_b01,1,5,3 script countdown#bat_b01 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_b01", "Guillaume Vintenar Axl Rose : Let's attack to destroy that Crystal!",bc_map,"0xFF9900";
  414. end;
  415. OnTimer8000:
  416. 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";
  417. end;
  418. OnTimer1800000:
  419. mapannounce "bat_b01", "Marollo VII : Guillaume Marollo, Croix Marollo! And their followers!",bc_map,"0x99CC00";
  420. end;
  421. OnTimer1803000:
  422. mapannounce "bat_b01", "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_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";
  426. end;
  427. OnTimer1822000:
  428. mapannounce "bat_b01", "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_b01", "Axl Rose, Swandery : Yes, sir.",bc_map,"0x99CC00";
  432. end;
  433. OnTimer1830000:
  434. donpcevent "time#bat_b01::OnStop";
  435. bg_warp $@FlaviusBG1_id1,"bat_b01",10,290;
  436. bg_warp $@FlaviusBG1_id2,"bat_b01",390,10;
  437. enablenpc "Vintenar#bat_b01_aover";
  438. enablenpc "Vintenar#bat_b01_bover";
  439. if (getbattleflag("feature.bgqueue"))
  440. bg_reserve "bat_b01", true;
  441. end;
  442. OnTimer1900000:
  443. mapwarp "bat_b01","bat_room",154,150;
  444. donpcevent "countdown#bat_b01::OnStop";
  445. end;
  446. }
  447. bat_b01,81,83,3 script Guillaume Camp#flag21 973,{ end; }
  448. bat_b01,94,83,3 script Guillaume Camp#flag22 973,{ end; }
  449. bat_b01,81,66,3 script Guillaume Camp#flag23 973,{ end; }
  450. bat_b01,94,66,3 script Guillaume Camp#flag24 973,{ end; }
  451. bat_b01,139,142,3 script Guillaume Camp#flag25 973,{ end; }
  452. bat_b01,139,158,3 script Guillaume Camp#flag26 973,{ end; }
  453. bat_b01,110,161,3 script Guillaume Camp#flag27 973,{ end; }
  454. bat_b01,110,137,3 script Guillaume Camp#flag28 973,{ end; }
  455. bat_b01,63,135,3 script Guillaume Camp#flag29 973,{ end; }
  456. bat_b01,63,165,3 script Guillaume Camp#flag30 973,{ end; }
  457. bat_b01,10,296,3 script Guillaume Camp#flag31 973,{ end; }
  458. bat_b01,306,233,3 script Croix Camp#flag21 974,{ end; }
  459. bat_b01,317,233,3 script Croix Camp#flag22 974,{ end; }
  460. bat_b01,306,216,3 script Croix Camp#flag23 974,{ end; }
  461. bat_b01,317,216,3 script Croix Camp#flag24 974,{ end; }
  462. bat_b01,257,158,3 script Croix Camp#flag25 974,{ end; }
  463. bat_b01,257,141,3 script Croix Camp#flag26 974,{ end; }
  464. bat_b01,297,164,3 script Croix Camp#flag27 974,{ end; }
  465. bat_b01,297,136,3 script Croix Camp#flag28 974,{ end; }
  466. bat_b01,336,161,3 script Croix Camp#flag29 974,{ end; }
  467. bat_b01,336,139,3 script Croix Camp#flag30 974,{ end; }
  468. bat_b01,389,16,3 script Croix Camp#flag31 974,{ end; }
  469. bat_b01,10,294,3 script Vintenar#bat_b01_aover 419,{
  470. set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
  471. if ($@FlaviusBG1_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_b01_aover";
  490. end;
  491. }
  492. bat_b01,389,14,3 script Vintenar#bat_b01_bover 415,{
  493. set .@A_B_gap,$@Guill_ScoreBG1 - $@Croix_ScoreBG1;
  494. if ($@FlaviusBG1_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_b01_bover";
  513. end;
  514. }
  515. bat_b01,1,10,3 script Release all#b01 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_b01","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#flavius01 -1,{
  539. end;
  540. OnInit:
  541. if (getbattleflag("feature.bgqueue")) {
  542. unloadnpc "Lieutenant Ator";
  543. unloadnpc "Lieutenant Thelokus";
  544. unloadnpc "back_bgroomb01a";
  545. unloadnpc "back_bgroomb01b";
  546. unloadnpc "A_CODE#bat_b01";
  547. unloadnpc "B_CODE#bat_b01";
  548. }
  549. end;
  550. }