Jump to content
  • 0

problem display function


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

Hi friends. I would like the help of a scripter who can save me from viewing this script that doesn't work, I select it to see but it doesn't show the ranking.

 

Spoiler

//  ______________________________________________________________________
// /                                                                      \
// |            _           _   _   _                                      |
// |           | |__  _ __ / \ | |_| |__   ___ _ __   __ _                 |
// |           | '_ \| '__/ _ \| __| '_ \ / _ \ '_ \ / _` |                |
// |           | |_) | | / ___ \ |_| | | |  __/ | | | (_| |                |
// |           |_.__/|_|/_/   \_\__|_| |_|\___|_| |_|\__,_|                |
// |                                                                       |
// |                         brAthena Script                               |
// |-----------------------------------------------------------------------|
// | Nome do Script: Sistema PvP 1.5 [SQL]                                 |
// |-----------------------------------------------------------------------|
// | Criado por: eA/brA Dev. Team                                          |
// |-----------------------------------------------------------------------|
// | Versão brA: 1.5                                                       |
// |-----------------------------------------------------------------------|
// | Descrição:                                                            |
// | Um sistema PvP com várias arenas                                      |
// |-----------------------------------------------------------------------|
// | Changelog:                                                            |
// | 1.0 Modificação [brAthena]                                            |
// | [brA]Floozie [Criador]                                                |
// 1.1 Relocorido
// 1.2 Adicionado novos Sons
// 1.3 Almentada Ranking
// \_______________________________________________________________________/
//============================================================
-    script    PvP_InitFunc    -1,{
OnInit:
//= Mapas ====================================================
set $@map$[1],"guild_vs3";
set $@map$[2],"pvp_y_1-2";
//= SoundList ================================================
set $@Sounds$[1], "First Blood";
set $@Sounds$[2], "Double Kill";
set $@Sounds$[3], "Triple Kill";
set $@Sounds$[4], "Monster Kill";
set $@Sounds$[5], "Mega Kill";
//============================================================
}
prontera,155,185,3    script    Arena    512,{

set .@n$, "[ ^cc0000Porteiro PvP^000000 ]";
INICIO:
mes .@n$;
mes "Arena 01 : ^0000FFPVP Arena^000000";
mes "Arena 02 : ^FF0000PVP Izlude^000000";
mes "O que você gostaria de fazer ?";
next;
switch(select("^3366FFEscolher Arena^000000:^800080Visualizar Ranking^000000:^00FF00Ver Minha Posição^000000:Sair")){
case 1:
mes "Escolha a Arena que gostaria de entrar";
mes "Arena 01 : ^0000FFPVP Arena^000000";
mes "Arena 02 : ^FF0000PVP Izlude^000000";
next;
switch(select("- ^0000FFArena Fechada^000000 [ "+getmapusers($@map$[1])+" ]:- ^FF0000Arena Izlude^000000 [ "+getmapusers($@map$[2])+" ]:- Nenhuma")){

case 1:
warp $@map$[1],0,0;
announce ""+strcharinfo(0)+" Entrou na Arena 1 onde os fracos não tem vez!",bc,0xBAB9B9;
end;

case 2:
warp $@map$[2],0,0;
announce ""+strcharinfo(0)+" Entrou no PvP 2, chama PT ou Alt F4?",bc,0xBAB9B9;
end;

close;
}
}
}
warp $@map$[4],0,0;
end;

case 5:
if(Class < 4023 || Class > 4045){
mes .@n$;
mes "Só babys podem entrar nesse PvP !";
close;
}
warp $@map$[5],128,114;
end;

case 6:
close;
}

case 2:
mes .@n$;
mes "Escolha a Arena do Rank:";
next;
switch(select("- Rank ^0000FFArena 01^000000:- Rank ^FF0000Arena 02^000000:- Voltar")){

case 1: callfunc("PvPS_Func","Ranking_Arena",1);close;
case 2: callfunc("PvPS_Func","Ranking_Arena",2);close;
case 6: goto INICIO;end;

}

case 3:
mes .@n$;
mes "Escolha o Tipo de PVP:";
next;
switch(select("- ^0000FFArena 01^000000:- ^FF0000Arena 02^000000:- Voltar")){

case 1: callfunc("PvPS_Func","MeuRanking",1);close;
case 2: callfunc("PvPS_Func","MeuRanking",2);close;
case 6: goto INICIO;end;
}
close;
}

}

-    script    ArenaPvP#Events    -1,{

OnPCKillEvent:
getmapxy(@mapa$,@x,@y,0);
for(set @i,1;( @i <= getarraysize($@map$)-1);set @i,@i+1)
{
if($@map$[@i] == @mapa$) callfunc("PvPS_Func","KillEvent",@i);
}
OnPCDieEvent:
getmapxy(@mapa$,@x,@y,0);
for(set @i,1;@i < getarraysize($@map$);set @i,@i+1)
{
if($@map$[@i] == @mapa$) callfunc("PvPS_Func","DieEvent",@i);
}
}

function    script    PvPS_Func    {
if(getarg(0) == "Ranking_Arena")
{
query_sql "SELECT `nome`, `matou`, `morreu`, `pontos` FROM `pvp_arenas` WHERE `id`="+getarg(1)+" ORDER BY `pontos` DESC LIMIT 10",@nome$,@matou,@morreu,@pontos;
mes "(Nome - ^3366FFMatou^000000 - ^FF9900Morreu^000000 - ^FF0000Saldo^000000)";
for(set @i,0;@i <= 99;set @i,@i+1){
mes "["+(@i+1)+"] - "+@nome$[@i]+" - ^3366FF"+@matou[@i]+"^000000 - ^FF9900"+@morreu[@i]+"^000000 - ^FF0000"+@pontos[@i]+"^000000";
}
return;
}

if(getarg(0) == "MeuRanking")
{
query_sql "SELECT `nome`, `matou`, `morreu`, `pontos` FROM `pvp_arenas` WHERE `id`="+getarg(1)+" AND `nome` = '"+strcharinfo(0)+"'",@nome$,@matou,@morreu,@pontos;
if(@nome$ == ""){
mes .@n$;
mes "Você nunca participou dessa arena !";
close;
}
mes .@n$;
mes "Você Matou: ^3366FF"+@matou+" ^000000Vezes";
mes "Você Morreu: ^FF9900"+@morreu+" ^000000Vezes";
mes "Seu Saldo: ^FF0000"+@pontos+" ^000000Vezes";
return;
}

if(getarg(0) == "KillEvent")
{
set @nome$,"";
set @PvPPoints,0;
query_sql "SELECT `nome`,`matou` FROM `pvp_arenas` WHERE `id` = "+getarg(1)+" AND `nome` = '"+strcharinfo(0)+"'",@nome$,@PvPPoints;
if(@nome$ == "") query_sql "INSERT INTO `pvp_arenas` (`id`, `nome`, `matou`, `pontos`) VALUES ("+getarg(1)+",'"+strcharinfo(0)+"',1,1)"; else
query_sql "UPDATE `pvp_arenas` SET `matou` = `matou`+1, `pontos` = `pontos`+1 WHERE `id`="+getarg(1)+" AND `nome` = '"+strcharinfo(0)+"'";
set @PvPPoints, @PvPPoints+1;
dispbottom "Pontos: "+@PvPPoints;
set @soundKills,@soundKills+1;
if(@soundKills >= getarraysize($@Sounds$)) set @soundKills,@soundKills-1;
announce "O Jogador [ "+strcharinfo(O)+" ] matou [ "+rid2name(killedrid)+" ] e está em "+$@Sounds$[@soundKills]+" !",bc_map,0xD20000;
soundeffectall $@Sounds$[@soundKills]+".wav",0,@mapa$;
end;
}

if(getarg(0) == "DieEvent")
{
set @soundKills,0;
set @nome$,"";
query_sql "SELECT `nome` FROM `pvp_arenas` WHERE `id`="+getarg(1)+" AND `nome` = '"+strcharinfo(0)+"'",@nome$;
if(@nome$ == "") query_sql "INSERT INTO `pvp_arenas` (`id`, `nome`, `morreu`, `pontos`) VALUES ("+getarg(1)+",'"+strcharinfo(0)+"',1,-1)"; else
query_sql "UPDATE `pvp_arenas` SET `morreu` = `morreu`+1, `pontos` = `pontos`-1 WHERE `id`="+getarg(1)+" AND `nome` = '"+strcharinfo(0)+"'";
end;
}
}

//=== MapFlags - Arenas =================================
// Não mude isso caso não saiba o que está fazendo !
//- Arena 01 --------------------------------------------
guild_vs1    mapflag    gvg    off
guild_vs1    mapflag    nowarp
guild_vs1    mapflag    noteleport
guild_vs1    mapflag    nowarpto
guild_vs1    mapflag    nobranch
guild_vs1    mapflag    nosave    SavePoint
guild_vs1    mapflag    nomemo
guild_vs1    mapflag    nopenalty
guild_vs1    mapflag    pvp

//- Arena 02 --------------------------------------------
guild_vs2    mapflag    gvg    off
guild_vs2    mapflag    nowarp
guild_vs2    mapflag    noteleport
guild_vs2    mapflag    nowarpto
guild_vs2    mapflag    nobranch
guild_vs2    mapflag    nosave    SavePoint
guild_vs2    mapflag    nomemo
guild_vs2    mapflag    nopenalty
guild_vs2    mapflag    pvp
guild_vs2    mapflag    noexp

guild_vs3    mapflag    noexp

//- Arena 03 --------------------------------------------
guild_vs5    mapflag    gvg    off
guild_vs5    mapflag    nowarp
guild_vs5    mapflag    noteleport
guild_vs5    mapflag    nowarpto
guild_vs5    mapflag    nobranch
guild_vs5    mapflag    nosave    SavePoint
guild_vs5    mapflag    nomemo
guild_vs5    mapflag    nopenalty
guild_vs5    mapflag    pvp
guild_vs5    mapflag    noexp
//- Arena 04 --------------------------------------------
pvp_n_1-5    mapflag    gvg    off
pvp_n_1-5    mapflag    nowarp
pvp_n_1-5    mapflag    noteleport
pvp_n_1-5    mapflag    nowarpto
pvp_n_1-5    mapflag    nobranch
pvp_n_1-5    mapflag    nosave    SavePoint
pvp_n_1-5    mapflag    nomemo
pvp_n_1-5    mapflag    nopenalty
pvp_n_1-5    mapflag    pvp
pvp_n_1-5    mapflag    noexp

guild_vs2,65,64,2    script    Sair do PvP    10009,{

mes "[Teleportador]";
mes "Você quer sair do PvP?";
next;
menu "Sim",sim,"Não",cancelar;

sim:
mes "[Teleportador]";
mes "Até Logo!";
next;
warp "prontera",156,181;
close;

cancelar:
mes "[Teleportador]";
mes "Tudo bem, ^5566FF"+strcharinfo(0)+"^000000, fale comigo quando quiser sair.";
close;
waitingroom "PvP Warper ",0;        //
end;
}
 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   36
  • Joined:  05/15/20
  • Last Seen:  

Double check your database if you have a table named pvp_arenas
If you don't have it, it will not show anything since you don't have that table.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...