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

Crash HELP Please!

Ghazer

Member
Joined
Mar 13, 2009
Messages
350
Reaction score
6
Hello players crash my server with account manager and magebomb...

I apply three script and continue with problems...
1e366fecd99d4c528c68b6e.jpg

I put the scripts...

Code:
local config = {
        max = 2,
        text = "Welcome"
}

local accepted_ip_list = "127.0.0.1"  -- 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 isInArray(accepted_ip_list,getPlayerIp(cid)) == FALSE then
                        addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
                        doShowTextDialog(cid,2597,config.text)
                end
        return TRUE
end


Code:
local config = {
  max = 2,
  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 = {"127.0.0.1", "255.255.255.255"}  -- 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
end

function onLogin(cid)
  if getPlayerGroupId(cid) <= config.group_id then
      if isInArray(accepted_ip_list, doConvertIntegerToIp(getPlayerIp(cid))) == FALSE then
        addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
        doPlayerPopupFYI(cid, config.text)
      end
  end
  return TRUE
end

Code:
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

Code:
	<event type="login" name="MageBomb" event="script" value="anti.lua"/>
	<event type="login" name="MageBomb2" event="script" value="anti2.lua"/>
	<event type="login" name="Anti Mc" event="script" value="Antimc.lua"/>

Please help me urgent!


His AntiMC can connect but kick a player if have MC, I need one antimc to block connection when have two mc...
 
Last edited:
use config cykotitan and try
LUA:
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 = {"127.0.0.1", "255.255.255.255"}  -- 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
end

function onLogin(cid)
	if getPlayerGroupId(cid) <= config.group_id then
		if isInArray(accepted_ip_list, doConvertIntegerToIp(getPlayerIp(cid))) == FALSE then
			addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
			doPlayerPopupFYI(cid, config.text)
		end
	end
	return TRUE
end
 
I use that... script I post ontop but that script allows connection but kick players when having mc... My idea is one script to block connection when have mc or idk, its possible?

HELP... jaja

- - - Updated - - -

IDEA? BUMP
 
Last edited:
the first and second script basically do the same thing, remove one of them

you can move to linux & limit connections per ip to gameport?:p
but i don't see what's wrong with return false in login.lua
 
you removed first or second script and you're still getting the error??

you want to limit it to 1 player online per IP? it's not very smart in some cases unless you have extreme abuse
or the problem is account manager?
 
I remove that
local config = {
max = 2,
text = "Welcome"
}

local accepted_ip_list = "127.0.0.1" -- 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 isInArray(accepted_ip_list,getPlayerIp(cid)) == FALSE then
addEvent(antiMC, 1000, {pid = cid, max = config.max+1})
doShowTextDialog(cid,2597,config.text)
end
return TRUE
end

I continue with problem, players can lagg and crash my server with account manager + magebomb...
 
LUA:
function onLogin(cid)
	if getPlayerAccountManager(cid) ~= MANAGER_NONE and #getPlayersByIp(getPlayerIp(cid)) > 1 then
		return false
	end

	doShowTextDialog(cid, 2597, "Welcome")
	return true
end
you can replace the last script with that :p
 
Last edited:
Back
Top