• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Death list

Skoczi

New Member
Joined
Jun 6, 2012
Messages
115
Reaction score
0
Hello,
I have a question , is it possible and how to make in Znote Acc - Death list - that shows more than 1 killer.


deaths.php
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php';
$cache = new Cache('engine/cache/deaths');
if ($cache->hasExpired()) {
   
    if ($config['TFSVersion'] == 'TFS_02' || $config['TFSVersion'] == 'TFS_10') {
        $deaths = fetchLatestDeaths();
    } else if ($config['TFSVersion'] == 'TFS_03') {
        $deaths = fetchLatestDeaths_03(30);
    }
    $cache->setContent($deaths);
    $cache->save();
} else {
    $deaths = $cache->load();
}
if ($deaths) {
?>
<h1>Latest Deaths</h1>
<table id="deathsTable" class="table table-striped">
    <tr class="yellow">
        <th>Victim</th>
        <th>Time</th>
        <th>Killer</th>
    </tr>
    <?php foreach ($deaths as $death) {
        echo '<tr>';
        echo "<td>At level ". $death['level'] .": <a href='characterprofile.php?name=". $death['victim'] ."'>". $death['victim'] ."</a></td>";
        echo "<td>". getClock($death['time'], true) ."</td>";
        if ($death['is_player'] == 1) echo "<td>Player: <a href='characterprofile.php?name=". $death['killed_by'] ."'>". $death['killed_by'] ."</a></td>";
        else if ($death['is_player'] == 0) {
            if ($config['TFSVersion'] == 'TFS_03') echo "<td>Monster: ". ucfirst(str_replace("a ", "", $death['killed_by'])) ."</td>";
            else echo "<td>Monster: ". ucfirst($death['killed_by']) ."</td>";
        }
        else echo "<td>". $death['killed_by'] ."</td>";
        echo '</tr>';
    } ?>
</table>
<?php
} else echo 'No deaths exist.';
include 'layout/overall/footer.php'; ?>
 
Back
Top