flavius01.txt 15 KB

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