rege stail
New Member
- Joined
- Jul 16, 2009
- Messages
- 150
- Reaction score
- 4
Hello I search Anty mc Scripts.
Rep ++
Rep ++
local config = {
max = 2,
group_id = 3
}
local list = {"127.0.0.1"} -- Acceptable IP's
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
local ip = doConvertIntegerToIp(getPlayerIp(cid))
if not isInArray(list, ip) then
addEvent(antiMC, 150, {pid = cid, max = config.max + 1})
end
end
return true
end
go to data\creaturescripts\scripts
and make a new lua called
Antimagebomb
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 Ips you want 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
then go to data\creaturescripts\creaturescripts.xml
and add this line
Code:<event type="login" name="Antimagebomb" event="script" value="Antimagebomb.lua"/>