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

Anty crash server

Wazzap

Killing Elite
Joined
Jun 15, 2010
Messages
124
Reaction score
4
Location
London / Poland
/data/creaturescripts/scripts/anti.lua

Lua:
local config = {
seconds = 7,
onlyWithSameIP = "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

/data/creaturescripts/scripts/anti2.lua
Lua:
local function gtfoMC(p)
if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then
doRemoveCreature(p.pid)
end
return TRUE
end
function onLogin(cid)
addEvent(gtfoMC, 1000, {pid = cid, max = 1})
return TRUE
end

creaturescript.xml

Lua:
<event type="login" name="Anti" event="script" value="anti.lua"/>
<event type="login" name="Anti2" event="script" value="ant2.lua"/>

if you use this script add my rep+++ i work 3 hours to make this script
 
And function ?

local function gtfoMC(p)

Don't we need to add it? lol
 
no add biceuse this work diffreny

write on google crash ots then what make a crash no mc but to many items in BP smaping ...
 
This script wont work.

btw, its not an anti-crash.. every single server can crash anytime.. its just an anti magebomb..
Lua:
onlyWithSameIP = "yes"

Should be true instead of yes.
 
LOL... nice i guess but this is not a custom function but a creaturescript
anyways seems useful if you want to keep MC out.
 
This script wont work.

btw, its not an anti-crash.. every single server can crash anytime.. its just an anti magebomb..
Lua:
onlyWithSameIP = "yes"

Should be true instead of yes.

It doesnt matter, because there is config.onlyWithSameIP = getBooleanFromString(config.onlyWithSameIP).

@topic
What about credits?
 
Nice Credits removing, I remember this script, it got scriptet by slawkens i think.
 
Back
Top