• 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!

[MODERN ACC] higscores.php & whoisonline.php

Dejm

Oh hun...
Joined
Nov 29, 2008
Messages
120
Reaction score
4
Location
United Kingdom
Hello,

I don't have higscores.php and whoisonline.php in my Acc. Can someone post it here, so I can add it to ma acc?

Also I have a problem with my deaths. You can see this problem on my acc.
If you can help to solve this problem I will be very grateful and I will rep+.
PROBLEM : DuarityOTS 24/7
 
Highscores.php

PHP:
 <?php

# Banishments Script
# Version: 1.0
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

require('config.php');

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$a = $ots->getDBHandle();

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

# Number of bans to show
$archez['limit'] = '15';

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$reason = array('Offensive Name', 'Invalid Name Format', 'Unsuitable Name', 'Name Inciting Rule Violation', 'Offensive Statement', 'Spamming', 'Illegal Advertising', 'Off-Topic Public Statement', 'Non-English Public Statement', 'Inciting Rule Violation', 'Bug Abuse', 'Game Weakness Abuse', 'Using Unofficial Software to Play', 'Hacking', 'Multi-Clienting', 'Account Trading or Sharing', 'Threatening Gamemaster', 'Pretending to Have Influence on Rule Enforcer', 'False Report to Gamemaster', 'Destructive Behaviour', 'Excessive Unjustified Player Killing', 'Invalid Payment', 'Spoiling Auction');

$data = $a->query('SELECT * FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 ORDER BY `bans`.`added` DESC LIMIT '.$archez['limit']);

echo '<table border="0" width="100%">
<tr><td width="5%"><b>#</b></td><td width="25%"><b>Player</b></td><td width="30%"><b>Reason</b></td><td width="25%"><b>Imposed by</b></td><td width="15%"><b>Expires on</b></td></tr>';

$count = 0;
foreach($data as $ban) {

$count++;

$player = $a->query('SELECT * FROM `players` WHERE `account_id` = '.$ban['value'].'')->fetch();
$staff = $a->query('SELECT * FROM `players` WHERE `id` = '.$ban['admin_id'].'')->fetch();

if($ban['admin_id'] == 0) {
$staff['name'] = '<span style="font-size:10px;color:#e87300;">AUTOMATIC</span>';
} else { $staff['name'] = '<a href="/index.php/character/view/'.strtolower($staff['name']).'">'.$staff['name'].'</a>';
}

if($ban['expires'] == '-1') {
$expires = '<span style="font-size:10px;color:#e80000;">PERMANENT</span>';
} else {
$expires = '<span style="font-size:10px;">'.strtoupper(date('dS/F/Y', $ban['expires'])).'</span>';
}

echo '<tr class="highlight"><td>'.$count.'</td><td><a href="/index.php/character/view/'.strtolower($player['name']).'">'.$player['name'].'</a></td><td>'.$reason[$ban['reason']].'</td><td>'.$staff['name'].'</td><td>'.$expires.'</td></tr>';
}

echo '</table>';

?>
 
Ok thanks, but I have solved that things. Now I need to solve this problem with this death. It strange, I've tried everything and it is not working. Maybe you know what is the problem?
 
Highscores.php

PHP:
 <?php

# Banishments Script
# Version: 1.0
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

require('config.php');

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$a = $ots->getDBHandle();

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

# Number of bans to show
$archez['limit'] = '15';

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$reason = array('Offensive Name', 'Invalid Name Format', 'Unsuitable Name', 'Name Inciting Rule Violation', 'Offensive Statement', 'Spamming', 'Illegal Advertising', 'Off-Topic Public Statement', 'Non-English Public Statement', 'Inciting Rule Violation', 'Bug Abuse', 'Game Weakness Abuse', 'Using Unofficial Software to Play', 'Hacking', 'Multi-Clienting', 'Account Trading or Sharing', 'Threatening Gamemaster', 'Pretending to Have Influence on Rule Enforcer', 'False Report to Gamemaster', 'Destructive Behaviour', 'Excessive Unjustified Player Killing', 'Invalid Payment', 'Spoiling Auction');

$data = $a->query('SELECT * FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 ORDER BY `bans`.`added` DESC LIMIT '.$archez['limit']);

echo '<table border="0" width="100%">
<tr><td width="5%"><b>#</b></td><td width="25%"><b>Player</b></td><td width="30%"><b>Reason</b></td><td width="25%"><b>Imposed by</b></td><td width="15%"><b>Expires on</b></td></tr>';

$count = 0;
foreach($data as $ban) {

$count++;

$player = $a->query('SELECT * FROM `players` WHERE `account_id` = '.$ban['value'].'')->fetch();
$staff = $a->query('SELECT * FROM `players` WHERE `id` = '.$ban['admin_id'].'')->fetch();

if($ban['admin_id'] == 0) {
$staff['name'] = '<span style="font-size:10px;color:#e87300;">AUTOMATIC</span>';
} else { $staff['name'] = '<a href="/index.php/character/view/'.strtolower($staff['name']).'">'.$staff['name'].'</a>';
}

if($ban['expires'] == '-1') {
$expires = '<span style="font-size:10px;color:#e80000;">PERMANENT</span>';
} else {
$expires = '<span style="font-size:10px;">'.strtoupper(date('dS/F/Y', $ban['expires'])).'</span>';
}

echo '<tr class="highlight"><td>'.$count.'</td><td><a href="/index.php/character/view/'.strtolower($player['name']).'">'.$player['name'].'</a></td><td>'.$reason[$ban['reason']].'</td><td>'.$staff['name'].'</td><td>'.$expires.'</td></tr>';
}

echo '</table>';

?>
that's ban script :p
 
Ok thanks, but I have solved that things. Now I need to solve this problem with this death. It strange, I've tried everything and it is not working. Maybe you know what is the problem?


Here's my deaths.php

PHP:
<?php
	if(!defined('BASEPATH')) exit('No direct script access allowed');

	require("config.php");

	$ots = POT::getInstance();
	$ots->connect(POT::DB_MYSQL, connection());
	$SQL = $ots->getDBHandle();
	$deaths = $SQL->query("SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level`, `players`.`name`, `players`.`world_id` FROM `player_deaths` LEFT JOIN `players` ON `player_deaths`.`player_id` = `players`.`id` ORDER BY `player_deaths`.`date` DESC LIMIT 0,{$config['latestdeathlimit']};");

	echo "<div style=\"text-align: center; font-weight: bold;\">Latest Deaths</div><table border=\"0\" cellspacing=\"1\" cellpadding=\"4\" width=\"100%\">";

	if($deaths->rowCount())
	{
		foreach($deaths as $death)
		{
			$i = 0;
			$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();

			echo "<tr class=\"highlight\"><td width=\"22%\">".date("j M Y, H:i", $death['date'])."</td><td><a href=\"".WEBSITE."/index.php/character/view/{$death['name']}\">{$death['name']}</a> ";

			foreach($killers as $killer)
			{
				$i++;
				$str = (count($killers) >= 20 ? "annihilated" : (count($killers) >= 15 ? "eliminated" : (count($killers) >= 10 ? "crushed" : (count($killers) >= 5 ? "slain" : "killed"))));
				if(!empty($killer['monster_name']))
					$killer['monster_name'] = (!in_array($i, array(1, count($killers))) ? str_replace(array("an ", "a "), array("", ""), $killer['monster_name']) : $killer['monster_name']);

				echo (!empty($killer['player_name']) ? ($i == 1 ? "{$str} at Level {$death['level']} by " : ($i == count($killers) ? " and " : ", ")).(!empty($killer['monster_name']) ? "{$killer['monster_name']} of " : "").($killer['player_exists'] == 0 ? "<a href=\"".WEBSITE."/index.php/character/view/{$killer['player_name']}\">{$killer['player_name']}</a>" : $killer['player_name']) : ($i == 1 ? "died at Level {$death['level']} by {$killer['monster_name']}" : ($i == count($killers) ? " and {$killer['monster_name']}" : ", {$killer['monster_name']}")));
			}

			echo ".</td></tr>";
		}
	}
	else
		echo "<tr class=\"highlight\"><td style=\"text-align: center;\">No one died on {$config['server_name']}.</td></tr>";
		
	echo "</table>";
?>
 
Back
Top