• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Release] Player Status Online

Joined
Nov 1, 2009
Messages
842
Reaction score
276
this is an old script by FDCORE, and i have modified it with php for Player Status Online with Map Status.

This is a Sample

novanakal - [Release] Player Status Online - RaGEZONE Forums



OK,.. here we go..

1. Create Your trigger in to MSSQL

USE [RF_WORLD_NOVUS]
ALTER TABLE [dbo].[tbl_general] ADD [OnlineStatus] datetime CONSTRAINT [DF_tbl_base_OnlineStatus] DEFAULT 0 NOT NULL
GO

CREATE TRIGGER [dbo].[OnlineСheck] ON [dbo].[tbl_general] FOR INSERT, UPDATE AS BEGIN SET NOCOUNT ON;
IF UPDATE(TotalPlayMin) UPDATE tbl_general SET tbl_general.OnlineStatus = GETDATE()
FROM tbl_general INNER JOIN inserted ON tbl_general.Serial = inserted.Serial
END
GO



2. Create your Config.php File
<?php
//MSSQL settings
$base = "RF_WORLD_NOVUS";
$host = "Your IP or YOUR Server Name";
$sql_user = 'SQL USER';
$sql_pwd = 'SQL PASSWORD';
?>


3. Now Status.php File
<!-- Online Status -->
<style type="text/css">
<!--
body {
background-color: #ffffff;
}
-->

</style>
<tr><td><center><table border=0>
<meta http-equiv="refresh" content="25" >
<?php

include_once 'config.php';

$conn=mssql_connect($host,$sql_user,$sql_pwd) or die("<center><b>??????????? ??????</b><br>?????????? ???????????? ? ????<br><br></center>");

@mssql_select_db($base, $conn) or die("<center><b>??????????? ??????</b><br>???? ?? ??????????, ???? ??? ???????<br><br></center>");

$resss=mssql_query ("SELECT t1.Name, t1.Race, t2.Map
FROM tbl_base AS t1 INNER JOIN tbl_general AS t2 ON t1.Serial = t2.Serial WHERE (t2.OnlineStatus >=(getdate()-0.005))");
echo "<tr><td><td><td style=padding-left:15px align=center ><font color=black><b>Who's Online :</b><br><br></tr></td></td></td></font>";

//Table Section
$g=0;
echo '
<table id=uo style="border:3px double black;" cellpadding=9 cellspacing=0 width="50%" height=15 align=center>
<td id=io width="3%" align=center bgcolor=#365a93 style="border-bottom:1px dashed #1d7abb;" ><font size=2><font color=white>No</font></td></font>
<td id=io width="3%" align=left bgcolor=#365a93 "><font size=2><font color=white><b>Nick Name</b></font></span></td></font>
<td id=io width="3%" align=center bgcolor=#365a93 "><font size=2><font color=white><b>Race</b></font></span></td></font>
<td id=io width="3%" align=center bgcolor=#365a93 "><font size=2><font color=white><b>Map Location</b></font></span></td></font>
</tr>';

while ($rows=mssql_fetch_array($resss))
{
{
// Table Number
$g++;

// Race Status
if ($rows[1]=="0")
$Race="<img src='/images/bcc.gif'>";
if ($rows[1]=="1")
$Race="<img src='/images/bcc.gif'>";
if ($rows[1]=="2")
$Race="<img src='/images/ccc.gif'>";
if ($rows[1]=="3")
$Race="<img src='/images/ccc.gif'>";
if ($rows[1]=="4")
$Race="<img src='/images/acc.gif'>";
// MAP STATUS
if ($rows['Map']=="0")
$maps="Bellato HQ";
if ($rows['Map']=="1")
$maps="Cora HQ";
if ($rows['Map']=="2")
$maps="Craig Mine";
if ($rows['Map']=="3")
$maps="Accretia HQ";
if ($rows['Map']=="4")
$maps="Numerus";
if ($rows['Map']=="5")
$maps="Anacade";
if ($rows['Map']=="6")
$maps="Solus";
if ($rows['Map']=="7")
$maps="Haram";
if ($rows['Map']=="8")
$maps="Armory 213";
if ($rows['Map']=="9")
$maps="Armory 117";
if ($rows['Map']=="10")
$maps="Ether Platform";
if ($rows['Map']=="11")
$maps="Sette";
if ($rows['Map']=="12")
$maps="Volcanic Cauldron";
if ($rows['Map']=="13")
$maps="Elan";
if ($rows['Map']=="14")
$maps="Battle Dungeon";
if ($rows['Map']=="15")
$maps="Transportation Ship";
if ($rows['Map']=="16")
$maps="Battle Dungeon";
if ($rows['Map']=="17")
$maps="Accretia Guild Room";
if ($rows['Map']=="18")
$maps="Bellato Guild Room";
if ($rows['Map']=="19")
$maps="Cora Guild Room";
if ($rows['Map']=="20")
$maps="Accretia Guild Room";
if ($rows['Map']=="21")
$maps="Bellato Guild Room";
if ($rows['Map']=="22")
$maps="Cora Guild Room";
if ($rows['Map']=="23")
$maps="Battle Dungeon";
if ($rows['Map']=="24")
$maps="Outcast Land";
if ($rows['Map']=="25")
$maps="Mountain Beast";
if ($rows['Map']=="26")
$maps="Medicallab";
if ($rows['Map']=="27")
$maps="Elf Land";
if ($rows['Map']=="28")
$maps="Battle Dungeon";
if ($rows['Map']=="29")
$maps="Medicallab 2nd";
if ($rows['Map']=="30")
$maps="Battle Dungeon";
}
echo '
<tr id=io>
<td id=io width=1% align=center style="border-bottom:1px dashed #1d7abb;"><font size=2>'.$g.'</font></td>
<td id=io width=7% align=left style="border-bottom:1px dashed #1d7abb;"><font size=2><b>'.$rows[0].'</b>
<td id=io width=0% align=center style="border-bottom:1px dashed #1d7abb;"><font size=2>'.$Race.'
<td id=io width=7% align=center style="border-bottom:1px dashed #1d7abb;"><font size=2>'.$maps;
}
?>


4. DONE


You can modify with Coordinat Map and whatever you want.
 
Last edited:
Newbie Spellweaver
Joined
Dec 28, 2009
Messages
36
Reaction score
6
This is way to complicated, you could have simplified it much more.
 
Newbie Spellweaver
Joined
Oct 25, 2005
Messages
60
Reaction score
2
thats cool dude. its much better than people who can only recognize or claim the work of the others. 9/10 for you :p
 
Joined
Apr 9, 2012
Messages
2,359
Reaction score
442
Anyone have Simple Total Players online script ?
this is the most easiest script i find sometime ago
http://forum.ragezone.com/f152/player-cw-time-script-857173-post7105131/#post7105131

if you know how that script work, not only you can get total player online, you can even get, how much people online on certain maps, can check boss on elan, is it spawn or not, it's not limited to elan tho'.hahahaha
you can do so many thing from it, if you know how that script work.hhahaha
 
Back
Top