Ir para conteúdo
  • 0

Powergamers - Gesior


rechdanfr

Pergunta

5 respostass a esta questão

Posts Recomendados

  • 0

Quer dizer isso?

 

 

1. Estatisticas Do Servidor. (Ultimo Char Criado, Top Etc.)

Abra O: latestnews.php

E procure pela linha: $time = time(); ( Normalmente Bem No Começo)

adicione isso logo abaixo:

/////////////////////////////////////////////////////////////////////////////////////////

//The new edition of my script: Best Player, Last joined and something new Server Motd.//

/////////////////////////Everything in the new appearance.///////////////////////////////

//////////////////////////////////////by Aleh///////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////////////

///Queries ///

$query = $SQL->query('SELECT `players`.`name`,`players`.`id`,`players`.`level`, `players`.`experience`, `server_motd`.`id`, `server_motd`.`text` FROM `players`,`server_motd` WHERE `players`.`group_id` < '.$config['site']['players_group_id_block'].' AND `players`.`name` != "Account Manager" ORDER BY `players`.`level` DESC, `players`.`experience` DESC, `server_motd`.`id` DESC LIMIT 1;')->fetch();

$query2 = $SQL->query('SELECT `id`, `name` FROM `players` ORDER BY `id` DESC LIMIT 1;')->fetch();

$housesfree = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=0;')->fetch();

$housesrented = $SQL->query('SELECT COUNT(*) FROM `houses` WHERE `owner`=1;')->fetch();

$players = $SQL->query('SELECT COUNT(*) FROM `players` WHERE `id`>0;')->fetch();

$accounts = $SQL->query('SELECT COUNT(*) FROM `accounts` WHERE `id`>0;')->fetch();

$banned = $SQL->query('SELECT COUNT(*) FROM `bans` WHERE `id`>0;')->fetch();

$guilds = $SQL->query('SELECT COUNT(*) FROM `guilds` WHERE `id`>0;')->fetch();

///End Queries ///

$main_content .= '<table bgcolor='.$config['site']['darkborder'].' border=0 cellpadding=4 cellspacing=1 width=100%>

<tr bgcolor='. $config['site']['vdarkborder'] .'><td align="center" class=white colspan=1><b>Welcome to '.$config['server']['serverName'].'</b></td></tr>

<tr><td><table border=0 cellpadding=1 cellspacing=1 width=100%>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Last joined us: <a href="?subtopic=characters&name='.urlencode($query2['name']).'">'.$query2['name'].'</a>, player number '.$query2['id'].'. Welcome and wish you a nice game!</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center>Currently, the best player on the server is: <a href="index.php?subtopic=characters&name='.urlencode($query['name']).'"> '.$query['name'].'</a> ('.urlencode($query['level']).'). Congratulations!</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Server motd:</b> '.$query['text'].'</center></td></tr>

<table border=0 cellpadding=0 cellspacing=1 width=100%>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Free Houses:</b> '.$housesfree[0].'</center></td>

<td><center><b>Rented Houses:</b> '.$housesrented[0].'</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Accounts</b> in database: '.$accounts[0].'</center></td>

<td><center><b>Players</b> in database: '.$players[0].'</center></td></tr>

<tr bgcolor='. $config['site']['lightborder'] .'><td><center><b>Banned</b> accounts: '.$banned[0].'</center></td>

<td><center><b>Guilds</b> in databese: '.$guilds[0].'</center></td></tr>

</table></td></tr></table>';

///Don't delete this! Please respect my work! I am counting on reputation.

$main_content .= '<div align="right"><small><b>Author of script: <a href="http://otland.net/members/aleh/">Aleh</a></b></small></div><br />';

///Don't delete this! Please respect my work! I am counting on reputation.

 

Pronto.

 

 

 

2. Best Guild.

 

Faça Um Novo Arquivo com o nome frags.php em: C:\xampp\htdocs

Cole Isso Dentro:

<?php

$main_content .= '<div style="text-align: center; font-weight: bold;">Top 30 frags on ' . $config['server']['serverName'] . '</div>

<table border="0" cellspacing="1" cellpadding="4" width="100%">

<tr bgcolor="' . $config['site']['vdarkborder'] . '">

<td class="white" style="text-align: center; font-weight: bold;">Name</td>

<td class="white" style="text-align: center; font-weight: bold;">Frags</td>

</tr>';

$i = 0;

foreach($SQL->query('SELECT `p`.`name` AS `name`, COUNT(`p`.`name`) as `frags`

FROM `killers` k

LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`

LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`

WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1

GROUP BY `name`

ORDER BY `frags` DESC, `name` ASC

LIMIT 0,30;') as $player)

{

$i++;

$main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']) . '">

<td><a href="?subtopic=characters&name=' . urlencode($player['name']) . '">' . $player['name'] . '</a></td>

<td style="text-align: center;">' . $player['frags'] . '</td>

</tr>';

}

$main_content .= '</table>';

?>

 

 

agora va em: latestnews

e adicione isso:

 

$main_content .= '<div class="NewsHeadline">

<div class="NewsHeadlineBackground" style="background-image:url(' . $layout_name . '/images/news/newsheadline_background.gif)">

<table border="0">

<tr>

<td style="text-align: center; font-weight: bold;">

<font color="white">Most powerfull guilds</font>

</td>

</tr>

</table>

</div>

</div>

<table border="0" cellspacing="3" cellpadding="4" width="100%">

<tr>';

foreach($SQL->query('SELECT `g`.`id` AS `id`, `g`.`name` AS `name`,

`g`.`logo_gfx_name` AS `logo`, COUNT(`g`.`name`) as `frags`

FROM `killers` k

LEFT JOIN `player_killers` pk ON `k`.`id` = `pk`.`kill_id`

LEFT JOIN `players` p ON `pk`.`player_id` = `p`.`id`

LEFT JOIN `guild_ranks` gr ON `p`.`rank_id` = `gr`.`id`

LEFT JOIN `guilds` g ON `gr`.`guild_id` = `g`.`id`

WHERE `k`.`unjustified` = 1 AND `k`.`final_hit` = 1

GROUP BY `name`

ORDER BY `frags` DESC, `name` ASC

LIMIT 0, 4;') as $guild)

$main_content .= ' <td style="width: 25%; text-align: center;">

<a href="?subtopic=guilds&action=show&guild=' . $guild['id'] . '"><img src="guilds/' . ((!empty($guild['logo']) && file_exists('guilds/' . $guild['logo'])) ? $guild['logo'] : 'default_logo.gif') . '" width="64" height="64" border="0"/><br />' . $guild['name'] . '</a><br />' . $guild['frags'] . ' kills

</td>';

$main_content .= ' </tr>

</table>';

 

Editado por Igor6
Link para o comentário
Compartilhar em outros sites

  • 0

eu ando procurando o download do powergamers e nao tenhu achado, assim que eu achar eu estarei postando!

 

Se você achar eu agradeço e muito! *-*

 

Vou te ajudar a procurar, fazer mais um esforço :)

Link para o comentário
Compartilhar em outros sites

  • 0

http://www.xtibia.com/forum/topic/195923-tutorial-powergamers-gesior/page__pid__1357831#entry1357831

 

O dono do topico achou a solução pro seus problemas e compartilhou! caso alguem precise ta ai!

 

Duvida sanada!

Topico movido!

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...