Legal mas tipo , você podia fazer assim qnd o player chegar a 10 kills ficaria black skull , mas se esse player morrer , ele perderá os itens? ou será skull de enfeite?
- Fórum
- OTServ
- Tutoriais
- Tutoriais de Websites
- [Gesior] Top Killers Com Skulls
info
Grupo: Banidos
Registrado: 05/09/11
Posts: 178
Reputação: +55

info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

Essa pagina é só um enfeite, realmente eu pensei em fazer skill em tempo real, mais acho um pouco desnecessario ja que no whoisonline ja mostra a skull do player em tempo real!
info
Grupo: Infante
Registrado: 13/10/08
Posts: 1.6k
Reputação: +420
Char no Tibia: Demonbholder

Não acho que isso seja um tutorial, acredito que seja um código.
Procede?
info
Grupo: Herói
Registrado: 05/11/07
Posts: 544
Reputação: +70

''Tutorial aprovado'', movido para seção correta.
Atenciosamente, Critical.
Editado Outubro 5 por Critical
info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike

Não acho que isso seja um tutorial, acredito que seja um código.
Procede?
Em websites todos tutoriais são pareceidos pelo fato de serem codigos prontos, mais sempre ensinamos como aplicar o codigo e editalo se possivel!
Dai ele se torna um tutorial!
Em 03/10/2012 em 02:55, Piabeta Kun disse:case "topkillers"; $topic = "topkillers"; $subtopic = "topkillers"; include("topkillers.php"); break;
Não entendo, porque quando tento colocar esta linha da erro logo após coloca-la.
Essa é Index:
<?php
// comment to show E_NOTICE [undefinied variable etc.], comment if you want make script and see all errors
error_reporting(E_ALL ^ E_STRICT ^ E_NOTICE);
// true = show sent queries and SQL queries status/status code/error message
define('DEBUG_DATABASE', false);
define('INITIALIZED', true);
// if not defined before, set 'false' to load all normal
if(!defined('ONLY_PAGE'))
define('ONLY_PAGE', false);
// check if site is disabled/requires installation
include_once('./system/load.loadCheck.php');
// fix user data, load config, enable class auto loader
include_once('./system/load.init.php');
// DATABASE
include_once('./system/load.database.php');
if(DEBUG_DATABASE)
Website::getDBHandle()->setPrintQueries(true);
// DATABASE END
// LOGIN
if(!ONLY_PAGE)
include_once('./system/load.login.php');
// LOGIN END
// COMPAT
// some parts in that file can be blocked because of ONLY_PAGE constant
include_once('./system/load.compat.php');
// COMPAT END
// LOAD PAGE
include_once('./system/load.page.php');
// LOAD PAGE END
// LAYOUT
// with ONLY_PAGE we return only page text, not layout
if(!ONLY_PAGE)
include_once('./system/load.layout.php');
else
echo $main_content;
// LAYOUT END





info
Grupo: Herói
Registrado: 23/12/08
Posts: 2.4k
Reputação: +359
Gênero: Masculino
Char no Tibia: Gordo Warlike
Bem eu achei algo que pode ter ultilidade a quem goste de dar nova cara ao seu site!
Não é nada mais que uma pagina de top frags com skulls na mesma quantidade de frags!
Crie uma Pagina Chamada Topkills.php e dentro coloque isso:
<?php function skull($how){ $skulls = ""; for($i=0;$i<$how;$i++){ $skulls .= "<img src=\"http://otland.net/images/redskull.gif\"/>"; } return $skulls; } $main_content .= '<div style="text-align: center; font-weight: bold;"><h2>Top 100 killers on ' . $config['server']['serverName'] . '.NET/ORG/EU W/E</h2></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;" width="4%">#</td> <td class="white" style="text-align: center; font-weight: bold;" width="30%">Name</td> <td class="white" style="text-align: center; font-weight: bold;" width="30%">Skulls</td> <td class="white" style="text-align: center; font-weight: bold;" width="10%">Frags</td> </tr>'; $i = 0; $pl = $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,100;')->fetchAll(); foreach($pl as $player) { $i++; $skull = $player['frags']; $main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']) . '"> <td style="text-align: center;">'.$i.'</td> <td style="text-align: center;"><a href="?subtopic=characters&name=' . urlencode($player['name']) . '">' . $player['name'] . '</a></td> <td style="text-align: center;">' . skull($skull/100). '</td> <td style="text-align: center;">' . $player['frags'] . '</td> </tr>'; } $main_content .= '</table>'; ?>Agora vá em index.php e adicione isso:
case "topkillers"; $topic = "topkillers"; $subtopic = "topkillers"; include("topkillers.php"); break;E em layouts/seulayout/layout.php
Adicione isso
Abaixo disso:
Imagem da pagina
Creditos
Ninja e PiabetaMan01 (por trazer o conteúdo ao forum!)
Editado Outubro 3 por PiabetaMan01