Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Does anyone know how to get a list of all online characters/account programmatically?

Banned
Banned
Joined
Jul 27, 2016
Messages
123
Reaction score
19
i think he asking there is possible way to put player list online on his game and put to his website
 
Upvote 0
Joined
Jun 10, 2009
Messages
658
Reaction score
140
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 know how to get the count. I wanna know is there some way to get the names of the players who are currently online.
 
Upvote 0
Joined
Oct 16, 2004
Messages
894
Reaction score
94
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:
Upvote 0
Banned
Banned
Joined
Jul 27, 2016
Messages
123
Reaction score
19
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
 
Upvote 0
Joined
Oct 16, 2004
Messages
894
Reaction score
94
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.
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
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.



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 butt and serves little purpose.
That's why its not being prioritize when we were actively developing our custom server.
 
Last edited:
Upvote 0
Joined
Jun 10, 2009
Messages
658
Reaction score
140
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.
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
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.



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 butt and serves little purpose.
That's why its not being prioritize when we were actively developing our custom server.

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. :cool:
 
Upvote 0
Joined
Jun 10, 2009
Messages
658
Reaction score
140
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.

Multi-client disable has been handled by the game guard. Game login code I have re-written fully with logging capacity when a player logs in. My only problem is client doesn't tell when that player logs out. So I was thinking of log reading thing!
 
Upvote 0
Joined
Jun 10, 2009
Messages
658
Reaction score
140
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?

Anti-cheat is not something that was released here in this section. The server is in testing phase currently. Will let you know when it's ready :burnout:
 
Upvote 0
Experienced Elementalist
Joined
Sep 10, 2009
Messages
227
Reaction score
7
i think you already found a solution for this... i saw one server that is showing the players lvl and castle lvl
 
Upvote 0
Back
Top