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

[GESIOR 1.0.1] Powergamers and Wars

Cornex

Web Developer
Staff member
Global Moderator
Joined
Jun 15, 2008
Messages
3,444
Solutions
5
Reaction score
1,167
Location
Sweden
Hello!

I want to show you guys how to install powergamers and war statistics to your webpage!
In the gesior 1.0.1 you already got the scripts for it. So you don't need to add them.

First go to layouts>tibiacom>layout.php


between line 172-270~ add:

PHP:
<a href='?subtopic=powergamers'>
  <div id='submenu_powergamers' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_powergamers' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><span style="color:#CC0000">Powergamer</span></div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>

AND

PHP:
<a href='?subtopic=wars'>
  <div id='submenu_wars' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
    <div class='LeftChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
    <div id='ActiveSubmenuItemIcon_wars' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'><span style="color:#CC0000">War Statistics</span></div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>

After done with that you need add some to PhPmyadmin. Go to your database>SQL:

First add:

SQL:
ALTER TABLE `players` ADD `exphist_lastexp` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist1` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist2` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist3` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist4` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist5` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist6` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `exphist7` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetimetoday` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime1` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime2` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime3` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime4` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime5` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime6` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetime7` BIGINT( 255 ) NOT NULL DEFAULT '0', 
ADD `onlinetimeall` BIGINT( 255 ) NOT NULL DEFAULT '0';


SQL:
UPDATE `players` SET `exphist_lastexp`=`players`.`experience`

SQL:
ALTER TABLE `guilds` 
ADD `invited_to` INT( 11 ) NOT NULL ,
ADD `invited_by` INT( 11 ) NOT NULL ,
ADD `in_war_with` INT( 11 ) NOT NULL ,
ADD `kills` INT( 11 ) NOT NULL ,
ADD `show` SMALLINT( 1 ) NOT NULL ,
ADD `war_time` INT( 11 ) NOT NULL ;

SQL:
`guild_id` INT( 11 ) NOT NULL ,
`player_id` INT( 11 ) NOT NULL ,
`killer_guild` INT( 11 ) NOT NULL ,
`killer` INT( 11 ) NOT NULL ,
`date` INT( 11 ) NOT NULL ,
`result1` INT( 11 ) NOT NULL ,
`result2` INT( 11 ) NOT NULL 
) ENGINE = MYISAM ;

AND

SQL:
UPDATE `guilds` SET `invited_to` = 0, `invited_by` = 0, `in_war_with` = 0, `kills` = 0, `show` = 0, `war_time` = 0 WHERE `id` > 0;

Any buggs please post it here!

Enjoy
 
Last edited:
Is there new war system in newest TFS 0.4?
Page wars.php is for war system that I found in 0.4 rev. 3777, I think it's same in newest revs. of TFS.
Code:
it's also available for TFS 0.3.6 for client 8.54 and 8.60 if you use one of my modified sources of 0.3.6:
http://skalski.at/files/files/0.3.6pl1.r83-8.54-war_system.zip
http://skalski.at/files/files/tfs036pl1_860_warsystem_sources.zip

Account makers for 0.3.6 and 0.4 adds required
Columns:
PHP:
$columns[] = array('guilds', 'balance', 'BIGINT UNSIGNED', '', '0');
		$columns[] = array('killers', 'war', 'INT', '11', '0');
and tables:
PHP:
$tables[Database::DB_MYSQL]['guild_wars'] = "CREATE TABLE `guild_wars` (
							  `id` INT NOT NULL AUTO_INCREMENT,
							  `guild_id` INT NOT NULL,
							  `enemy_id` INT NOT NULL,
							  `begin` BIGINT NOT NULL DEFAULT '0',
							  `end` BIGINT NOT NULL DEFAULT '0',
							  `frags` INT UNSIGNED NOT NULL DEFAULT '0',
							  `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
							  `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
							  PRIMARY KEY (`id`),
							  KEY `status` (`status`),
							  KEY `guild_id` (`guild_id`),
							  KEY `enemy_id` (`enemy_id`)
							) ENGINE=InnoDB;";
		$tables[Database::DB_MYSQL]['guild_wars_table_references'] = "ALTER TABLE `guild_wars`
								  ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
								  ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
when you install acc. maker.
So you don't have to add columns and tables for war system. Just add line to layout.php to show link to 'Wars'.
 
Is there new war system in newest TFS 0.4?
Page wars.php is for war system that I found in 0.4 rev. 3777, I think it's same in newest revs. of TFS.
Code:
it's also available for TFS 0.3.6 for client 8.54 and 8.60 if you use one of my modified sources of 0.3.6:
http://skalski.at/files/files/0.3.6pl1.r83-8.54-war_system.zip
http://skalski.at/files/files/tfs036pl1_860_warsystem_sources.zip

Account makers for 0.3.6 and 0.4 adds required
Columns:
PHP:
$columns[] = array('guilds', 'balance', 'BIGINT UNSIGNED', '', '0');
		$columns[] = array('killers', 'war', 'INT', '11', '0');
and tables:
PHP:
$tables[Database::DB_MYSQL]['guild_wars'] = "CREATE TABLE `guild_wars` (
							  `id` INT NOT NULL AUTO_INCREMENT,
							  `guild_id` INT NOT NULL,
							  `enemy_id` INT NOT NULL,
							  `begin` BIGINT NOT NULL DEFAULT '0',
							  `end` BIGINT NOT NULL DEFAULT '0',
							  `frags` INT UNSIGNED NOT NULL DEFAULT '0',
							  `payment` BIGINT UNSIGNED NOT NULL DEFAULT '0',
							  `guild_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `enemy_kills` INT UNSIGNED NOT NULL DEFAULT '0',
							  `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
							  PRIMARY KEY (`id`),
							  KEY `status` (`status`),
							  KEY `guild_id` (`guild_id`),
							  KEY `enemy_id` (`enemy_id`)
							) ENGINE=InnoDB;";
		$tables[Database::DB_MYSQL]['guild_wars_table_references'] = "ALTER TABLE `guild_wars`
								  ADD CONSTRAINT `guild_wars_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE,
								  ADD CONSTRAINT `guild_wars_ibfk_2` FOREIGN KEY (`enemy_id`) REFERENCES `guilds` (`id`) ON DELETE CASCADE;";
when you install acc. maker.
So you don't have to add columns and tables for war system. Just add line to layout.php to show link to 'Wars'.

Really? Thanks for this :)
 
Fatal error: Call to a member function fetchAll() on a non-object in D:\xampp\htdocs\pages\powergamers.php on line 54

Using 1.0.1 Gesior.... Here is the line
Code:
[/B][/B][/B]$players = $SQL->query('SELECT * FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' < 2 ORDER BY ' . $SQL->fieldName('experience') . '-' . $SQL->fieldName('exphist_lastexp') . ' DESC LIMIT ' . $limit)->fetchAll();
 
Fatal error: Call to a member function fetchAll() on a non-object in D:\xampp\htdocs\pages\powergamers.php on line 54

Using 1.0.1 Gesior.... Here is the line
Code:
[/B][/B][/B]$players = $SQL->query('SELECT * FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' < 2 ORDER BY ' . $SQL->fieldName('experience') . '-' . $SQL->fieldName('exphist_lastexp') . ' DESC LIMIT ' . $limit)->fetchAll();


It is something with your powergamers.php.

Try use this instead:

PHP:
<?php
if(!defined('INITIALIZED'))
	exit;

/*
Script for OTSes that use MySQL (globalevent, type: think, interval: 60 or 60000 [tfs 0.4]):
function onThink()
	if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then
		setGlobalStorageValue(23456, (tonumber(os.date("%d"))))
		db.executeQuery("UPDATE `players` SET `onlinetime7`=`onlinetime6`, `onlinetime6`=`onlinetime5`, `onlinetime5`=`onlinetime4`, `onlinetime4`=`onlinetime3`, `onlinetime3`=`onlinetime2`, `onlinetime2`=`onlinetime1`, `onlinetime1`=`onlinetimetoday`, `onlinetimetoday`=0;")
		db.executeQuery("UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`=`experience`-`exphist_lastexp`, `exphist_lastexp`=`experience`;")
	end
	db.executeQuery("UPDATE `players` SET `onlinetimetoday`=`onlinetimetoday`+60, `onlinetimeall`=`onlinetimeall`+60 WHERE `online` = 1;")
end

MySQL schema:
ALTER TABLE `players` ADD `exphist_lastexp` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist1` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist2` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist3` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist4` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist5` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist6` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `exphist7` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetimetoday` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime1` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime2` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime3` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime4` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime5` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime6` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetime7` BIGINT( 20 ) NOT NULL DEFAULT '0',
ADD `onlinetimeall` BIGINT( 20 ) NOT NULL DEFAULT '0';
*/
$limit = 50;
$type = $_REQUEST['type'];
function coloured_value($valuein)
{
	$value2 = $valuein;
	while(strlen($value2) > 3)
	{
		$value .= '.'.substr($value2, -3, 3);
		$value2 = substr($value2, 0, strlen($value2)-3);
	}
	$value = $value2.$value;
	if($valuein > 0)
		return '<font color="green">+'.$value.'</font>';
	elseif($valuein < 0)
		return '<font color="red">'.$value.'</font>';
	else
		return '<font color="black">'.$value.'</font>';
}
if(empty($type))
	$players = $SQL->query('SELECT * FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' < 2 ORDER BY ' . $SQL->fieldName('experience') . '-' . $SQL->fieldName('exphist_lastexp') . ' DESC LIMIT ' . $limit)->fetchAll();
elseif($type == "sum")
	$players = $SQL->query('SELECT * FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' < 2 ORDER BY ' . $SQL->fieldName('exphist1') . '+' . $SQL->fieldName('exphist2') . '+' . $SQL->fieldName('exphist3') . '+' . $SQL->fieldName('exphist4') . '+' . $SQL->fieldName('exphist5') . '+' . $SQL->fieldName('exphist6') . '+' . $SQL->fieldName('exphist7') . '+' . $SQL->fieldName('experience') . '-' . $SQL->fieldName('exphist_lastexp') . ' DESC LIMIT ' . $limit)->fetchAll();
elseif($type >= 1 && $type <= 7)
	$players = $SQL->query('SELECT * FROM ' . $SQL->tableName('players') . ' WHERE ' . $SQL->fieldName('group_id') . ' < 2 ORDER BY ' . $SQL->fieldName('exphist' . (int) $type) . ' DESC LIMIT '.$limit)->fetchAll();
$main_content .= '<CENTER><H2>Ranking of powergamers</H2></CENTER><BR><TABLE BORDER="0" CELLPADDING="4" CELLSPACING="1" WIDTH="100%"><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD style="color:white"><B>Rank</B></TD><TD style="color:white"><B>Name</B></TD>';
{
	if($type == $i)
		$main_content .= '<TD bgcolor="red"><b><center><a href="?subtopic=powergamers&type='.$i.'">'.$i.' Days Ago</a></center></B></TD>';
	else
		$main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers&type='.$i.'">'.$i.' Days Ago</a></center></B></TD>';
}
if($type == 1)
	$main_content .= '<TD bgcolor="red"><b><center><a href="?subtopic=powergamers&type=1">1 Day Ago</a></center></B></TD>';
else
	$main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers&type=1">1 Day Ago</a></center></B></TD>';
if(empty($type))
	$main_content .= '<TD bgcolor="red"><b><center><a href="?subtopic=powergamers">Today</a></center></B></TD>';
else
	$main_content .= '<TD bgcolor="yellow"><b><center><a href="?subtopic=powergamers">Today</a></center></B></TD>';
$main_content .= '</TR>';
foreach($players as $player)
{
	if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
	$main_content .= '<tr bgcolor="'.$bgcolor.'"><td align="center">'.$number_of_rows.'. </td>';
	if($player['online'] == 1)
		$main_content .= '<td><a href="?subtopic=characters&name='.urlencode($player['name']).'"><b><font color="green">'.htmlspecialchars($player['name']).'</font></b></a>';
	else
		$main_content .= '<td><a href="?subtopic=characters&name='.urlencode($player['name']).'"><b><font color="red">'.htmlspecialchars($player['name']).'</font></b></a>';
	$main_content .= '<br />'.$player['level'].' '.htmlspecialchars(Website::getVocationName($player['vocation'], $player['promotion'])).'</td><td align="right">'.coloured_value($player['exphist1'] + $player['exphist2'] + $player['exphist3'] + $player['exphist4'] + $player['exphist5'] + $player['exphist6'] + $player['exphist7'] + $player['experience'] - $player['exphist_lastexp']).'</td>';
	$main_content .= '<td align="right">'.coloured_value($player['exphist7']).'</td><td align="right">'.coloured_value($player['exphist6']).'</td><td align="right">'.coloured_value($player['exphist5']).'</td><td align="right">'.coloured_value($player['exphist4']).'</td><td align="right">'.coloured_value($player['exphist3']).'</td><td align="right">'.coloured_value($player['exphist2']).'</td><td align="right">'.coloured_value($player['exphist1']).'</td><td align="right">'.coloured_value($player['experience']-$player['exphist_lastexp']).'</td></tr>';
}
$main_content .= '</TABLE>';
 
How would you go about keeping the Sample Characters out of a page, like the powergamers ect, the highscores doesn't show them, but i can't for the life of me figure out why -.-

Also the Above code doesn't display correctly, but i finally got my org powergamers script that came with gesior to work properly, redid the sql query / fetch command...



- - - Updated - - -

How would you go about keeping the Sample Characters out of a page, like the powergamers ect, the highscores doesn't show them, but i can't for the life of me figure out why -.-

Also the Above code doesn't display correctly, but i finally got my org powergamers script that came with gesior to work properly, redid the sql query / fetch command...



- - - Updated - - -

SORRY FOR DOUBLE POST!!! anyways The Quote is What your Redone Version of it looks like for me, but like i said the org started working, although it would be cool if you knew a way to turn this data into a overall world exp, and each day it'd add onto the [bar graph / line graph], Think you can add that? o.0 cauz that would be cool, it'd show the most active days people were on, and hunting

- - - Updated - - -

SORRY FOR DOUBLE POST!!! anyways The Quote is What your Redone Version of it looks like for me, but like i said the org started working, although it would be cool if you knew a way to turn this data into a overall world exp, and each day it'd add onto the [bar graph / line graph], Think you can add that? o.0 cauz that would be cool, it'd show the most active days people were on, and hunting
 
Page was fine, just needed a different History.lua, the function..

LINK TO THE FOLLOWING SCRIPT'S MAIN PAGE BY GESIOR.PL
Code:
[COLOR=#007700][FONT=monospace]function [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]historyPage[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]parameters[/FONT][/COLOR][COLOR=#007700][FONT=monospace])
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]dofile[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"./config.lua"[/FONT][/COLOR][COLOR=#007700][FONT=monospace])
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]luasql[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysql[/FONT][/COLOR][COLOR=#007700][FONT=monospace]())
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]connect[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlDatabase[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlUser[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlPass[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlHost[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlPort[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]local historyPage [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]addEvent[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]historyPage[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]60000[/FONT][/COLOR][COLOR=#007700][FONT=monospace], {})
    if ([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]tonumber[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]os[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]date[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"%d"[/FONT][/COLOR][COLOR=#007700][FONT=monospace])) ~= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]getGlobalStorageValue[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]23456[/FONT][/COLOR][COLOR=#007700][FONT=monospace])) [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]then
        setGlobalStorageValue[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]23456[/FONT][/COLOR][COLOR=#007700][FONT=monospace], ([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]tonumber[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]os[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]date[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"%d"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))))
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]end
    assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]close[/FONT][/COLOR][COLOR=#007700][FONT=monospace]()
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]close[/FONT][/COLOR][COLOR=#007700][FONT=monospace]()
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]end
[/FONT][/COLOR]

- - - Updated - - -

It was fine, after i added a table i forgot to add, that was the orginal problem, then my serve was spamming me, so i updated the script, and it stopped =)
 
Page was fine, just needed a different History.lua, the function..

LINK TO THE FOLLOWING SCRIPT'S MAIN PAGE BY GESIOR.PL
Code:
[COLOR=#007700][FONT=monospace]function [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]historyPage[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]parameters[/FONT][/COLOR][COLOR=#007700][FONT=monospace])
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]dofile[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"./config.lua"[/FONT][/COLOR][COLOR=#007700][FONT=monospace])
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]luasql[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysql[/FONT][/COLOR][COLOR=#007700][FONT=monospace]())
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]connect[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlDatabase[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlUser[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlPass[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlHost[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]mysqlPort[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]local historyPage [/FONT][/COLOR][COLOR=#007700][FONT=monospace]= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]addEvent[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]historyPage[/FONT][/COLOR][COLOR=#007700][FONT=monospace], [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]60000[/FONT][/COLOR][COLOR=#007700][FONT=monospace], {})
    if ([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]tonumber[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]os[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]date[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"%d"[/FONT][/COLOR][COLOR=#007700][FONT=monospace])) ~= [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]getGlobalStorageValue[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]23456[/FONT][/COLOR][COLOR=#007700][FONT=monospace])) [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]then
        setGlobalStorageValue[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]23456[/FONT][/COLOR][COLOR=#007700][FONT=monospace], ([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]tonumber[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]os[/FONT][/COLOR][COLOR=#007700][FONT=monospace].[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]date[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"%d"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))))
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
        [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
    [/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]end
    assert[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]execute[/FONT][/COLOR][COLOR=#007700][FONT=monospace]([/FONT][/COLOR][COLOR=#DD0000][FONT=monospace]"UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;"[/FONT][/COLOR][COLOR=#007700][FONT=monospace]))
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]con[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]close[/FONT][/COLOR][COLOR=#007700][FONT=monospace]()
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]env[/FONT][/COLOR][COLOR=#007700][FONT=monospace]:[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]close[/FONT][/COLOR][COLOR=#007700][FONT=monospace]()
[/FONT][/COLOR][COLOR=#0000BB][FONT=monospace]end
[/FONT][/COLOR]

- - - Updated - - -

It was fine, after i added a table i forgot to add, that was the orginal problem, then my serve was spamming me, so i updated the script, and it stopped =)

I don't understand, the history script works?
 
its a file to caculate the online time ect, and set it to the database values.. you didn't post it, but it's sorta in the link i provided.

TFS: 0.3.7 Crying Damson, WEB: Gesior 2012 Ver: 1.0.1.

Might of did this wrong not sure wtf it's for rly, other then updating the database, but anyways..
Here's what i did, i took the first script from that page and turned it into this:
Code:
function onThink(interval, lastExecution) 
    if (tonumber(os.date("%d")) ~= getGlobalStorageValue(23456)) then 
        setGlobalStorageValue(23456, (tonumber(os.date("%d")))) 
        db.executeQuery("UPDATE `players` SET `onlinetime7`=players.onlinetime6, `onlinetime6`=players.onlinetime5, `onlinetime5`=players.onlinetime4, `onlinetime4`=players.onlinetime3, `onlinetime3`=players.onlinetime2, `onlinetime2`=players.onlinetime1, `onlinetime1`=players.onlinetimetoday, `onlinetimetoday`=0;")
        db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")
    end
    db.executeQuery("UPDATE `players` SET `onlinetimetoday`=players.onlinetimetoday+60, `onlinetimeall`=players.onlinetimeall+60 WHERE `online` = 1;") 
    return TRUE 
end

And then Added this to Globalevents.lua
Code:
<globalevent name="history" interval="60" event="script" value="custom/history.lua"/>
Im pretty sure this is needed to update the database though.. although turning interval into time="01:00" ect would keep the script from overwriting the past values in intervals of 60, and save once a day, but if a player logged out before it was called, they wouldn't get there exphist saved? so is interval correct then?

OR

Do i need to just do the onlogin thing?... lol totaly just noticed that was there -.-
Now i Have yet to actually login and try to get exp ect... but theres no error's and everything displays properly.(but like i said yet to try and gain exp to see if it works, lol)
 
When trying to add

Code:
`guild_id` INT( 11 ) NOT NULL ,
`player_id` INT( 11 ) NOT NULL ,
`killer_guild` INT( 11 ) NOT NULL ,
`killer` INT( 11 ) NOT NULL ,
`date` INT( 11 ) NOT NULL ,
`result1` INT( 11 ) NOT NULL ,
`result2` INT( 11 ) NOT NULL 
) ENGINE = MYISAM ;

I got this error:

Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`guild_id` INT( 11 ) NOT NULL , `player_id` INT( 11 ) NOT NULL , `killer_guild' at line 1

- - - Updated - - -

Using TFS 0.2
 
got a bug on my wars page , gesior 0.2.15

Warning: Invalid argument supplied for foreach() in C:\wamp\www\pages\wars.php on line 33

Lua:
<?php
if(!defined('INITIALIZED'))
	exit;

$main_content = "<h1 align=\"center\">Guild Wars</h1>
/war invite,guild name,fraglimit                              Send an invitation to start a war. Example: war invite,Black Ninjas,150 <br>
/war invite,guild name,fraglimit,money,time                   Send an invitation to start a war. <br>
Example: war invite,Black Ninjas,150,10000,3 day's <br>

<b>/war accept,guild name </b> <u>                                      Accept the invitation to start a war. <br></u>
<b>/war reject,guild name  </b>    <u>                                  Reject the invitation to start a war. <br></u>
<b>/war end,guild name    </b>        <u>                               Ends an active war with another guild. <br></u>
<b>/war cancel,guild name   </b>         <u>                            This will cancel the invitation to the guild Black Ninjas <br></u>
<b>/balance donate 1234     </b>            <u>                         Command for founder of guilds for pay money <br></u>
<b>/balance pick 1234       </b>               <u>                      Command for founder of guilds for payout money <br></u>
<br>
<script type=\"text/javascript\"><!--
function show_hide(flip)
{
        var tmp = document.getElementById(flip);
        if(tmp)
                tmp.style.display = tmp.style.display == 'none' ? '' : 'none';
}
--></script>
<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\">
<tr>
<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\" width=\"150\"><b>Aggressor</b></td>
<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\"><b>Information</b></td>
<td style=\"background: " . $config['site']['vdarkborder'] . "\" class=\"white\" width=\"150\"><b>Enemy</b></td>
</tr>";
 
$count = 0;
foreach($SQL->query('SELECT * FROM ' . $SQL->tableName('guild_wars') . ' WHERE ' . $SQL->fieldName('status') . ' IN (1,4) OR ((' . $SQL->fieldName('end') . ' >= (UNIX_TIMESTAMP() - 604800) OR ' . $SQL->fieldName('end') . ' = 0) AND ' . $SQL->fieldName('status') . ' IN (0,5));') as $war)
{
        $a = new Guild();
        $a->load($war['guild_id']);
        if(!$a->isLoaded())
                continue;
 
        $e = new Guild();
        $e->load($war['enemy_id']);
        if(!$e->isLoaded())
                continue;
 
        $count++;
        $main_content .= "<tr style=\"background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\">
<td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$a->getId()."\"><img src=\"" . $a->getGuildLogoLink() . "\" width=\"64\" height=\"64\" border=\"0\"/><br />".htmlspecialchars($a->getName())."</a></td>
<td class=\"white\" align=\"center\">";
        switch($war['status'])
        {
                case 0:
                {
                        $main_content .= "<font color=black><b>Pending acceptation</b><br />Invited on " . date("M d Y, H:i:s", $war['begin']) . " for " . ($war['end'] > 0 ? (($war['end'] - $war['begin']) / 86400) :"unspecified") . " days. The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." :"without any payment.")."<br />Will expire in three days.</font>";
                        break;
                }
 
                case 3:
                {
                        $main_content .= "<s>Canceled invitation</s><br />Sent invite on " . date("M d Y, H:i:s", $war['begin']) . ", canceled on " . date("M d Y, H:i:s", $war['end']) . ".";
                        break;
                }
 
                case 2:
                {
                        $main_content .= "Rejected invitation<br />Invited on " . date("M d Y, H:i:s", $war['begin']) . ", rejected on " . date("M d Y, H:i:s", $war['end']) . ".";
                        break;
                }
 
                case 1:
                {
                        $main_content .= "<font size=\"12\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span><font color=black> : </font><span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred; font-weight: bold;\">On a brutal war</span><br /><font color=black>Began on " . date("M d Y, H:i:s", $war['begin']) . ($war['end'] > 0 ? ", will end up at " . date("M d Y, H:i:s", $war['end']) :"") . ".<br />The frag limit is set to " . $war['frags'] . " frags, " . ($war['payment'] > 0 ? "with payment of " . $war['payment'] . " bronze coins." :"without any payment.</font>");
                        break;
                }
 
                case 4:
                {
                        $main_content .= "<font size=\"12\"><span style=\"color: red;\">" . $war['guild_kills'] . "</span> : <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span></font><br /><br /><span style=\"color: darkred;\">Pending end</span><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", signed armstice on " . date("M d Y, H:i:s", $war['end']) . ".<br />Will expire after reaching " . $war['frags'] . " frags. ".($war['payment'] > 0 ? "The payment is set to " . $war['payment'] . " bronze coins." :"There's no payment set.");
                        break;
                }
 
                case 5:
                {
                        $main_content .= "<i>Ended</i><br />Began on " . date("M d Y, H:i:s", $war['begin']) . ", ended on " . date("M d Y, H:i:s", $war['end']) . ". Frag statistics: <span style=\"color: red;\">" . $war['guild_kills'] . "</span> to <span style=\"color: lime;\">" . $war['enemy_kills'] . "</span>.";
                        break;
                }
 
                default:
                {
                        $main_content .= "Unknown, please contact with gamemaster.";
                        break;
                }
        }
 
        $main_content .= "<br /><br /><a onclick=\"show_hide('war-details:" . $war['id'] . "'); return false;\" style=\"cursor: pointer;\">&raquo; Details &laquo;</a></td>
<td align=\"center\"><a href=\"?subtopic=guilds&action=show&guild=".$e->getId()."\"><img src=\"" . $a->getGuildLogoLink() . "\" width=\"64\" height=\"64\" border=\"0\"/><br />".htmlspecialchars($e->getName())."</a></td>
</tr>
<tr id=\"war-details:" . $war['id'] . "\" style=\"display: none; background: " . (is_int($count / 2) ? $config['site']['darkborder'] : $config['site']['lightborder']) . ";\">
<td colspan=\"3\">";
        if(in_array($war['status'], array(1,4,5)))
        {
                $deaths = $SQL->query('SELECT ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('id') . ', ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('date') . ', ' . $SQL->tableName('gk') . '.' . $SQL->fieldName('guild_id') . ' AS ' . $SQL->fieldName('enemy') . ', ' . $SQL->tableName('p') . '.' . $SQL->fieldName('name') . ', ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('level') . ' FROM ' . $SQL->tableName('guild_kills') . ' gk LEFT JOIN ' . $SQL->tableName('player_deaths') . ' pd ON ' . $SQL->tableName('gk') . '.' . $SQL->fieldName('death_id') . ' = ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' p ON ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('player_id') . ' = ' . $SQL->tableName('p') . '.' . $SQL->fieldName('id') . ' WHERE ' . $SQL->tableName('gk') . '.' . $SQL->fieldName('war_id') . ' = ' . $SQL->quote($war['id']) . ' AND ' . $SQL->tableName('p') . '.' . $SQL->fieldName('deleted') . ' = 0 ORDER BY ' . $SQL->tableName('pd') . '.' . $SQL->fieldName('date') . ' DESC')->fetchAll();
                if(!empty($deaths))
                {
                        foreach($deaths as $death)
                        {
                                $killers = $SQL->query('SELECT ' . $SQL->tableName('p') . '.' . $SQL->fieldName('name') . ' AS ' . $SQL->fieldName('player_name') . ', ' . $SQL->tableName('p') . '.' . $SQL->fieldName('deleted') . ' AS ' . $SQL->fieldName('player_exists') . ', ' . $SQL->fieldName('k') . '.' . $SQL->fieldName('war') . ' AS ' . $SQL->fieldName('is_war') . ' FROM ' . $SQL->fieldName('killers') . ' k LEFT JOIN ' . $SQL->tableName('player_killers') . ' pk ON ' . $SQL->tableName('k') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('kill_id') . ' LEFT JOIN ' . $SQL->tableName('players') . ' p ON ' . $SQL->tableName('p') . '.' . $SQL->fieldName('id') . ' = ' . $SQL->tableName('pk') . '.' . $SQL->fieldName('player_id') . ' WHERE ' . $SQL->tableName('k') . '.' . $SQL->fieldName('death_id') . ' = ' . $SQL->quote($death['id']) . ' ORDER BY ' . $SQL->tableName('k') . '.' . $SQL->fieldName('final_hit') . ' DESC, ' . $SQL->tableName('k') . '.' . $SQL->fieldName('id') . ' ASC')->fetchAll();
                                $count = count($killers); $i = 0;
 
                                $others = false;
                                $main_content .= date("j M Y, H:i", $death['date']) . " <span style=\"font-weight: bold; color: " . ($death['enemy'] == $war['guild_id'] ? "red" :"lime") . ";\">+</span>
<a href=\"?subtopic=characters&name=" . urlencode($death['name']) . "\"><b>".htmlspecialchars($death['name'])."</b></a> ";
                                foreach($killers as $killer)
                                {
                                        $i++;
                                        if($killer['is_war'] != 0)
                                        {
                                                if($i == 1)
                                                        $main_content .= "killed at level <b>".$death['level']."</b> by ";
                                                else if($i == $count && $others == false)
                                                        $main_content .= " and by ";
                                                else
                                                        $main_content .= ", ";
 
                                                if($killer['player_exists'] == 0)
                                                        $main_content .= "<a href=\"?subtopic=characters&name=".urlencode($killer['player_name'])."\">";
 
                                                $main_content .= htmlspecialchars($killer['player_name']);
                                                if($killer['player_exists'] == 0)
                                                        $main_content .= "</a>";
                                        }
                                        else
                                                $others = true;
 
                                        if($i == $count)
                                        {
                                            if($others == true)
                                                $main_content .= " and few others";
                                            $main_content .= ".<br />";
                                        }
                                }
                        }
                }
                else
                        $main_content .= "<center>There were no frags on this war so far.</center>";
        }
        else
                $main_content .= "<center>This war did not began yet.</center>";
 
        $main_content .= "</td>
</tr>";
}
 
if($count == 0)
        $main_content .= "<tr style=\"background:".$config['site']['darkborder'].";\">
<td colspan=\"3\">Currently there are no active wars.</td>
</tr>";
 
$main_content .= "</table>";
i sent u a message tho, i need help with a few stuffs for exaample to get the commands working ingame because u need like talkactions for that if im right and i dont got it :/
 
i have a problem with my powergamer status. its just stand overall exp . it doesent restart each day . all days of exping goeas to 1 day. why
-Oddis
 
Back
Top