JO

[Pedido] Ant Mc

Por jogadorinfinito, 17 de abr. de 2012 em Scripts

ajuda...(vale rep)
script
6
1.1k
jogadorinfinitoJ
17 de abril de 2012 às 17:28

Gente é o seguinte :

 

Queria um script q blokeasse os ip , tipo só podendo logar 2 chares com mesmo ip sendo q quando lagarem mais eles sejam kickados ...!

 

 

Ajuda obrigado desde ja

AnneMottaA
17 de abril de 2012 às 17:58

-- [( XTibia.com )] --
local maximo = 0 -- Maximo de IP's iguais permitidos.

function remove(r)
if #getPlayersByIp(getPlayerIp(r.pid)) >= r.maximo then
addEvent(doRemoveCreature, 100, r.pid)
end
return TRUE
end

function onLogin(cid)
if getPlayerGroupId(cid) <= 1 then
if isInArray(getPlayerIp(cid)) == FALSE then
addEvent(remove, 300, {pid = cid, maximo = maximo+1})
addEvent(doPlayerSendTextMessage, 2*1000, cid, 23, "Remember, Multi-Clients is not permited!")
end
end
return TRUE
end

 

nen sei quem fez o script catei de um ot que eu tinha aqui no pc.

 

bota em creaturescripts.

SofftS
17 de abril de 2012 às 22:10

kkk, @AnneMotta, sempre na frente...

eu ia postar o msm script.

 

Testei e está funcionando perfeitamente.

JeanCristianJ
18 de abril de 2012 às 00:50

e para os xtibanos que nao sabem colokar? '-' tipo bota em creaturescripts nao é um bom tutorial tente melhorar nisso manim mdr.gif mais o script pegou vlw.

jogadorinfinitoJ
19 de abril de 2012 às 15:27

-- [( XTibia.com )] --
local maximo = 0 -- Maximo de IP's iguais permitidos.

function remove(r)
if #getPlayersByIp(getPlayerIp(r.pid)) >= r.maximo then
addEvent(doRemoveCreature, 100, r.pid)
end
return TRUE
end

function onLogin(cid)
if getPlayerGroupId(cid) <= 1 then
if isInArray(getPlayerIp(cid)) == FALSE then
addEvent(remove, 300, {pid = cid, maximo = maximo+1})
addEvent(doPlayerSendTextMessage, 2*1000, cid, 23, "Remember, Multi-Clients is not permited!")
end
end
return TRUE
end

 

nen sei quem fez o script catei de um ot que eu tinha aqui no pc.

 

bota em creaturescripts.

Entao vlw ... mais e pra quem não sabe ativar o script

tente colocar por inteiro , mas muito obrigado por me dispoibilizar esse script ja dei seu rep

jhon992J
19 de abril de 2012 às 15:56

Duplica um arquivo na pasta data/creaturescripts/scripts e nomeia para "antmc" sem as aspas e nele cole:

-- [( XTibia.com )] --
local maximo = 0 -- Maximo de IP's iguais permitidos. 

function remove(r)
if #getPlayersByIp(getPlayerIp(r.pid)) >= r.maximo then 
addEvent(doRemoveCreature, 100, r.pid) 
end 
return TRUE
end 

function onLogin(cid)
if getPlayerGroupId(cid) <= 1 then
if isInArray(getPlayerIp(cid)) == FALSE then 
addEvent(remove, 300, {pid = cid, maximo = maximo+1}) 
addEvent(doPlayerSendTextMessage, 2*1000, cid, 23, "Remember, Multi-Clients is not permited!") 
end 
end
return TRUE 
end

 

Agora em creaturescripts.xml cole a tag:

<event type="login" name="AntMc" event="script" value="antmc.lua"/>

 

-------------------

Explicadinho agora, Créditos da postagem para @AnneMotta.