• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ unique active player

alcapone

Member
Joined
Jan 13, 2021
Messages
247
Reaction score
19
"This attribute is supposed to return the number of unique active players on a server. So returned XML looks like:
<players online="344" unique="144" max="1500" peak="1501"/>"


Xin is asking that if they have this 'unique' tag anyone would have any idea how to create it or an example

bump

bump
 
Solution

updated protocolstatus block:
C++:
// Compliance to otservlist.org regulations
// Dont count players with idletime over 15 minutes, count max 4 players per IP, count unique IPs
// https://otland.net/threads/very-important-rules-change-on-otservlist-org.247531/
// https://otland.net/threads/very-important-rules-change-on-otservlist-org.247531/post-2492577
// No official statement for unique IP count ???
uint32_t real = 0;
uint32_t ips = 0;
std::map<uint32_t, uint32_t> listIP;
for (const auto& it : g_game.getPlayers()) {
    if (it.second->idleTime <= 900000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP())...
I dont really know how do that by my self, i can use IA but what promt i had to say? can u help me?

Talk with him like hes your friend :D

"Can you convert this code for TFS 0.4 please?"
That's it
You better say please otherwise your time is over as soon as they take over.... :D
 
Back
Top