• 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. maker][TFS 0.3.5]Powergamers and online time stats

Koci1994

Banned User
Joined
Dec 27, 2008
Messages
807
Reaction score
1
1.How to install?
1. In MySQL execute (phpmyadmin -> 'SQL'):
PHP:
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';
and:
PHP:
UPDATE `players` SET `exphist_lastexp`=`players`.`experience`
2.open TFS file .../data/globalevents/globalevents.xml and paste line :
PHP:
    <globalevent name="history" interval="60" event="script" value="history.lua"/>
3.open TFS/ file .../data/globalevents/scripts
Create new file history.lua
Open history.lua and put:
PHP:
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
4. In folder with acc. maker unpack file:
pro-stats.zip
5. Now you must only add buttons with links to new pages:
Open index.php (In folder with acc) and
After:
PHP:
    case "team";
        $subtopic = "team";
        $topic = "Gamemasters List";
        include("team.php");
    break;
Add:
PHP:
    case "exphist";
        $subtopic = "exphist";
        $topic = "Powergamers";
        include("exphist.php");
    break;
And After :
PHP:
    case "creatures";
        $topic = "Creatures";
        $subtopic = "creatures";
        include("creatures.php");
    break;
Add:
PHP:
    case "onlinetime";
        $topic = "Onlinetime";
        $subtopic = "onlinetime";
        include("onlinetime.php");
    break;
And in file .../tibiacom/layout.php
After:
PHP:
<a href='index.php?subtopic=guilds'>
  <div id='submenu_guilds' 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_guilds' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Guilds</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
</a>
Add:
PHP:
<a href='index.php?subtopic=exphist'>
  <div id='submenu_exphist' 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_exphist' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Powergamers</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
<a href='index.php?subtopic=onlinetime'>
  <div id='submenu_onlinetime' 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_onlinetime' class='ActiveSubmenuItemIcon' style='background-image:url(<?PHP echo $layout_name; ?>/images/menu/icon-activesubmenu.gif);'></div>
    <div class='SubmenuitemLabel'>Most Online</div>
    <div class='RightChain' style='background-image:url(<?PHP echo $layout_name; ?>/images/general/chain.gif);'></div>
  </div>
Layout of graphic statistics is generated by charinfo.php(data + colors/effects) and charts.php (background color)
Other graphic layouts you can find:
PHP/SWF Charts > Introduction

6. Characters.php
Open characters.php (In folder with acc)
Over :
PHP:
      //deaths list
Paste:
PHP:
  $main_content .= '</TABLE>';

            include "charts.php";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=exp&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=online&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=expgain&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
                        $main_content .= '</TD></TR></TABLE>';
 

Attachments

  • pro-stats (php files).zip
    2.6 KB · Views: 81 · VirusTotal
Last edited by a moderator:
For users 0.3.4
globalevents.xml
PHP:
	<globalevent name="history" interval="60" script="history.lua"/>
 
Hello .. how do I remove the graphics?
I would like to remove the three .. they appear when using the Characters!

http://img151.imageshack.us/img151/7438/tablec.jpg
Delete in characters.php
PHP:
  $main_content .= '</TABLE>';  

            include "charts.php";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=exp&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=online&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
            $main_content .= "<table><tr width=\"100%\"><td width='9%'></td><td><center>".InsertChart ( "charts.swf", "charts_library", "charinfo.php?type=expgain&uniqueID=" . uniqid(rand(),true) . "&guid=" . $player->getId(), 500, 300 )."</center></td></tr></table>";
                        $main_content .= '</TD></TR></TABLE>';
 
Fatal error: Cannot redeclare coloured_value() (previously declared in C:\xampp\htdocs\xampp\exphist.php:4) in C:\xampp\htdocs\xampp\layouts\lay\layout.php on line 172

:SSS Solution?
 
Back
Top