prtg_cas02.txt 24 KB

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