Welcome to the RaGEZONE - MMORPG development forums.

[Release] Player Status Online

This is a discussion on [Release] Player Status Online within the RF Releases forums, part of the RF Online category; this is an old script by FDCORE, and i have modified it with php for Player Status Online with Map ...

Results 1 to 6 of 6
  1. #1
    iam still Noob
    Rank
    Member +
    Join Date
    Nov 2009
    Location
    Jaka, Indonesia
    Posts
    721
    Liked
    154
    Steam ID: novanakal

    [Release] Player Status Online

    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




    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 by novanakal; 23-12-11 at 12:03 AM.
    NYESEL NGESHARE SESUATU ?? PERCUMA SOB, UDAH JD BUBUR..!!!!

  2. #2
    Ron
    ':,,:'
    Rank
    WTF? Overkill!
    Join Date
    Apr 2005
    Location
    Dallas, TX
    Posts
    8,271
    Liked
    1887

    Re: [Release] Player Status Online

    That PHP code is horrible.

  3. #3
    Member
    Rank
    Member
    Join Date
    Dec 2009
    Posts
    60
    Liked
    7

    Re: [Release] Player Status Online

    This is way to complicated, you could have simplified it much more.

  4. #4
    iam still Noob
    Rank
    Member +
    Join Date
    Nov 2009
    Location
    Jaka, Indonesia
    Posts
    721
    Liked
    154
    Steam ID: novanakal

    Re: [Release] Player Status Online

    if you have a simple php, share it
    NYESEL NGESHARE SESUATU ?? PERCUMA SOB, UDAH JD BUBUR..!!!!

  5. #5
    Registered
    Rank
    Member
    Join Date
    Nov 2008
    Posts
    15
    Liked
    0

    Re: [Release] Player Status Online

    Quote Originally Posted by novanakal View Post
    if you have a simple php, share it
    you can PM me mr novanakal

  6. #6
    Member
    Rank
    Member
    Join Date
    Oct 2005
    Location
    Indonesia
    Posts
    78
    Liked
    2

    Re: [Release] Player Status Online

    thats cool dude. its much better than people who can only recognize or claim the work of the others. 9/10 for you :p

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •