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

anti multiclient MC

first go to data\creaturescripts\scripts and make a new .lua whit the name:Antimc.lua

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 ="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 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 put this...
Code:
[COLOR="Green"]        <event type="login" name="Anti Mc" event="script" value="Antimc.lua"/>[/COLOR]

and thats all
 
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 = {"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 = {
	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
yep



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 = [COLOR="Blue"]{"127.0.0.1", "255.255.255.255"}[/COLOR]  -- 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
 
What Im doing against that is adding IP exception, then I check /mc, if the player is using MC or botting, the player and the IP get banneds and also his IP is removed from the exception list.
 
yep



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 = [COLOR="Blue"]{"127.0.0.1", "255.255.255.255"}[/COLOR]  -- 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
does this work for 0.3.6pl1?
 
I have a suggestion, could you add a timer? Like it starts from 4 PM to 5 PM... And when it starts, kick all the MCs online?
you requested this long time ago, but still:
creature script:
Lua:
local t = {
	a = 16:00:00, -- 4 PM
	b = 17:00:00, -- 5 PM
	c = 3, -- it'll only kick players with group id that are equal or less than 3.
	d = 1, -- max MCs allowed
	e = {"127.0.0.1", "123.45.678.901"}
	}
function onLogin(cid)
	if os.date("%X") >= t.a and os.date("%X") <= t.b then
		if getPlayerGroupId(cid) <= t.c then
			if not isInArray(t.e, doConvertIntegerToIp(getPlayerIp(cid))) then
				if #getPlayersByIp(getPlayerIp(cid)) >= t.d then
					doRemoveCreature(cid)
				end
			end
		end
	end
return TRUE
end
global event:
Lua:
local t = {
	a = 16:00:00, -- 4 PM
	b = 17:00:00, -- 5 PM
	c = 3, -- it'll only kick players with group id that are equal or less than 3.
	d = 1, -- max MCs allowed
	e = {"127.0.0.1", "123.45.678.901"}
	}
function onTimer()
	for _, pid in ipairs(getPlayersOnline()) do
		if getPlayerGroupId(pid) <= t.c then
			if not isInArray(t.e, doConvertIntegerToIp(getPlayerIp(pid))) then
				if #getPlayersByIp(getPlayerIp(pid)) >= t.d then
					doRemoveCreature(pid)
				end
			end
		end
	end
return TRUE
end

does this work for 0.3.6pl1?
Yes
 
Last edited:
first go to data\creaturescripts\scripts and make a new .lua whit the name:Antimc.lua

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 ="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 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 put this...
Code:
[COLOR="Green"]        <event type="login" name="Anti Mc" event="script" value="Antimc.lua"/>[/COLOR]

and thats all

i use tfs 1.0

and got error:
yin9.jpg


how to do it works on tfs 1.0 ? :p
 
i use tfs 1.0

and got error:
yin9.jpg


how to do it works on tfs 1.0 ? :p



Code:
local config = {
        max = 2,
        text = "Warning! You are trying to log-in with multiple characters, your third character will automatically disconnect.",
        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"  -- here put the Ip you whant to be allowed to use Mc/Magebomb..

local function antiMC(p)
        if #getPlayersByIPAddress(getPlayerIp(p.pid)) >= p.max then
                doRemoveCreature(p.pid)
        elseif #getPlayersByIPAddress(getPlayerIp(p.pid)) > 1 then
                doPlayerPopupFYI(p.pid, config.text)
        end
        return true
end

function onLogin(cid)
        local player = Player(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})
                end              
        end
        return true
end
 
I do not prefer to use it. It's very very very VEEEEERY primitive script.
Lots of ppl are using local internet providers. For example over half of ppl in my estate have the same ip. So, if I want to play with friends on your server I'll be automaticly kicked, they too. You are losing players.

There is other way to solve that problem. You have to do a script what is checking MAC adresses or Machine from which connection is coming. Another program have to read the file with active connections in real time to filtrate them and execute another 'kicking script' for multiple connections from the same IP and the same machine (pc). Ofc kicking script should block connections via firewall. Making players unable to login into game via seconds client.

I'd like to add, over 3/4 servers are using that primitive stupid system to block multiple connections. I'm not talking about open tibia servers, but about all servers and websites, even those what are not about tibia or even games. That shows only administrator's very bad knowledge about IT.
 
Last edited:
Back
Top