I want to show the list of all players who are currently playing in my server on my website. Is there some way I get it from server and show?
I want to show the list of all players who are currently playing in my server on my website. Is there some way I get it from server and show?
You can count all the "online users" from the db.
The easiest way to do this is to just grab the web releases here and see how it was done.
Note that you can also put "online users" by "maps/zones".
Example:
Total Online: 10
Mandara: 5
Shambala: 5
i think he asking there is possible way to put player list online on his game and put to his website
you need to make players online php code direct on database
As far as I can remember one of the released web-templates here has Online Listing (total & by zones).
Edit:
Well, I understand you wanted to list the Online players by name then it should be possible by 2 ways I can think of.
1. You can recode / rebuild the gamelogin.php in \s_game\login\.
Lets say, once the gamelogin.php confirms the user has successfully logged in, you then pass it to your online ranking.
2. Create a DLL and attach it to your HTLauncher.
The DLL will record the player name in game & its current location and will actively monitor it in game.
If player is online = true, write it to your web script.
Last edited by master_unknown; 27-10-17 at 09:42 AM.
actually im a php programmer but i don't have idea of this game if someone give me tips about database on this game maybe i will make my own panel and share it on public but for now got busy for my personal things
Ive updated my post above.
We have never tried Listing the player's name in our ranking while we have our server online back then because we found it a hassle and serves no real purpose.
However, I can understand that you seek uniqueness in this and I dont see a problem with that.
The #2 option I talked about is how I made my Macro for Tantra Surya.
It gets the Player Name via Memory Reading.
You can do the same, read the Player Name from Memory and also its location.
And then Write it back to your php script using Post method or you can directly write it into your custom database for the online ranking.Code:'## CHAR NAME / ID Dim char1 = ReadLong(HTLauncher, &H10055978, 4) + &H0 Dim charX = "&H" & Hex(char1) 'string charName Dim myASCIIStringValue As String = ReadMemory(Of String)(charX, 50, False) lblCharName.Text = myASCIIStringValue
- - - Updated - - -
With Method #2 you can also record the players Map / Zone his X / Y / Z location.
And you can make your DLL update this live (memory intensive and bandwidth intensive probably) or set it with intervals.
Now if you are planning to build a custom database using MySQL, its a lot simpler.
You can use MySQL connector to set your application to talk to your Sql server.
When your application detects the player is in game, it will update the sql database with its value (Player name, Map, X/Y/Z).
And when it it detects the player is offline or client is close, it will delete the record from your database.
You see, by just doing that alone is a lot of work and pain in the ass and serves little purpose.
That's why its not being prioritize when we were actively developing our custom server.
Last edited by master_unknown; 27-10-17 at 09:49 AM.
Your solution is commendable. Reading memory and stuff is bit of a hassle if you ask me. So I am thinking a simpler solution like a zone log watcher service which watches all the zone log folder for updates. Character login and logout anyways is recorded in those logs. So a new table for character online log which will be updated by the log watcher service for all logins and logouts. PHP will just fetch from that table and display.![]()
If you're going to read the log file, then thats more tedious dont you think?
You have to cycle through all the log files inside the log folder and process each files with RegEx to find your string?
Or Im over thinking again?
Since you are a pro in Php, I really encourage you to look into the gamelogin.php and enhance that from there.
And that will also probably solve in multi-client instances in 1 pc.
As it will record per account who logged in.
Good luck if you're using the anti-cheat that was attached with the released client (whom other server uses).
That can be easily bypassed.
You have an online server now that we can take a look / play?