aldeg_cas04.txt 25 KB

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