payg_cas05.txt 24 KB

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