root/npc/other/pvp.txt @ 9

Revision 1, 15.8 kB (checked in by jinshiro, 17 years ago)
Line 
1//===== eAthena Script =======================================
2//= PvP NPCs
3//===== By: ==================================================
4//= kobra_k88; L0ne_W0lf
5//===== Current Version: =====================================
6//= 1.4
7//===== Compatible With: =====================================
8//= eAthena SVN
9//===== Description: =========================================
10//= [Aegis Conversion]
11//= PvP NPCs that are found in the Inns in major cities.
12//= Includes Yoyo Mode, Nightmare Mode, and Event Mode
13//=
14//= Breakdown of function "F_PVPNarrator"
15//= arg(0): Map to save player on
16//= arg(1): X position on getarg(0) map to save player
17//= arg(2): Y position on getarg(0) map to save player
18//===== Additional Comments: =================================
19//= 1.1 Fixed arena names for Nightmare mode.  Added room limit
20//=     check.[kobra_k88]
21//= 1.2 Fixed the bug that you aways savepoint in geffen.[shadowlady]
22//= 1.2a Added PvP Narrator function. Using args for Fight
23//=     Square Helpers. [kobra_k88]
24//= 1.3 Rescripted to Aegis 10.3 standards. [L0ne_W0lf]
25//=     Removed all receptioned for Yoyo mode, with the
26//=     exception of the "Free for all" mode.
27//=     Added PVP event NPCs.
28//= 1.4 Corrected NPC names to fall within proper restrictions. [L0ne_W0lf]
29//============================================================
30
31// Morroc
32//============================================================
33morocc_in,144,138,4     script  PVPNarrator#moc 84,{
34        callfunc "F_PVPNarrator","morocc_in",141,139;
35}
36
37morocc_in,144,142,4     script  Gate Keeper#moc::PVPGateKeeper  83,{
38        mes "[Gate Keeper]";
39        mes "Glad to be of service.";
40        mes "I will open the PVP fight";
41        mes "square for you! If you have";
42        mes "any questions about the PVP";
43        mes "modes or rules, Please ask";
44        mes "the Narrator...";
45        next;
46        switch(select("^FF5533' PvP Nightmare Mode'^000000:^3355FF' PvP Yoyo Mode'^000000:^3355FF' PvP Event Mode'^000000:Quit")) {
47        case 1:
48                mes "[Gate Keeper]";
49                mes "I am sorry, but currently the Nightmare mode service is not available.";
50                mes "Please use the Yoyo mode instead. We apologize for the inconvenience.";
51                close;
52        case 2:
53                mes "[Gate Keeper]";
54                mes "The admission fee is 500 Zeny.";
55                mes "Do you want to move";
56                mes "to the Yoyo Mode";
57                mes "fight square?";
58                next;
59                switch(select("Move:Cancel")) {
60                case 1:
61                        if (Zeny > 499 && BaseLevel > 30) {
62                                set zeny,zeny-500;
63                                warp "pvp_y_room",51,23;
64                                end;
65                        }
66                        else {
67                                mes "[Gate Keeper]";
68                                mes "Excuse me, but";
69                                mes "did you not come prepared?";
70                                mes "Double check that you have the";
71                                mes "500 Zeny entrance fee, and";
72                                mes "that you are at least level 31!";
73                                close;
74                        }
75                case 2:
76                        mes "[Gate Keeper]";
77                        mes "In this war between Monsters";
78                        mes "and Humans. This competition";
79                        mes "between people, The PVP Mode!";
80                        mes "Encourages us all to become";
81                        mes "stronger. Come again.";
82                        mes "We welcome your challenge!";
83                        close;
84                }
85        case 3:
86                mes "[Gate Keeper]";
87                mes "Welcome";
88                mes "Please double check";
89                mes "That you have the admission or viewing ticket!";
90                next;
91                if (countitem(7028) == 0 && countitem(7029) == 0) {
92                        mes "[Gate Keeper]";
93                        mes "Eh? You don't have it? Then I";
94                        mes "am sorry, this fight square is";
95                        mes "only for people who have";
96                        mes "admission or viewing tickets.";
97                        mes "You cannot come in without it.";
98                        close;
99                }
100                mes "[Gate Keeper]";
101                mes "Yes, thank you for participating. Have fun!";
102                close2;
103                warp "pvp_room",51,23;
104                end;
105        case 4:
106                mes "[Gate Keeper]";
107                mes "In this war between Monsters";
108                mes "and Humans. This competition";
109                mes "between people, The PVP Mode!";
110                mes "Encourages us all to become";
111                mes "stronger. Come again.";
112                mes "We welcome your challenge!";
113                close;
114        }
115}
116
117// Alberta
118//============================================================
119alberta_in,22,146,4     script  PVP Narrator#alb        84,{
120        callfunc "F_PVPNarrator","alberta_in",22,148;
121}
122
123alberta_in,26,146,4     duplicate(PVPGateKeeper)        Gate Keeper#alb 83
124
125// Prontera
126//============================================================
127prt_in,56,140,4 script  PVPNarrator#prt 84,{
128        callfunc "F_PVPNarrator","prt_in",54,137;
129}
130
131prt_in,52,140,4 duplicate(PVPGateKeeper)        Gate Keeper#prt 83
132
133// Geffen
134//============================================================
135geffen_in,67,63,4       script  PVPNarrator#gef 84,{
136        callfunc "F_PVPNarrator","geffen_in",70,59;
137}
138
139geffen_in,63,63,4       duplicate(PVPGateKeeper)        Gate Keeper#gef 83
140
141// Payon
142//============================================================
143payon_in01,142,50,4     script  PVPNarrator#pay 84,{
144        callfunc "F_PVPNarrator","payon_in01",142,46;
145}
146
147payon_in01,140,53,4     duplicate(PVPGateKeeper)        Gate Keeper#pay 83
148
149
150// PVP Yoyo Mode Staff
151//============================================================
152pvp_y_room,86,85,4      script  Fight Square Reception#1        105,{
153        set .@mapcount_1,getmapusers("pvp_y_8-1");
154        set .@mapcount_2,getmapusers("pvp_y_8-2");
155        set .@mapcount_3,getmapusers("pvp_y_8-3");
156        set .@mapcount_4,getmapusers("pvp_y_8-4");
157        set .@mapcount_5,getmapusers("pvp_y_8-5");
158        while(1) {
159                switch(select("Prontera [ "+.@mapcount_1+" / 128 ]:Izlude [ "+.@mapcount_2+" / 128 ]:Payon [ "+.@mapcount_3+" / 128 ]:Alberta [ "+.@mapcount_4+" / 128 ]:Morroc [ "+.@mapcount_5+" / 128 ]:Cancel")) {
160                case 1:
161                        callsub S_CheckPVPRoom,@mapcount_1,"pvp_y_8-1";
162                        break;
163                case 2:
164                        callsub S_CheckPVPRoom,@mapcount_2,"pvp_y_8-2";
165                        break;
166                case 3:
167                        callsub S_CheckPVPRoom,@mapcount_3,"pvp_y_8-3";
168                        break;
169                case 4:
170                        callsub S_CheckPVPRoom,@mapcount_4,"pvp_y_8-4";
171                        break;
172                case 5:
173                        callsub S_CheckPVPRoom,@mapcount_5,"pvp_y_8-5";
174                        break;
175                case 6:
176                        close;
177                }
178        }
179
180OnInit:
181        waitingroom "Free For All",0;
182        end;
183
184S_CheckPVPRoom:
185        if (getarg(0) >= 128) {
186                mes "[PVP Fight Square Reception Staff]";
187                mes "This map is currently full.";
188                next;
189                return;
190        }
191        else {
192                warp getarg(1),0,0;
193                end;
194        }
195}
196
197// PVP Nightmare Mode Staff
198//============================================================
199pvp_n_room,30,85,4      script  Fight Square Reception#2        105,{
200        set .@mapcount_1,getmapusers("pvp_n_8-1");
201        set .@mapcount_2,getmapusers("pvp_n_8-2");
202        set .@mapcount_3,getmapusers("pvp_n_8-3");
203        set .@mapcount_4,getmapusers("pvp_n_8-4");
204        set .@mapcount_5,getmapusers("pvp_n_8-5");
205        while(1) {
206                switch(select("Sandwich [ "+.@mapcount_1+" / 64 ]:Lock on [ "+.@mapcount_2+" / 32 ]:Four Room [ "+.@mapcount_3+" / 32 ]:Under cross [ "+.@mapcount_4+" / 32 ]:Compass Room [ "+.@mapcount_5+" / 32 ]:Cancel")) {
207                case 1:
208                        callsub S_CheckPVPRoom,@mapcount_1,"pvp_n_8-1",64;
209                        break;
210                case 2:
211                        callsub S_CheckPVPRoom,@mapcount_2,"pvp_n_8-2",32;
212                        break;
213                case 3:
214                        callsub S_CheckPVPRoom,@mapcount_3,"pvp_n_8-3",32;
215                        break;
216                case 4:
217                        callsub S_CheckPVPRoom,@mapcount_4,"pvp_n_8-4",32;
218                        break;
219                case 5:
220                        callsub S_CheckPVPRoom,@mapcount_5,"pvp_n_8-5",32;
221                        break;
222                case 6:
223                        close;
224                }
225        }
226
227OnInit:
228        waitingroom "Free For All",0;
229        end;
230
231S_CheckPVPRoom:
232        if (getarg(0) >= getarg(2)) {
233                mes "[PVP Fight Square Reception Staff]";
234                mes "This map is currently full.";
235                next;
236                return;
237        }
238        else {
239                warp getarg(1),0,0;
240                end;
241        }
242}
243
244// Function
245//============================================================
246function        script  F_PVPNarrator   {
247        mes "[PVP Narrator]";
248        mes "Hello and welcome!";
249        mes "I am in charge of";
250        mes "explaining the PVP Mode.";
251        mes "I am the PVP Narrator!";
252        next;
253        switch(select("What is PVP?:What are the PVP Modes?:What are the rules for PVP?:Save Position.:End Dialog.")) {
254        case 1:
255                mes "[PVP Narrator]";
256                mes "In short form";
257                mes "PVP means,";
258                mes "' Player VS Player Mode '";
259                mes "It's a unique place for people";
260                mes "To duel with each other.";
261                next;
262                mes "[PVP Narrator]";
263                mes "Just tell the";
264                mes "^3355FFGate Keeper^000000";
265                mes "That you want to try. He will";
266                mes "let you into the PVP square.";
267                next;
268                mes "[PVP Narrator]";
269                mes "But, You need to be at";
270                mes "least level 31. And you";
271                mes "must pay the 500 zeny";
272                mes "entrance fee in order to";
273                mes "To enter a PVP Fight Square.";
274                close;
275        case 2:
276                mes "[PVP Narrator]";
277                mes "When you are qualified, You";
278                mes "can choose one of two Modes.";
279                mes "Yoyo Mode, Or";
280                mes "Nightmare Mode.";
281                next;
282                mes "[PVP Narrator]";
283                mes "Yoyo Mode is risk free.";
284                mes "You can experience PVP";
285                mes "without any restriction or";
286                mes "punishment. It is recommended";
287                mes "that you practice your skills";
288                mes "here before you move on.";
289                next;
290                mes "[PVP Narrator]";
291                mes "Nightmare Mode is very";
292                mes "dangerous! Please use caution.";
293                mes "You will lose some of your real";
294                mes "EXP when you are defeated. And";
295                mes "There is a small chance that";
296                mes "you will drop some equipment.";
297                next;
298                mes "[PVP Narrator]";
299                mes "However, if you win, the";
300                mes "rewards can be great!";
301                mes "To avoid misunderstanding.";
302                mes "You should think it over";
303                mes "twice before you go there...";
304                mes "Good Luck!";
305                close;
306        case 3:
307                mes "[PVP Narrator]";
308                mes "Each of the Fight squares";
309                mes "have a row of Narrators to";
310                mes "choose from based on your";
311                mes "qualifications.";
312                next;
313                mes "[PVP Narrator]";
314                mes "Each Narrator will ask";
315                mes "which of the five PVP maps";
316                mes "you wish to go to.";
317                mes "Choose, and go in!";
318                next;
319                mes "[PVP Narrator]";
320                mes "Each map has a limitation on";
321                mes "the number of people who can";
322                mes "participate. So you will see";
323                mes "figures in the corner showing";
324                mes "'Attendee/total'.";
325                next;
326                mes "[PVP Narrator]";
327                mes "Also, there is a hidden EXP";
328                mes "value in PVP mode. This EXP";
329                mes "score will only apply inside";
330                mes "of the PVP zone, so do not";
331                mes "worry.";
332                next;
333                mes "[PVP Narrator]";
334                mes "Every player's EXP at the";
335                mes "beginning is usually 5 points.";
336                mes "If you win, you will";
337                mes "increse your EXP by 1 point";
338                next;
339                mes "[PVP Narrator]";
340                mes "In the same way, when you";
341                mes "lose... Your EXP will";
342                mes "drop by 5 points.";
343                mes "So be careful!";
344                next;
345                mes "[PVP Narrator]";
346                mes "When you are defeated";
347                mes "And your EXP is equal";
348                mes "to or less than 0,";
349                mes "You will be removed from PVP";
350                mes "And your duel is finished!";
351                next;
352                mes "[PVP Narrator]";
353                mes "However, If your EXP is more";
354                mes "than 0. You can still get help";
355                mes "Through other players healing...";
356                mes "Do you get it?";
357                next;
358                mes "[PVP Narrator]";
359                mes "The fighting commands inside of";
360                mes "PVP Are the same as the normal.";
361                mes "All the basic controls are the";
362                mes "same.";
363                next;
364                mes "[PVP Narrator]";
365                mes "However, there is one thing...";
366                mes "Within the PVP fight square,";
367                mes "And in the PVP fighting zones";
368                mes "You cannot save your position.";
369                mes "Remember well... These rules";
370                mes "can help to ensure your victory.";
371                close;
372        case 4:
373                mes "[PVP Narrator]";
374                mes "Position saved...";
375                mes "Successfully.";
376                mes "Thank you very much, We";
377                mes "will see you again soon.";
378                close2;
379                savepoint getarg(0),getarg(1),getarg(2);
380                end;
381        case 5:
382                mes "[PVP Narrator]";
383                mes "In this war between Monsters";
384                mes "and Humans. This competition";
385                mes "between people, The PVP Mode!";
386                mes "Encourages us all to become";
387                mes "stronger. Come again.";
388                mes "We welcome your challenge!";
389                close;
390        }
391}
392
393// Event Contestant Entrance
394//============================================================
395pvp_room,54,85,4        script  Registration Staff#1    105,{
396        if (countitem(7028) == 0) {
397                mes "[PVP Combat Square Register Staff]";
398                mes "Eh? How did you get in here?";
399                mes "This is the entrance for players only.";
400                mes "For details about viewers please proceed to the Register Staff on your right.";
401                close;
402        }
403
404        if (.pvp_close_n_room == 1 && .pvp_close_s_room == 1 && .pvp_close_w_room == 1 && .pvp_close_e_room == 1) {
405                Set .pvp_close_n_room,0;
406                Set .pvp_close_s_room,0;
407                Set .pvp_close_w_room,0;
408                Set .pvp_close_e_room,0;
409        }
410
411        if (select("Combat Square one :Cancel") == 1) {
412                mes "[PVP Combat Square Register Staff]";
413                mes "'"+ strcharinfo(0) +"'";
414                mes "Are you ready?!";
415                next;
416                if (select("Yes!:No!") == 1) {
417                        mes "[PVP Combat Square Register Staff]";
418                        mes "OK! I will send you inside";
419                        mes "Good luck!";
420                        close2;
421                        delitem 7028,1; //Invite_For_Duel
422                        while(1) {
423                                switch(rand(1,4)) {
424                                case 1:
425                                        if (.pvp_close_n_room == 0) {
426                                                set .pvp_close_n_room,1;
427                                                warp "pvp_2vs2",40,59;
428                                                end;
429                                        }
430                                case 2:
431                                        if (.pvp_close_s_room == 0) {
432                                                set .pvp_close_s_room,1;
433                                                warp "pvp_2vs2",59,40;
434                                                end;
435                                        }
436                                case 3:
437                                        if (.pvp_close_w_room == 0) {
438                                                set .pvp_close_w_room,1;
439                                                warp "pvp_2vs2",20,40;
440                                                end;
441                                        }
442                                case 4:
443                                        if (.pvp_close_e_room == 0) {
444                                                set .pvp_close_e_room,1;
445                                                warp "pvp_2vs2",40,20;
446                                                end;
447                                        }
448                                }
449                        }
450                }
451                mes "[PVP Combat Square Register Staff]";
452                mes "Come back anytime you are ready.";
453                close;
454        }
455        close;
456
457OnInit:
458        Set .pvp_close_n_room,0;
459        Set .pvp_close_s_room,0;
460        Set .pvp_close_w_room,0;
461        Set .pvp_close_e_room,0;
462        waitingroom "Combat Square players entrance only",0;
463        end;
464}
465
466// Spectator Entrance
467//============================================================
468pvp_room,62,85,4        script  Spectator's Entrance#1::PVPSpectator    105,{
469        if (countitem(7029) == 0) {
470                mes "[PVP Compete Square Register Staff]";
471                mes "This is the entrance for viewers.";
472                mes "For details about players entrance please proceed to the Register Staff on your left.";
473                close;
474        }
475
476        if (select("Compete Square one:Cancel") == 1) {
477                mes "[PVP Combat Square Register Staff]";
478                mes "You got it, thanks for participating. Have fun!";
479                close2;
480                delitem 7029,1; //Admission_For_Duel
481                switch(rand(1,4)) {
482                case 1: warp "pvp_2vs2",39,7; end;
483                case 2: warp "pvp_2vs2",39,73; end;
484                case 3: warp "pvp_2vs2",7,39; end;
485                case 4: warp "pvp_2vs2",73,39; end;
486                }
487        }
488        close;
489
490OnInit:
491        waitingroom "Compete Square viewer's entrance",0;
492        end;
493}
494
495pvp_room,70,85,4        duplicate(PVPSpectator) Spectator's Entrance#2  105
496
497pvp_room,78,85,4        duplicate(PVPSpectator) Spectator's Entrance#3  105
498
499pvp_room,86,85,4        duplicate(PVPSpectator) Spectator's Entrance#4  105
500
501// Spectator Warps
502//============================================================
503pvp_2vs2,5,4,0  script  Combat Square Staff#1::PVPSpecWarp      45,1,1,{
504OnTouch:
505        mes "[Combat Square Staff]";
506        mes "May I help you?";
507        if (select("To the center viewer seat.:Leave Combat Square.") == 1) {
508                warp "pvp_2vs2",38,38;
509                end;
510        }
511        warp "pvp_room",84,39;
512        end;
513}
514
515pvp_2vs2,5,74,0 duplicate(PVPSpecWarp)  Combat Square Staff#2   45,1,1
516
517pvp_2vs2,74,74,0        duplicate(PVPSpecWarp)  Combat Square Staff#3   45,1,1
518
519pvp_2vs2,74,5,0 duplicate(PVPSpecWarp)  Combat Square Staff#4   45,1,1
520
521pvp_2vs2,40,40,0        script  Combat Square Staff#5   45,1,1,{
522        set mapmove,0;
523        mes "[Combat Square Staff]";
524        mes "May I help you?";
525        if (select("To the side viewer seat.:Leave Combat Square.") == 1) {
526                switch(rand(1,4)) {
527                case 1: warp "pvp_2vs2",39,7; end;
528                case 2: warp "pvp_2vs2",39,73; end;
529                case 3: warp "pvp_2vs2",7,39; end;
530                case 4: warp "pvp_2vs2",73,39; end;
531                }
532        }
533        warp "pvp_c_room",84,39;
534        end;
535}
536
537// PVP Area Exit warp
538//============================================================
539pvp_room,51,19,0        script  out#eventpvp    45,4,2,{
540OnTouch:
541        mes "[Combat Square Staff]";
542        mes "Did you have fun in Combat Square?";
543        mes "May I ask where you want to go?";
544        next;
545        switch(select("prontera.:morocc.:geffen.:payon.:alberta.:Cancel.")) {
546        case 1: warp "prontera",107,60; end;
547        case 2: warp "morocc",157,96; end;
548        case 3: warp "geffen",120,36; end;
549        case 4: warp "payon",96,100; end;
550        case 5: warp "alberta",41,243; end;
551        case 6: close;
552        }
553}
Note: See TracBrowser for help on using the browser.