O código é de sua autoria? caso contrario coloque os créditos ao dono.
- Fórum
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- AntiMageBomb para TFS 0.3.6 | 0.4
MA
creatureevent
AntiMageBomb para TFS 0.3.6 | 0.4
Por Marco Oliveira, 31 de jul. de 2015 em Globalevents e Spells
3
1.2k
info
Grupo: Lorde
Registrado: 22/07/12
Posts: 2.2k
Reputação: +453
Char no Tibia: Kissy

31 de julho de 2015 às 20:39
info
Grupo: Visconde
Registrado: 20/06/15
Posts: 331
Reputação: +205
Gênero: Masculino

31 de julho de 2015 às 22:20
Iae galo cego husahusauash'.
Peguei o código numa source que encontrei na otland, não possui créditos ![]()


info
Grupo: Visconde
Registrado: 20/06/15
Posts: 331
Reputação: +205
Gênero: Masculino
Já existe um sistema parecido no fórum, mas esse possui um código menor e também é funcional em 0.3.6 e 0.4
Em data\creaturescripts\scripts crie um arquivo chamado Antimagebomb.lua
local config = { max = 3, 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 = "" local function antiMC(p) if (getCreatureName(p.pid) == "Account Manager") then return true end if #getPlayersByIp(getPlayerIp(p.pid)) >= p.max then doRemoveCreature(p.pid) end return TRUE end function onLogin(cid) if not(isPlayer(cid)) then return true end if (getCreatureName(cid) == "Account Manager") then return true end if(getConfigValue("antimulticlient")) then 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}) doPlayerSendTextMessage(cid, 19, config.text) end end end return TRUE endEm creaturescripts.xml
Na linha é o máximo de players que podem logar por ip:
Editado Janeiro 23 por Marco Oliveira