• 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!

Otservlist.org online counter

Itutorial

Legendary OT User
Joined
Dec 23, 2014
Messages
2,331
Solutions
68
Reaction score
1,008
How does otservlist get the amount of players from a server? How can I create a code that will remove players from the online list it reads but allow the players to remain online.
 
The hole point of player spoofing is to make it look like (on otserver lists) that you have more players. I am trying to stop that from happening.
 
Yes, I am trying to avoid player spoofing because I allow MC and players to sit in trainers without an auto kick. I need some way to remove players who are MC or training from the online counter. I am using 8.6 TFS 0.3.6 crying damson. I will pay for this if I need to.
 
Yes, I am trying to avoid player spoofing because I allow MC and players to sit in trainers without an auto kick. I need some way to remove players who are MC or training from the online counter. I am using 8.6 TFS 0.3.6 crying damson. I will pay for this if I need to.
For the first you have to add kick if player is 15 minutes in idle.
That script is default in TFS, or either you can find it on otland.
Should be in config.lua wrotten too.
if you are using linux hosting then add iptable :
iptables -A INPUT -p tcp --dport GAME_PORT -m connlimit --connlimit-above 4 -j DROP
in game port write whats your game port, probably 7172.
After you done that you are probably safe. it will count maximum 4 mcs which otserverlist can accept. Once someone reach 4mc that char wont be counted on otserverlist and you are safe again :D
I personally use that iptable and kick on 15 minutes, never received any ban/notation by otserverlist.
Had over 90 Players and everything worked fine :)
 
If im not wrong theres a code which ignores afk players. Evolera had it befor aswell.

second solution would be offline training
 
They read the players count from a port, I don't recall which one (perhaps 7173?)
There's a couple functions in the source that are responsible to update the amount it sends to this port, you'll have to create a logic to only counts online players that aren't afk.

People here won't help you with that because otlist heavily relies on the lack of knowledge about this system, otherwise anyone would be able to spoof their fragile system.
 
The problem is I don't want to kick players after 15 minutes.

This is not spoof because the player are on computer but it's forbidden, even with the system (that I will mention below) that does not count above 4 players per IP is prohibited anyway, (you can get banned), I asked Xin.
Oh, you should use this system to don't count more than 4 players per IP or just make an script to avoid more than 4 players log in your game.
Like:
Lua:
local max_players = 4

function onLogin(player)
    local t, ip = {}, player:getIp()
    local players = getPlayersByIPAddress(ip)
    local size = #players
    if size ~= 0 and size >= max_players then
        for i = 1, size do
            t[i] = '-> ' .. Player(players[i]):getName()
        end
 
    return false
    end
    return true
end
If you are going to use this instead of the code c ++ changes I submitted above, you should remember to register this event in creaturescripts.
(the best way is to use the changes of c ++ made by gunz)

There is a system in otland that makes the player stay online forever if it is on the computer, even being on the computer is also prohibited.
 
Last edited by a moderator:
Back
Top