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

CreatureEvent anti magebomb

husam

Member
Joined
Aug 23, 2008
Messages
2,216
Reaction score
10
Location
Iraq-Baghdad
Hello all,
this wont let 3+ ppl from login
Lua:
local config = {

max = 2,     -- max chars med samma ip

text = "Multi-Client is not allowed.",  -- text som kmr nar dom kickas

group_id = 1  -- so inte gm kickas bara

} local accepted_ip_list = {}    -- lista med ips som KAN kora med magebomb

local function antiMC(p)

if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then

doRemoveCreature(p.pid)

end

return TRUE

end

function onLogin(cid)

if getPlayerGroupId(cid) <= config.group_id then

if isInArray(accepted_ip_list,getPayerIp(cid)) == FALSE then

addEvent(antiMC, 1000, {pid = cid, max = config.max+1})

doPlayerPopupFYI(cid, config.text)

   end

 end

return TRUE

end
credits
coffe
 
Last edited:
Code:
local config = {
        max = 1,
        text = "Multi-Client or Magebomb is not allowed.",
        group_id = 1  -- it will only kick player whit that id (1=Players, 2=tutor, 3=seniortutors, 4=Gm's, 5=Cm's and 6=God's
}

local accepted_ip_list = ""  -- here put the Ip you whant to be allowed to use Mc/Magebomb..

local function antiMC(p)
        if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then
                doRemoveCreature(p.pid)
        end
        return TRUE
end

function onLogin(cid)
        if getPlayerGroupId(cid) <= config.group_id then
                if isInArray(accepted_ip_list,getPlayerIp(cid)) == FALSE then
                        addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
                        doPlayerPopupFYI(cid, config.text)
                end
        end
        return TRUE
end
Code:
	<event type="login" name="Antimagebomb" event="script" value="Antimagebomb.lua"/>
 
Last edited:
When people use diffrent computers it still tell it's magebomb or mc! How to fix that? i got tfs 0.4
 
When people use diffrent computers it still tell it's magebomb or mc! How to fix that? i got tfs 0.4

Duh, you can still be under the same IP-address, even though you're on a different computer.
It is recommended not to use this script, there are other ways to prevent magebomb.
 
Back
Top