aldeg_cas02.txt 25 KB

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