summaryrefslogtreecommitdiff
path: root/world/map/npc/xmas/2010/golbanez.txt
blob: 8d7b3e02b9742c2ffff2f88a9b0fe975be2ff1db (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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
//#################################################################################
//#
//#    Golbanez for Christmas 2010
//#
//#    Authors: alastrim, PjotrOrial
//#
//#    reviewed by:
//#
//#    This is Golbanez, he took Santa Claus as a hostage.
//#    Santa will be accessible only if players give what golbenez want.
//#    if the player reach santa, he will donate some stuff to the players.
//#    
//#################################################################################

// Please, remove the debug script bofore releasing the quest.

//031-3.gat,215,294,0	script	Debug	204,{

//	mes "What you want to do?";
//	menu
//		"Change 'Maze'",-,
//		"Change Golbenez_Inn_Cost(Your Donations)",_cost,
//		"Change Xmas2010",_xmas,
//		"Clean all variables.",_clean,
//		"Nothing",_end;

//	mes "Old Value: " + Maze;
//	input Maze;
//	mes "New Value: " + Maze;
//	close;

//_xmas:
//	mes "Old Value: " + Xmas2010;
//	input Xmas2010;
//	mes "New Value: " + Xmas2010;
//	close;

//_cost:
//	mes "Old Value: " + Golbenez_Inn_Cost;
//	input Golbenez_Inn_Cost;
//	mes "New Value: " + Golbenez_Inn_Cost;
//	close;

//_clean:
//	mes "Golbenez_Inn_Cost Old Value: " + Golbenez_Inn_Cost;
//	set Golbenez_Inn_Cost, 0;
//	mes "Golbenez_Inn_Cost New Value: " + Golbenez_Inn_Cost;
//	mes "Maze Old Value: " + Maze;
//	set Maze, 0;
//	mes "Maze New Value: " + Maze;
//	mes "Xmas2010 old value: " + Xmas2010;
//	set Xmas2010, 0;
//	mes "Xmas2010 New Value: " + Xmas2010;
//	mes "Yellow Old Value: " + Yellow;
//	set Silver, 0;
//	mes "Yellow New Value: " + Yellow;
//	mes "White Old Value: " + White;
//	set Golden, 0;
//	mes "White New Value: " + White;
//	mes "Count_White Old Value: " + Count_White;
//	set Count_White, 0;
//	mes "Count_White New Value: " + Count_White;
//	mes "Count_Yellow Old Value: " + Count_Yellow;
//	set Count_Yellow, 0;
//	mes "Count_Yellow New Value: " + Count_Yellow;


//	close;
	
//_end:
//	close;

//}

031-3.gat,215,296,0	script	#Golbenez#_M	204,{

	if (Golbenez_Inn_Cost >= 5000000) goto Glb_Inn_Enough;
        if (Xmas2010 > 0) goto L_Intro;
	if (BaseLevel < 40) goto L_Young;

	mes "[Golbenez]";
	mes "\"Mortal!  I am Golbenez!  I have broken through the barriers of space and time!\"";
	next;
	mes "\"Well to let you know, I have taken Santa Claus hostage.\"";
	next;
	mes "\"This may sound hard to you... But I need lots of stuff for building the way to place of leisure.";
	next;
	mes "\"So if you want to have gifts at Christmas... we should make a deal: Bring me money.";
	next;
	menu
		"But I am broke!",L_Broke,
		"Ok, but how much do you need?",-;
	mes "[Golbenez]";
	mes "\"Not much.  A few millions would do!\"";
	next;
	menu
		"WHAT! But no one has so much money!",-,
		"Ehh... I dont like Christmas anyway... Bye!",L_Close;
	
	mes "[Golbenez]";
	mes "\"Hey, you think I dont know about your inflation problems? Dont try to fool me, you must be filthy rich!\"";
	next;
	menu
		"Ok, you got me. Im rich!",-,
		"Im not rich! But is there any other way to help you?",-;

	mes "[Golbenez]";
	mes "\"Well... What I really want is money, but I can propose a different way to help Santa. When I took Santa as hostage he tried to resist and, in the process of submitting him by force, a lot of present boxes were dropped in the ground.\"";
	next;
	mes "\"I was intrigued by those boxes... They were Yellow and White. When I finally took control of the situation, I noticed that the monsters in the cave stole all the Boxes! Now, here is my idea: if you get ALL the boxes back to me, I can release santa.\"";
	next;
	mes "\"Im willing to consider a conversion of each Present Box donated to an amount in Gold Pieces. So, a Yellow Present is equivalent to 50.000 Gold Pieces and a White Present, 100.000 Gold Pieces. I am pretty sure he dropped 40 Yellow and 30 White boxes. So, if you bring me all of them, it would be equivalent to 5 million Gold Pieces, exactly what I was going to ask you.\"";
	next;
	mes "\"But don't be a fool. You will find these presents only with the monsters in the Ice Cave where Santa is hidden.\"";
	next;
	mes "\"So, bring me Money and/or Present Boxes and Santa can be released. Now, there is one more thing. Santa is in a very complicated Ice Cave in nivalis. I can control all the entrances in this cave. And I will only let you reach Santa after you pay me what I want.\"";
	next;
	mes "\"If you choose to find the present boxes, instead of paying in Gold Pieces, it is going to be easier for you if you bring them in small lots. Don't wait until you have everything. Remember: The more you give me, the closer you can get to santa.\"";
	next;

L_Intro:
	if (Xmas2010 == 0) set Xmas2010, 1;
	mes "\"So far, you have brought presents and money in a total value of " + Golbenez_Inn_Cost + " gold pieces.  The people of your world have brought me " + $Golbenez_Inn_Cost + " gold pieces.  What would you like to give?\"";

L_Menu:

	menu
		"I'd like to spend some money.", Glb_money,
		"I'd like to give some Yellow presents.", -,
		"I'd like to give some White presents.", -,
		"Why do you want present boxes?",Glb_whypresents,
		"Can I bring other items?", Glb_otheritems,
		"Nevermind.", Glb_nvm;

	// in this array the items should be filled in. Remember to change the ID when the boxes are added to item_db.
	set @menuitem[2], 4021;
	set @menuitem[3], 4022;
	set @menuvalue[2], 50000;
	set @menuvalue[3], 100000;

	mes "\"How many presents do you want to give?\"";

	input @count;

	if (countitem(@menuitem[@menu]) < @count ) goto Glb_noitems;
	if (@menuitem[@menu] == 4021) goto L_Check_Yellow;
	if (@menuitem[@menu] == 4022) goto L_Check_White;

L_Check_Yellow:
	// If you have already donated more than you have collected in the right way (Via script),
	// then whatever you have donated so far will remain, but if you have some spare boxes,
	// it will be not possible to give it.
	if (Count_Yellow > Yellow) set Yellow, Count_Yellow;
	if (Count_Yellow + @count > Yellow) goto L_Fail_Box;

	if (Count_Yellow >= 40) goto L_Done_Yellow;
	if (@count > Yellow) goto L_Fail_Box;
	delitem @menuitem[@menu], @count;
	set Count_Yellow, Count_Yellow + @count;
	set @Give, (@count * @menuvalue[@menu]);
	goto Golbenez_pay_presents;

L_Check_White:
	// If you have already donated more than you have collected in the right way (Via script),
	// then whatever you have donated so far will remain, but if you have some spare boxes,
	// it will be not possible to give it.
	if (Count_White > White) set White, Count_White;
	if (Count_White + @count > White) goto L_Fail_Box;

	if (Count_White >= 30) goto L_Done_White;
	if (@count > White) goto L_Fail_Box;
	delitem @menuitem[@menu], @count;
	set Count_White, Count_White + @count;
	set @Give, (@count * @menuvalue[@menu]);
	goto Golbenez_pay_presents;

L_Fail_Box:
	mes "[Golbenez]";
	mes "\"How did you get those present boxes? I am monitoring the cave and I do not remember to see you getting this by yourself. I do not like this.\"";
	close;

L_Done_Yellow:
	mes "[Golbenez]";
	mes "\"You already gave me all the Yellow Boxes that I wanted. I don't even want to know how you got these boxes.\"";
	close;

L_Done_White:
	mes "[Golbenez]";
	mes "\"You already gave me all the White Boxes that I wanted. I don't even want to know how you got these boxes.\"";
	close;

Glb_money:
	input @Give;
	if (@Give <= 0) close;
	if (Zeny < @Give) goto Glb_Inn_NotEnoughZeny;
	goto Golbenez_pay;

Glb_checkGlAn:
	set @glob_an$ , "Golbenez: " + strcharinfo(0) + " accounted to free santa";

	// depending on the absolute amount setup another global announcement.
	if( @Give >3000000 ) goto Golbenez_an_5;
	if( @Give > 2000000 ) goto Golbenez_an_4;
	if( @Give > 1000000 ) goto Golbenez_an_3;
	if( @Give >  700000 ) goto Golbenez_an_2;
	if( @Give >  350000 ) goto Golbenez_an_1;
	if (Golbenez_Inn_Cost < 5000000) goto L_Needmore;
	if (Golbenez_Inn_Cost >= 5000000) goto Glb_Inn_Enough;
	close;

Golbenez_an_1:
	set @glob_an$, @glob_an$ + " with a great effort.";
	goto Golbenez_an;

Golbenez_an_2:
	set @glob_an$, @glob_an$ + " with an honest contribution.";
	goto Golbenez_an;

Golbenez_an_3:
	set @glob_an$, @glob_an$ + " with a great effort. Such a generous person.";
	goto Golbenez_an;

Golbenez_an_4:
	set @glob_an$, @glob_an$ + " with a remarkable effort. Impressive!";
	goto Golbenez_an;

Golbenez_an_5:
	set @glob_an$, @glob_an$ + " with a huge effort. What a honorable donation!";
	goto Golbenez_an;

Golbenez_an:
	announce @glob_an$, 0;
	if (Golbenez_Inn_Cost < 5000000) goto L_Needmore;
	if (Golbenez_Inn_Cost >= 5000000) goto Glb_Inn_Enough;
	close;

Golbenez_pay:
	set Golbenez_Inn_Cost, Golbenez_Inn_Cost + @Give;
	set $Golbenez_Inn_Cost, $Golbenez_Inn_Cost + @Give;
	set Zeny, Zeny - @Give;
	goto Glb_checkGlAn;

Golbenez_pay_presents:
	set Golbenez_Inn_Cost, Golbenez_Inn_Cost + @Give;
	set $Golbenez_Inn_Cost, $Golbenez_Inn_Cost + @Give;
	if (Golbenez_Inn_Cost < 5000000) goto L_Needmore;
	if (Golbenez_Inn_Cost >= 5000000) goto Glb_Inn_Enough;
	close;


Glb_Inn_NotEnoughZeny:
	mes "[Golbenez]";
	mes "\"You don't have as much as you say you do.  Come back when you can give the gold pieces you say you can.\"";
	close;

Glb_noitems:
	mes "[Golbenez]";
	mes "\"You don't have as many as you say you do.  Come back when you have enough.\"";
	close;

Glb_nvm:
	mes "[Golbenez]";
	mes "\"That's too bad.\"";
	close;

Glb_whypresents:
	mes "[Golbenez]";
	mes "\"The presents contain some sort of spiritual attachment that aids in the creation of dimensional connections to this plane of existence. The white ones contain the stronger spiritual attachment, followed by the yellow and then green, blue and purple present boxes. But I am not interested in the last three kinds.\"";
	close;

Glb_otheritems:
	mes "[Golbenez]";
	mes "\"No you cannot!\"";
	next;
	mes "\"I will not discuss any further, mortal!\"";
	close;


L_Needmore:
	mes "[Golbenez]";
	mes "\"You brought me the equivalent to " +Golbenez_Inn_Cost+ " Gold Pieces. This is not enough.\"";
	next;
	mes "\"Keep working. The closer you get to the amount of money I need, the closer you can get to Santa on that big Ice cave.\"";

	if (Golbenez_Inn_Cost >= 500000 && Golbenez_Inn_Cost < 1000000) set Maze, 1;
	if (Golbenez_Inn_Cost >= 1000000 && Golbenez_Inn_Cost < 1500000) set Maze, 2;
	if (Golbenez_Inn_Cost >= 1500000 && Golbenez_Inn_Cost < 2000000) set Maze, 3;
	if (Golbenez_Inn_Cost >= 2000000 && Golbenez_Inn_Cost < 2500000) set Maze, 4;
	if (Golbenez_Inn_Cost >= 2500000 && Golbenez_Inn_Cost < 3000000) set Maze, 5;
	if (Golbenez_Inn_Cost >= 3000000 && Golbenez_Inn_Cost < 3500000) set Maze, 6;
	if (Golbenez_Inn_Cost >= 3500000 && Golbenez_Inn_Cost < 4000000) set Maze, 7;
	if (Golbenez_Inn_Cost >= 4000000 && Golbenez_Inn_Cost < 5000000) set Maze, 8;

	close;

L_Broke:
	mes "[Golbenez]";
	mes "\"Then say goodbye to christmas.\"";
	close;

L_Close:
	close;

L_Young:
	mes "[Golbenez]";
	mes "\"You are too young, even for mortal standards. You can't do anything to save santa.\"";
	close;

Glb_Inn_Enough:
	set Maze, 9;
	mes "[Golbenez]";
	mes "\"Ok mortal!\"";
	next;
	mes "\"I have collected enough for now. You are now able to reach Santa.\"";
	next;
	mes "\"This will definitely help me finish the place of leisure.\"";
	next;
	mes "\"Have fun trying to save Santa from that cold maze!\"";
	close;
}