gefg_cas03.txt 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. //===== eAthena Script =======================================
  2. //= War of Emperium - gefg_cas03 script
  3. //===== By: ==================================================
  4. //= jAthena - kalen (1.0)
  5. //===== Current Version: =====================================
  6. //= 1.1
  7. //===== Compatible With: =====================================
  8. //= eAthena 0.1+; RO Episode 4+
  9. //===== Description: =========================================
  10. //= Guild Flags, Kafra and Guild Manager scripts in gefg_cas03
  11. //===== Additional Comments: =================================
  12. //= 1.1 by Akaru, ho|yAnge|X, and Valaris
  13. //============================================================
  14. gefg_cas03.gat,122,220,6 script Isinlife#g3-8::IsinlifeNW 722,{
  15. set @GIDg3,GetCastleData("gefg_cas03.gat",1);
  16. if (@GIDg3 != 0) goto LStartg;
  17. mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
  18. mes " ";
  19. mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
  20. mes " this guild base has not been taken by any guild yet";
  21. mes " ";
  22. mes "2. In order to take this guild base, you must defeat all the guardians";
  23. mes " that are protecting the guild base and eliminate the Emperium";
  24. close;
  25. LStartg:
  26. mes "[ Edict of the Divine Rune Midgard Kingdom of Geffen ]";
  27. mes " ";
  28. mes "1. Honoring the ordinance of the Divine Rune Midgard Kingdom of Geffen,";
  29. mes " we approve that this base is in the private possession of ^ff0000" + GetGuildName(@GIDg3) + "^000000 guild";
  30. mes " ";
  31. mes "2. The guild master of ^ff0000" + GetGuildName(@GIDg3) + "^000000 is";
  32. mes " ^ff0000" + GetGuildMaster(@GIDg3) + "^000000. If anyone who objects to that,";
  33. mes " raise your sword to honor yourself.";
  34. close;
  35. OnRecvCastleG03:
  36. FlagEmblem GetCastleData("gefg_cas03.gat",1);
  37. break;
  38. }
  39. gefg_cas03.gat,122,229,6 duplicate(IsinlifeNW) Isinlife#g3-8 722
  40. gefg_cas03.gat,91,257,7 duplicate(IsinlifeNW) Isinlife#g3-9 722
  41. gefg_cas03.gat,52,276,7 duplicate(IsinlifeNW) Isinlife#g3-10 722
  42. gefg_cas03.gat,56,164,4 duplicate(IsinlifeNW) Isinlife#g3-11 722
  43. gefg_cas03.gat,65,164,4 duplicate(IsinlifeNW) Isinlife#g3-12 722
  44. gefg_cas03.gat,37,214,1 duplicate(IsinlifeNW) Isinlife#g3-13 722
  45. gefg_cas03.gat,34,208,1 duplicate(IsinlifeNW) Isinlife#g3-14 722
  46. //================================================
  47. // Kafra Service
  48. //================================================
  49. gefg_cas03.gat,116,89,5 script Kafra Service#gef3 117,{
  50. cutin "kafra_01",2;
  51. set @GIDg3,GetCastleData("gefg_cas03.gat",1);
  52. if (getcharid(2) == @GIDg3) goto LStartg;
  53. mes "[Kafra Service]";
  54. mes "I am here to serve only ^ff0000" + GetGuildName(@GIDg3) + "^000000 members. Please use different Kafra Service. Thank you.";
  55. goto L_EXIT;
  56. LStartg:
  57. mes "[Kafra Service]";
  58. mes "Welcome, ^ff0000" + GetGuildName(@GIDg3) + "^000000 members";
  59. mes "We will stay with you wherever you go";
  60. next;
  61. menu "Open Storage",L2,"Teleport Service",L3,"Use Cart Service",L4,"Cancel",L7;
  62. //================================================
  63. // Storage
  64. //================================================
  65. L2:
  66. if(getskilllv(1) < 6) goto Lerror2_1;
  67. openstorage;
  68. goto L_EXIT;
  69. Lerror2_1:
  70. mes "[Kafra Service]";
  71. mes "You must have lvl 6 or higher novice skill.";
  72. goto L_EXIT;
  73. //================================================
  74. // Teleport Service
  75. //================================================
  76. L3:
  77. mes "[Kafra Service]";
  78. mes "Please confirm your destination.";
  79. next;
  80. menu "Geffen -> 200 z",L3_1,"Cancel",L3_2;
  81. L3_1:
  82. if (Zeny < 200) goto Lerror3;
  83. set Zeny,Zeny-200;
  84. warp "geffen.gat",120,39;
  85. break;
  86. L3_2:
  87. mes "[Kafra Service]";
  88. mes "Kafra Service always trying to offer best service for you.";
  89. mes "Thank you for using our service.";
  90. goto L_EXIT;
  91. Lerror3:
  92. mes "[Kafra Service]";
  93. mes "Sorry, you don't have enough Zeny to use the teleport service.";
  94. goto L_EXIT;
  95. //================================================
  96. // Cart Rental
  97. //================================================
  98. L4:
  99. if (!((Class == 5) || (Class == 10) || (Class == 18) || (Class == 4006) || (Class == 4011) || (Class == 4019))) goto Lerror4_1;
  100. if (checkcart(0) == 1) goto Lerror4_3;
  101. mes "[Kafra Service]";
  102. mes "The cart rental fee is 800 Zeny.";
  103. mes "Would you like to rent a cart?";
  104. next;
  105. menu "Rent a Cart",L4_1,"Cancel",-;
  106. mes "[Kafra Service]";
  107. mes "We always try to serve you better.";
  108. mes "Thank you for using our service.";
  109. goto L_EXIT;
  110. L4_1:
  111. If(getskilllv(39) == 0) goto Lerror4_4;
  112. if (Zeny < 800) goto Lerror4_2;
  113. set Zeny,Zeny-800;
  114. setcart;
  115. goto L_EXIT;
  116. //Not a merchant class
  117. Lerror4_1:
  118. mes "[Kafra Service]";
  119. mes "Sorry, the cart rental service is only for the merchant class.";
  120. goto L_EXIT;
  121. //Not enough zenny
  122. Lerror4_2:
  123. mes "[Kafra Service]";
  124. mes "Sorry, you don't have enough zeny. You need 800 Zeny.";
  125. goto L_EXIT;
  126. //Already have cart
  127. Lerror4_3:
  128. mes "[Kafra Service]";
  129. mes "Sorry, you already have a cart now.";
  130. mes "Return when you dont have one and are in need of our service.";
  131. goto L_EXIT;
  132. //No Pushcart Skill
  133. Lerror4_4:
  134. mes "[Kafra Service]";
  135. mes "Sorry, you need to learn the skill [Pushcart] first";
  136. goto L_EXIT;
  137. //================================================
  138. // Cancel
  139. //================================================
  140. L7:
  141. mes "[Kafra Service]";
  142. mes "We will always try to serve you better.";
  143. mes "Thank you for using our service.";
  144. goto L_EXIT;
  145. L_EXIT:
  146. cutin "kafra_01",255;
  147. close;
  148. OnInit:
  149. if (GetCastleData("gefg_cas03.gat",9) == 1) break;
  150. disablenpc "Kafra Service#gef3";
  151. break;
  152. }
  153. //================================================
  154. // Guild Dungeon Switch
  155. //================================================
  156. gefg_cas03.gat,221,43,0 script Switch 111,{
  157. mes "[ Vibration of Man's Voice ]";
  158. mes " ' Only brave man get to lead the guild base.. '";
  159. next;
  160. mes " ";
  161. mes "There is little switch over here";
  162. mes "Would you like to pull the switch down?";
  163. next;
  164. menu "Yes",-,"No",L2;
  165. set @GIDg3,GetCastleData("gefg_cas03.gat",1);
  166. if (getcharid(2) != @GIDg3) goto L1n;
  167. warp "gld_dun04.gat",268,251;
  168. break;
  169. L1n:
  170. mes "[ Vibration of Man's Voice ]";
  171. mes " ' ... ' ";
  172. L2:
  173. close;
  174. }
  175. //================================================
  176. // Guild Castle Manager
  177. //================================================
  178. gefg_cas03.gat,106,23,5 script Jyang 55,{
  179. set @GIDg3,GetCastleData("gefg_cas03.gat",1);
  180. if (@GIDg3 == 0) goto LStart;
  181. if (getcharid(2) != @GIDg3) goto LStart2;
  182. if (strcharinfo(0) == getguildmaster(@GIDg3)) goto LStart3;
  183. goto LStart1;
  184. //================================================
  185. // Guild Members
  186. //================================================
  187. LStart1:
  188. mes "[ Jyang ]";
  189. mes "You're not ^ff0000" + getguildmaster(@GIDg3) + "^000000 ! I am here to follow ^ff0000" + getguildmaster(@GIDg3) + "^000000 's command only";
  190. close;
  191. //================================================
  192. // Castle not owned
  193. //================================================
  194. LStart:
  195. mes "[ Jyang ]";
  196. mes "I am waiting for my master.";
  197. mes "Brave Player! Follow your destiny!";
  198. close;
  199. //================================================
  200. // Non-Guild Members
  201. //================================================
  202. LStart2:
  203. mes "[ Jyang ]";
  204. mes "I am here to follow ^ff0000" + getguildmaster(@GIDg3) + "^000000 's command! Where are the guardians? Destroy these bastards!";
  205. close;
  206. //================================================
  207. // Guild Leader
  208. //================================================
  209. LStart3:
  210. mes "[ Jyang ]";
  211. mes "Welcome Master ^ff0000" + getguildmaster(@GIDg3) + "^000000 !";
  212. mes "I'll do anything you tell me to do sir!.";
  213. next;
  214. menu "Guild Base Briefing",L1,"Commerce Investment",L2,"Defence Investment",L3,"Guardian Installation",L4,"Kafra Service Employment / Dismissal",L5,"Enter Master's Room",L6,"Empty Guild Base",L7;
  215. //-----------------------------------------------------------
  216. //================================================
  217. // Guild Base Briefing
  218. //================================================
  219. L1:
  220. mes "[ Jyang ]";
  221. mes "Guild Base Investment Information.";
  222. mes " ";
  223. mes "Current Commerce Investment is : " + GetCastleData("gefg_cas03.gat",2) + " points.";
  224. mes "^0000ff - You have invested " + GetCastleData("gefg_cas03.gat",4) + "times today.^000000";
  225. mes " ";
  226. mes "Current Defence Investment is : " + GetCastleData("gefg_cas03.gat",3) + "points.";
  227. mes "^0000ff- You have invested" + GetCastleData("gefg_cas03.gat",5) + "times today.^000000";
  228. mes " ";
  229. mes "That is about it.";
  230. close;
  231. //================================================
  232. // Commerce Investment
  233. //================================================
  234. L2:
  235. set @TriggerE,GetCastleData("gefg_cas03.gat",4);
  236. set @Economy,GetCastleData("gefg_cas03.gat",2);
  237. if(@Economy < 8) set $eco_invest,10000;
  238. if(@Economy >= 8) set $eco_invest,20000;
  239. if(@Economy >= 16) set $eco_invest,40000;
  240. if(@Economy >= 25) set $eco_invest,80000;
  241. if(@Economy >= 34) set $eco_invest,160000;
  242. if(@Economy >= 44) set $eco_invest,320000;
  243. if(@Economy >= 54) set $eco_invest,640000;
  244. if(@Economy >= 65) set $eco_invest,1280000;
  245. if(@Economy >= 76) set $eco_invest,2560000;
  246. if(@Economy >= 88) set $eco_invest,5120000;
  247. if(@TriggerE == 0) goto L2_1;
  248. if(@TriggerE == 1) goto L2_1_2;
  249. if(@Economy >= 100) goto L2_2;
  250. mes "[ Jyang ]";
  251. mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
  252. mes " ";
  253. mes "You can invest up to two times a day, but the second time costs more";
  254. mes " ";
  255. mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
  256. close;
  257. L2_1:
  258. if(@TriggerE == 1) goto L2_1_2;
  259. mes "[ Jyang ]";
  260. mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
  261. mes " ";
  262. mes "You can invest up to two times a day, but the second time costs more";
  263. mes " ";
  264. mes "The needed investment amount is ^ff0000" + $eco_invest + "^000000 zeny. Would you like to invest?";
  265. next;
  266. menu "Invest Commerce.",L2_1_1,"Cancel.",-;
  267. mes "[ Jyang ]";
  268. mes "As you wish, master.";
  269. close;
  270. L2_1_1:
  271. if(Zeny < $eco_invest) goto L2_error;
  272. set Zeny,Zeny-$eco_invest;
  273. SetCastleData "gefg_cas03.gat",4,@TriggerE+1;
  274. SetCastleData "gefg_cas03.gat",2,@Economy+1;
  275. mes "[ Jyang ]";
  276. mes "You have invested successfully.";
  277. close;
  278. L2_1_2:
  279. set $eco_invest,$eco_invest*4;
  280. mes "[ Jyang ]";
  281. mes "If you improve your Commerce Investment, the guild's productive power increases to produce more goods. So an investment will be required if you consider the future";
  282. mes " ";
  283. mes "You can invest up to two times a day, but the second time costs more";
  284. mes " ";
  285. mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
  286. next;
  287. menu "Invest Commerce.",L2_1_3,"Cancel.",-;
  288. mes "[ Jyang ]";
  289. mes "As you wish, master.";
  290. close;
  291. L2_1_3:
  292. if(Zeny < $eco_invest) goto L2_error;
  293. set Zeny,Zeny-$eco_invest;
  294. SetCastleData "gefg_cas03.gat",4,@TriggerE+1;
  295. SetCastleData "gefg_cas03.gat",2,@Economy+1;
  296. mes "[ Jyang ]";
  297. mes "You have invested successfully";
  298. close;
  299. L2_2:
  300. mes "[ Jyang ]";
  301. mes " ";
  302. mes "^ff0000This Castle's commerce investment is already maxed at 100 points. You don't have to invest any further.^000000";
  303. close;
  304. L2_error:
  305. mes "[ Jyang ]";
  306. mes "Master, you do not have enough money to invest. Investment has been cancelled.";
  307. close;
  308. //================================================
  309. // Defence Investment
  310. //================================================
  311. L3:
  312. set @TriggerD,GetCastleData("gefg_cas03.gat",5);
  313. set @Defence,GetCastleData("gefg_cas03.gat",3);
  314. if(@Defence < 8) set $def_invest,20000;
  315. if(@Defence >= 8) set $def_invest,40000;
  316. if(@Defence >= 16) set $def_invest,80000;
  317. if(@Defence >= 25) set $def_invest,160000;
  318. if(@Defence >= 34) set $def_invest,320000;
  319. if(@Defence >= 44) set $def_invest,640000;
  320. if(@Defence >= 54) set $def_invest,1280000;
  321. if(@Defence >= 65) set $def_invest,2560000;
  322. if(@Defence >= 76) set $def_invest,5120000;
  323. if(@Defence >= 88) set $def_invest,10240000;
  324. if(@TriggerD == 0) goto L3_1;
  325. if(@TriggerD == 1) goto L3_1_2;
  326. if(@Defence >= 100) goto L3_2;
  327. mes "[ Jyang ]";
  328. mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
  329. mes " ";
  330. mes "You can invest up to two times a day, but the second time costs more";
  331. mes " ";
  332. mes "^ff0000You have already invested twice today, and that's the limit.^000000 I'm expecting to see our riches grow at a high level.";
  333. close;
  334. L3_1:
  335. if(@TriggerD == 1) goto L3_1_2;
  336. mes "[ Jyang ]";
  337. mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
  338. mes " ";
  339. mes "You can invest up to two times a day, but the second time costs more";
  340. mes " ";
  341. mes "The needed investment amount is ^ff0000" + $def_invest + "^000000 zeny. Would you like to invest?";
  342. next;
  343. menu "Invest Defence.",L3_1_1,"Cancel",-;
  344. mes "[ Jyang ]";
  345. mes "As you wish, master.";
  346. close;
  347. L3_1_1:
  348. if(Zeny < $def_invest) goto L3_error;
  349. set Zeny,Zeny-$def_invest;
  350. SetCastleData "gefg_cas03.gat",5,@TriggerD+1;
  351. SetCastleData "gefg_cas03.gat",3,@Defence+1;
  352. mes "[ Jyang ]";
  353. mes "You have invested successfully.";
  354. close;
  355. L3_1_2:
  356. set $def_invest,$def_invest*4;
  357. mes "[ Jyang ]";
  358. mes "If you improve investment of defence, the durability of our guardians and the emperium will increase. So if you consider our future battles, an investment will be required.";
  359. mes " ";
  360. mes "You can invest up to two times a day, but the second time costs more";
  361. mes " ";
  362. mes "You've already invested once today, but you can invest again at ^ff0000" + $eco_invest + "^000000 Zeny. Would you like to invest again?";
  363. next;
  364. menu "Invest Defence.",L3_1_3,"Cancel",-;
  365. mes "[ Jyang ]";
  366. mes "As you wish, master.";
  367. close;
  368. L3_1_3:
  369. if(Zeny < $def_invest) goto L3_error;
  370. set Zeny,Zeny-$def_invest;
  371. SetCastleData "gefg_cas03.gat",5,@TriggerD+1;
  372. SetCastleData "gefg_cas03.gat",3,@Defence+1;
  373. mes "[ Jyang ]";
  374. mes "You have invested successfully.";
  375. close;
  376. L3_2:
  377. mes "[ Jyang ]";
  378. mes " ";
  379. mes "^ff0000This Castle's Defence Investment is already maxed at 100 points. You don't have to invest any further.^000000";
  380. close;
  381. L3_error:
  382. mes "[ Jyang ]";
  383. mes "Master, you do not have enough money to invest, investment has been cancelled.";
  384. close;
  385. //================================================
  386. // Guardian Installation
  387. //================================================
  388. L4:
  389. If(getskilllv(10002) == 0) goto L4Error;
  390. set @Defence,GetCastleData("gefg_cas03.gat",3);
  391. set @Guardian0,guardianinfo(0);
  392. set @Guardian1,guardianinfo(1);
  393. set @Guardian2,guardianinfo(2);
  394. set @Guardian3,guardianinfo(3);
  395. set @Guardian4,guardianinfo(4);
  396. set @Guardian5,guardianinfo(5);
  397. set @Guardian6,guardianinfo(6);
  398. set @Guardian7,guardianinfo(7);
  399. set @SGuardian,strmobinfo(4,1287)+2000*@Defence;
  400. set @AGuardian,strmobinfo(4,1286)+2000*@Defence;
  401. set @KGuardian,strmobinfo(4,1285)+2000*@Defence;
  402. mes "[ Jyang ]";
  403. mes "Would you like to install a guardian? Guardian will protect guild base from enemies.";
  404. mes "Please choose guardian.";
  405. next;
  406. menu "Soldier Guardian (" + @Guardian0 + "/" + @SGuardian + ")",L4_1,
  407. "Soldier Guardian (" + @Guardian1 + "/" + @SGuardian + ")",L4_2,
  408. "Soldier Guardian (" + @Guardian2 + "/" + @SGuardian + ")",L4_3,
  409. "Archer Guardian (" + @Guardian3 + "/" + @AGuardian + ")",L4_4,
  410. "Archer Guardian (" + @Guardian4 +"/" + @AGuardian + ")",L4_5,
  411. "Knight Guardian (" + @Guardian5 +"/" + @KGuardian + ")",L4_6,
  412. "Knight Guardian (" + @Guardian6 + "/" + @KGuardian + ")",L4_7,
  413. "Knight Guardian (" + @Guardian7 + "/" + @KGuardian + ")",L4_8;
  414. L4_1:
  415. if (GetCastleData("gefg_cas03.gat",10) == 1) goto L4Error2;
  416. set @GDnum,10;
  417. set @GDnum2,18;
  418. set @GuardianHP,@SGuardian;
  419. goto L4_9;
  420. L4_2:
  421. if (GetCastleData("gefg_cas03.gat",11) == 1) goto L4Error2;
  422. set @GDnum,11;
  423. set @GDnum2,19;
  424. set @GuardianHP,@SGuardian;
  425. goto L4_9;
  426. L4_3:
  427. if (GetCastleData("gefg_cas03.gat",12) == 1) goto L4Error2;
  428. set @GDnum,12;
  429. set @GDnum2,20;
  430. set @GuardianHP,@SGuardian;
  431. goto L4_9;
  432. L4_4:
  433. if (GetCastleData("gefg_cas03.gat",13) == 1) goto L4Error2;
  434. set @GDnum,13;
  435. set @GDnum2,21;
  436. set @GuardianHP,@AGuardian;
  437. goto L4_9;
  438. L4_5:
  439. if (GetCastleData("gefg_cas03.gat",14) == 1) goto L4Error2;
  440. set @GDnum,14;
  441. set @GDnum2,22;
  442. set @GuardianHP,@AGuardian;
  443. goto L4_9;
  444. L4_6:
  445. if (GetCastleData("gefg_cas03.gat",15) == 1) goto L4Error2;
  446. set @GDnum,15;
  447. set @GDnum2,23;
  448. set @GuardianHP,@KGuardian;
  449. goto L4_9;
  450. L4_7:
  451. if (GetCastleData("gefg_cas03.gat",16) == 1) goto L4Error2;
  452. set @GDnum,16;
  453. set @GDnum2,24;
  454. set @GuardianHP,@KGuardian;
  455. goto L4_9;
  456. L4_8:
  457. if (GetCastleData("gefg_cas03.gat",17) == 1) goto L4Error2;
  458. set @GDnum,17;
  459. set @GDnum2,25;
  460. set @GuardianHP,@KGuardian;
  461. goto L4_9;
  462. L4_9:
  463. mes "[ Jyang ]";
  464. mes "Would you really like to install guardian? You need 10,000 zeny to install.";
  465. next;
  466. menu "Install",L4_9_1,"Cancel",-;
  467. mes "[ Jyang ]";
  468. mes "I'll follow your order sir, but it is worth to have a guardian soon or later.";
  469. close;
  470. L4_9_1:
  471. if (Zeny < 10000) goto L4Error3;
  472. set Zeny,Zeny-10000;
  473. SetCastleData "gefg_cas03.gat",@GDnum,1;
  474. SetCastleData "gefg_cas03.gat",@GDnum2,@GuardianHP;
  475. if(@GDnum==10) guardian "gefg_cas03.gat",101,53,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",0;
  476. if(@GDnum==11) guardian "gefg_cas03.gat",158,40,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",1;
  477. if(@GDnum==12) guardian "gefg_cas03.gat",158,67,"Soldier Guardian",1287,1,"Guardian_B03::OnGuardianDied",2;
  478. if(@GDnum==13) guardian "gefg_cas03.gat",229,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",3;
  479. if(@GDnum==14) guardian "gefg_cas03.gat",248,53,"Archer Guardian",1285,1,"Guardian_B03::OnGuardianDied",4;
  480. if(@GDnum==15) guardian "gefg_cas03.gat",122,53,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",5;
  481. if(@GDnum==16) guardian "gefg_cas03.gat",243,35,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",6;
  482. if(@GDnum==17) guardian "gefg_cas03.gat",234,33,"Knight Guardian",1286,1,"Guardian_B03::OnGuardianDied",7;
  483. mes "[ Jyang ]";
  484. mes "Guardian has been installed, guardian will protect our guild base against enemies.";
  485. close;
  486. L4Error:
  487. mes "[ Jyang ]";
  488. mes "Master, you cannot install guardians because the guild had not learnt the ^ff0000Guardian Research^000000 skill. Guardian Installation has been cancelled.";
  489. close;
  490. L4Error2:
  491. mes "[ Jyang ]";
  492. mes "Master, that guardian has already been installed..";
  493. close;
  494. L4Error3:
  495. mes "[ Jyang ]";
  496. mes "Master, you do not have enough money to invest, investment has been cancelled.";
  497. close;
  498. //================================================
  499. // Kafra Employment
  500. //================================================
  501. L5:
  502. if (GetCastleData("gefg_cas03.gat",9) == 1) goto Lkafra_dimi;
  503. //================================================
  504. //(When Kafra is off) Employment
  505. //================================================
  506. If(getskilllv(10001) == 0) goto L_k_a;
  507. mes "[ Jyang ]";
  508. mes "Would you like to employ the services of a Kafra Service?";
  509. mes "^ff0000 You need 10,000 Zeny to employ... ";
  510. next;
  511. menu "Employ Kafra.",L_k_0,"Cancel",L_k_E;
  512. L_k_a:
  513. mes "[ Jyang ]";
  514. mes "Master, you don't have a contract with the Kafra Service Company. In order to hire, a kafra, it is important to be contracted with the Kafra Service by having Guild Skill ^ff0000Contract With Kafra^000000. Employment has been cancelled .";
  515. close;
  516. L_k_0:
  517. if (Zeny > 10000) goto L_k_1;
  518. mes "[ Jyang ]";
  519. mes "Master, you do not have enough money to employ Kafra. Employment has been cancelled.";
  520. close;
  521. L_k_1:
  522. set Zeny,Zeny-10000;
  523. enablenpc "Kafra Service#gef3";
  524. SetCastleData "gefg_cas03.gat",9,1;
  525. mes "[ Jyang ]";
  526. mes "You have been contracted with Kafra Service Company.";
  527. next;
  528. cutin "kafra_01",2;
  529. mes "[ Kafra Service ]";
  530. mes "How do you do? I came here to follow your orders!.";
  531. mes "I'll do the best I can to serve you better.";
  532. next;
  533. cutin "kafra_01",255;
  534. mes "[ Jyang ]";
  535. mes "Your employment contract lasts one month.";
  536. mes "After this term, you'll have to pay again.";
  537. mes "I think the Kafra Service will benefit our guild members.";
  538. close;
  539. L_k_e:
  540. mes "[ Jyang ]";
  541. mes "Yes, Master. But we should really get a Kafra as soon as possible!";
  542. close;
  543. //=========================
  544. //(When Kafra is on) Dismissal
  545. //=========================
  546. Lkafra_dimi:
  547. mes "[ Jyang ]";
  548. mes "Would you like to dismiss the current Kafra Service?";
  549. next;
  550. menu "Dismissal",-,"Cancel",L_D_1;
  551. cutin "kafra_01",2;
  552. mes "[ Kafra Service ]";
  553. mes "Have I did anything wrong? If yes, would you please forgive me?";
  554. next;
  555. menu "Dismiss",-,"Cancel",L_D_2;
  556. mes "[ Kafra Service ]";
  557. mes "It's such unfortunate that I'm unable to serve master anymore";
  558. next;
  559. disablenpc "Kafra Service#gef3";
  560. SetCastleData "gefg_cas03.gat",9,0;
  561. cutin "kafra_01",255;
  562. mes "[ Jyang ]";
  563. mes "The Kafra Service had been dismissed";
  564. mes "But... we should really get a Kafra as soon as possible!";
  565. close;
  566. L_D_2:
  567. mes "[ Kafra Service ]";
  568. mes "Thank you master, I'll do my best! ^^.";
  569. cutin "kafra_01",255;
  570. close;
  571. L_D_1:
  572. mes "[ Jyang ]";
  573. mes "Master, I think you should keep the current Kafra Service because she is already trying her best to serve us";
  574. close;
  575. L5_1:
  576. //================================================
  577. // Guild Treasure Room
  578. //================================================
  579. L6:
  580. mes "[ Jyang ]";
  581. mes "Would you like to get into our treasure room?";
  582. mes "That place is only for guild master, which means you are the only one who has access to enter.";
  583. next;
  584. menu "Enter Master's room.",-,"Cancel",L6_1;
  585. mes "[ Jyang ]";
  586. mes "Please follow me through the secret way.";
  587. mes "You must push down the secret switch in order to get out.";
  588. next;
  589. warp "gefg_cas03",270,290;
  590. L6_1:
  591. mes "[ Jyang ]";
  592. mes "The goods are produced everyday.";
  593. mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
  594. close;
  595. //================================================
  596. // Surrender Castle
  597. //================================================
  598. L7:
  599. mes "[ Jyang ]";
  600. mes "Master..";
  601. mes "Do you really want to give up this guild base?";
  602. mes "It is not worth it to give up this guild base, master!!!";
  603. mes "Please reconsider, master!!";
  604. next;
  605. menu "Empty Guild Base",L7_1,"Cancel",L7_2;
  606. L7_1:
  607. mes "[ Jyang ]";
  608. mes "Master, please reconsider...!!";
  609. next;
  610. menu "Cancel",L7_2,"Empty Guild Base",-;
  611. mes "[ Jyang ]";
  612. mes "Master!!.....";
  613. mes "Oh well..";
  614. next;
  615. SetCastleData "gefg_cas03.gat",1,0;
  616. SetCastleData "gefg_cas03.gat",2,0;
  617. SetCastleData "gefg_cas03.gat",3,0;
  618. SetCastleData "gefg_cas03.gat",4,0;
  619. SetCastleData "gefg_cas03.gat",5,0;
  620. SetCastleData "gefg_cas03.gat",6,0;
  621. SetCastleData "gefg_cas03.gat",7,0;
  622. SetCastleData "gefg_cas03.gat",8,0;
  623. SetCastleData "gefg_cas03.gat",9,0;
  624. SetCastleData "gefg_cas03.gat",10,0;
  625. SetCastleData "gefg_cas03.gat",11,0;
  626. SetCastleData "gefg_cas03.gat",12,0;
  627. SetCastleData "gefg_cas03.gat",13,0;
  628. SetCastleData "gefg_cas03.gat",14,0;
  629. SetCastleData "gefg_cas03.gat",15,0;
  630. SetCastleData "gefg_cas03.gat",16,0;
  631. SetCastleData "gefg_cas03.gat",17,0;
  632. SetCastleData "gefg_cas03.gat",18,0;
  633. SetCastleData "gefg_cas03.gat",19,0;
  634. SetCastleData "gefg_cas03.gat",20,0;
  635. SetCastleData "gefg_cas03.gat",21,0;
  636. SetCastleData "gefg_cas03.gat",22,0;
  637. SetCastleData "gefg_cas03.gat",23,0;
  638. SetCastleData "gefg_cas03.gat",24,0;
  639. SetCastleData "gefg_cas03.gat",25,0;
  640. Announce "[" + GetGuildName(@GIDg3) + "] has surrendered Agit [" + GetCastleName("gefg_cas03.gat") + "]",0;
  641. MapRespawnGuildID "gefg_cas03.gat",GetCastleData("gefg_cas03.gat",1),7;
  642. break;
  643. L7_2:
  644. mes "[ Jyang ]";
  645. mes "I knew it master!!";
  646. mes "Please, don't freak me out like that again.";
  647. close;
  648. }