aldeg_cas01.txt 25 KB

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