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

Mage bomb

foxkbt

Member
Joined
Sep 29, 2009
Messages
290
Reaction score
7
Location
Salvador
I would like a script anti mage bomb

the function would work well
onlogin
if the player had two accounts same ip
one of the accounts would be banned for one day

I believe this script will help many people
thanks

rep++
 
Use search function next time.
LUA:
local config = {
        seconds = 3,            -- in seconds
        onlyWithSameIP = "yes" -- will work for all players ("no"), or only check player with same IP? ("yes")
}
 
--DONT MODIFY
config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP)
 
local m_lastLogin, m_lastIP = 0, 0
 
function onLogin(cid)
        local timeNow, playerIP = os.time(), getPlayerIp(cid)
        if(m_lastLogin + config.seconds >= timeNow and
                (config.onlyWithSameIP == FALSE or m_lastIP == playerIP)) then
                return FALSE
        end
 
        m_lastIP = playerIP
        m_lastLogin = timeNow
        return TRUE
end
 
Back
Top