prtg_cas04.txt 24 KB

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