Ir para conteúdo

[Gesior Aac] Top 25 Fragger


tyuahoi

Posts Recomendados

Olá

 

 

Vim Trazer A Voçês um Script De Top Fragger. ;D

 

 

Vamo Ao Que Interessa.

 

Va Em: xampp\htdocs

 

Crie Um Novo Arquivo frags.php

 

e Cole Isso:

 

<?php
$main_content .= '<div style="text-align: center; font-weight: bold;">Top 25 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
GROUP BY `name`
ORDER BY `frags` DESC, `name` ASC
LIMIT 0,25;') 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>';
?>

Salve E Fexe.

 

Agora Va Em index.php

 

Após:

	case "guilds";
	$topic = "Guilds";
	$subtopic = "guilds";
	include("guilds.php");
break;

 

Cole isso:

 

        case "frags";
       $topic = "Top Frags";
       $subtopic = "frags";
       include("frags.php");
   break;  

 

Agora Va na Detabase DO Seu Servidor e Adicione Isso:

 

ALTER TABLE `players` ADD `frags` INT( 11 ) NOT NULL DEFAULT '0';

 

Agora Va Ate: data\creaturescripts\scripts

 

Abra o Login.lua

 

Após:

registerCreatureEvent(cid, "Mail")

 

Cole Isso:

registerCreatureEvent(cid, "TopFrags")

 

Em: data\creaturescripts\scripts

 

 

Crie Um Novo Arquivo Com O nome: topfrags.lua

function onKill(cid, target, lastHit)
if isPlayer(target) then
db.executeQuery("UPDATE `players` SET `frags` = `frags` + 1 WHERE `id` = " .. getPlayerGUID(cid) .. ";")
end
return true
end 

 

 

 

Salve E Fexe.

 

Agora Va em: data/creaturescripts/

 

e Abra o: creaturescripts.xml

 

E Adicione essa Linha:

 

<event type="kill" name="TopFrags" event="script" value="topfrags.lua"/>

 

 

 

Agora Va Em:

 

C:\xampp\htdocs\layouts\tibiacom

 

Após

<a href='?subtopic=guilds'>
 <div id='submenu_guilds' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
   <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>

   <div id='ActiveSubmenuItemIcon_guilds' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
   <div class='SubmenuitemLabel'>Guilds</div>
   <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
 </div>
</a>

 

Cole isso:

 

<a href='index.php?subtopic=frags'>
 <div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
   <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
   <div id='ActiveSubmenuItemIcon_wars' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
   <div class='SubmenuitemLabel'><font color="red"> Top Fragger </font></div>
   <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
 </div>
</a>

 

 

Resultado:

upppp.png

 

Pronto.

 

 

 

CréDiToS:

 

Layout: widnet

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

  • 2 weeks later...
  • 2 weeks later...

Agora Va Ate: data\creaturescripts\scripts

 

Após:

registerCreatureEvent(cid, "Mail")

 

 

Cole Isso:

registerCreatureEvent(cid, "TopFrags")

 

 

 

____________________

Em que arquivo eu colo isso? dentro dessa pasta tem MUITOS arquivos e você não especificou :S

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...