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

Looking for Anti-Magebomb script [help asap].

Ruukz

New Member
Joined
Apr 5, 2016
Messages
1
Reaction score
0
i am looking for a script that disallows the use of magebomb, because some people take advantage of it and use it to crash the server somehow using the account manager, i currently don't have a website for the server so, i really need a script to avoid that, would be appreciated.
 
Code:
getPlayersOnline()

Code:
local max_players_per_ip = 2

function onThink(interval)
    local ipList = {}
    local players = getPlayersOnline()
    for i, v in ipairs(players) do
        local tmpPlayer = players[v]
        local ip = getPlayerIpByName(getPlayerName(tmpPlayer))
        if ip ~= 0 then
            local list = ipList[ip]
            if not list then
                ipList[ip] = {}
                list = ipList[ip]
            end
            list[#list + 1] = tmpPlayer
        end
    end

    for ip, list in pairs(ipList) do
        local listLength = #list
        if listLength > max_players_per_ip then
            local tmpPlayer = list[1]
            for i = 2, listLength do
                tmpPlayer = list[i]
                doRemoveCreature(list[i])
            end
        end
    end
    return true
end
 
Last edited by a moderator:
Back
Top