gefg_cas01.txt 24 KB

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