OTHispano
¿Quieres reaccionar a este mensaje? Regístrate en el foro con unos pocos clics o inicia sesión para continuar.

Ir abajo
Yerenix
Yerenix
Aportador
Mensajes Mensajes : 98

Anti Multi Cliente Empty Anti Multi Cliente

Dom Sep 25, 2011 12:19 am
Bueno Encontre Este Sistema Anti-MC En Otland Y Bueno Lo Traigo Ya Que Hay Gente Que No Quiere MC En Sus Ot Bueno No Lo E Testiado Pero Me Dijieron Que Si Funciono Ok Bueno Aqui Primero Vamos A data/creaturescripts/scripts Creamos Un Archivo Llamado Antimc.lua en Y Copias Esto:

Código:

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

Ok Luego Vamos A data/creaturescripts/creaturescripts.xml

Y Pones Esto:

Código:
<event type="login" name="Anti Mc" event="script" value="Antimc.lua"/>

Ok Ahora A Editarlo:

Código:

max = 1,
  text = "Multi-Client or Magebomb is not allowed.",

Donde Dice Text Es El Texto Que Saldra Al Usar Mc O Magebomb Etc.

Donde Dice Max Es El Maximo De Chart Que Pueden Conectarse En Una Misma Ip.

Ok Y Lo Otro A Editar Seria Donde Dice:

Código:

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..

Donde Dice:

Código:

"255.255.255.255"} 

Pondrian Su IP Ejemplo Supongamos Que Mi Ip Es 100.100.100.100 Quedaria Asi:

Código:

"100.100.100.100"} 

Y Ya Eso Seria Todo.

Ojala Les Sirva

Creditos:

100% Otland.



Volver arriba
Permisos de este foro:
No puedes responder a temas en este foro.