viewing paste PVP Master Ultimate v1.3. | Athena
Posted on the
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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
| //|==================================================================================|
//| ___ ___ ___ ___ ___ |
//| /\ \ /\ \ /\ \ /| | /\ \ |
//| |::\ \ /::\ \ /::\ \ |:| | /::\ \ |
//| |:|:\ \ /:/\:\ \ /:/\:\ \ |:| | /:/\:\ \ |
//| __|:|\:\ \ /:/ \:\ \ /:/ \:\ \ __|:| | /:/ /::\ \ |
//| /::::|_\:\__\ /:/__/ \:\__\ /:/__/ \:\__\ /\ |:|__|____ /:/_/:/\:\__\ |
//| \:\--\ \/__/ \:\ \ /:/ / \:\ \ /:/ / \:\/:::::/__/ \:\/:/ \/__/ |
//| \:\ \ \:\ /:/ / \:\ /:/ / \::/__/ \::/__/ |
//| \:\ \ \:\/:/ / \:\/:/ / \:\ \ \:\ \ |
//| \:\__\ \::/ / \::/ / \:\__\ \:\__\ |
//| \/__/ \/__/ \/__/ \/__/ \/__/ |
//| ================================================================================ |
//| Credits: Mooka | eAthena | Please, don't remove credits |
//| ================================================================================ |
//| ObservaÁ„o! O MapFlag Est· No Final Do Script ! |
//| ================================================================================ |
- script init_PM -1,{ // |
//| |
OnInit: // |
//| Configurations: |
//| |
//|=> NPC name. |
set $@pvpm_name$,"[ ^FF0000 Arena ^000000 ]"; // |
//| |
//|=> Want to use Ratio Ranking as the main? [ 1 = On ] |
//|---> Note: Ranking Ratio: Points = Kills - Mortes |
set $@mainRanking,1; // |
//| |
//|=> Untill where Ranking will show. [ Max 127 ] |
set $@showsRankUntil,25; // |
//| |
//|=> PK mode. Is configured to automatically change, change if necessary. |
set $@PK_Mode,getbattleflag("pk_mode"); // |
//| |
//|=> Remove buffs from the player when entering the arena. [ 1 = On] |
set $@breakBuffs,0; // |
//| |
//|=> When the player kills the other, will gain experience? |
//|---> Note 1: Servers high rates, set the "quest_exp_rate". (exp.conf) |
//|---> Note 2: $@lostEXP: Amount of EXP lost when dying. (0=Off) |
//|---> Note 3: Setup command: |
//|--> 0 : Disabled. |
//|--> 1 : Enabled by using equation of the NPC. ($@getEXP*KilledLVL/KillerLVL) |
//|--> 2 : Enabled. The player will always get the amount specified in $@getEXP. |
set $@getEXPoption,1; // |
set $@getEXP,115; // 0,1% on level 50. |
set $@lostEXP,0; // |
//| |
//|=> Enable the counting of points on maps of Woe? |
//|---> Note 1: Do not are sent sounds/broadcast on the WoE maps. |
//|---> Note 2: Setup: |
//|--> 0: Disabled. |
//|--> 1: Enable counting only the PvP. |
//|--> 2: Enable counting only the GvG. |
//|--> 3: Enable both. |
set $@CountPointsInWoE,3; // |
//| |
//|=> Setting Sound & Announce! |
//|---> Note 1: The sound should be placed in the folder data/wav |
//|---> Note 2: If disabling the sound of the UT, it also disables the broadcast.(1) |
//|--> 0 : Disable All Options. |
//|--> 1 : Enable only broadcast Global. |
//|--> 2 : Enable only sounds/broadcast of Unreal Tournament. (1) |
//|--> 3 : Enable both. |
set $@sound,3; // |
//| |
//|=> List the names of Unreal Tournament Sons. |
//|---> Note 1: $@SoundList$[Points where the sound will play (Max. 127)],"Sound Name";
//|---> Note 2: From the latter, will be added 10 and will be repeated the sound, |
//|---> the set with "end" indicates that the last sound is repeated from then on.
//|---> Note 3: The file name is the same that will appear in announce. |
set $@SoundList$[1],"First Blood"; // |
set $@SoundList$[2],"Double Kill"; // |
set $@SoundList$[3],"Triple Kill"; // |
set $@SoundList$[5],"Mega Kill"; // |
set $@SoundList$[10],"Ultra Kill"; // |
set $@SoundList$[15],"Killing Spree"; // |
set $@SoundList$[20],"Ownage"; // |
set $@SoundList$[25],"Holy Shit"; // |
set $@SoundList$[30],"God Like"; // |
set $@SoundList$[35],"Dominating"; // |
set $@SoundList$[40],"Unstoppable"; // |
set $@SoundList$[50],"Monster Kill"; // |
set $@SoundList$[51],"end"; // |
//|==================================================================================|
query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$);
query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$);
query_sql("select lang from pvpm_lang where lang=0 and lang=1",.@checkDefaultLang);
if(!.@checkDefaultLang && .@checkDefaultLang[1])
{
debugmes "[PvP Master Ultimate] NO DEFAULT LANGUAGE(LANG0)! LANG1 WAS SET AS DEFAULT!";
query_sql("update pvpm_lang set lang=lang-1");
}
query_sql("select count(lang) from pvpm_lang where id=0",.@c);
if(!.@c) debugmes "[PvP Master Ultimate] NO LANGUAGE DATA!";
for(set .@i,0;.@i<.@c;set .@i,.@i+1)
{
deletearray .@str$,82;
query_sql("select str from pvpm_lang where lang="+.@i,.@str$);
for(set .@y,0;.@y<82;set .@y,.@y+1) setd "$@PM_Lang"+.@i+"$["+.@y+"]",.@str$[.@y];
}
OnReloadListMap:
deletearray $@IDPM,10;
deletearray $@mapPM$,10;
deletearray $@MapTypePM,10;
deletearray $@menu$,10;
query_sql("select * from pvpm_map order by id asc limit 10",$@IDPM,$@mapPM$,$@MapTypePM,$@mfPM);
setarray $@TypeArena$[0],"^CD5C5C<PvP>","^FF4500<PvP Baby>","^8B5742<GvG>","^0047AB<Evento>";
for(set .@j,0;.@j<=(getarraysize($@mapPM$)-1);set .@j,.@j+1)
{
set $@menu$[.@j],"^000000- Arena "+(.@j+1)+" "+$@TypeArena$[$@MapTypePM[.@j]];
setmapflag $@mapPM$[.@j],mf_noreturn;
setmapflag $@mapPM$[.@j],mf_nosave;
setmapflag $@mapPM$[.@j],mf_noteleport;
setmapflag $@mapPM$[.@j],mf_nowarpto;
setmapflag $@mapPM$[.@j],mf_nowarp;
setmapflag $@mapPM$[.@j],mf_nomemo;
setmapflag $@mapPM$[.@j],mf_nopenalty;
setmapflag $@mapPM$[.@j],mf_nobranch;
if(!$@MapTypePM[.@j] && !$@mfPM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp; else
if(!$@MapTypePM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp_noguild;
if($@MapTypePM[.@j]==2) setmapflag $@mapPM$[.@j],mf_gvg;
}
}
- script PM_source -1,{
while(1)
{
mes $@pvpm_name$;
mes callfunc("getMesPM",1);
mes callfunc("getMesPM",2);
mes callfunc("getMesPM",3);
mes "^008B8B< PvP "+callfunc("getMesPM",4)+" - ^FFA500"+$@Player_Lider$+"^008B8B >";
mes "^008B8B< GvG "+callfunc("getMesPM",4)+" - ^FFA500"+$@Guild_Lider$+"^008B8B >";
switch(select("^FFA500- "+callfunc("getMesPM",5)+"^000000:- Ranking:- "+callfunc("getMesPM",6)+":- "+callfunc("getMesPM",7)+":- "+callfunc("getMesPM",79)))
{
case 1:
for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) set @m$[@i]," ^0000FF["+getmapusers($@mapPM$[@i])+"]";
switch(getarraysize($@IDPM))
{
case 1: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0]));
case 2: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1]));
case 3: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2]));
case 4: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3]));
case 5: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4]));
case 6: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5]));
case 7: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6]));
case 8: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7]));
case 9: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7],$@menu$[8]+@m$[8]));
case 10: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3],$@menu$[4]+@m$[4],$@menu$[5]+@m$[5],$@menu$[6]+@m$[6],$@menu$[7]+@m$[7],$@menu$[8]+@m$[8],$@menu$[9]+@m$[9]));
} mes "** ERROR ** CHECK THE pm_map TABLE"; close;
case 2:
switch(select("- PvP:- PvP "+callfunc("getMesPM",8)+":- PvP (Ratio):- GvG:- GvG "+callfunc("getMesPM",8)+":- GvG (Ratio):- "+callfunc("getMesPM",9)))
{
case 1: callfunc "pvpm_func","Ranking1","kills",0,"PvP"; next; continue;
case 2: callfunc "pvpm_func","Ranking1","dies",0,"PvP (Mortes)"; next; continue;
case 3: callfunc "pvpm_func","Ranking1","ratio",0,"PvP (Ratio)"; next; continue;
case 4: callfunc "pvpm_func","Ranking1","kills",2,"GvG"; next; continue;
case 5: callfunc "pvpm_func","Ranking1","dies",2,"GvG (Mortes)"; next; continue;
case 6: callfunc "pvpm_func","Ranking1","ratio",2,"GvG (Ratio)"; next; continue;
case 7:
switch(select("- "+callfunc("getMesPM",9)+" PvP:- "+callfunc("getMesPM",9)+" PvP "+callfunc("getMesPM",8)+":- "+callfunc("getMesPM",9)+" PvP (Ratio):- "+callfunc("getMesPM",9)+" GvG:- "+callfunc("getMesPM",9)+" GvG "+callfunc("getMesPM",8)+":- "+callfunc("getMesPM",9)+" GvG (Ratio)"))
{
case 1: callfunc "pvpm_func","Ranking2","kills",0; next; continue;
case 2: callfunc "pvpm_func","Ranking2","dies",0; next; continue;
case 3: callfunc "pvpm_func","Ranking2","ratio",0; next; continue;
case 4: callfunc "pvpm_func","Ranking2","kills",2; next; continue;
case 5: callfunc "pvpm_func","Ranking2","dies",2; next; continue;
case 6: callfunc "pvpm_func","Ranking2","ratio",2; next; continue;
}
}
case 3:
next;
mes $@pvpm_name$;
mes callfunc("getMesPM",10);
mes callfunc("getMesPM",11);
mes callfunc("getMesPM",12);
next; continue;
case 4:
close;
case 5:
next;
mes $@pvpm_name$;
mes callfunc("getMesPM",80);
query_sql("select str from pvpm_lang where id=0",@lang$);
for(set @a,0;@a<getarraysize(@lang$);set @a,@a+1) mes @a+" = "+@lang$[@a];
input @inp;
if(@inp < 0 || @inp > (getarraysize(@lang$)-1))
{
mes callfunc("getMesPM",81);
next; continue;
} set PM_Lang,@inp;
next; continue;
}
}
OnInit:
waitingroom "",0;
OnTimer5000:
setarray .@RoomDisplay$,"[PvP] Arena","PvP "+$@PM_Lang0$[4]+" ["+$@Player_Lider$+"]","GvG "+$@PM_Lang0$[4]+" ["+$@Guild_Lider$+"]";
delwaitingroom;
waitingroom .@RoomDisplay$[rand(0,2)],0;
initnpctimer;
}
- script cmd -1,{
OnWhisperGlobal:
if(compare(@whispervar0$,"!warp"))
{
set @ArenaID,@whispervar1$;
if(!@ArenaID)
{
dispbottom callfunc("getMesPM",13);
end;
} callfunc("pvpm_func","Warp",0,@ArenaID);
}
if(compare(@whispervar0$,"!ranking"))
{ if(compare(@whispervar0$,"2"))
{
if(compare(@whispervar1$,"pvp"))
{ if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",0,"Ratio"; end; }
if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",0; else
callfunc "pvpm_func","Ranking2","dies",0;
end;
}
if(compare(@whispervar1$,"gvg"))
{ if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",2,"Ratio"; end; }
if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",2; else
callfunc "pvpm_func","Ranking2","dies",2;
end;
}
}
if(compare(@whispervar1$,"pvp"))
{ if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",0,"Ratio"; end; }
if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",0,"PvP"; else
callfunc "pvpm_func","Ranking1","dies",0,"PvP ( Mortes )";
end;
}
if(compare(@whispervar1$,"gvg"))
{ if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",2,"Ratio"; end; }
if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",2,"GvG"; else
callfunc "pvpm_func","Ranking1","dies",2,"GvG";
end;
}
}
if ( compare(@whispervar0$,"!exit") )
{
getmapxy(@map$,@x,@y,0);
for(set @i,0;@i!=getarraysize($@mapPM$);set @i,@i+1)
{
if (@map$ != $@mapPM$[@i]) continue;
dispbottom callfunc("getMesPM",14);
sleep2 5000;
warp getsavepoint(0),getsavepoint(1),getsavepoint(2);
end;
}
dispbottom callfunc("getMesPM",15);
end;
}
if (compare(@whispervar0$,"lider"))
{
if(compare(@whispervar0$,"pvp")) dispbottom "PvP "+callfunc("getMesPM",4)+": "+$@Player_Lider$; else
dispbottom "GvG "+callfunc("getMesPM",4)+": "+$@Guild_Lider$;
end;
}
if(compare(@whispervar0$,"!truncate") && getgmlevel()>=70)
{
if(compare(@whispervar1$,"pvp"))
{
query_sql("delete from pvpm_data where type=0");
dispbottom callfunc("getMesPM",16);
end;
}
if(compare(@whispervar1$,"gvg"))
{
query_sql("delete from pvpm_data where type=2");
dispbottom callfunc("getMesPM",16);
end;
} dispbottom callfunc("getMesPM",17);
}
if (compare(@whispervar0$,"!ban"))
{
if(@whispervar1$=="") { dispbottom callfunc("getMesPM",18); end; }
if(@whispervar2$=="") { dispbottom callfunc("getMesPM",19); end; }
if(@whispervar3$=="") { dispbottom callfunc("getMesPM",20); end; }
if(@whispervar2$=="showtime")
{ query_sql("select ban from pvpm_data where name='"+@whispervar1$+"' limit 1",@showtime);
dispbottom callfunc("getMesPM",21)+" ["+@whispervar1$+"] ["+@showtime+" "+callfunc("getMesPM",27)+"]";
end;
} if(@whispervar2$=="unban")
{ query_sql("update pvpm_data set ban=0 where name='"+@whispervar1$+"' limit 1");
dispbottom callfunc("getMesPM",22)+@whispervar1$;
message @whispervar1$,callfunc("getMesPM",23);
end;
} set @time,@whispervar2$;
if(@time==0 && @whispervar2$!="unban" || @time==0 && @whispervar2$!="showtime") { dispbottom callfunc("getMesPM",24); end; }
set @id,0;
query_sql("select id from pvpm_data where name='"+@whispervar1$+"' and type="+@whispervar3$,@id);
if(!@id && @whispervar3$=="0" || !@id && @whispervar3$=="2") { dispbottom callfunc("getMesPM",25); end; }
set @bantime,0;
if(compare(@whispervar2$,"-")) query_sql("update pvpm_data set ban=ban"+@time+" where id="+@id+" limit 1"); else
query_sql("update pvpm_data set ban=ban+"+@time+" where id="+@id+" limit 1");
query_sql("select ban from pvpm_data where id="+@id+" limit 1",@bantime);
dispbottom callfunc("getMesPM",26)+" ("+@bantime+" "+callfunc("getMesPM",27)+")";
message @whispervar1$,callfunc("getMesPM",28)+" "+@bantime+" "+callfunc("getMesPM",27)+".";
warpchar "prontera",150,150,getcharid(0,@whispervar1$);
end;
}
if (compare(@whispervar0$,"!map") && getgmlevel()>=70)
{
if (compare(@whispervar1$,"add"))
{
if(getarraysize($@IDPM)>=10)
{
dispbottom callfunc("getMesPM",29);
dispbottom callfunc("getMesPM",30);
end;
} set @type,@whispervar3$;
if(!@type && @whispervar3$==""||@type>2)
{
dispbottom callfunc("getMesPM",31);
dispbottom callfunc("getMesPM",32);
dispbottom callfunc("getMesPM",33);
end;
} set @mapcheck$,"";
query_sql("select map from pvpm_map where map='"+@whispervar2$+"' limit 1",@mapcheck$);
if(@mapcheck$!="")
{
dispbottom callfunc("getMesPM",34);
end;
} query_sql("insert into `pvpm_map` (id,map,type) values ("+(getarraysize($@IDPM)-1)+",'"+@whispervar2$+"',"+@type+")");
dispbottom callfunc("getMesPM",35)+" ("+@whispervar2$+")";
doevent "init_PM::OnReloadListMap";
}
if (compare(@whispervar1$,"del"))
{
if(getarraysize($@IDPM)<=1)
{
dispbottom callfunc("getMesPM",36);
end;
} query_sql("select map from pvpm_map where map='"+@whispervar2$+"'",@mapcheck$);
if(@mapcheck$=="")
{
dispbottom callfunc("getMesPM",37);
end;
} query_sql("delete from pvpm_map where map='"+@whispervar2$+"'");
dispbottom callfunc("getMesPM",38)+" ("+@whispervar2$+")";
doevent "init_PM::OnReloadListMap";
}
if (compare(@whispervar1$,"list"))
{
for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) dispbottom "["+(@i+1)+"] "+$@mapPM$[@i];
end;
}
end;
}
if (compare(@whispervar0$,"!help"))
{
if(compare(@whispervar1$,"!warp")) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",40);
dispbottom "- !warp#1;!warp#2;...!warp#5 ..";
dispbottom callfunc("getMesPM",41);
end;
}
if(compare(@whispervar1$,"!ranking")) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",42);
dispbottom "- !ranking#pvp;!ranking#pvp#die;!ranking#gvg;!ranking#gvg#die;!ranking#ratio";
dispbottom "- !ranking2#pvp;!ranking2#pvp#die;!ranking2#gvg;!ranking2#gvg#die;!ranking2#ratio; (Mostra somente sua posiÁ„o)";
dispbottom callfunc("getMesPM",43);;
end;
}
if(compare(@whispervar1$,"!pvplider") || compare(@whispervar1$,"!gvglider")) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",44);;
end;
}
if(compare(@whispervar1$,"!exit")) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",45);
end;
}
if(compare(@whispervar1$,"!ban") && getgmlevel()>=70) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",46);
dispbottom callfunc("getMesPM",47);
dispbottom callfunc("getMesPM",48);
dispbottom callfunc("getMesPM",49);
dispbottom callfunc("getMesPM",50);
end;
}
if(compare(@whispervar1$,"!map") && getgmlevel()>=70) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",51);
dispbottom callfunc("getMesPM",52);
dispbottom "- Type: 0 = Arena PvP; 1 = Arena PvP Baby; 2 Arena GvG;";
dispbottom callfunc("getMesPM",53);
end;
}
if(compare(@whispervar1$,"!truncate") && getgmlevel()>=70) {
dispbottom callfunc("getMesPM",39);
dispbottom callfunc("getMesPM",54);
dispbottom callfunc("getMesPM",55);
dispbottom callfunc("getMesPM",56);
end;
} dispbottom callfunc("getMesPM",57);
end;
}
dispbottom callfunc("getMesPM",58);
dispbottom callfunc("getMesPM",59);
dispbottom callfunc("getMesPM",60);
dispbottom callfunc("getMesPM",61);
dispbottom callfunc("getMesPM",62);
dispbottom callfunc("getMesPM",63);
dispbottom callfunc("getMesPM",64);
dispbottom callfunc("getMesPM",65);
if(getgmlevel()>=70)
{
dispbottom callfunc("getMesPM",66);
dispbottom callfunc("getMesPM",67);
dispbottom callfunc("getMesPM",68);
dispbottom callfunc("getMesPM",69);
}
}
- script event#pvpm -1,{
OnInit:
OnTimer60000:
query_sql("update pvpm_data set ban=ban-1 where ban>0");
initnpctimer;
end;
OnPCKillEvent:
callfunc("pvpm_func","PCKillEvent");
OnPCDieEvent:
callfunc("pvpm_func","PCDieEvent");
OnPCLoadMapEvent:
callfunc("pvpm_func","PCLoadEvent");
}
function script pvpm_func {
if (getarg(0) == "Ranking1")
{
deletearray @name$[0],getarraysize(@name$);
deletearray @points[0],getarraysize(@points);
query_sql "select name,"+getarg(1)+" from pvpm_data where type="+getarg(2)+" and "+getarg(1)+"!=0 order by "+getarg(1)+" desc limit 125",@name$,@points;
dispbottom "======= Ranking - "+getarg(3)+" =======";
for(set @i,0;@i != $@showsRankUntil;set @i,@i+1)
{
if(@name$[@i]=="") return;
dispbottom (@i+1)+"∫ | "+@name$[@i]+" | "+@points[@i];
} return;
}
if (getarg(0) == "Ranking2")
{
deletearray @name$[0],getarraysize(@name$);
deletearray @points[0],getarraysize(@points);
query_sql "select id,"+getarg(1)+" from pvpm_data where type="+getarg(2)+" order by "+getarg(1)+" desc limit 125",@id,@points;
for(set @i,0;@i <= 125;set @i,@i+1)
{
if (@id[@i] == getcharid(getarg(2)))
{
dispbottom "- "+strcharinfo(getarg(2))+" | "+(@i+1)+"∫ | "+@points[@i];
return;
}
}
dispbottom callfunc("getMesPM",70);
return;
}
if(getarg(0)=="Warp")
{
if(getarg(1))
{
if($@MapTypePM[(getarg(2)-1)]==2 && !getcharid(2))
{
mes $@pvpm_name$;
mes callfunc("getMesPM",71);
close;
} if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2)
{
mes $@pvpm_name$;
mes callfunc("getMesPM",72);
close;
} if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0,1); else callfunc("pvpm_func","ban",2,1);
} else {
getmapxy(@map$,@x,@y,0);
if($@mapPM$[(getarg(2)-1)]==@map$)
{
dispbottom "<!!!> "+callfunc("getMesPM",73);
end;
} if($@MapTypePM[(getarg(2)-1)]==2)
{
dispbottom "<!!!> "+callfunc("getMesPM",71);
end;
} if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2)
{
dispbottom "<!!!> "+callfunc("getMesPM",72);
end;
} if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0); else callfunc("pvpm_func","ban",2);
} set @MapIDx,(getarg(2)-1);
if($@breakBuffs) sc_end -1;
warp $@mapPM$[(getarg(2)-1)],0,0;
end;
}
if (getarg(0) == "ban")
{
set @bantime,0;
query_sql("select ban from pvpm_data where id="+getcharid(getarg(1))+" limit 1",@bantime);
if(!@bantime) return;
if(!getarg(2,0)) { dispbottom "<!!!> "+callfunc("getMesPM",74)+" "+@bantime+" "+callfunc("getMesPM",27)+"!"; end; } else
{ mes "^FF7F50<!!!> ^FFA500"+callfunc("getMesPM",74)+" ^FF7F50"+@bantime+"^FFA500 "+callfunc("getMesPM",27)+"!"; close; }
}
if (getarg(0) == "Up")
{
if($@getEXPoption) callfunc("pvpm_func","getexp");
set @name$,"";
set @points,0;
query_sql("select name,"+getarg(1)+" from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@name$,@points);
if (@name$=="")
{
query_sql("INSERT INTO pvpm_data (id,"+getarg(1)+",name,annc,type) values ("+getcharid(getarg(2))+",1,'"+strcharinfo(getarg(2))+"',"+getarg(3)+","+getarg(2)+")");
dispbottom "Score: 1";
end;
} query_sql("update pvpm_data set "+getarg(1)+"="+getarg(1)+"+1 where id="+getcharid(getarg(2)));
set @points,@points+1;
if($@mainRanking)
{
set @kills,0;
set @dies,0;
query_sql("select kills,dies from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@kills,@dies);
query_sql("update pvpm_data set ratio="+(@kills-@dies)+" where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1");
set @points,@kills-@dies;
return;
} return;
}
if (getarg(0) == "ChangeLeader")
{
set @L_name$,"";
set @L_points,0;
if(!$@mainRanking) query_sql("select name,kills from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points); else
query_sql("select name,ratio from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points);
if (@points > @L_points && @L_name$ != strcharinfo(getarg(1)))
{
query_sql("update pvpm_data set leader=0 where type="+getarg(1));
query_sql("update pvpm_data set leader=1 where id="+getcharid(getarg(1))+" and type="+getarg(1));
mapannounce @map$,strcharinfo(getarg(1))+" | "+callfunc("getMesPM",75)+" !",bc_map,0xFF7F50;
set $@Player_Lider$,"";
set $@Guild_Lider$,"";
query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$);
query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$);
} return;
}
if (getarg(0) == "Annc")
{
set @points,0;
set @annc,0;
query_sql "select kills,annc from pvpm_data where id="+getcharid(getarg(1))+" and type="+getarg(1),@points,@annc;
if(!@annc) query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1);
if (@points >= @annc)
{
Announce strcharinfo(getarg(1))+" | "+@points+" "+callfunc("getMesPM",76)+"! ["+getarg(3)+"]",bc_all,0xFF7F50;
query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1);
if($@sound==1||$@sound==3) soundeffectall "Monster Kill.wav",0;
} if(!$@sound||$@sound==1) return;
if(getarg(3)=="PvP")
{
if(@noMoreSounds&&@withoutDying==@withoutDyingAnnc)
{
mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@noMoreSounds]+"! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50;
soundeffectall $@SoundList$[@noMoreSounds]+".wav",0,@map$;
set @withoutDyingAnnc,@withoutDyingAnnc+5;
return;
}
if($@SoundList$[@withoutDying]=="end")
{
set @withoutDyingAnnc,@withoutDyingAnnc+5;
set @noMoreSounds,@withoutDying-1;
}
if($@SoundList$[@withoutDying]!=""&&!@noMoreSounds)
{
mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@withoutDying]+" ! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50;
soundeffectall $@SoundList$[@withoutDying]+".wav",0,@map$;
}
} return;
}
if(getarg(0) == "PCKillEvent")
{
set @Live,1;
if(@RightWoEMap)
{
if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",0,100;
dispbottom "Player Score: "+@points;
if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",2,1000;
dispbottom "Guild Score: "+@points;
end;
} getmapxy(@map$,@x,@y,0);
if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]>=0 && $@MapTypePM[@MapIDx]<=1 || $@PK_Mode)
{
set @withoutDying,@withoutDying+1;
callfunc("pvpm_func","Up","kills",0,100);
dispbottom "Player Score: "+@points;
callfunc("pvpm_func","ChangeLeader",0);
callfunc("pvpm_func","Annc",0,100,"PvP");
}
if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]==2 && getcharid(2) || $@PK_Mode && getcharid(2))
{
callfunc("pvpm_func","Up","kills",2,1000);
dispbottom "Guild Score: "+@points;
callfunc("pvpm_func","ChangeLeader",2);
callfunc("pvpm_func","Annc",2,1000,"GvG");
} end;
}
if(getarg(0) == "PCDieEvent")
{
set @Live,0;
if(@RightWoEMap)
{
if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",0,100; if($@mainRanking) dispbottom "Player Score: "+@points; }
if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",2,1000; if($@mainRanking) dispbottom "Guild Score: "+@points; }
}
set @withoutDying,0;
set @noMoreSounds,0;
set @withoutDyingAnnc,0;
set @MapIDx,0;
set @RightWoEMap,0;
getmapxy(@map$,@x,@y,0);
if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]>=0 && $@MapTypePM[@MapIDx]<=1 || $@PK_Mode) { callfunc "pvpm_func","Up","dies",0,100; if($@mainRanking) dispbottom "Player Score: "+@points; }
if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]==2 && getcharid(2) || $@PK_Mode && getcharid(2)) { callfunc "pvpm_func","Up","dies",2,1000; if($@mainRanking) dispbottom "Guild Score: "+@points; }
end;
}
if(getarg(0) == "PCLoadEvent")
{
getmapxy(@map$,@x,@y,0);
if(getcastlename(@map$)=="") { set @RightWoEMap,0; end; }
if(agitcheck() || agitcheck2()) set @RightWoEMap,1;
end;
}
if(getarg(0) == "getexp")
{
if(@Live)
{
attachrid(killedrid);
set .@BaseLevel,BaseLevel;
attachrid(killerrid);
if($@getEXPoption==1) set @EXP,(($@getEXP*.@BaseLevel)/BaseLevel); else set @EXP,$@getEXP;
getexp @EXP,@EXP;
dispbottom callfunc("getMesPM",77)+" "+@EXP+" EXP.";
} else {
if(BaseExp) set BaseExp,BaseExp-$@lostEXP;
if(JobExp) set JobExp,JobExp-$@lostEXP;
dispbottom callfunc("getMesPM",78)+" "+$@lostEXP+" EXP.";;
} return;
}
}
function script getMesPM { return getd("$@PM_Lang"+PM_Lang+"$["+getarg(0)+"]"); }
//================== DUPLICATE =====================
prontera,151,193,4 duplicate(PM_source) [PvP] Arena#1 899
morocc,152,97,4 duplicate(PM_source) [PvP] Arena#2 899
geffen,127,65,4 duplicate(PM_source) [PvP] Arena#3 899
alberta,26,240,4 duplicate(PM_source) [PvP] Arena#4 899
izlude,122,119,4 duplicate(PM_source) [PvP] Arena#5 899
aldebaran,147,119,4 duplicate(PM_source) [PvP] Arena#6 899
xmas,145,136,4 duplicate(PM_source) [PvP] Arena#7 899
comodo,184,158,4 duplicate(PM_source) [PvP] Arena#8 899
gonryun,161,126,4 duplicate(PM_source) [PvP] Arena#9 899
louyang,226,106,4 duplicate(PM_source) [PvP] Arena#10 899
ayothaya,155,121,4 duplicate(PM_source) [PvP] Arena#11 899
hugel,87,164,4 duplicate(PM_source) [PvP] Arena#12 899
moscovia,209,190,5 duplicate(PM_source) [PvP] Arena#13 899
//================== WOE =====================
//Necess·rio para ativar o sistema de contagem dos pontos na woe.
//caso queira desativar algum mapa, retire-o daqui.
aldeg_cas01 mapflag loadevent
aldeg_cas02 mapflag loadevent
aldeg_cas03 mapflag loadevent
aldeg_cas04 mapflag loadevent
gefg_cas01 mapflag loadevent
gefg_cas02 mapflag loadevent
gefg_cas03 mapflag loadevent
gefg_cas04 mapflag loadevent
gefg_cas05 mapflag loadevent
payg_cas01 mapflag loadevent
payg_cas02 mapflag loadevent
payg_cas03 mapflag loadevent
payg_cas04 mapflag loadevent
payg_cas05 mapflag loadevent
prtg_cas01 mapflag loadevent
prtg_cas02 mapflag loadevent
prtg_cas03 mapflag loadevent
prtg_cas04 mapflag loadevent
prtg_cas05 mapflag loadevent
schg_cas01 mapflag loadevent
schg_cas02 mapflag loadevent
schg_cas03 mapflag loadevent
schg_cas04 mapflag loadevent
schg_cas05 mapflag loadevent
arug_cas01 mapflag loadevent
arug_cas02 mapflag loadevent
arug_cas03 mapflag loadevent
arug_cas04 mapflag loadevent
arug_cas05 mapflag loadevent
//N√O APAGUE DAQUI PARA BAIXO!
pay_gld mapflag loadevent
prt_gld mapflag loadevent
sch_gld mapflag loadevent
aru_gld mapflag loadevent
gef_fild13 mapflag loadevent
alde_gld mapflag loadevent
n_castle mapflag loadevent |
Viewed 1047 times, submitted by Guest.