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

Solved Need help with magebomb...

bolero

MikeHere
Joined
Apr 13, 2009
Messages
1,146
Reaction score
12
Location
Venezuela
I search and I look this post OtLand and this script doesn't work for my ot

I use 0.3.5

Anyone can help me?

Give me your script of anti magebomb please.. ty. :peace:
 
Last edited:
here are, dont remember whos create this code, but i think was shawak

on data/creaturescripts/
create a script name "magebomb.lua"
put this code:
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
and creaturescripts.xml
Lua:
	<event type="login" name="MageBomb" event="script" value="magebomb.lua"/>
and data/creaturescripts/login.lua
Lua:
	registerCreatureEvent(cid, "MageBomb")
if this code working, give me rep+:)
 
Back
Top Bottom