· 6 years ago · Dec 20, 2019, 01:04 PM
1//|==================================================================================|
2//| ___ ___ ___ ___ ___ |
3//| /\ \ /\ \ /\ \ /| | /\ \ |
4//| |::\ \ /::\ \ /::\ \ |:| | /::\ \ |
5//| |:|:\ \ /:/\:\ \ /:/\:\ \ |:| | /:/\:\ \ |
6//| __|:|\:\ \ /:/ \:\ \ /:/ \:\ \ __|:| | /:/ /::\ \ |
7//| /::::|_\:\__\ /:/__/ \:\__\ /:/__/ \:\__\ /\ |:|__|____ /:/_/:/\:\__\ |
8//| \:\--\ \/__/ \:\ \ /:/ / \:\ \ /:/ / \:\/:::::/__/ \:\/:/ \/__/ |
9//| \:\ \ \:\ /:/ / \:\ /:/ / \::/__/ \::/__/ |
10//| \:\ \ \:\/:/ / \:\/:/ / \:\ \ \:\ \ |
11//| \:\__\ \::/ / \::/ / \:\__\ \:\__\ |
12//| \/__/ \/__/ \/__/ \/__/ \/__/ |
13//| ================================================================================ |
14//| Script Desenvolvido Por Mooka | eAthena | Por Favor, Não Retire Os Créditos. |
15//| ================================================================================ |
16//| Observação! O MapFlag Está No Final Do Script ! |
17//| ================================================================================ |
18//|[v1.3.0]: Nova Função de Múltiplas linguagens. (Mooka) |
19//| ------ |
20//| v1.2.9 : Nova Tabela! (PM_Lang) (Mooka) |
21//| v1.2.8 : Alteração na função !exit. (Mooka) |
22//| v1.2.7 : Adicionado balão de Chat no npc. (Mooka) |
23//| v1.2.6 : Nova opção! Ganhando experiência no PvP! (Mooka) |
24//| v1.2.5 : Adicionado !map#list. (Mooka) |
25//| v1.2.4 : Mapflags são definidos automaticamente. (Mooka) |
26//| v1.2.3 : Novo campo na tabela 'pvpm_map'. (noguild) (Mooka) |
27//| v1.2.2 : Alteração na função "Changeleader". (Mooka) |
28//| v1.2.1 : Implementada opção para WoE. (Contagem de pontos na WoE) (Mooka) |
29//| v1.2.0 : Novo comando remoto. (!map) (Mooka) |
30//| ------ |
31//| v1.1.9 : Comandos !pvp\!gvg\!baby mergidos no novo comando !warp. (Mooka) |
32//| v1.1.8 : Reformulado Sistema das Arenas. (Mooka) |
33//| v1.1.7 : Nova tabela no PvP Master. (pvpm_map) (Mooka) |
34//| v1.1.6 : Ranking não mostra mais valores com 0. (Mooka) |
35//| v1.1.5 : Novos comandos remotos. (!ban;!truncate) (Mooka) |
36//| v1.1.4 : Adicionado opção de Ranking Ratio aos Menus e CMD Remotos. (Mooka) |
37//| v1.1.3 : Otimizado IF's dos comandos remotos. (Mooka) |
38//| v1.1.2 : Desenvolvida nova opção de Ranking. (Ratio) (Mooka) |
39//| v1.1.1 : Alteração na tabela pvpm_data. (Adicionado campo 'ratio') (Mooka) |
40//| v1.1.0 : Novo comando remoto. (!help) (Mooka) |
41//| ------ |
42//| v1.0.9 : Adicionado duplicações do npc em todas as cidades. (Mooka) |
43//| v1.0.8 : Adicionada opção para retirar buffs. (Mooka) |
44//| v1.0.7 : Correção na função Ranking2. (Mooka) |
45//| v1.0.6 : Correção no comando !exit. (Mooka) |
46//| v1.0.5 : Correção no bug de enviar o som "end" causando erro. (Mooka) |
47//| v1.0.4 : Implementado Sons do Unreal Tournament. (Mooka) |
48//| v1.0.3 : Adicionado novo tipo de contagem de Pontos com Announce. (Mooka) |
49//| v1.0.2 : Adicionada opção para servidores PK. (Mooka) |
50//| v1.0.1 : Adicionado PvP Baby. (Mooka) |
51//| v1.0.0 : Desenvolvida Versão. (Mooka) |
52//| ================================================================================ |
53//| Table update (v1.3.0+): |
54//| DROP TABLE IF EXISTS `pvpm_lang`; |
55//| CREATE TABLE `pvpm_lang` ( |
56//| `id` int(11) unsigned NOT NULL default '0', |
57//| `lang` int(11) unsigned NOT NULL default '0', |
58//| `str` varchar(255) NOT NULL default '', |
59//| KEY `id` (`id`) |
60//| ) TYPE=MyISAM; |
61//| -------------------------------------------------------------------------------- |
62//| Table update (v1.2.3+): |
63//| alter table pvpm_map add noguild int(11) not null default '0'; |
64//| update pvpm_map set noguild=1 where map='guild_vs1'; |
65//| -------------------------------------------------------------------------------- |
66//| Table update (v1.1.7+): |
67//| DROP TABLE IF EXISTS `pvpm_map`; |
68//| CREATE TABLE `pvpm_map` ( |
69//| `id` int(11) unsigned NOT NULL default '0', |
70//| `map` varchar(255) NOT NULL default 'NULL', |
71//| `type` int(11) unsigned NOT NULL default '0', |
72//| KEY `id` (`id`) |
73//| ) TYPE=MyISAM; |
74//| insert into pvpm_map (id,map,type) values (0,'guild_vs3',0); |
75//| insert into pvpm_map (id,map,type) values (1,'pvp_n_1-5',0); |
76//| insert into pvpm_map (id,map,type) values (2,'guild_vs1',2); |
77//| insert into pvpm_map (id,map,type) values (3,'prt_are01',2); |
78//| insert into pvpm_map (id,map,type) values (4,'guild_vs2',1); |
79//| -------------------------------------------------------------------------------- |
80//| Table update (v1.1.1+): |
81//| alter table pvpm_data add ratio int(11) not null default '0' after dies |
82//| -------------------------------------------------------------------------------- |
83//| Table update (v1.0.0+): |
84//| DROP TABLE IF EXISTS `pvpm_data`; |
85//| CREATE TABLE `pvpm_data` ( |
86//| `id` int(11) unsigned NOT NULL default '0', |
87//| `name` varchar(255) NOT NULL default '', |
88//| `kills` int(11) unsigned NOT NULL default '0', |
89//| `dies` int(11) unsigned NOT NULL default '0', |
90//| `leader` int(11) unsigned NOT NULL default '0', |
91//| `annc` int(11) unsigned NOT NULL default '0', |
92//| `ban` int(11) unsigned NOT NULL default '0', |
93//| `type` int(11) unsigned NOT NULL default '0', |
94//| KEY `id` (`id`), |
95//| KEY `kills` (`kills`), |
96//| KEY `dies` (`dies`) |
97//| ) TYPE=MyISAM; |
98//| |
99//| ================================================================================ |
100- script init_PM -1,{ // |
101//| |
102//| -------------------------------------------------------------------------------- |
103//| |!Aviso importante sobre as configurações! | |
104//| |O Sistema de Arena terá problemas caso passe de 10 mapas na lista. | |
105//| |É possível alterar este limite editando o script, caso queira fale comigo. | |
106//| -------------------------------------------------------------------------------- |
107//| |
108OnInit: // |
109//| Configurações: |
110//| |
111//|=> Nome do npc na janela. |
112set $@pvpm_name$,"[ ^FF0000 Arena ^000000 ]"; // |
113//| |
114//|=> Deseja usar o Ranking Ratio como principal? [ 1 = Sim ] |
115//|---> Nota: Ranking Ratio: Pontuação = Kills - Mortes |
116set $@mainRanking,1; // |
117//| |
118//|=> Até onde o Ranking irá mostrar. [ Máximo 127 ] |
119set $@showsRankUntil,10; // |
120//| |
121//|=> Modo PK. Está configurado para alterar automaticamente, mude se necessário. |
122set $@PK_Mode,getbattleflag("pk_mode"); // |
123//| |
124//|=> Deseja que ao player entrar no pvp perca os buff? [ 1 = Sim] |
125set $@breakBuffs,0; // |
126//| |
127//|=> Quando o player matar o outro, deve ganhar experiência? |
128//|---> Nota 1: Servidores de rates alta, configure o "quest_exp_rate". (exp.conf) |
129//|---> Nota 2: $@lostEXP: Quantidade de EXP perdida ao morrer. ( 0 = Desativado ) |
130//|---> Nota 3: Configuração do comando: |
131//|--> 0 : Desativado. |
132//|--> 1 : Ativado usando fórmula de EXP. ($@getEXP*KilledLVL/KillerLVL) |
133//|--> 2 : Ativado, o player sempre irá ganhar a quantia definida no $@getEXP. |
134set $@getEXPoption,0; // |
135set $@getEXP,0; // 0,1% no level 50. |
136set $@lostEXP,0; // |
137//| |
138//|=> Deseja ativar a contagem de pontos nos mapas da WoE? |
139//|---> Nota 1: Não são enviandos sons/broadcast nos mapas da WoE. |
140//|---> Nota 2: Opções de contagem. |
141//|--> 0: Desativado. |
142//|--> 1: Ativar contagem somente do PvP. |
143//|--> 2: Ativar contagem somente do GvG. |
144//|--> 3: Ativar ambos. |
145set $@CountPointsInWoE,0; // |
146//| |
147//|=> Configuração do Som e Announce! |
148//|---> Nota 1: Os sons devem ser colocados na pasta data/wav em formato .wav |
149//|---> Nota 2: Se desativar o som do UT, desativará o broadcast dele também.(2) |
150//|--> 0 : Desativar Todas Opções. |
151//|--> 1 : Ativar somente broadcast Global. |
152//|--> 2 : Ativar somente sons/broadcast do Unreal Tournament. |
153//|--> 3 : Ativar Ambos. |
154set $@sound,3; // |
155//| |
156//|=> Lista com o nomes dos Sons Unreal Tournament. |
157//|---> Nota 1: $@SoundList$[Pontos em que irá tocar o som(Max. 127)],"Nome do Som"; |
158//|---> Nota 2: A partir do ultimo, será somado 10 e repetirá o som, o set |
159//|---> com "end" indica que o ultimo som será repetido dali em diante. |
160//|---> Nota 3: O nome do arquivo é o mesmo que será exibido no announce. |
161set $@SoundList$[1],"First Blood"; // |
162set $@SoundList$[2],"Double Kill"; // |
163set $@SoundList$[3],"Triple Kill"; // |
164set $@SoundList$[5],"Mega Kill"; // |
165set $@SoundList$[10],"Ultra Kill"; // |
166set $@SoundList$[15],"Killing Spree"; // |
167set $@SoundList$[20],"Ownage"; // |
168set $@SoundList$[25],"Holy Shit"; // |
169set $@SoundList$[30],"God Like"; // |
170set $@SoundList$[35],"Dominating"; // |
171set $@SoundList$[40],"Unstoppable"; // |
172set $@SoundList$[50],"Monster Kill"; // |
173set $@SoundList$[51],"end"; // |
174//|==================================================================================|
175
176query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$);
177query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$);
178
179 query_sql("select lang from pvpm_lang where lang=0 and lang=1",.@checkDefaultLang);
180 if(!.@checkDefaultLang && .@checkDefaultLang[1])
181 {
182 debugmes "[PvP Master Ultimate] NO DEFAULT LANGUAGE(LANG0)! LANG1 WAS SET AS DEFAULT!";
183 query_sql("update pvpm_lang set lang=lang-1");
184 }
185
186 query_sql("select count(lang) from pvpm_lang where id=0",.@c);
187 if(!.@c) debugmes "[PvP Master Ultimate] NO LANGUAGE DATA!";
188 for(set .@i,0;.@i<.@c;set .@i,.@i+1)
189 {
190 deletearray .@str$,82;
191 query_sql("select str from pvpm_lang where lang="+.@i,.@str$);
192 for(set .@y,0;.@y<82;set .@y,.@y+1) setd "$@PM_Lang"+.@i+"$["+.@y+"]",.@str$[.@y];
193 }
194
195OnReloadListMap:
196 deletearray $@IDPM,10;
197 deletearray $@mapPM$,10;
198 deletearray $@MapTypePM,10;
199 deletearray $@menu$,10;
200 query_sql("select * from pvpm_map order by id asc limit 10",$@IDPM,$@mapPM$,$@MapTypePM,$@mfPM);
201 setarray $@TypeArena$[0],"^CD5C5C<PvP>","^FF4500<PvP Baby>","^8B5742<GvG>","^0047AB<Evento>";
202 for(set .@j,0;.@j<=(getarraysize($@mapPM$)-1);set .@j,.@j+1)
203 {
204 set $@menu$[.@j],"^000000- Arena "+(.@j+1)+" "+$@TypeArena$[$@MapTypePM[.@j]];
205 setmapflag $@mapPM$[.@j],mf_noreturn;
206 setmapflag $@mapPM$[.@j],mf_nosave;
207 setmapflag $@mapPM$[.@j],mf_noteleport;
208 setmapflag $@mapPM$[.@j],mf_nowarpto;
209 setmapflag $@mapPM$[.@j],mf_nowarp;
210 setmapflag $@mapPM$[.@j],mf_nomemo;
211 setmapflag $@mapPM$[.@j],mf_nopenalty;
212 setmapflag $@mapPM$[.@j],mf_nobranch;
213 if(!$@MapTypePM[.@j] && !$@mfPM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp; else
214 if(!$@MapTypePM[.@j]) setmapflag $@mapPM$[.@j],mf_pvp_noguild;
215 if($@MapTypePM[.@j]==2) setmapflag $@mapPM$[.@j],mf_gvg;
216 }
217}
218
219- script PM_source -1,{
220
221 while(1)
222 {
223 cutin "sc_vicente01",2;
224 mes $@pvpm_name$;
225 mes callfunc("getMesPM",1);
226 mes callfunc("getMesPM",2);
227 mes callfunc("getMesPM",3);
228 mes "^008B8B< PvP "+callfunc("getMesPM",4)+" - ^FFA500"+$@Player_Lider$+"^008B8B >";
229 mes "^008B8B< GvG "+callfunc("getMesPM",4)+" - ^FFA500"+$@Guild_Lider$+"^008B8B >";
230 switch(select("^FFA500- "+callfunc("getMesPM",5)+"^000000:- Ranking:- "+callfunc("getMesPM",6)+":- "+callfunc("getMesPM",7)+":- "+callfunc("getMesPM",79)))
231 {
232 case 1:
233 for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) set @m$[@i]," ^0000FF["+getmapusers($@mapPM$[@i])+"]";
234 switch(getarraysize($@IDPM))
235 {
236 case 1: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0]));
237 case 2: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1]));
238 case 3: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2]));
239 case 4: callfunc("pvpm_func","Warp",1,select($@menu$[0]+@m$[0],$@menu$[1]+@m$[1],$@menu$[2]+@m$[2],$@menu$[3]+@m$[3]));
240 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]));
241 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]));
242 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]));
243 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]));
244 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]));
245 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]));
246 } mes "** ERROR ** CHECK THE pm_map TABLE"; close;
247
248 case 2:
249 switch(select("- PvP:- PvP "+callfunc("getMesPM",8)+":- PvP (Ratio):- GvG:- GvG "+callfunc("getMesPM",8)+":- GvG (Ratio):- "+callfunc("getMesPM",9)))
250 {
251 case 1: callfunc "pvpm_func","Ranking1","kills",0,"PvP"; next; continue;
252 case 2: callfunc "pvpm_func","Ranking1","dies",0,"PvP (Mortes)"; next; continue;
253 case 3: callfunc "pvpm_func","Ranking1","ratio",0,"PvP (Ratio)"; next; continue;
254 case 4: callfunc "pvpm_func","Ranking1","kills",2,"GvG"; next; continue;
255 case 5: callfunc "pvpm_func","Ranking1","dies",2,"GvG (Mortes)"; next; continue;
256 case 6: callfunc "pvpm_func","Ranking1","ratio",2,"GvG (Ratio)"; next; continue;
257 case 7:
258 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)"))
259 {
260 case 1: callfunc "pvpm_func","Ranking2","kills",0; next; continue;
261 case 2: callfunc "pvpm_func","Ranking2","dies",0; next; continue;
262 case 3: callfunc "pvpm_func","Ranking2","ratio",0; next; continue;
263 case 4: callfunc "pvpm_func","Ranking2","kills",2; next; continue;
264 case 5: callfunc "pvpm_func","Ranking2","dies",2; next; continue;
265 case 6: callfunc "pvpm_func","Ranking2","ratio",2; next; continue;
266 }
267 }
268 case 3:
269 next;
270 mes $@pvpm_name$;
271 mes callfunc("getMesPM",10);
272 mes callfunc("getMesPM",11);
273 mes callfunc("getMesPM",12);
274 next; continue;
275 case 4:
276 close2;
277 cutin "",255;
278 end;
279
280 case 5:
281 next;
282 mes $@pvpm_name$;
283 mes callfunc("getMesPM",80);
284 query_sql("select str from pvpm_lang where id=0",@lang$);
285 for(set @a,0;@a<getarraysize(@lang$);set @a,@a+1) mes @a+" = "+@lang$[@a];
286 input @inp;
287 if(@inp < 0 || @inp > (getarraysize(@lang$)-1))
288 {
289 mes callfunc("getMesPM",81);
290 next; continue;
291 } set PM_Lang,@inp;
292 next; continue;
293 }
294 }
295
296OnInit:
297 waitingroom "",0;
298OnTimer5000:
299 setarray .@RoomDisplay$,"[PvP] Arena","PvP "+$@PM_Lang0$[4]+" ["+$@Player_Lider$+"]","GvG "+$@PM_Lang0$[4]+" ["+$@Guild_Lider$+"]";
300 delwaitingroom;
301 waitingroom .@RoomDisplay$[rand(0,2)],0;
302 initnpctimer;
303}
304
305- script cmd -1,{
306
307OnWhisperGlobal:
308
309 if(compare(@whispervar0$,"!warp"))
310 {
311 set @ArenaID,@whispervar1$;
312 if(!@ArenaID)
313 {
314 dispbottom callfunc("getMesPM",13);
315 end;
316 } callfunc("pvpm_func","Warp",0,@ArenaID);
317 }
318
319 if(compare(@whispervar0$,"!ranking"))
320 { if(compare(@whispervar0$,"2"))
321 {
322 if(compare(@whispervar1$,"pvp"))
323 { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",0,"Ratio"; end; }
324 if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",0; else
325 callfunc "pvpm_func","Ranking2","dies",0;
326 end;
327 }
328
329 if(compare(@whispervar1$,"gvg"))
330 { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking2","ratio",2,"Ratio"; end; }
331 if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking2","kills",2; else
332 callfunc "pvpm_func","Ranking2","dies",2;
333 end;
334 }
335 }
336
337 if(compare(@whispervar1$,"pvp"))
338 { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",0,"Ratio"; end; }
339 if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",0,"PvP"; else
340 callfunc "pvpm_func","Ranking1","dies",0,"PvP ( Mortes )";
341 end;
342 }
343
344 if(compare(@whispervar1$,"gvg"))
345 { if(compare(@whispervar2$,"ratio")) { callfunc "pvpm_func","Ranking1","ratio",2,"Ratio"; end; }
346 if(!compare(@whispervar2$,"die")) callfunc "pvpm_func","Ranking1","kills",2,"GvG"; else
347 callfunc "pvpm_func","Ranking1","dies",2,"GvG";
348 end;
349 }
350 }
351
352 if ( compare(@whispervar0$,"!exit") )
353 {
354 getmapxy(@map$,@x,@y,0);
355 for(set @i,0;@i!=getarraysize($@mapPM$);set @i,@i+1)
356 {
357 if (@map$ != $@mapPM$[@i]) continue;
358 dispbottom callfunc("getMesPM",14);
359 sleep2 5000;
360 warp getsavepoint(0),getsavepoint(1),getsavepoint(2);
361 end;
362 }
363 dispbottom callfunc("getMesPM",15);
364 end;
365 }
366
367 if (compare(@whispervar0$,"lider"))
368 {
369 if(compare(@whispervar0$,"pvp")) dispbottom "PvP "+callfunc("getMesPM",4)+": "+$@Player_Lider$; else
370 dispbottom "GvG "+callfunc("getMesPM",4)+": "+$@Guild_Lider$;
371 end;
372 }
373
374 if(compare(@whispervar0$,"!truncate") && getgmlevel()>=70)
375 {
376 if(compare(@whispervar1$,"pvp"))
377 {
378 query_sql("delete from pvpm_data where type=0");
379 dispbottom callfunc("getMesPM",16);
380 end;
381 }
382 if(compare(@whispervar1$,"gvg"))
383 {
384 query_sql("delete from pvpm_data where type=2");
385 dispbottom callfunc("getMesPM",16);
386 end;
387 } dispbottom callfunc("getMesPM",17);
388 }
389
390 if (compare(@whispervar0$,"!ban"))
391 {
392 if(@whispervar1$=="") { dispbottom callfunc("getMesPM",18); end; }
393 if(@whispervar2$=="") { dispbottom callfunc("getMesPM",19); end; }
394 if(@whispervar3$=="") { dispbottom callfunc("getMesPM",20); end; }
395 if(@whispervar2$=="showtime")
396 { query_sql("select ban from pvpm_data where name='"+@whispervar1$+"' limit 1",@showtime);
397 dispbottom callfunc("getMesPM",21)+" ["+@whispervar1$+"] ["+@showtime+" "+callfunc("getMesPM",27)+"]";
398 end;
399 } if(@whispervar2$=="unban")
400 { query_sql("update pvpm_data set ban=0 where name='"+@whispervar1$+"' limit 1");
401 dispbottom callfunc("getMesPM",22)+@whispervar1$;
402 message @whispervar1$,callfunc("getMesPM",23);
403 end;
404 } set @time,@whispervar2$;
405 if(@time==0 && @whispervar2$!="unban" || @time==0 && @whispervar2$!="showtime") { dispbottom callfunc("getMesPM",24); end; }
406 set @id,0;
407 query_sql("select id from pvpm_data where name='"+@whispervar1$+"' and type="+@whispervar3$,@id);
408 if(!@id && @whispervar3$=="0" || !@id && @whispervar3$=="2") { dispbottom callfunc("getMesPM",25); end; }
409 set @bantime,0;
410 if(compare(@whispervar2$,"-")) query_sql("update pvpm_data set ban=ban"+@time+" where id="+@id+" limit 1"); else
411 query_sql("update pvpm_data set ban=ban+"+@time+" where id="+@id+" limit 1");
412 query_sql("select ban from pvpm_data where id="+@id+" limit 1",@bantime);
413 dispbottom callfunc("getMesPM",26)+" ("+@bantime+" "+callfunc("getMesPM",27)+")";
414 message @whispervar1$,callfunc("getMesPM",28)+" "+@bantime+" "+callfunc("getMesPM",27)+".";
415 warpchar "prontera",150,150,getcharid(0,@whispervar1$);
416 end;
417 }
418
419 if (compare(@whispervar0$,"!map") && getgmlevel()>=70)
420 {
421 if (compare(@whispervar1$,"add"))
422 {
423 if(getarraysize($@IDPM)>=10)
424 {
425 dispbottom callfunc("getMesPM",29);
426 dispbottom callfunc("getMesPM",30);
427 end;
428 } set @type,@whispervar3$;
429 if(!@type && @whispervar3$==""||@type>2)
430 {
431 dispbottom callfunc("getMesPM",31);
432 dispbottom callfunc("getMesPM",32);
433 dispbottom callfunc("getMesPM",33);
434 end;
435 } set @mapcheck$,"";
436 query_sql("select map from pvpm_map where map='"+@whispervar2$+"' limit 1",@mapcheck$);
437 if(@mapcheck$!="")
438 {
439 dispbottom callfunc("getMesPM",34);
440 end;
441 } query_sql("insert into `pvpm_map` (id,map,type) values ("+(getarraysize($@IDPM)-1)+",'"+@whispervar2$+"',"+@type+")");
442 dispbottom callfunc("getMesPM",35)+" ("+@whispervar2$+")";
443 doevent "init_PM::OnReloadListMap";
444 }
445
446 if (compare(@whispervar1$,"del"))
447 {
448 if(getarraysize($@IDPM)<=1)
449 {
450 dispbottom callfunc("getMesPM",36);
451 end;
452 } query_sql("select map from pvpm_map where map='"+@whispervar2$+"'",@mapcheck$);
453 if(@mapcheck$=="")
454 {
455 dispbottom callfunc("getMesPM",37);
456 end;
457 } query_sql("delete from pvpm_map where map='"+@whispervar2$+"'");
458 dispbottom callfunc("getMesPM",38)+" ("+@whispervar2$+")";
459 doevent "init_PM::OnReloadListMap";
460 }
461
462 if (compare(@whispervar1$,"list"))
463 {
464 for(set @i,0;@i<=(getarraysize($@IDPM)-1);set @i,@i+1) dispbottom "["+(@i+1)+"] "+$@mapPM$[@i];
465 end;
466 }
467 end;
468 }
469
470 if (compare(@whispervar0$,"!help"))
471 {
472 if(compare(@whispervar1$,"!warp")) {
473 dispbottom callfunc("getMesPM",39);
474 dispbottom callfunc("getMesPM",40);
475 dispbottom "- !warp#1;!warp#2;...!warp#5 ..";
476 dispbottom callfunc("getMesPM",41);
477 end;
478 }
479
480 if(compare(@whispervar1$,"!ranking")) {
481 dispbottom callfunc("getMesPM",39);
482 dispbottom callfunc("getMesPM",42);
483 dispbottom "- !ranking#pvp;!ranking#pvp#die;!ranking#gvg;!ranking#gvg#die;!ranking#ratio";
484 dispbottom "- !ranking2#pvp;!ranking2#pvp#die;!ranking2#gvg;!ranking2#gvg#die;!ranking2#ratio; (Mostra somente sua posição)";
485 dispbottom callfunc("getMesPM",43);;
486 end;
487 }
488
489 if(compare(@whispervar1$,"!pvplider") || compare(@whispervar1$,"!gvglider")) {
490 dispbottom callfunc("getMesPM",39);
491 dispbottom callfunc("getMesPM",44);;
492 end;
493 }
494
495 if(compare(@whispervar1$,"!exit")) {
496 dispbottom callfunc("getMesPM",39);
497 dispbottom callfunc("getMesPM",45);
498 end;
499 }
500
501 if(compare(@whispervar1$,"!ban") && getgmlevel()>=70) {
502 dispbottom callfunc("getMesPM",39);
503 dispbottom callfunc("getMesPM",46);
504 dispbottom callfunc("getMesPM",47);
505 dispbottom callfunc("getMesPM",48);
506 dispbottom callfunc("getMesPM",49);
507 dispbottom callfunc("getMesPM",50);
508 end;
509 }
510
511 if(compare(@whispervar1$,"!map") && getgmlevel()>=70) {
512 dispbottom callfunc("getMesPM",39);
513 dispbottom callfunc("getMesPM",51);
514 dispbottom callfunc("getMesPM",52);
515 dispbottom "- Type: 0 = Arena PvP; 1 = Arena PvP Baby; 2 Arena GvG;";
516 dispbottom callfunc("getMesPM",53);
517 end;
518 }
519
520 if(compare(@whispervar1$,"!truncate") && getgmlevel()>=70) {
521 dispbottom callfunc("getMesPM",39);
522 dispbottom callfunc("getMesPM",54);
523 dispbottom callfunc("getMesPM",55);
524 dispbottom callfunc("getMesPM",56);
525 end;
526 } dispbottom callfunc("getMesPM",57);
527 end;
528 }
529
530 dispbottom callfunc("getMesPM",58);
531 dispbottom callfunc("getMesPM",59);
532 dispbottom callfunc("getMesPM",60);
533 dispbottom callfunc("getMesPM",61);
534 dispbottom callfunc("getMesPM",62);
535 dispbottom callfunc("getMesPM",63);
536 dispbottom callfunc("getMesPM",64);
537 dispbottom callfunc("getMesPM",65);
538 if(getgmlevel()>=70)
539 {
540 dispbottom callfunc("getMesPM",66);
541 dispbottom callfunc("getMesPM",67);
542 dispbottom callfunc("getMesPM",68);
543 dispbottom callfunc("getMesPM",69);
544 }
545
546}
547
548- script event#pvpm -1,{
549OnInit:
550OnTimer60000:
551 query_sql("update pvpm_data set ban=ban-1 where ban>0");
552 initnpctimer;
553 end;
554
555OnPCKillEvent:
556 callfunc("pvpm_func","PCKillEvent");
557
558OnPCDieEvent:
559 callfunc("pvpm_func","PCDieEvent");
560
561OnPCLoadMapEvent:
562 callfunc("pvpm_func","PCLoadEvent");
563}
564
565function script pvpm_func {
566
567 if (getarg(0) == "Ranking1")
568 {
569 deletearray @name$[0],getarraysize(@name$);
570 deletearray @points[0],getarraysize(@points);
571 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;
572 dispbottom "======= Ranking - "+getarg(3)+" =======";
573 for(set @i,0;@i != $@showsRankUntil;set @i,@i+1)
574 {
575 if(@name$[@i]=="") return;
576 dispbottom (@i+1)+"º | "+@name$[@i]+" | "+@points[@i];
577 } return;
578 }
579
580 if (getarg(0) == "Ranking2")
581 {
582 deletearray @name$[0],getarraysize(@name$);
583 deletearray @points[0],getarraysize(@points);
584 query_sql "select id,"+getarg(1)+" from pvpm_data where type="+getarg(2)+" order by "+getarg(1)+" desc limit 125",@id,@points;
585 for(set @i,0;@i <= 125;set @i,@i+1)
586 {
587 if (@id[@i] == getcharid(getarg(2)))
588 {
589 dispbottom "- "+strcharinfo(getarg(2))+" | "+(@i+1)+"º | "+@points;
590 return;
591 }
592 }
593 dispbottom callfunc("getMesPM",70);
594 return;
595 }
596
597 if(getarg(0)=="Warp")
598 {
599 if(getarg(1))
600 {
601 if($@MapTypePM[(getarg(2)-1)]==2 && !getcharid(2))
602 {
603 next;
604 mes $@pvpm_name$;
605 mes callfunc("getMesPM",71);
606 close2;
607 cutin "",255;
608 end;
609 } if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2)
610 {
611 next;
612 mes $@pvpm_name$;
613 mes callfunc("getMesPM",72);
614 close2;
615 cutin "",255;
616 end;
617 } if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0,1); else callfunc("pvpm_func","ban",2,1);
618 } else {
619 getmapxy(@map$,@x,@y,0);
620 if($@mapPM$[(getarg(2)-1)]==@map$)
621 {
622 dispbottom "<!!!> "+callfunc("getMesPM",73);
623 end;
624 } if($@MapTypePM[(getarg(2)-1)]==2)
625 {
626 dispbottom "<!!!> "+callfunc("getMesPM",71);
627 end;
628 } if($@MapTypePM[(getarg(2)-1)]==1 && Upper!=2)
629 {
630 dispbottom "<!!!> "+callfunc("getMesPM",72);
631 end;
632 } if($@MapTypePM==0||$@MapTypePM==1) callfunc("pvpm_func","ban",0); else callfunc("pvpm_func","ban",2);
633 } set @MapIDx,(getarg(2)-1);
634 if($@breakBuffs) sc_end -1;
635 warp $@mapPM$[(getarg(2)-1)],0,0;
636 end;
637 }
638
639 if (getarg(0) == "ban")
640 {
641 set @bantime,0;
642 query_sql("select ban from pvpm_data where id="+getcharid(getarg(1))+" limit 1",@bantime);
643 if(!@bantime) return;
644 if(!getarg(2,0)) { dispbottom "<!!!> "+callfunc("getMesPM",74)+" "+@bantime+" "+callfunc("getMesPM",27)+"!"; end; } else
645 { mes "^FF7F50<!!!> ^FFA500"+callfunc("getMesPM",74)+" ^FF7F50"+@bantime+"^FFA500 "+callfunc("getMesPM",27)+"!"; close; }
646 }
647
648 if (getarg(0) == "Up")
649 {
650 if($@getEXPoption) callfunc("pvpm_func","getexp");
651 set @name$,"";
652 set @points,0;
653 query_sql("select name,"+getarg(1)+" from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@name$,@points);
654 if (@name$=="")
655 {
656 query_sql("INSERT INTO pvpm_data (id,"+getarg(1)+",name,annc,type) values ("+getcharid(getarg(2))+",1,'"+strcharinfo(getarg(2))+"',"+getarg(3)+","+getarg(2)+")");
657 dispbottom "Score: 1";
658 end;
659 } query_sql("update pvpm_data set "+getarg(1)+"="+getarg(1)+"+1 where id="+getcharid(getarg(2)));
660 set @points,@points+1;
661 if($@mainRanking)
662 {
663 set @kills,0;
664 set @dies,0;
665 query_sql("select kills,dies from pvpm_data where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1",@kills,@dies);
666 query_sql("update pvpm_data set ratio="+(@kills-@dies)+" where id="+getcharid(getarg(2))+" and type="+getarg(2)+" limit 1");
667 set @points,@kills-@dies;
668 return;
669 } return;
670 }
671
672 if (getarg(0) == "ChangeLeader")
673 {
674 set @L_name$,"";
675 set @L_points,0;
676 if(!$@mainRanking) query_sql("select name,kills from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points); else
677 query_sql("select name,ratio from pvpm_data where leader=1 and type="+getarg(1)+" limit 1",@L_name$,@L_points);
678 if (@points > @L_points && @L_name$ != strcharinfo(getarg(1)))
679 {
680 query_sql("update pvpm_data set leader=0 where type="+getarg(1));
681 query_sql("update pvpm_data set leader=1 where id="+getcharid(getarg(1))+" and type="+getarg(1));
682 mapannounce @map$,strcharinfo(getarg(1))+" | "+callfunc("getMesPM",75)+" !",bc_map,0xFF7F50;
683 set $@Player_Lider$,"";
684 set $@Guild_Lider$,"";
685 query_sql("select name from pvpm_data where leader=1 and type=0 limit 1",$@Player_Lider$);
686 query_sql("select name from pvpm_data where leader=1 and type=2 limit 1",$@Guild_Lider$);
687 } return;
688 }
689
690 if (getarg(0) == "Annc")
691 {
692 set @points,0;
693 set @annc,0;
694 query_sql "select kills,annc from pvpm_data where id="+getcharid(getarg(1))+" and type="+getarg(1),@points,@annc;
695 if(!@annc) query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1);
696 if (@points >= @annc)
697 {
698 announce strcharinfo(getarg(1))+" | "+@points+" "+callfunc("getMesPM",76)+"! ["+getarg(3)+"]",bc_all,0xFF7F50;
699 query_sql "update pvpm_data set annc=annc+"+getarg(2)+" where id="+getcharid(getarg(1))+" and type="+getarg(1);
700 if($@sound==1||$@sound==3) soundeffectall "Monster Kill.wav",0;
701 } if(!$@sound||$@sound==1) return;
702 if(getarg(3)=="PvP")
703 {
704 if(@noMoreSounds&&@withoutDying==@withoutDyingAnnc)
705 {
706 mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@noMoreSounds]+"! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50;
707 soundeffectall $@SoundList$[@noMoreSounds]+".wav",0,@map$;
708 set @withoutDyingAnnc,@withoutDyingAnnc+5;
709 return;
710 }
711 if($@SoundList$[@withoutDying]=="end")
712 {
713 set @withoutDyingAnnc,@withoutDyingAnnc+5;
714 set @noMoreSounds,@withoutDying-1;
715 }
716 if($@SoundList$[@withoutDying]!=""&&!@noMoreSounds)
717 {
718 mapannounce @map$,strcharinfo(0)+" | "+$@SoundList$[@withoutDying]+" ! [ "+@withoutDying+" "+callfunc("getMesPM",76)+" ]",bc_map,0xFF7F50;
719 soundeffectall $@SoundList$[@withoutDying]+".wav",0,@map$;
720 }
721 } return;
722 }
723
724 if(getarg(0) == "PCKillEvent")
725 {
726 set @Live,1;
727 if(@RightWoEMap)
728 {
729 if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",0,100;
730 dispbottom "Player Score: "+@points;
731 if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) callfunc "pvpm_func","Up","kills",2,1000;
732 dispbottom "Guild Score: "+@points;
733 end;
734 } getmapxy(@map$,@x,@y,0);
735 if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]>=0 && $@MapTypePM[@MapIDx]<=1 || $@PK_Mode)
736 {
737 set @withoutDying,@withoutDying+1;
738 callfunc("pvpm_func","Up","kills",0,100);
739 dispbottom "Player Score: "+@points;
740 callfunc("pvpm_func","ChangeLeader",0);
741 callfunc("pvpm_func","Annc",0,100,"PvP");
742 }
743 if(@map$==$@mapPM$[@MapIDx] && $@MapTypePM[@MapIDx]==2 && getcharid(2) || $@PK_Mode && getcharid(2))
744 {
745 callfunc("pvpm_func","Up","kills",2,1000);
746 dispbottom "Guild Score: "+@points;
747 callfunc("pvpm_func","ChangeLeader",2);
748 callfunc("pvpm_func","Annc",2,1000,"GvG");
749 } end;
750 }
751
752 if(getarg(0) == "PCDieEvent")
753 {
754 set @Live,0;
755 if(@RightWoEMap)
756 {
757 if($@CountPointsInWoE==1 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",0,100; if($@mainRanking) dispbottom "Player Score: "+@points; }
758 if($@CountPointsInWoE==2 || $@CountPointsInWoE==3) { callfunc "pvpm_func","Up","dies",2,1000; if($@mainRanking) dispbottom "Guild Score: "+@points; }
759 }
760 set @withoutDying,0;
761 set @noMoreSounds,0;
762 set @withoutDyingAnnc,0;
763 set @MapIDx,0;
764 set @RightWoEMap,0;
765 getmapxy(@map$,@x,@y,0);
766 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; }
767 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; }
768 end;
769 }
770
771 if(getarg(0) == "PCLoadEvent")
772 {
773 getmapxy(@map$,@x,@y,0);
774 if(getcastlename(@map$)=="") { set @RightWoEMap,0; end; }
775 if(agitcheck() || agitcheck2()) set @RightWoEMap,1;
776 end;
777 }
778
779 if(getarg(0) == "getexp")
780 {
781 if(@Live)
782 {
783 attachrid(killedrid);
784 set .@BaseLevel,BaseLevel;
785 attachrid(killerrid);
786 if($@getEXPoption==1) set @EXP,(($@getEXP*.@BaseLevel)/BaseLevel); else set @EXP,$@getEXP;
787 getexp @EXP,@EXP;
788 dispbottom callfunc("getMesPM",77)+" "+@EXP+" EXP.";
789 } else {
790 set BaseExp,BaseExp-$@lostEXP;
791 set JobExp,JobExp-$@lostEXP;
792 dispbottom callfunc("getMesPM",78)+" "+$@lostEXP+" EXP.";;
793 } return;
794 }
795}
796
797function script getMesPM { return getd("$@PM_Lang"+PM_Lang+"$["+getarg(0)+"]"); }
798
799//================== DUPLICATE =====================
800prontera,164,186,4 duplicate(PM_source) [PvP] Arena#1 899
801morocc,162,97,4 duplicate(PM_source) [PvP] Arena#2 899
802geffen,127,65,4 duplicate(PM_source) [PvP] Arena#3 899
803alberta,33,240,4 duplicate(PM_source) [PvP] Arena#4 899
804izlude,122,119,4 duplicate(PM_source) [PvP] Arena#5 899
805aldebaran,147,114,4 duplicate(PM_source) [PvP] Arena#6 899
806xmas,140,136,4 duplicate(PM_source) [PvP] Arena#7 899
807comodo,190,162,4 duplicate(PM_source) [PvP] Arena#8 899
808gonryun,161,126,4 duplicate(PM_source) [PvP] Arena#9 899
809louyang,226,106,4 duplicate(PM_source) [PvP] Arena#10 899
810ayothaya,155,121,4 duplicate(PM_source) [PvP] Arena#11 899
811hugel,94,157,4 duplicate(PM_source) [PvP] Arena#12 899
812moscovia,209,190,5 duplicate(PM_source) [PvP] Arena#13 899
813//================== WOE =====================
814
815//Necessário para ativar o sistema de contagem dos pontos na woe.
816//caso queira desativar algum mapa, retire-o daqui.
817
818aldeg_cas01 mapflag loadevent
819aldeg_cas02 mapflag loadevent
820aldeg_cas03 mapflag loadevent
821aldeg_cas04 mapflag loadevent
822gefg_cas01 mapflag loadevent
823gefg_cas02 mapflag loadevent
824gefg_cas03 mapflag loadevent
825gefg_cas04 mapflag loadevent
826gefg_cas05 mapflag loadevent
827payg_cas01 mapflag loadevent
828payg_cas02 mapflag loadevent
829payg_cas03 mapflag loadevent
830payg_cas04 mapflag loadevent
831payg_cas05 mapflag loadevent
832prtg_cas01 mapflag loadevent
833prtg_cas02 mapflag loadevent
834prtg_cas03 mapflag loadevent
835prtg_cas04 mapflag loadevent
836prtg_cas05 mapflag loadevent
837schg_cas01 mapflag loadevent
838schg_cas02 mapflag loadevent
839schg_cas03 mapflag loadevent
840schg_cas04 mapflag loadevent
841schg_cas05 mapflag loadevent
842arug_cas01 mapflag loadevent
843arug_cas02 mapflag loadevent
844arug_cas03 mapflag loadevent
845arug_cas04 mapflag loadevent
846arug_cas05 mapflag loadevent
847
848//NÃO APAGUE DAQUI PARA BAIXO!
849pay_gld mapflag loadevent
850prt_gld mapflag loadevent
851sch_gld mapflag loadevent
852aru_gld mapflag loadevent
853gef_fild13 mapflag loadevent
854alde_gld mapflag loadevent
855n_castle mapflag loadevent