Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Olá amigos do TibiaKing.

Venho aqui pedir um Ranking (highscore) reset para gesior acc makker.

Alguns vão falar esse ranking aqui.

<?php

# Modifique o valor 10 para o numero de players que aparecerao na lista.

$top = 10;

# Nao toque em nada daqui em diante.

$top = $top > 0 ? $top : 10;

$resets = $SQL->query("SELECT `name`,`reset` FROM `players` WHERE `reset` != 0 ORDER BY `reset` DESC LIMIT $top;");

$count = $resets->rowCount();

$main_content = "<br><div class=\"conteudo\" style=\"background-image:url(layouts/tibiacom/images/content/scroll.gif);\">";

$main_content .= "<center><table cellpadding=\"5\" cellspacing=\"1\"><tr><td width=\"500px\" colspan=\"3\" bgcolor=\"#555555\"><font color=\"white\" size=\"3\"><b>TOP Resets</b></font></td></tr>";

if($count == 0){

$main_content .= "<tr><td width=\"250px\" bgcolor=\"#F1E0C6\"><b>Players</b></td></tr>";

$main_content .= "<tr><td width=\"250px\" bgcolor=\"#D4C0A1\">Nenhum player foi resetado.</td></tr>";

}else{

$main_content .= "<tr><td width=\"250px\" bgcolor=\"#F1E0C6\"><b>Player</b></td><td width=\"250px\" bgcolor=\"#F1E0C6\"><b>Resets</b></td></tr>";

foreach($resets as $info){

$main_content .= "<tr><td width=\"250px\" bgcolor=\"#D4C0A1\">{$info["name"]}</td><td width=\"250px\" bgcolor=\"#D4C0A1\">{$info["reset"]}</td></tr>";

}

}

$main_content .= "</table></center></div>";

?>

Ta ai alguns vão me perguntar mais esse rank ai esta certo e tals... o problema não é estar certo! e sim, aonde ele fica ele é separado das outras highscores e também ele não numera as posições dos jogadores

Ex: 1 - DavidHDL - 30 resets

2 - Maria - 20 resets

ele fica assim.

DavidHDL - 30 resets

Maria - 20 resets

Traduzindo queria esse Rank Reset junto com os outros Ranks no gesior na lista do lado direito que fica Magic Level,Club,Sword,Axe,Distance Etc. Como no exemplo abaixo.

2z6b37p.png

Se poderem me ajudar agradeço... o System Reset que uso é o Advanced Reset System 2.0 do MarcelloMkalo.

Deis de ja Obg.

Link para o post
Compartilhar em outros sites
  • 9 months later...

<?PHP

$list = $_REQUEST['list'];

$page = $_REQUEST['page'];

switch($list)

{

case "fist":

$id = 0;

$list_name = 'Fist Fighting';

break;

case "club":

$id = 1;

$list_name = 'Club Fighting';

break;

case "sword":

$id = 2;

$list_name = 'Sword Fighting';

break;

case "axe":

$id = 3;

$list_name = 'Axe Fighting';

break;

case "distance":

$id = 4;

$list_name = 'Distance Fighting';

break;

case "shield":

$id = 5;

$list_name = 'Shielding';

break;

case "fishing":

$id = 6;

$list_name = 'Fishing';

break;

}

if(count($config['site']['worlds']) > 1)

{

$worlds .= '<i>Select world:</i> ';

foreach($config['site']['worlds'] as $idd => $world_n)

{

if($idd == (int) $_GET['world'])

{

$world_id = $idd;

$world_name = $world_n;

}

}

}

if($idd == (int) $_GET['world'])

{

$world_id = $idd;

$world_name = $world_n;

}

if(!isset($world_id))

{

$world_id = 0;

$world_name = $config['server']['serverName'];

}

$offset = $page * 100;

//jesli chodzi o skilla

if(isset($id))

{

$skills = $SQL->query('SELECT * FROM players, player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' AND players.account_id != 1 ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset);

}

else

{

//jesli chodzi o level lub mlvl

if($list == "magic")

{

$list_name = 'Magic Level';

$skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset);

}

else

{

$skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset);

$list_name = 'Experience';

$list = 'experience';

}

}

//wyswietlanie wszystkiego

$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>';

if(count($config['site']['worlds']) > 1)

{

$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD>

<FORM ACTION="index.php?subtopic=highscores&list='.$list.'" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience>

<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR='.$config['site]['lightborder'].'">

<TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';

foreach($config['site']['worlds'] as $id => $world_n)

{

$main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';

}

$main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>

</TD></TR></TABLE></TABLE></FORM></TABLE><br>';

}

$main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>';

if($list == "experience")

{

$main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>';

}

$main_content .= '</TR><TR>';

foreach($skills as $skill)

{

if($config['site']['show_flag'])

{

$account = $SQL->query('SELECT * FROM accounts WHERE id = '.$skill['account_id'].'')->fetch();

// Mostrando Outfit by: Ather

if($config['site']['show_outfit'] and $player->getCustomField( 'show_outfit' ) == 1) {

$id = $player->getCustomField("id");

$listaddon = array('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','158','159','251','252','268','269','270','273','278','279','288','289','302','324','325');

$lookadd = array('0','1','2','3');

foreach ($listaddon as $pid => $name)

foreach ($lookadd as $addo => $name) {

$addon1 = $SQL->query('SELECT * FROM players WHERE id = '.$id.' AND looktype = '.$listaddon[$pid].' AND lookaddons = '.$lookadd[$addo].';')->fetch();

if($addon1[looktype] == true ) {

$finaddon = $addon1[looktype] + $addon1[lookaddons] * 300;

$main_content .= '<center><img src="images/addons/'.$finaddon.'.gif"/></center>';

}

}

}

}

if($number_of_rows < 100)

{

if($list == "magic")

$skill['value'] = $skill['maglevel'];

if($list == "experience")

$skill['value'] = $skill['level'];

if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;

$main_content .= '<tr bgcolor="'.$bgcolor.'">

<td>'.($offset + $number_of_rows).'.</td>

<td>'.$flag.'<a href="index.php?subtopic=characters&name='.urlencode($skill['name']).'">'.$skill['name'].'</a>';

if($config['site']['showMoreInfo'])

$main_content .= '<br><small>Level: '.$skill['level'].', '.$vocation_name[$skill['world_id']][$skill['promotion']][$skill['vocation']].', '.$config['site']['worlds'][$skill['world_id']].'</small>';

$main_content .= '</td><td>'.$skill['value'].'</td>';

if($list == "experience")

$main_content .= '<td>'.$skill['experience'].'</td>';

$main_content .= '</tr>';

}

else

$show_link_to_next_page = TRUE;

}

$main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>';

//link to previous page if actual page isn't first

if($page > 0)

$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';

//link to next page if any result will be on next page

if($show_link_to_next_page)

$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';

//end of page

$main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right>

<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1>

<TR BGCOLOR="'.$config['site']['vdarkborder'].'">

<TD CLASS=whites><B>Choose a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>

<A HREF="index.php?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs">Experience</A><BR>

<A HREF="index.php?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs">Magic</A><BR>

<A HREF="index.php?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs">Shielding</A><BR>

<A HREF="index.php?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs">Distance</A><BR>

<A HREF="index.php?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs">Club</A><BR>

<A HREF="index.php?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs">Sword</A><BR>

<A HREF="index.php?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs">Axe</A><BR>

<A HREF="index.php?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs">Fist</A><BR>

<A HREF="index.php?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs">Fishing</A><BR>

</TD>

</TR>

</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';

?>

Ai está!

Link para o post
Compartilhar em outros sites
  • 1 year later...
  • 2 months later...

Segue código funcional em spoiler. Espero ajudar as pessoas =)

Se quiser, posso disponibilizar o sistema de reset pelo site =) (APENAS GESIOR)

 

<?PHP
$list = $_REQUEST['list'];
$page = $_REQUEST['page'];

switch($list)
{
case "fist":
$id = 0;
$list_name = 'Fist Fighting';
break;
case "club":
$id = 1;
$list_name = 'Club Fighting';
break;
case "sword":
$id = 2;
$list_name = 'Sword Fighting';
break;
case "axe":
$id = 3;
$list_name = 'Axe Fighting';
break;
case "distance":
$id = 4;
$list_name = 'Distance Fighting';
break;
case "shield":
$id = 5;
$list_name = 'Shielding';
break;
case "fishing":
$id = 6;
$list_name = 'Fishing';
break;
}
if(count($config['site']['worlds']) > 1)
{
foreach($config['site']['worlds'] as $idd => $world_n)
{
if($idd == (int) $_GET['world'])
{
$world_id = $idd;
$world_name = $world_n;
}
}
}
if(!isset($world_id))
{
$world_id = 0;
$world_name = $config['server']['serverName'];
}
$offset = $page * 100;
if(isset($id))
$skills = $SQL->query('SELECT * FROM players, player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' AND players.account_id != 1 ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset);
else
{
if($list == "magic") 
{
$list_name = 'Magic Level';
$skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset);
}
elseif($list == "reset") 
{
$list_name = 'Reset Level';
$skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY reset DESC LIMIT 101 OFFSET '.$offset);
}
else
{
$skills = $SQL->query('SELECT * FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND account_id != 1 ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset);
$list_name = 'Experience';
$list = 'experience';
}
}
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>';
if(count($config['site']['worlds']) > 1)
{
$main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD>
<FORM ACTION="index.php?subtopic=highscores&list='.$list.'" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience>
<TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'">
<TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';
foreach($config['site']['worlds'] as $id => $world_n)
{
$main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';
}
$main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
</TD></TR></TABLE></TABLE></FORM></TABLE><br>';
}
$main_content .= '<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD>';
if($list == "experience") 
{
$main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>';
}
$main_content .= '</TR><TR>';
foreach($skills as $skill)
{
if($number_of_rows < 100)
{
if($list == "magic")
$skill['value'] = $skill['maglevel'];
if($list == "reset")
$skill['value'] = $skill['reset'];
if($list == "experience")
$skill['value'] = $skill['level'];
if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
$main_content .= '<tr bgcolor="'.$bgcolor.'">
<td>'.($offset + $number_of_rows).'.</td>
<td>'.$flag.'<a href="index.php?subtopic=characters&name='.urlencode($skill['name']).'">'.$skill['name'].'</a>';
#if(count($config['site']['worlds']) > 1)
# $main_content .= ', '.$config['site']['worlds'][$skill['world_id']];
$main_content .= '</small>';
$main_content .= '</td><td>'.$skill['value'].'</td>';
if($list == "experience") 
$main_content .= '<td>'.number_format($skill['experience'],0).'</td>';
$main_content .= '</tr>';
}
else
$show_link_to_next_page = TRUE;
}
if (!$skill){
$main_content .='
<tr bgcolor="'.$config['site']['darkborder'].'">
<td colspan="4" align="center"><i>'.$config['server']['serverName'].' no have players created on database.</i></td>
</tr>
';}
$main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>';
if($page > 0) 
$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
if($show_link_to_next_page) 
$main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="index.php?subtopic=highscores&list='.$list.'&world='.$world_id.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
$main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right>
<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1>
<TR BGCOLOR="'.$config['site']['vdarkborder'].'">
<TD CLASS=whites><B>Choose a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD>
<A HREF="index.php?subtopic=highscores&list=reset&world='.$world_id.'" CLASS="size_xs">Reset</A><BR>
<A HREF="index.php?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs">Experience</A><BR>
<A HREF="index.php?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs">Magic</A><BR>
<A HREF="index.php?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs">Shielding</A><BR>
<A HREF="index.php?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs">Distance</A><BR>
<A HREF="index.php?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs">Club</A><BR>
<A HREF="index.php?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs">Sword</A><BR>
<A HREF="index.php?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs">Axe</A><BR>
<A HREF="index.php?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs">Fist</A><BR>
<A HREF="index.php?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs">Fishing</A><BR>
</TD>
</TR>
</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
?>

Editado por Victor Fasano Raful (veja o histórico de edições)

 

 

DeadPoolHost - Confira!

 

 

 

 

Fui útil? Realmente útil? Obrigado!

Não sabe como compensar?

Doe quanto puder... Seu ato é o que vale!

 

Link para o post
Compartilhar em outros sites
  • 1 year later...
2 horas atrás, romaidana disse:

Revivendo o tópico!!!

Victor Raful tu pode passar o sistema??? 

 

Gesior

distro OTX

 

abraço

está no post dele ali o scripit

 

Em 01/10/2014 at 17:15, Victor Fasano Raful disse:

Segue código funcional em spoiler. Espero ajudar as pessoas =)

Se quiser, posso disponibilizar o sistema de reset pelo site =) (APENAS GESIOR)

 

 

 

Conteúdo Oculto

 

 

OuhEeY.png

Link para o post
Compartilhar em outros sites
  • 4 months later...

up, up! 

Esse que passaram diz que não tem player na db, acho que é antigo sei lá, já tentei alterar o id dos world mas nada, alguém tem outro?

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo