Hello i tray do real tibia death list and i have some problems.
Check this out.
If i use it i get back in website this
Human Rights
Somebody now how fix it?
Check this out.
PHP:
$player_deaths = $SQL->query('SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = '.$player->getId().' ORDER BY `date` DESC LIMIT 0,10;');
foreach($player_deaths as $death)
{
if(is_int($number_of_rows / 2))
$bgcolor = $config['site']['darkborder']; else $bgcolor = $config['site']['lightborder'];
$number_of_rows++; $deads++;
$dead_add_content .= "<tr bgcolor=\"".$bgcolor."\">
<td width=\"20%\" align=\"center\">".date("M j Y, H:i", $death['date'])."</td>
<td>";
$killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id
LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id
WHERE killers.death_id = ".$SQL->quote($death['id'])." ORDER BY killers.final_hit DESC, killers.id ASC")->fetchAll();
$i = 0;
$count = count($killers);
{
if ($count > 0)
if($count < 5)
$rodzaj .="Killed";
else if($count >= 5)
if($count < 10)
$rodzaj .="Slain";
else if($count >= 10)
if($count < 14)
$rodzaj .="Crushed";
else if($count >= 14)
if($count < 20)
$rodzaj .="Eliminated";
else
$rodzaj .="Annihilated";
}
foreach($killers as $killer)
{
$i++;
if(in_array($i, array(1, $count)))
$killer['monster_name'] = str_replace(array("an ", "a "), array("", ""), $killer['monster_name']);
if($killer['player_name'] != "")
{
if($i == 1)
$dead_add_content .= "".$rodzaj." at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";
if($killer['monster_name'] != "")
$dead_add_content .= $killer['monster_name']." summoned by ";
if($killer['player_exists'] == 0)
$dead_add_content .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";
$dead_add_content .= $killer['player_name'];
if($killer['player_exists'] == 0)
$dead_add_content .= "</a>";
}
else
{
if($i == 1)
$dead_add_content .= "Died at level <b>".$death['level']."</b> by ";
else if($i == $count)
$dead_add_content .= " and by ";
else
$dead_add_content .= ", ";
$dead_add_content .= $killer['monster_name'];
}
if($i == $count)
$dead_add_content .= ".";
}
$dead_add_content .= "</td></tr>";
}
if($deads > 0)
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>' . $dead_add_content . '</TABLE><br />';
Code:
Mar 19 2010, 15:17 Died at level 978 by serpent spawn.
Feb 27 2010, 16:33 Died at level 643 by azerus, Vaniz and by Rift Scythe.
Feb 27 2010, 14:51 Died at level 642 by physical, Vaniz, azerus, a Ritf Worm and by Ritf Brood.
Feb 17 2010, 22:10 KilledKilledSlainSlain at level 355 by Zarabek, Demotywator, Pagrio, Spoxter and by Sorcerer Honoru.
Feb 16 2010, 23:36 Died at level 268 by hellfire fighter, a warlock, a fire elemental and by fire devil.
Feb 16 2010, 16:17 Died at level 241 by hellfire fighter.
Feb 16 2010, 00:57 Died at level 179 by Ritf Brood and by Vaniz.
Feb 16 2010, 00:42 Died at level 181 by Azerus, a Rift Scythe and by war golem.
Feb 16 2010, 00:39 Died at level 184 by Ritf Brood, a Ritf Brood, a Rift Scythe and by war golem.
Feb 15 2010, 18:37 Died at level 153 by demon and by banshee.
Somebody now how fix it?
Last edited: