<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
/*
Script by zonet.
Converted to ZnoteAAC by HalfAway.
*/
// Creature array (name + storage).
$kills = array(
'dragon' => 9541,
'dragon lord' => 9542,
'frost dragon' => 9543,
'wyrm' => 9544,
'demon' => 9545
);
// Limits the list of killers for each creature
$limit = 6;
echo '<table border="0px" cellspacing="1px" cellpadding="4px" width="100%">
<tr bgcolor="#505050" style="color: white;"><th width="10%">Creature</th><th>Creature Name</th><th>Top Killers (Max: '.$limit.')</th></tr>';
$row = 1;
foreach($kills as $name => $storage) {
$monterq = mysql_select_multi('SELECT `player_storage`.`player_id`, `player_storage`.`key`, `player_storage`.`value` AS `value`, `players`.`id`, `players`.`name` AS `name`
FROM `player_storage` LEFT JOIN `players` ON `player_storage`.`player_id` = `players`.`id` WHERE `player_storage`.`key` = '.$storage.' ORDER BY ABS(value) DESC LIMIT '.$limit);
echo '<tr><td><img src="monsters/'.(str_replace(" ", "" , $name)).'.gif"></td><td width="20%" style="font-size: 13pt; font-weight: bold; color: darkorange;"><center>'.(ucwords($name)).'</center></td><td>';
$a = 0;
foreach ((array) $monterq as $q) {
$a++;
if($a == 1)
echo '<font color="green">';
if($a == $limit)
echo '<font color="red">';
if($a == $limit / 2)
echo '<font color="darkorange">';
echo '<b>'.$a.'. Name:</b> <a href="characterprofile.php?name='.urlencode($q['name']).'">'.$q['name'].'</a> (Kills: '.$q['value'].') <--line 38 </font></font></font><br />';
}
echo '</tr>';
}
echo '</td></table>';
include 'layout/overall/footer.php'; ?>