nguild_managers.txt 5.9 KB

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