nguild_managers.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. //===== rAthena Script =======================================
  2. //= War of Emperium Managers for N Guild Castles
  3. //===== By: ==================================================
  4. //= kobra_k88
  5. //===== Current Version: =====================================
  6. //= 1.2
  7. //===== Compatible With: =====================================
  8. //= rAthena 0.1+; RO Episode 4+
  9. //===== Description: =========================================
  10. //=
  11. //==============================================
  12. //= Break down of arguments used in the function:
  13. //= arg(0): name of Castle Manager
  14. //= arg(1): name of guild castle.
  15. //= arg(2): x1 coordinate for warp to treasure room
  16. //= arg(3): y1 coordinate for warp to treasure room
  17. //= arg(4): guild script suffix for kafra, etc.
  18. //===== Additional Comments: =================================
  19. //= 1.0 Based off existing guild scripts. Do not know if it is accurate.[kobra_k88]
  20. //= 1.1 Added modified guild manager function. [L0ne_W0lf]
  21. //= Removed guardian summoning.
  22. //= 1.2 Corrected function name. (bugreport:1728) [L0ne_W0lf]
  23. //============================================================
  24. //==============================================
  25. function script F_GldManager {
  26. set @GID, GetCastleData(getarg(1),1);
  27. mes "[ "+getarg(0)+" ]";
  28. if (@GID == 0){
  29. mes "I am waiting for my master. Brave adventurer, follow your destiny!";
  30. return;
  31. }
  32. if (getcharid(2) != @GID){
  33. mes "I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command! Hey! Your not even a part of the guild!!";
  34. mes "Where are the guardians? Destroy these intruders!";
  35. return;
  36. }
  37. if (strcharinfo(0) != getguildmaster(@GID)){
  38. mes "You're not ^5533FF" + getguildmaster(@GID) + "^000000! I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command only";
  39. return 0;
  40. }
  41. mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
  42. next;
  43. menu "Kafra Staff Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Cancel",M_End;
  44. //===========================
  45. M_Kaf:
  46. //======
  47. mes "[ "+getarg(0)+" ]";
  48. if (GetCastleData(getarg(1),9) == 1) goto L_Dismiss;
  49. if (getgdskilllv(@GID,10001) == 0){
  50. mes "Master, you don't have a contract with the Kafra Staff Company.";
  51. mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000.";
  52. return;
  53. }
  54. L_Hire:
  55. mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
  56. next;
  57. menu "Employ Kafra.",-,"Cancel",sM_KafEnd;
  58. mes "[ "+getarg(0)+" ]";
  59. if (Zeny < 10000){
  60. mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
  61. return;
  62. }
  63. set Zeny,Zeny-10000;
  64. enablenpc "Kafra Staff#"+getarg(4);
  65. SetCastleData getarg(1),9,1;
  66. mes "You have created a contract with the Kafra Staff Company.";
  67. next;
  68. cutin "kafra_01",2;
  69. mes "[ Kafra Staff ]";
  70. mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
  71. next;
  72. cutin "kafra_01",255;
  73. mes "[ "+getarg(0)+" ]";
  74. //mes "Your employment contract lasts ^5533FF1 month^000000. After this term is over you will have to create a new contract.";
  75. mes "I think the Kafra Staff will benefit our guild members.";
  76. return;
  77. sM_KafEnd:
  78. mes "[ "+getarg(0)+" ]";
  79. mes "As you wish Master. But I suggest we get a Kafra as soon as possible!";
  80. return;
  81. L_Dismiss:
  82. mes "Would you like to dismiss the current Kafra?";
  83. next;
  84. menu "Dismissal",-,"Cancel",sM_KafEnd2;
  85. cutin "kafra_01",2;
  86. mes "[ Kafra Staff ]";
  87. mes "Have I done anything wrong? If I did, will you please forgive me?";
  88. next;
  89. menu "Dismiss",-,"Cancel",ssM_KafEnd2;
  90. mes "[ Kafra Staff ]";
  91. mes "It's unfortunate that I won't be able to serve your guild anymore....";
  92. next;
  93. disablenpc "Kafra Staff#"+getarg(4);
  94. SetCastleData getarg(1),9,0;
  95. cutin "kafra_01",255;
  96. mes "[ "+getarg(0)+" ]";
  97. mes "The Kafra has been dismissed. But... we should really get a Kafra as soon as possible!";
  98. return;
  99. ssM_KafEnd2:
  100. mes "[ Kafra Staff ]";
  101. mes "Thank you master, I'll do my best! ^^.";
  102. cutin "kafra_01",255;
  103. return;
  104. sM_KafEnd2:
  105. mes "[ "+getarg(0)+" ]";
  106. mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us";
  107. return;
  108. //=========================
  109. M_Treas:
  110. //========
  111. mes "[ "+getarg(0)+" ]";
  112. mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
  113. next;
  114. menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;
  115. mes "[ "+getarg(0)+" ]";
  116. mes "Please follow me through the secret passage way.";
  117. mes "You must pull down on the secret switch in order to get out.";
  118. next;
  119. warp getarg(1),getarg(2),getarg(3);
  120. return;
  121. sM_TresEnd:
  122. mes "[ "+getarg(0)+" ]";
  123. mes "The goods are produced everyday.";
  124. mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
  125. return;
  126. //==========================
  127. M_End:
  128. //=======
  129. mes "[ "+getarg(0)+" ]";
  130. mes "As you wish, master.";
  131. return;
  132. }
  133. // Castle 1 ==================================================================================
  134. nguild_alde,218,175,0 script Frolo 55,{
  135. callfunc "F_GldManager","Frolo","nguild_alde",119,223,"N01";
  136. close;
  137. }
  138. // Castle 2 ==================================================================================
  139. nguild_gef,40,48,5 script Leiber 55,{
  140. callfunc "F_GldManager","Leiber","nguild_gef",155,112,"N02";
  141. close;
  142. }
  143. // Castle 3 ==================================================================================
  144. nguild_pay,120,58,4 script Dundar 55,{
  145. callfunc "F_GldManager","Dundar","nguild_pay",290,7,"N03";
  146. close;
  147. }
  148. // Castle 4 ==================================================================================
  149. nguild_prt,112,181,0 script Thefton 55,{
  150. callfunc "F_GldManager","Thefton","nguild_prt",15,209,"N04";
  151. close;
  152. }