LU

[Pedido] Anti-Bot Diferente

Por lucas502, 14 de mai. de 2012 em Scripts

script
21
3.2k
lucas502L
14 de maio de 2012 às 20:38

Ae galera blza, então, eu to precisando de um anti bot assim:

 

o script checka de tempo em tempo (configuravel), os players que estão usando bot à 5 horas (configuravel), se essas 5 horas estourarem, e o player estiver usando a 6 horas bot por exemplo, ele será movido para uma PZ Zone (configuravel)

 

Aguardo, vlw!

 

 

Objetivo: Limitar o tempo de uso do BOT

 

ou pode ser, no lugar de mover para uma pz zone, kickar o player. Ou ainda qualquer sistema de anti bot, mas que não de ban no player..

 

vlw

lucas502L
17 de maio de 2012 às 18:09

ninguem? o.O , pode ser qualquer sistema de anti bot, mas que não de ban no player..

Makelin1M
17 de maio de 2012 às 18:17

ninguem? o.O , pode ser qualquer sistema de anti bot, mas que não de ban no player..

 

Reportado Por Double Post e também por esta saindo do assunto do tópico

ate

VildenV
17 de maio de 2012 às 23:40

Cara usa o pesquisa, existe um sistema anti bot que envia mensagens de 15 em 15 minutos

e o player tem q enviar corretamente

lucas502L
24 de maio de 2012 às 06:17

eu sei q existe um sistema de manda msgs de 15 em 15 mins..mas ele da ban no player, e não faz oq eu kero: mover para uma pz zone

VildenV
24 de maio de 2012 às 07:48

Não vai conseguir um anti-bot que identifica um bot, nem o tibia global conseguiu.

 

 

http://www.xtibia.co...nti-bot-system/

Usa esse sistema, em nessa primeira parte, você troca:

 

 

Eita poha, bugo tudo aqui.. vê o script abaixo do jhon.

 

 

Acho que deve funcionar

Editado Maio 24 por Vilden

jhon992J
24 de maio de 2012 às 09:25

Ja que o spoiler do Vilden não ficou certinho, vou mostrar oque tem que fazer pra teleporta ao templo.

Primeiro tu vai instalar todo o script do "Antha Anti-Bot System".

Depois abrir o arquivo "anthaab.lua" da pasta globalevents/scripts e trocar tudo que tem dentro por isso:

function onThink(interval, lastExecution)
for x=1,#getOnlinePlayers() do
if getPlayerAccess(getCreatureByName(getOnlinePlayers()[x])) < 4 and (not isPlayerPzLocked(getCreatureByName(getOnlinePlayers()[x]))) and getOnlinePlayers()[x] ~= "Account Manager" then
 if getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564) == -1 then
	 local numero = math.random(0,99999)
	 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Anti-bot system by Antharaz. Seu número de confirmação anti-bot é: '..numero..'. Por favor digite !anthaab XXXXX onde XXXXX é seu número de confirmação.')
	 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564,numero)
 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == -1 then
	 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,1)
	 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !anthaab ou você será teleportado ao templo.')
 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == 1 then
        doTeleportThing(getOnlinePlayers()[x], getTownTemplePosition(getPlayerTown(getOnlinePlayers()[x])))
	 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,-1)
 end
end
end
   return TRUE
end

 

Agora essa tag no globalevents.xml:

<globalevent name="anthaab" interval="900" event="script" value="anthaab.lua"/>

O interval="900" faz o script executar a todos os players online a cada 15 minutos, ja que você quer verificar a cada 5 horas troque o 900 por 18000. Ficando assim:

<globalevent name="anthaab" interval="18000" event="script" value="anthaab.lua"/>

1 mês depois...
lucas502L
16 de junho de 2012 às 22:13

Jhon, teria como fazer também pra não mandar o sistema de resposta pros que estiverem treinando?

 

tipo, eu quero q o sistema mande somente pros q estiverem caçando, e não pros q estiverem treinando nos trainers entende?

 

Vlw! aguardo

jhon992J
16 de junho de 2012 às 23:26

local trainerNames = {"Training Monk","Trainer"} -- põe o nome de todo tipo de trainer do seu servidor.

function onThink(interval, lastExecution)
for x=1,#getOnlinePlayers() do
if getPlayerAccess(getCreatureByName(getOnlinePlayers()[x])) < 4 and (not isPlayerPzLocked(getCreatureByName(getOnlinePlayers()[x]))) and getOnlinePlayers()[x] ~= "Account Manager" and (not isInArray(trainerNames, getCreatureName(getCreatureTarget(cid)))) then
	 if getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564) == -1 then
			 local numero = math.random(0,99999)
			 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Anti-bot system by Antharaz. Seu número de confirmação anti-bot é: '..numero..'. Por favor digite !anthaab XXXXX onde XXXXX é seu número de confirmação.')
			 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564,numero)
	 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == -1 then
			 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,1)
			 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !anthaab ou você será teleportado ao templo.')
	 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == 1 then
	 doTeleportThing(getOnlinePlayers()[x], getTownTemplePosition(getPlayerTown(getOnlinePlayers()[x])))
			 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,-1)
	 end
end
end
return TRUE
end

 

Caso sua dúvida tenha sido resolvida, use o "Denunciar" abaixo do post para reportar o tópico fazendo assim com que ele seja movido para área de Pedidos Atendidos, deixando a comunidade mais limpa e organizada.

Editado Junho 16 por Jhon992

lucas502L
21 de junho de 2012 às 14:08

Jhon, fiquei pensando aqui.

 

 

Se o player tiver em war, e esse sistema entrar e fizer a pergunta pro player, se ele responder errado de propósito, ele vai ser movido pro templo mesmo assim? (tipo se aproveitar do sistema pra escapar de pk/war/etc)

 

Vai funcionar esse problema?

 

E outra, como eu defino a palavra do sistema tipo: !anthaab Xresposta para: !bot Xresposta

 

!?

Editado Junho 21 por Lucas502

jhon992J
21 de junho de 2012 às 15:12

Pra mudar o talk de !anthaab pra !bot, basta ir no arquivo data/talkactions/talkactions.xml e procura por:

<talkaction words="!anthaab" event="script" value="anthaab.lua"/>

sóh trocar por:

<talkaction words="!bot" event="script" value="anthaab.lua"/>

 

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

 

Agora pra tirar o outro erro, vai em data/creaturescripts/scripts, cria um arquivo e nomeia para "botTeste" sem as aspas e nele cole:

function onCombat(cid, target)
if isPlayer(target) then
setPlayerStorageValue(cid, 34951, 1)
else
setPlayerStorageValue(cid, 34951, -1)
end
return true
end

 

No creaturescripts.xml cole a tag:

<event type="combat" name="BotTeste" event="script" value="botTeste.lua"/>

 

E no login.lua, antes do último return true põe:

registerCreatureEvent(cid, "BotTeste")

 

E troca o anthhab do globalevents por esse:

local trainerNames = {"Training Monk","Trainer"} -- põe o nome de todo tipo de trainer do seu servidor.

function onThink(interval, lastExecution)
for x=1,#getOnlinePlayers() do
if getPlayerAccess(getCreatureByName(getOnlinePlayers()[x])) < 4 and (not isPlayerPzLocked(getCreatureByName(getOnlinePlayers()[x]))) and getOnlinePlayers()[x] ~= "Account Manager" and getPlayerStorageValue(cid, 34951) < 0 and (not isInArray(trainerNames, getCreatureName(getCreatureTarget(getOnlinePlayers()[x]))))) then
			 if getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564) == -1 then
							 local numero = math.random(0,99999)
							 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Anti-bot system by Antharaz. Seu número de confirmação anti-bot é: '..numero..'. Por favor digite !anthaab XXXXX onde XXXXX é seu número de confirmação.')
							 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9564,numero)
			 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == -1 then
							 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,1)
							 doPlayerSendTextMessage(getCreatureByName(getOnlinePlayers()[x]), MESSAGE_STATUS_WARNING, 'Último aviso. Confirme seu número gerado pelo sistema anti-bot pelo comando !anthaab ou você será teleportado ao templo.')
			 elseif getPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565) == 1 then
			 doTeleportThing(getOnlinePlayers()[x], getTownTemplePosition(getPlayerTown(getOnlinePlayers()[x])))
							 setPlayerStorageValue(getCreatureByName(getOnlinePlayers()[x]),9565,-1)
			 end
end
end
	return TRUE
end

Editado Junho 22 por Jhon992

lucas502L
21 de junho de 2012 às 15:30

Pera não entendi, antes era uma tag no globalevents, agora eh tag no talkactions?

 

 

o.O

 

Tipo..no primeiro post que postou sobre o script, vc me mandou uma tag do globalevents,

 

agora me mandou uma tag do talkactions (sendo q o script ta na pasta de globalevents), não entendi ainda

 

poderia explicar melhor, onde e o que colocar em cada "coisinha" ? :D

 

vlw

Editado Junho 21 por Lucas502

jhon992J
21 de junho de 2012 às 15:37

Faz oque eu disse aew e deu. sadhusada

 

Explicando:

O sistema é executado no globalevents mais para responder é usado a talkaction. Por isso que tem que modificar a talkaction também.

A parte de creaturescripts foi feita pra identificar se tu ta atacando um player ou um monster dae set um determinado storage.

E a última modificação no globalevents foi feita pra o script só executar se ele não tiver atacando player.

lucas502L
21 de junho de 2012 às 15:42

ta mas o que eu não entendi foi que NÃO EXISTE o script anthaab.lua no talkactions entendeu? só tem no globalevents, eu to dizendo que o script do talkactions vc nao botou aki o.O

jhon992J
21 de junho de 2012 às 20:16

http://www.xtibia.com/forum/topic/128885-antha-anti-bot-system/

Tu já era pra ter feito todo o script a tempo...