Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

[Release] Player Status Online

iam still Noob
Joined
Nov 1, 2009
Messages
842
Reaction score
277
Location
Jaka, Indonesia
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:
This is way to complicated, you could have simplified it much more.
 
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