QuaS
Cykotitan Pwned =/
Hello. I would like to release new deathlist system for gesior accmaker.
1. What I mean?
I mean that:
I spent few hours to optimize it to newest tables of tfs, which will be relased in crying damnson 0.3.5.
2. But what if You want change it urself
Find in characters.php line with "deaths list" and replace this all php code with it:
But if You are not experienced, then best way will be just replace file, with this one in attachments. This file has included Ballack Status.
3. Something Doesn't Work - Doesn't work all site!
If u update ur TFS to newest one (0.3.5) ur site won't work properly. If u want to make it works, you have to change pot/OTS_Player.php and install.php
IF anyone wants to me to upload this 2 files, then say it in this Topic.
Comments Please.
Your QuaS~
1. What I mean?
I mean that:
I spent few hours to optimize it to newest tables of tfs, which will be relased in crying damnson 0.3.5.
2. But what if You want change it urself
Find in characters.php line with "deaths list" and replace this all php code with it:
PHP:
//deaths list by QuaS~~
//Getting Data - 2 SQL Queries
$idgracza = $player->getCustomField("id");
$players_deaths = $SQL->query('SELECT `player_deaths`.`id`, `player_deaths`.`date`, `player_deaths`.`level` FROM `player_deaths` WHERE `player_deaths`.`player_id` = '.$idgracza.' ORDER BY `date` DESC LIMIT 50');
$players_deaths_count = 0;
if(!empty($players_deaths))
{
foreach($players_deaths as $death)
{
$players_deaths_count++;
if(is_int($players_deaths_count / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$players_rows .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH="125"><small>'.date("j M Y, H:i",$death['date']).' CEST</small></TD><TD><a href="?subtopic=characters&name='.urlencode($death['name']).'"><b>'.$death['name'].'</b></a> ';
$killers = $SQL->query("SELECT environment_killers.name AS monster_name, players.name AS player_name, players.deleted AS player_exists, killers.final_hit AS final_hit
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 = '".$death['id']."' ORDER BY player_killers.player_id DESC, killers.id ASC")->fetchAll();
$i = 0;
//Properly Counting - 4 SQL Queries
$getDeathlist = $SQL->query("SELECT player_killers.kill_id from killers,player_killers where killers.death_id = ".$death['id']." and player_killers.kill_id = killers.id")->fetchAll();
$getDeathlist1 = $SQL->query("SELECT id, death_id from killers where final_hit = 1 and death_id = ".$death['id']);
$z = 0;
$p = 0;
foreach($getDeathlist1 as $Deathlist)
{
$count_m = $SQL->query("SELECT * from environment_killers where kill_id = ".$Deathlist['id'])->fetchAll();
}
$z = count($count_m);
$p = count($getDeathlist);
$count = $z + $p;
//Displaying
//Killed By Players
foreach($killers as $killer)
{
$i++;
if($killer['player_name'] != "")
{
if($i == 1)
{
if ($count <= 4){
$players_rows .= "Killed at level <b>".$death['level']."</b> by ";
}
elseif ($count > 4 and $count < 10){
$players_rows .= "Slain at level <b>".$death['level']."</b> by ";
}
elseif ($count > 9 and $count < 15){
$players_rows .= "Crushed at level <b>".$death['level']."</b> by ";
}
elseif ($count > 14){
$players_rows .= "Eliminated at level <b>".$death['level']."</b> by ";
}
}
elseif($i == $count)
$players_rows .= " and ";
else{
$players_rows .= ", ";
}
if($killer['monster_name'] != "")
$players_rows .= $killer['monster_name']." summoned by ";
if($killer['player_exists'] == 0)
$players_rows .= "<a href=\"index.php?subtopic=characters&name=".urlencode($killer['player_name'])."\">";
$players_rows .= $killer['player_name'];
if($killer['player_exists'] == 0)
$players_rows .= "</a>";
}
else
//Killed By Monster (only final hit)
{
if ($killer['final_hit'] == 1)
{
if ($i == 1)
$players_rows .= "Died at level <b>".$death['level']."</b> by ";
else
$players_rows .= " and ";
$players_rows .= $killer['monster_name'];
}
}
}
$players_rows .= '.</TD></TR>';
}
}
if(!$players_deaths_count == 0)
{
$main_content .= '<br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><B>Character Deaths</B></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2 WIDTH=100%>'.$players_rows.'</TABLE>';
}
//end
But if You are not experienced, then best way will be just replace file, with this one in attachments. This file has included Ballack Status.
3. Something Doesn't Work - Doesn't work all site!
If u update ur TFS to newest one (0.3.5) ur site won't work properly. If u want to make it works, you have to change pot/OTS_Player.php and install.php
IF anyone wants to me to upload this 2 files, then say it in this Topic.
Comments Please.
Your QuaS~
Last edited by a moderator: