Назад

Вое плэй ранк

Автор: S2pidsMan: Дата: 03.08.2011

Lunette,86,112,4	script	Healer	936,{ 
// == Configuracoes ==
SetArray @Names$[0],"^FF4500[Rank Guerra do Emperium]^000000","^40E0D0ServerRO^000000"; //= Nome do NPC seguido do nome do Servidor.
set @PlRank,10; //= Quantos Players aparecerao nos rankings?
set @GdRank,10; //= Quantos Clas aparecerao nos rankings
// ===================
set @CID,getcharid(0);
set @GID,getcharid(2);
while(true)
{
Mes @Names$[0];
Mes "Ola ^00BFFF"+strcharinfo(0)+"^000000.";
Mes "Selecione a ^FF0000opcao^000000 desejada:";
DeleteArray @breaks[0],GetArraySize(@breaks);
DeleteArray @name$[0],GetArraySize(@name$);
DeleteArray @kills[0],GetArraySize(@kills);
DeleteArray @deaths[0],GetArraySize(@deaths);
next;
Set @Rank,select("- TOP "+@PlRank+" Breakers","- TOP "+@GdRank+" Clas","- Meu Status","- Sair") - 1;
if(@Rank == 4)
{
Mes @Names$[0];
Mes "Bom jogo.";
close;
}
else if(@Rank == 3)
{
query_sql "SELECT `breaks`,`kills`,`deaths` FROM `woeplayerrank` WHERE `char_id`="+@CID,@points,@kills,@deaths;
query_sql "SELECT `breaks`,`kills`,`deaths` FROM `woerank` WHERE `guild_id`="+@GID,@guild,@gkills,@gdeaths;
Mes @name$;
Mes "^0000FF[Jogador "+strcharinfo(0)+"]^000000";
Mes "^525252Cla atual:^000000 ^FF0000"+strcharinfo(2)+"^000000.";
Mes "^525252Quebrou o Emperium..^000000 ^FF0000"+@points+"^000000 vezes.";
Mes "^525252Cla quebrou o Emperium..^000000 ^FF0000"+@guild+"^000000 vezes.";
Mes "^525252Matou no Total..^000000 ^FF0000"+@kills+"^000000 Players.";
Mes "^525252Morreu no Total..^000000 ^FF0000"+@deaths+"^000000 Vezes.";
Mes "^525252Amigos do Cla Mataral no Total..^000000 ^FF0000"+@gkills+"^000000 Players.";
Mes "^525252Amigos do Cla Morreram no Total..^000000 ^FF0000"+@gdeaths+"^000000 Vezes.";
next;
}
else
{
query_sql "SELECT `breaks`,`"+(@from? "g" : "")+"name`,`kills`,`deaths` FROM `woe"+(!@from? "player" : "")+"rank` ORDER BY `breaks` DESC, `kills` DESC LIMIT "+(@from? @GdRank : @PlRank),@breaks,@name$,@kills,@deaths;
Mes "[^FF4500TOP "+(@from? @GdRank+" Clas" : @PlRank+" Breakers")+" - WoE^000000]";
for(set @i,0; @i<=(@from? @GdRank : @PlRank); set @i,@i+1)
if(@name$[@i]=="")
Mes (@i+1)+": ---";
else
Mes "Posicao: ^0000FF"+ (@i+1) +"^000000?: "+@name$[@i]+" com ^FF0000"+@breaks[@i]+"^000000 ^0000FFbreaks^000000, ^FF0000"+@kills[@i]+"^000000 ^0000FFKills^000000 e ^FF0000"+@deaths[@i]+"^000000 ^0000FFDeaths^000000.";
Mes "^525252_____________^000000";
Mes "^525252TOP "+(@from? @GdRank+" Clas" : @PlRank+" Breakers")+" - WoE^000000 "+@Names$[1]+".";
next;
}
}
}

function script WoE_Rank {

query_sql "SELECT `breaks`,`name` FROM `woeplayerrank` WHERE `char_id`="+GetCharID(0),@bpoints,@name$;
query_sql "SELECT `gname`,`breaks` FROM `woerank` WHERE `guild_id`="+GetCharID(2),@gname$,@gbpoints;
if( @name$ == "" )
query_sql "INSERT INTO `woeplayerrank` (`char_id`,`name`,`breaks`) VALUES ("+GetCharID(0)+",'"+strcharinfo(0)+"',0)";
if ( @gname$ == "" )
query_sql "INSERT INTO `woerank` (`guild_id`,`gname`,`breaks`) VALUES ("+GetCharID(2)+",'"+getguildname(GetCharID(2))+"',0)";
query_sql "UPDATE `woeplayerrank` SET `breaks` = `breaks` +1 WHERE `char_id`="+GetCharID(0);
query_sql "UPDATE `woerank` SET `breaks` = `breaks` +1 WHERE `guild_id`="+GetCharID(2);
return;
}

- script WoePlayerLadder -1,{
OnPCKillEvent:
if(!AgitCheck() && !AgitCheck2())
end;
getmapxy @map$,@x,@y,0;
Set @Found,0;
if($UsingWoEController)
for(set @i,0; @i<3; set @i,@i+1)
for(set @j,0; @j < GetArraySize(GetD("$DiasWoE_"+@i)); Set @j,@j + 1)
for(set @k,0; @k if(@map$==GetD("$CastelosWoE_"+@i+"_"+@j+"$["+@k+"]"))
{
Set @Found,1;
break;
}
else
for(set @i,0; @i < getarraysize($woemap$); set @i,@i+1)
if(@map$==$woemap$[@i])
{
Set @Found,1;
break;
}
if(!@Found)
end;

query_sql "SELECT `kills`,`name` FROM `woeplayerrank` WHERE `char_id`="+GetCharID(0),@ppoints,@name$;
query_sql "SELECT `kills`,`gname` FROM `woerank` WHERE `guild_id`="+GetCharID(2),@gpoints,@gname$;
if( @name$ == "" )
query_sql "INSERT INTO `woeplayerrank` (`char_id`,`name`,`kills`) VALUES ("+GetCharID(0)+",'"+strcharinfo(0)+"',0)";
if( @gname$ == "" )
query_sql "INSERT INTO `woerank` (`guild_id`,`gname`,`kills`) VALUES ("+GetCharID(2)+",'"+getguildname(GetCharID(2))+"',0)";
query_sql "UPDATE `woeplayerrank` SET `kills` = `kills` +1 WHERE `char_id`="+GetCharID(0);
query_sql "UPDATE `woerank` SET `kills` = `kills` +1 WHERE `guild_id`="+GetCharID(2);

attachrid killedrid;
query_sql "SELECT `deaths`,`name` FROM `woeplayerrank` WHERE `char_id`="+GetCharID(0),@ppoints,@name$;
query_sql "SELECT `deaths`,`gname` FROM `woerank` WHERE `guild_id`="+GetCharID(2),@gpoints,@gname$;
if( @name$ == "" )
query_sql "INSERT INTO `woeplayerrank` (`char_id`,`name`,`deaths`) VALUES ("+GetCharID(0)+",'"+strcharinfo(0)+"',0)";
if( @gname$ == "" )
query_sql "INSERT INTO `woerank` (`guild_id`,`gname`,`deaths`) VALUES ("+GetCharID(2)+",'"+getguildname(GetCharID(2))+"',0)";
query_sql "UPDATE `woeplayerrank` SET `deaths` = `deaths` + 1 WHERE `char_id`="+GetCharID(0);
query_sql "UPDATE `woerank` SET `deaths` = `deaths` + 1 WHERE `guild_id`="+GetCharID(2);
end;

OnInit:
Set $UsingWoEController,0; // Coloque 1 caso utilize o WoE Controller de minha autoria.
if(!$UsingWoEController) // Ponha aqui os castelos que estao habilitados na sua WoE caso nao use o WoE Controller
SetArray $woemap$[0],"gefg_cas02","gefg_cas03","payg_cas02","arug_cas01","arug_cas05";
end;
}

Смысл в том, что нпц грузится, ошибок нету, таблицы в бд все есть, а эффекта нету)
Нпц на нажатие не реагирует ну и вывод на сайте не фурычит.

Автор: S2pidsMan: Дата: 03.08.2011

Откопал все темы Санасола, нету нужной.

Автор: Renegade: Дата: 03.08.2011

ну я ж себе откудато ставил, правда?

Автор: Кеник: Дата: 03.08.2011

Ну форум уже переезжал, правда?)

По сабжу - это нормально, что цикл смотрит переменную true, которая нигде не меняется?