summaryrefslogtreecommitdiff
path: root/npc/other/pvp.txt
blob: 28a925d141a402fa997f773810ad4492c828c36e (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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
//================= Hercules Script =======================================
//=       _   _                     _
//=      | | | |                   | |
//=      | |_| | ___ _ __ ___ _   _| | ___  ___
//=      |  _  |/ _ \ '__/ __| | | | |/ _ \/ __|
//=      | | | |  __/ | | (__| |_| | |  __/\__ \
//=      \_| |_/\___|_|  \___|\__,_|_|\___||___/
//================= License ===============================================
//= This file is part of Hercules.
//= http://herc.ws - http://github.com/HerculesWS/Hercules
//=
//= Copyright (C) 2012-2015  Hercules Dev Team
//= Copyright (C)  Joseph
//= Copyright (C)  Euphy
//= Copyright (C)  Elias (og2)
//= Copyright (C)  L0ne_W0lf
//= Copyright (C)  kobra_k88
//=
//= Hercules is free software: you can redistribute it and/or modify
//= it under the terms of the GNU General Public License as published by
//= the Free Software Foundation, either version 3 of the License, or
//= (at your option) any later version.
//=
//= This program is distributed in the hope that it will be useful,
//= but WITHOUT ANY WARRANTY; without even the implied warranty of
//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//= GNU General Public License for more details.
//=
//= You should have received a copy of the GNU General Public License
//= along with this program.  If not, see <http://www.gnu.org/licenses/>.
//=========================================================================
//= PvP NPCs
//================= Description ===========================================
//= PvP NPCs that are found in the Inns in major cities.
//= Includes Yoyo Mode, Nightmare Mode, and Event Mode.
//================= Current Version =======================================
//= 2.5
//=========================================================================

//== Information ===========================================
-	script	PVP Narrator::pvpe	FAKE_NPC,{
	mes "[PVP Narrator]";
	mes "Hello and welcome!";
	mes "I am in charge of";
	mes "explaining the PVP Modes.";
	mes "I am the PVP Narrator!";
	next;
	switch(select("What is PVP?", "What are the PVP Modes?", "What are the rules for PVP?", "Save Position.", "End Dialog.")) {
	case 1:
		mes "[PVP Narrator]";
		mes "In short, PVP means";
		mes "' Player VS Player Mode '";
		mes "It's a unique place for people";
		mes "to duel with each other.";
		next;
		mes "[PVP Narrator]";
		mes "Just tell the";
		mes "^3355FFGate Keeper^000000";
		mes "that you want to try. He will";
		mes "let you enter the PVP square.";
		next;
		mes "[PVP Narrator]";
		mes "But, you need to be at";
		mes "least level 31. And you";
		mes "must pay 500 zeny entrance fee in order";
		mes "to enter a PVP fight square.";
		break;
	case 2:
		mes "[PVP Narrator]";
		mes "When you are qualified, you";
		mes "can choose one of the two modes.";
		mes "Yoyo Mode or Nightmare Mode.";
		next;
		mes "[PVP Narrator]";
		mes "Yoyo Mode is risk free.";
		mes "You can experience PVP";
		mes "without any restriction or";
		mes "punishment. It is recommended";
		mes "that you practice your skills";
		mes "here before you move on.";
		next;
		mes "[PVP Narrator]";
		mes "Nightmare Mode is very";
		mes "dangerous! Please be cautious,";
		mes "you will lose some of your";
		mes "EXP when you are defeated. And";
		mes "there is a small chance that";
		mes "you will drop some equipment.";
		next;
		mes "[PVP Narrator]";
		mes "However, if you win, the";
		mes "rewards can be great!";
		mes "To avoid misunderstanding,";
		mes "you should think twice";
		mes "before you go there...";
		mes "Good Luck!";
		break;
	case 3:
		mes "[PVP Narrator]";
		mes "Each of the fight squares";
		mes "have a row of Narrators and";
		mes "choose them based on your";
		mes "qualifications.";
		next;
		mes "[PVP Narrator]";
		mes "Each Narrator will ask";
		mes "which of the five PVP maps";
		mes "you wish to go to.";
		mes "Choose, and go in!";
		next;
		mes "[PVP Narrator]";
		mes "Each map has a limitation on";
		mes "the number of people who can";
		mes "participate. So you will see";
		mes "figures in the corner showing";
		mes "'Attendee/Total'.";
		next;
		mes "[PVP Narrator]";
		mes "Also, there is a hidden EXP";
		mes "value in PVP mode. This EXP";
		mes "score will only apply inside";
		mes "of the PVP zone, so do not";
		mes "worry.";
		next;
		mes "[PVP Narrator]";
		mes "Every player's EXP at the";
		mes "beginning is usually 5 points.";
		mes "If you win, it will";
		mes "increase by 1 point";
		next;
		mes "[PVP Narrator]";
		mes "In the same way, when you";
		mes "lose... Your EXP will";
		mes "drop by 5 points.";
		mes "So be careful!";
		next;
		mes "[PVP Narrator]";
		mes "When you are defeated";
		mes "And your EXP is equal";
		mes "to or less than 0,";
		mes "You will be removed from PVP";
		mes "and your duel is finished!";
		next;
		mes "[PVP Narrator]";
		mes "However, if your EXP is more";
		mes "than 0. You can still get help";
		mes "through other players healing...";
		mes "Do you get it?";
		next;
		mes "[PVP Narrator]";
		mes "The fighting commands inside of";
		mes "PVP are the same as the normal.";
		mes "All the basic controls are the";
		mes "same.";
		next;
		mes "[PVP Narrator]";
		mes "However, there is one thing...";
		mes "Within the PVP fight square";
		mes "and PVP fighting zones,";
		mes "you cannot save your position.";
		mes "Remember well... These rules";
		mes "can help to ensure your victory.";
		break;
	case 4:
		mes "[PVP Narrator]";
		mes "Position successfully saved...";
		mes "Thank you very much!";
		mes "We will see you again soon.";
		if(strnpcinfo(NPC_MAP) == "morocc_in") { savepoint "morocc_in",141,139; }
		if(strnpcinfo(NPC_MAP) == "alberta_in") { savepoint "alberta_in",22,148; }
		if(strnpcinfo(NPC_MAP) == "prt_in") { savepoint "prt_in",54,137; }
		if(strnpcinfo(NPC_MAP) == "geffen_in") { savepoint "geffen_in",70,59; }
		if(strnpcinfo(NPC_MAP) == "payon_in01") { savepoint "payon_in01",142,46; }
		break;
	case 5:
		mes "[PVP Narrator]";
		mes "With war raging between monsters";
		mes "and humans, this competition";
		mes "among people - PVP -";
		mes "encourages us all to get";
		mes "stronger. Come again,";
		mes "we welcome your challenge!";
		break;
	}
	close;
}
morocc_in,144,138,4	duplicate(pvpe)	PVP Narrator#pe1	4_M_02
alberta_in,22,146,4	duplicate(pvpe)	PVP Narrator#pe2	4_M_02
prt_in,56,140,4	duplicate(pvpe)	PVP Narrator#pe3	4_M_02
geffen_in,67,63,4	duplicate(pvpe)	PVP Narrator#pe4	4_M_02
payon_in01,142,50,4	duplicate(pvpe)	PVP Narrator#pe5	4_M_02
geffen_in,67,63,4	duplicate(pvpe)	PVP Narrator#pe6	4_M_02

//== Mode Select ===========================================
-	script	Gate Keeper::gkut	FAKE_NPC,{
	mes "[Gate Keeper]";
	mes "Glad to be of service.";
	mes "I will open the PVP fight";
	mes "square for you! If you have";
	mes "any questions about the PVP";
	mes "modes or rules, Please ask";
	mes "the Narrator...";
	next;
	switch(select("^FF5533' PvP Nightmare Mode'^000000", "^3355FF' PvP Yoyo Mode'^000000", "^3355FF' PvP Event Mode'^000000", "Quit")) {
		case 1:
			mes "[Gate Keeper]";
			mes "I am sorry, but currently the Nightmare mode service is not available.";
			mes "Please use the Yoyo Mode instead. We apologize for the inconvenience.";
			break;
		case 2:
			mes "[Gate Keeper]";
			mes "The admission fee is 500 Zeny.";
			mes "Do you want to move";
			mes "to the Yoyo Mode";
			mes "fight square?";
			next;
			switch(select("Move", "Cancel")) {
			case 1:
				if ((Zeny > 499) && (BaseLevel > 30)) {
					Zeny -= 500;
					callsub L_Warp,"pvp_y_room";
				}
				else {
					mes "[Gate Keeper]";
					mes "Excuse me, but";
					mes "did you not come prepared?";
					mes "Double check that you have the";
					mes "500 Zeny entrance fee, and";
					mes "that you are at least level 31!";
				}
				close;
			case 2:
				mes "[Gate Keeper]";
				mes "With war raging between monsters";
				mes "and humans, this competition";
				mes "among people - PVP -";
				mes "encourages us all to get";
				mes "stronger. Come again,";
				mes "we welcome your challenge!";
				close;
			}
		case 3:
			mes "[Gate Keeper]";
			mes "Welcome!";
			mes "Please double check";
			mes "that you have the admission or viewing ticket.";
			next;
			if ((countitem(Invite_For_Duel) == 0) && (countitem(Admission_For_Duel) == 0)) {
				mes "[Gate Keeper]";
				mes "Eh? You don't have it? Then I";
				mes "am sorry, this fight square is";
				mes "only for people who have";
				mes "admission or viewing tickets.";
				mes "You cannot come in without it.";
				close;
			}
			mes "[Gate Keeper]";
			mes "Yes, thank you for participating. Have fun!";
			if (Zeny >= 500) Zeny -= 500;
			callsub L_Warp,"pvp_room";
			break;
		case 4:
			mes "[Gate Keeper]";
			mes "With war raging between monsters";
			mes "and humans, This competition";
			mes "among people - PVP -";
			mes "encourages us all to get";
			mes "stronger. Come again,";
			mes "we welcome your challenge!";
			break;
	}
	close;

L_Warp:
	.@map$ = getarg(0);
	if (RENEWAL) {
		switch(rand(1,10)) {
			case 1: warp .@map$,34,38; break;
			case 2: warp .@map$,46,38; break;
			case 3: warp .@map$,58,38; break;
			case 4: warp .@map$,70,38; break;
			case 5: warp .@map$,82,38; break;
			case 6: warp .@map$,82,58; break;
			case 7: warp .@map$,65,58; break;
			case 8: warp .@map$,49,58; break;
			case 9: warp .@map$,33,58; break;
			case 10: warp .@map$,52,24; break;
		}
	} else
		warp .@map$,51,23;
	return;
}
morocc_in,144,142,4	duplicate(gkut)	Gate Keeper#gke1	4_M_01
alberta_in,26,146,4	duplicate(gkut)	Gate Keeper#gke2	4_M_01
prt_in,52,140,4	duplicate(gkut)	Gate Keeper#gke3	4_M_01
geffen_in,63,63,4	duplicate(gkut)	Gate Keeper#gke4	4_M_01
payon_in01,140,53,4	duplicate(gkut)	Gate Keeper#gke5	4_M_01

//== PVP Warper Function ===================================
// Note: The warper NPCs are in the pre-re/re paths.
//callfunc "F_PVP_FSRS"{,<min_lvl>,<max_lvl>};
function	script	F_PVP_FSRS	{
	if (getargcount()) {
		if (BaseLevel < getarg(0) || BaseLevel > getarg(1)) {
			mes "[PVP Fight Square Reception Staff]";
			mes "Sorry, but you base level has to be between LV "+getarg(0)+" and LV "+getarg(1)+".";
			close;
		}
	}
	if (strnpcinfo(NPC_MAP) == "pvp_y_room") {
		.@base$ = "pvp_y_"+strnpcinfo(NPC_NAME_HIDDEN);
		setarray .@maps$[0],	.@base$+"-1",	.@base$+"-2",	.@base$+"-3",	.@base$+"-4",	.@base$+"-5";
		setarray .@name$[0],	"Prontera",		"Izlude",		"Payon",		"Alberta",		"Morroc";
		setarray .@Limit[0],	128,			128,			128,			128,			128;
	} else {
		setarray .@maps$[0],	"pvp_n_8-1",	"pvp_n_8-2",	"pvp_n_8-3",	"pvp_n_8-4",	"pvp_n_8-5";
		setarray .@name$[0],	"Sandwich",		"Lock on",		"Four Room",	"Under cross",	"Compass Room";
		setarray .@Limit[0],	64,				32,				32,				32,				32;
	}
	for (.@i = 0; .@i<5; ++.@i)
		.@menu$ += .@name$[.@i]+" ["+getmapusers(.@maps$[.@i])+" / "+.@Limit[.@i]+"]:";
	.@menu$ += "Cancel.";
	.@i = select(.@menu$)-1;
	if (.@i == 5) close;
	if (getmapusers(.@maps$[.@i]) >= .@Limit[.@i]) {
		mes "[PVP Fight Square Reception Staff]";
		mes "This map is currently full.";
		close;
	}
	warp .@maps$[.@i],0,0;
	end;
}

//== Event Contestant Entrance =============================
pvp_room,54,85,4	script	Registration Staff#1	8W_SOLDIER,{
	if (countitem(Invite_For_Duel) == 0) {
		mes "[PVP Combat Square Register Staff]";
		mes "Eh? How did you get in here?";
		mes "This is the entrance for players only.";
		mes "For details about viewers please proceed to the Register Staff on your right.";
		close;
	}
	.@size = getarraysize(.warp_x);
	if (.@size == 0) {
		setarray .warp_x,40,59,20,40;
		setarray .warp_y,59,40,40,20;
	}
	if (select("Combat Square one", "Cancel") == 1) {
		mes "[PVP Combat Square Register Staff]";
		mes "'"+ strcharinfo(0) +"'";
		mes "Are you ready?!";
		next;
		if (select("Yes!", "No!") == 1) {
			mes "[PVP Combat Square Register Staff]";
			mes "OK! I will send you inside";
			mes "Good luck!";
			close2;
			delitem Invite_For_Duel,1;
			.@rand = rand(.@size);
			warp "pvp_2vs2", .warp_x[.@rand], .warp_y[.@rand];
			deletearray .warp_x[.@rand],1;
			deletearray .warp_y[.@rand],1;
			end;
		}
		mes "[PVP Combat Square Register Staff]";
		mes "Come back anytime you are ready.";
		close;
	}
	close;

OnInit:
	waitingroom "Combat Square players entrance only",0;
	end;
}

//== Spectator Entrance ====================================
-	script	Spectator's Entrance#dum::PVPSpectator	FAKE_NPC,{
	if (countitem(Admission_For_Duel) == 0) {
		mes "[PVP Compete Square Register Staff]";
		mes "This is the entrance for viewers.";
		mes "For details about players entrance please proceed to the Register Staff on your left.";
		close;
	}
	if (select("Compete Square one", "Cancel") == 1) {
		mes "[PVP Combat Square Register Staff]";
		mes "You got it, thanks for participating. Have fun!";
		close2;
		delitem Admission_For_Duel,1;
		switch(rand(1,4)) {
			case 1: warp "pvp_2vs2",39,7; end;
			case 2: warp "pvp_2vs2",39,73; end;
			case 3: warp "pvp_2vs2",7,39; end;
			case 4: warp "pvp_2vs2",73,39; end;
		}
	}
	close;

OnInit:
	waitingroom "Compete Square viewer's entrance",0;
	end;
}
pvp_room,62,85,4	duplicate(PVPSpectator)	Spectator's Entrance#1	8W_SOLDIER
pvp_room,70,85,4	duplicate(PVPSpectator)	Spectator's Entrance#2	8W_SOLDIER
pvp_room,78,85,4	duplicate(PVPSpectator)	Spectator's Entrance#3	8W_SOLDIER
pvp_room,86,85,4	duplicate(PVPSpectator)	Spectator's Entrance#4	8W_SOLDIER

//== Spectator Warps =======================================
-	script	Combat Square Staff#dum::PVPSpecWarp	FAKE_NPC,{
OnTouch:
	mes "[Combat Square Staff]";
	mes "May I help you?";
	if (select("To the center viewer seat.", "Leave Combat Square.") == 1) {
		warp "pvp_2vs2",38,38;
		end;
	}
	warp "pvp_room",84,39;
	end;
}
pvp_2vs2,5,4,0	duplicate(PVPSpecWarp)	Combat Square Staff#1	WARPNPC,1,1
pvp_2vs2,5,74,0	duplicate(PVPSpecWarp)	Combat Square Staff#2	WARPNPC,1,1
pvp_2vs2,74,74,0	duplicate(PVPSpecWarp)	Combat Square Staff#3	WARPNPC,1,1
pvp_2vs2,74,5,0	duplicate(PVPSpecWarp)	Combat Square Staff#4	WARPNPC,1,1

pvp_2vs2,40,40,0	script	Combat Square Staff#5	WARPNPC,1,1,{
	mes "[Combat Square Staff]";
	mes "May I help you?";
	switch(select("To the side viewer seat.", "Leave Combat Square.")) {
	case 1:
		switch(rand(1,4)) {
			case 1: warp "pvp_2vs2",39,7; end;
			case 2: warp "pvp_2vs2",39,73; end;
			case 3: warp "pvp_2vs2",7,39; end;
			case 4: warp "pvp_2vs2",73,39; end;
		}
	case 2:
		warp "pvp_c_room",84,39;
		end;
	}
}

//== PVP Area Exit warp ====================================
pvp_room,51,19,0	script	out#eventpvp	WARPNPC,4,2,{
OnTouch:
	mes "[Combat Square Staff]";
	mes "Did you have fun in Combat Square?";
	mes "May I ask where you want to go?";
	next;
	switch(select("Prontera.", "Morocc.", "Geffen.", "Payon.", "Alberta.", "Cancel.")) {
		case 1: warp "prontera",107,60; end;
		case 2: warp "morocc",157,96; end;
		case 3: warp "geffen",120,36; end;
		case 4: warp "payon",96,100; end;
		case 5: warp "alberta",41,243; end;
		case 6: close;
	}
}