Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Shaiya > Shaiya Private Server > Shaiya PServer Guides & Releases
You last visited: Today at 17:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[RELEASE] Script - Number of Players Online

Discussion on [RELEASE] Script - Number of Players Online within the Shaiya PServer Guides & Releases forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
ProfNerwosol's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 644
[RELEASE] Script - Number of Players Online

Updated

Script showing how many players are online, with distinction by race.

Instructions:

Note that for it to work, you need to alter two procedures in PS_GameData and add one colum in PS_GameData.dbo.Chars, LoginStatus. Files with sql code are included.

What it does?

Everytime players logs in LoginStatus is changed to 1. PHP script when run, read everyone with LoginStatus=1, counts and prints on screen. Then 'extracts' from those online how many are ... human, elf, vail, nordein.

Procedures to midify:
Code:
usp_Read_Chars_Detail2_R
usp_Save_Char_LeaveDate_R
Credit for modified procedures goes to an unknown person. I got them from a friend.
Attached Files
File Type: rar NoOfOnlinePlayers.rar (3.0 KB, 4056 views)
ProfNerwosol is offline  
Thanks
32 Users
Old 02/09/2010, 17:00   #2

 
Polypropylen's Avatar
 
elite*gold: 0
Join Date: Feb 2009
Posts: 4,507
Received Thanks: 3,086
added to the important topics
Polypropylen is offline  
Thanks
3 Users
Old 03/07/2010, 06:35   #3
 
thunderxc's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 80
Received Thanks: 13
I tried. All I am getting is a blank page. Hmm...
thunderxc is offline  
Thanks
1 User
Old 05/03/2010, 19:24   #4
 
Shaiya Xtreme's Avatar
 
elite*gold: 261
Join Date: Sep 2009
Posts: 288
Received Thanks: 236
How to add it in the 1.php script ?
Shaiya Xtreme is offline  
Thanks
1 User
Old 05/12/2010, 20:18   #5
 
ProfNerwosol's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 644
Include the file.

I updated the php script. It should be working better now.
ProfNerwosol is offline  
Thanks
1 User
Old 06/09/2010, 15:43   #6
 
lae's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 40
Received Thanks: 17
Thank you for the scripts. I was using a similar one, but yours is clearer.

Although with some characters the usp_Save_Char_LeaveDate_R doesn't change the Loginstatus to 0. The leave date is changing, but the login status is not.

Did any of you get similar failure?

I have tried on my computer (on my test pserver) and the script was fine, but when we put it to our real pserver it is not working with some characters.
I didn't find any connection between that characters. I have checked the code several times and I have no idea now what could be the problem.
lae is offline  
Thanks
1 User
Old 06/10/2010, 23:44   #7
 
elite*gold: 0
Join Date: Dec 2009
Posts: 74
Received Thanks: 13
does this scritp work for server ep5? becuas ei treid it no wokr
pinoygoku is offline  
Thanks
1 User
Old 06/14/2010, 01:22   #8
 
ProfNerwosol's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 644
The script should work with any server. It's not dependant on the version but on whether you added LoginStatus field in PS_GameData.dbo.Chars and updated two procedures to change the value once player logs in.

PS.

This script is simple. You can observe what a bit more advanced version does on kingdoms website (once its back and running).

ProfNerwosol is offline  
Thanks
1 User
Old 06/19/2010, 23:59   #9
 
lae's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 40
Received Thanks: 17
Thank you.
lae is offline  
Thanks
1 User
Old 07/07/2010, 14:50   #10
 
AriezOMG's Avatar
 
elite*gold: 100
Join Date: Mar 2009
Posts: 552
Received Thanks: 1,003
mind helping me out with this a bit? when i look on the page, what i see is:

Code:
Players online: ".$online." Human: ".$human." Elf: ".$elf." Vail: ".$vail." DeathEater: ".$nordein." "; @mssql_close($link); ?>
did i do something wrong?
AriezOMG is offline  
Thanks
1 User
Old 07/09/2010, 12:53   #11
 
ProfNerwosol's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 449
Received Thanks: 644
You need to install PHP for your web server.
ProfNerwosol is offline  
Thanks
1 User
Old 07/11/2010, 12:36   #12
 
AriezOMG's Avatar
 
elite*gold: 100
Join Date: Mar 2009
Posts: 552
Received Thanks: 1,003
I do have it installed, but for some reason i still get this
Code:
Players online: ".$online." Human: ".$human." Elf: ".$elf." Vail: ".$vail." DeathEater: ".$nordein." "; @mssql_close($link); ?>
AriezOMG is offline  
Old 07/11/2010, 22:44   #13
 
elite*gold: 0
Join Date: Jan 2010
Posts: 115
Received Thanks: 64
Quote:
Originally Posted by Apocalypsist View Post
I do have it installed, but for some reason i still get this
Code:
Players online: ".$online." Human: ".$human." Elf: ".$elf." Vail: ".$vail." DeathEater: ".$nordein." "; @mssql_close($link); ?>
I am getting the exact same problem with this script.
All SQL executed without error and Server Is running PHP with MSSql extension on the server allowed.
the registration page works fine but this one just shows what Apocalypsist shows.
NocturnalSniper is offline  
Old 07/11/2010, 23:39   #14
 
AriezOMG's Avatar
 
elite*gold: 100
Join Date: Mar 2009
Posts: 552
Received Thanks: 1,003
Grr, I really want this to work because it'll come in handy majorly >.<
AriezOMG is offline  
Old 07/13/2010, 14:32   #15
 
il.mane's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 32
Received Thanks: 39
Apocalypsist the script need to be in the root directory of your web server...

i got a different problem..
the script wont read the colum LoginStatus
i been try to add the if and else to debug it

Code:
if (!$result  = @mssql_query("SELECT LoginStatus, Family FROM Chars WHERE LoginStatus=1",$link))
		{
            print "Failed to select colum.";
        };
and it return me "Failed to select colum."
the querys work fine in SQL and i can see who's online and who's not

i also try with another tinyint value colum in the same table and it work like a charm
wonder if theres something i miss in SQL
il.mane is offline  
Reply


Similar Threads Similar Threads
[Release]Users Visiting/Players Online
03/28/2012 - EO PServer Guides & Releases - 5 Replies
Just some simple code to display how many people are visiting your site and the number of players on your server. Players Online: This one will not display your players online unless you are running a website on the same computer as the server. I am working on making a code that can grab the users online from a website that isn't hosted on the servers computer. <?php echo (exec('netstat -a -n |find "5816" |find "ESTABLISHED" /c')-2); ?> Users Visiting: <?php $output = shell_exec...
[HELP]SCRIPT PHP PLAYERS ONLINE
04/12/2011 - Dekaron Private Server - 12 Replies
Not know much about PHP I'M WITH A DOUBT AS AGENT IN AN ONLINE PLAYERS SYNTAX WHAT IT IN TIME FOR YOU TO READ THE DATABASE NOT READ NAMES OF FILES CONTAINING ", ... BELOW IS THE FILE: <style type="text/css"> <!-- body,td,th { font-family: Verdana, Geneva, sans-serif; color: #FFFF00; font-weight: bold; } body {
[Release] Total Players Online
09/09/2009 - CO2 PServer Guides & Releases - 1 Replies
For Who Looking For that code that code let you know how many players play on your server now Its Not Made by Me Total Players Online: 30 Just Put it On Register.php
[RELEASE] Free Items to all Online Players
07/30/2009 - CO2 PServer Guides & Releases - 17 Replies
A "free" Command, put this Command in Client.cs under GM or Owner Command and change "@" to "/" if your command start with "/" "LOFT code not CoEmu v2" if (Splitter == "@free") { if (Splitter == "db") { foreach (DictionaryEntry DE in World.AllChars) { ...
[REQUEST] online players script
10/30/2008 - EO PServer Hosting - 18 Replies
hi all , i think that the titel says enouf of what i want to aks , but to be shure i goin write a little more ^^ i aim looking for a script whit a few things server offline server online players online



All times are GMT +2. The time now is 17:40.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.