summaryrefslogtreecommitdiff
path: root/npc/events/nguild/nguild_managers.txt
blob: 8fe345e3d2bab0f6b0364e05b5afefbdb11fe4c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
//===== eAthena Script =======================================
//= War of Emperium Managers for N Guild Castles
//===== By: ==================================================
//= kobra_k88
//===== Current Version: =====================================
//= 1.1
//===== Compatible With: =====================================
//= eAthena 0.1+; RO Episode 4+
//===== Description: =========================================
//=
//==============================================
//= Break down of arguments used in the function:
//=   arg(0): name of Castle Manager
//=   arg(1): name of guild castle.
//=   arg(2): x1 coordinate for warp to treasure room
//=   arg(3): y1 coordinate for warp to treasure room
//=   arg(4): guild script suffix for kafra, etc.
//===== Additional Comments: =================================
//= 1.0 Based off existing guild scripts.  Do not know if it is accurate.[kobra_k88]
//= 1.1 Added modified guild manager function. [L0ne_W0lf]
//= 	Removed guardian summoning.
//============================================================

//==============================================
function	script	F_GldManagerN	{

	set @GID, GetCastleData(getarg(1),1);
	mes "[ "+getarg(0)+" ]";
	if (@GID == 0){
		mes "I am waiting for my master.  Brave adventurer, follow your destiny!";
		return;
	}
	if (getcharid(2) != @GID){
		mes "I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command! Hey! Your not even a part of the guild!!";
		mes "Where are the guardians? Destroy these intruders!";
		return;
	}
	if (strcharinfo(0) != getguildmaster(@GID)){
		mes "You're not ^5533FF" + getguildmaster(@GID) + "^000000! I am here to follow ^5533FF" + getguildmaster(@GID) + "^000000's command only";
		return 0;
	}

	mes "Welcome Master ^5533FF" + getguildmaster(@GID) + "^000000 ! I will assist you in any way I can!";
	next;

	menu "Kafra Staff Employment / Dismissal",M_Kaf, "Enter Treasure Room",M_Treas, "Cancel",M_End;

	//===========================
	M_Kaf:
	//======
		mes "[ "+getarg(0)+" ]";
		if (GetCastleData(getarg(1),9) == 1) goto L_Dismiss;
		if (getgdskilllv(@GID,10001) == 0){
			mes "Master, you don't have a contract with the Kafra Staff Company.";
			mes "In order to hire a Kafra, you must first learn the Guild skill ^5533FFContract With Kafra^000000.";
			return;
		}

		L_Hire:
			mes "Would you like to employ the services of a Kafra? You will need ^5533FF10,000 Zeny^000000 to do so... ";
			next;
			menu "Employ Kafra.",-,"Cancel",sM_KafEnd;

				mes "[ "+getarg(0)+" ]";
				if (Zeny < 10000){
					mes "Master, you do not have enough money to employ a Kafra. Employment has been cancelled.";
					return;
				}
				set Zeny,Zeny-10000;
				enablenpc "Kafra Staff#"+getarg(4);
				SetCastleData getarg(1),9,1;
				mes "You have created a contract with the Kafra Staff Company.";
				next;
				cutin "kafra_01",2;
				mes "[ Kafra Staff ]";
				mes "How do you do? I'm here to provide you with helpful service! I'll do the best I can to serve you.";
				next;
				cutin "kafra_01",255;
				mes "[ "+getarg(0)+" ]";
				//mes "Your employment contract lasts ^5533FF1 month^000000.  After this term is over you will have to create a new contract.";
				mes "I think the Kafra Staff will benefit our guild members.";
				return;

			sM_KafEnd:
				mes "[ "+getarg(0)+" ]";
				mes "As you wish Master.  But I suggest we get a Kafra as soon as possible!";
				return;

		L_Dismiss:
			mes "Would you like to dismiss the current Kafra?";
			next;
			menu "Dismissal",-,"Cancel",sM_KafEnd2;

				cutin "kafra_01",2;
				mes "[ Kafra Staff ]";
				mes "Have I done anything wrong? If I did, will you please forgive me?";
				next;
				menu "Dismiss",-,"Cancel",ssM_KafEnd2;

					mes "[ Kafra Staff ]";
					mes "It's unfortunate that I won't be able to serve your guild anymore....";
					next;
					disablenpc "Kafra Staff#"+getarg(4);
					SetCastleData getarg(1),9,0;
					cutin "kafra_01",255;
					mes "[ "+getarg(0)+" ]";
					mes "The Kafra has been dismissed.  But... we should really get a Kafra as soon as possible!";
					return;
				ssM_KafEnd2:
					mes "[ Kafra Staff ]";
					mes "Thank you master, I'll do my best! ^^.";
					cutin "kafra_01",255;
					return;
			sM_KafEnd2:
				mes "[ "+getarg(0)+" ]";
				mes "Master, I think you should keep the current Kafra Staff because she is already trying her best to serve us";
				return;

	//=========================
	M_Treas:
	//========
		mes "[ "+getarg(0)+" ]";
		mes "Would you to go to our Treasure Room? Only you, the Guild Master, are allowed to enter this room.";
		next;
		menu "Enter Treasure room.",-,"Cancel",sM_TresEnd;

			mes "[ "+getarg(0)+" ]";
			mes "Please follow me through the secret passage way.";
			mes "You must pull down on the secret switch in order to get out.";
			next;
			warp getarg(1),getarg(2),getarg(3);
			return;
		sM_TresEnd:
			mes "[ "+getarg(0)+" ]";
			mes "The goods are produced everyday.";
			mes "You should get them whenever you can because they might dissapear if you take them at the wrong time.";
			return;


	//==========================
	M_End:
	//=======
		mes "[ "+getarg(0)+" ]";
		mes "As you wish, master.";
		return;
}

// Castle 1 ==================================================================================
nguild_alde,218,175,0	script	Frolo	55,{
	callfunc "F_GldManager","Frolo","nguild_alde",119,223,"N01";
	close;
}


// Castle 2 ==================================================================================
nguild_gef,40,48,5	script	Leiber	55,{
	callfunc "F_GldManager","Leiber","nguild_gef",155,112,"N02";
	close;
}


// Castle 3 ==================================================================================
nguild_pay,120,58,4	script	Dundar	55,{
	callfunc "F_GldManager","Dundar","nguild_pay",290,7,"N03";
	close;
}


// Castle 4 ==================================================================================
nguild_prt,112,181,0	script	Thefton	55,{
	callfunc "F_GldManager","Thefton","nguild_prt",15,209,"N04";
	close;
}