• 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 ACC]RS/WS in Who is Online

EmmaA

JigglyPuff
Joined
Aug 11, 2008
Messages
462
Reaction score
0
Location
Kraków, Poland
Hi,
I have 4u, my script, on show in Who is Online, who player has White or Red skull!

Tested: 0.3.*
Not testted: 0.2.*

Credits: Me(EmmaA) and Chojrakt (Give Chojrak reputations) - Click

Example: Click
beztytuujav.jpg


Install ;P

1. Download two files! redskull.gif and whiteskull.gif (trackback or links)

2. Put it (redskull.gif or whiteskull.gif) on folder "images" in your main website catalog.
3. Open your file whoisonline.php
4. After:
if(is_int($number_of_players_online / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];

Add:

$kills = 6;
$time = 3 * 60 * 60 * 1000;
$hasRs = $kills * $time;
$rs = "";
if ($player['redskulltime'] > 0 && $player['redskull'] == 0)
$rs = "<img style='border: 0;' src='./images/whiteskull.gif'/>";
else if ($player['redskulltime'] >= $hasRs or $player['redskull'] == 1)
$rs = "<img style='border: 0;' src='./images/redskull.gif'/>";

5. Along whoisonline.php

This replece:
$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="index.php?subtopic=characters&name='.$player['name'].'">'.$player['name'].'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$player['promotion']][$player['vocation']].'</TD></TR>';

on:

$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="?subtopic=characters name='.urlencode($player['name']).'">'.$player['name'].$rs.'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';

7. Over(on this text):
//list of players
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD><A HREF="?subtopic=whoisonline&order=name" CLASS=white>Name</A></TD><TD><A HREF="?subtopic=whoisonline&order=level" CLASS=white>Level</A></TD><TD><A HREF="?subtopic=whoisonline&order=vocation" CLASS=white>Vocation</TD></TR>'.$players_rows.'</TABLE>';
//search bar
$main_content .= '<BR><FORM ACTION="?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>';
}
?>

add

$main_content .= "<table width='100%' cellspacing='1'>
<tr>
<td style='background: ".$bgcolor.";' align='center'>
<img src='./images/whiteskull.gif'/> - 1 - 6 Frags
<br/>
<img src='./images/redskull.gif'/> - 6+ Frags or Red Skull
</td>
</tr>
</table>";

OK. The end ;P

Files:
redskull.jpg ->
Code:
http://www.speedy*****malware.localhost/282973577.html
whiteskull.jpg ->
Code:
http://www.speedy*****malware.localhost/393735323.html

All bugs report in this topic!

Before you download/install , give Me reputation! Please.
 
Last edited:
Well done, EmmaA!

Nicely done, thanks for sharing.

Rep++
Zer0xe
 
hi this is my version for this mayby is simple
PHP:
$order = $_REQUEST['order'];
if($order == 'level')
    $orderby = 'level';
elseif($order == 'vocation')
    $orderby = 'vocation';
elseif($order == 'redskull')
    $orderby = 'redskull';
elseif($order == 'redskulltime')
    $orderby = 'redskulltime';
if(empty($orderby))
    $orderby = 'name';
    

$players_online_data = $SQL->query('SELECT * FROM players WHERE world_id = '.(int) $world_id.' AND online = 1 ORDER BY '.$orderby);
$number_of_players_online = 0;
foreach($players_online_data as $player) {
    $number_of_players_online++;
    if(is_int($number_of_players_online / 2))
        $bgcolor = $config['site']['darkborder'];
    else
        $bgcolor = $config['site']['lightborder'];
    $players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="?subtopic=characters&name='.urlencode($player['name']).'">';
        if($player['redskull'] == 1)
            $players_rows .= '<img src="Red_Skull.gif" border="0"> '.$player['name'].'';
        elseif($player['redskulltime'] >= 1)
            $players_rows .= '<img src="White_Skull.gif" border="0"> '.$player['name'].'';
        else
            $players_rows .= '&nbsp;&nbsp;&nbsp; '.$player['name'].'';
    $players_rows .= '</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';
}
Black_Skull.gif

Red_Skull.gif

White_Skull.gif
 
$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=70%><A HREF="index.php?subtopic=characters&name='.$player['name'].'">'.$player['name'].$rs.'</A></TD><TD WIDTH=10%>'.$player['level'].'</TD><TD WIDTH=20%>'.$vocation_name[$world_id][$player['promotion']][$player['vocation']].'</TD></TR>';
 
i fixed the error, but why in the website show pimage later of 20 minutes
approximately and not disappears the image??
 
in my page all people with 1 frag more got pk white and on game not.. can you help me?
 
Back
Top