Water Fighter
New Member
- Joined
- Mar 11, 2008
- Messages
- 47
- Reaction score
- 0
Hello
I need Deathlist for See 2 killers!
Like Example
In Gesior ACC 0.3.2 Beta 3
Here is The Deathlist Code:
THANKS in Advance =*
I need Deathlist for See 2 killers!
Like Example
Code:
Jan 29 2009, 23:32:47 CET Killed at Level 231 by Princess Morwen
and by Ron Montegro
Here is The Deathlist Code:
Code:
//deaths list
$player_deaths = $SQL->query('SELECT * FROM player_deaths WHERE '.$player->getId().' = player_id ORDER BY time DESC');
$number_of_players_deaths = 0;
$dead_add_content .= '<br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Deaths</B></TD></TR>';
if(!empty($player_deaths)) {
$vowels = array("e", "y", "u", "i", "o", "a");
foreach($player_deaths as $dead) {
if(is_int($number_of_player_deaths / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$number_of_player_deaths++;
$dead_add_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=20%>'.date("j M Y, H:i", $dead['time']).'</TD><TD>Killed at Level '.$dead['level'].' by ';
if(is_numeric($dead['killed_by']))
{
$player_char = new OTS_Player();
$player_char->load($dead['killed_by']);
if($player_char->isLoaded())
$dead_add_content .= '<a href="index.php?subtopic=characters&name='.$player_char->getName().'"><b>'.$player_char->getName().'</b></a>';
else
$dead_add_content .= '<b>DELETED PLAYER</b>';
}
else
{
if($dead['killed_by'] == "-1")
$dead_add_content .= "item or field";
else
{
if(in_array(substr(strtolower($dead['killed_by']), 0, 1), $vowels))
$dead_add_content .= "an ";
else
$dead_add_content .= "a ";
$dead_add_content .= $dead['killed_by'];
}
}
$dead_add_content .= '.</TD></TR>';
}
}
$dead_add_content .= '</TABLE>';
if($number_of_player_deaths > 0)
$main_content .= $dead_add_content;
if($player->getCustomField("hide_char") != 1) {
//account info
$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=2 CLASS=white><B>Account Information</B></TD></TR><TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Real name:</TD><TD>'.$account->getCustomField("rlname").'</TD></TR><TR BGCOLOR='.$config['site']['darkborder'].'><TD WIDTH=20%>Location:</TD><TD>'.$account->getCustomField("location").'</TD></TR><TR BGCOLOR='.$config['site']['lightborder'].'><TD WIDTH=20%>Created:</TD><TD>'.date("j F Y, H:i", $account->getCustomField("created")).'</TD>';
//char list table
$main_content .= '</TD></TR></TABLE>';
$main_content .= '<br><TABLE BORDER=0><TR><TD></TD></TR></TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD COLSPAN=4 CLASS=white><B>Characters</B></TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD><B>Name</B></TD><TD><B>Level</B></TD><TD><b>Status</b></TD><TD><B>*</B></TD></TR>';
//for each player on account
$account_players = $account->getPlayersList();
$account_players->orderBy('name');
$player_number = 0;
foreach($account_players as $player_list)
{
if($player_list->getCustomField("hide_char") != 1)
{
$player_number++;
if(is_int($player_number / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
if($player_list->getCustomField("online") == 0)
$player_list_status = '<font color="red">Offline</font>';
else
$player_list_status = '<font color="green">Online</font>';
$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=72%><NOBR>'.$player_number.'.*'.$player_list->getName().'</NOBR></TD><TD WIDTH=20%>'.$player_list->getLevel().' '.$config_vocations[$player_list->getVocation()].'</TD><TD WIDTH="8%"><b>'.$player_list_status.'</b></TD><TD><TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0><FORM ACTION="index.php?subtopic=characters" METHOD=post><TR><TD><INPUT TYPE=hidden NAME=name VALUE="'.$player_list->getName().'"><INPUT TYPE=image NAME="View '.$player_list->getName().'" ALT="View '.$player_list->getName().'" SRC="'.$layout_name.'/images/buttons/sbutton_view.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></FORM></TABLE></TD></TR>';
}
}
$main_content .= '</TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
//end of char list table
}
//show search form
$main_content .= '<BR><BR><FORM ACTION="index.php?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
$main_content .= '</TABLE>';
}
else
{
$search_errors[] = 'Character <b>'.$name.'</b> does not exist.';
//gracz nie istnieje - komunikat
}
}
else
{
$search_errors[] = 'This name contains invalid letters. Please use only A-Z, a-z and space.';
//niepoprawne imie gracza
}
if(!empty($search_errors)) {
$main_content .= '<div class="SmallBox" > <div class="MessageContainer" > <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="ErrorMessage" > <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);" /></div> <div class="AttentionSign" style="background-image:url('.$layout_name.'/images/content/attentionsign.gif);" /></div><b>The Following Errors Have Occurred:</b><br/>';
foreach($search_errors as $search_error)
$main_content .= '<li>'.$search_error;
$main_content .= '</div> <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);" /></div> <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);" /></div> </div></div><br/>';
$main_content .= '<BR><FORM ACTION="index.php?subtopic=characters" METHOD=post><TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>Search Character</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['darkborder'].'"><TABLE BORDER=0 CELLPADDING=1><TR><TD>Name:</TD><TD><INPUT NAME="name" VALUE=""SIZE=29 MAXLENGTH=29></TD><TD><INPUT TYPE=image NAME="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18></TD></TR></TABLE></TD></TR></TABLE></FORM>';
}
}
?>
THANKS in Advance =*