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