function onLogin(cid) local max_count = 3 -- Máximo de jogadores com o mesmo IP local count = 0 local players = getPlayersOnline() local cid_ip = getPlayerIp(cid) for _, pid in pairs(players) do if cid_ip == getPlayerIp(pid) and cid ~= pid then count = count + 1 end end if count >= max_count then return false end return true end
Só configurar quantos podem entrar e colocar em creaturescripts/scripts.




info
Grupo: Campones
Registrado: 04/10/08
Posts: 53
Reputação: +2
Char no Tibia: sir basi
Sei que aqui no forum possui muitos tutoriais e scripts prontos dessa função !
Anti mage bomb..
Mais estou usando varios e nao tenho sucesso
A galera entra em 300 Acc manager facilmente ..
Atualmente uso estes !
function onLogin(cid)local limit,days = 3,15 function CheckMcManager(cid) local count,on = 0,getPlayersOnline() if #on > 0 then for i = 1, #on do if getCreatureName(on[i]) == "Account Manager" and getPlayerIp(on[i]) == getPlayerIp(cid) then count = count + 1 end end if count > limit then doAddIpBanishment(getPlayerIp(cid), days * 24 * 60 * 60) doRemoveCreature(cid) end end return true end addEvent(CheckMcManager, 1000, cid) return true endocal config = { max = 3, -- número de players permitido com o mesmo ip group_id = "Account Manager" -- kikar apenas player com o group id 1 } local accepted_ip_list = {} -- lista dos players permitidos a usar MC, exemplo: {"200.85.3.60", "201.36.5.222"} local function antiMC(p) if (#getPlayersByIp(getPlayerIp(p.pid)) >= p.max) then doRemoveCreature(p.pid) end return true end function onLogin(cid) if getPlayerName(cid) == config.group_id then if isInArray(accepted_ip_list,doConvertIntegerToIp(getPlayerIp(cid))) == false then addEvent(antiMC, 1000, {pid = cid, max = config.max+1}) end end return true endPorem ambos não estao funcionando.. Vi um cara pklizando com 5 char mesmo ip =s
Alguem ajuda ai ? Uso tfs DO IGOR DARKTIBIA 0.36 VERSÃO 8.60