aldeg_cas05.txt 25 KB

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