O fabio(beeki) pediu um script para min então eu resolvi disponibilizar o mesmo script para vocês xtibianos!
O anti bot faz uma pergunta ao player quando ele loga e depois de X tempo.
Assim se o player estiver usando um bot de "caça sozinho" ele e detectado e teleportado para uma posição que seria uma cadeia.
Esta todo configurado mais pode ser alterado livremente.
Vá em lib e crie um arquivo lua chamado de anti bot e coloque este código:
local question = { {perg = "1+1 e igual a?", resp = "2"}, {perg = "Qual e o nome verdadeiro do beeki", resp = "Fabio"}, {perg = "Você esta em que level?", resp = "100"} } function doJailforBot(cid, pos) if isPlayer(cid) and getPlayerStorageValue(cid, 23410) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] Você foi preso por bot") doTeleportThing(cid, pos) setPlayerStorageValue(cid, 23446, 0) setPlayerStorageValue(cid, 23448, 0) setPlayerStorageValue(cid, 23412, 1) end return true end function respQuestion(cid, resp) if getPlayerStorageValue(cid, 23410) == 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] O sistema não esta ativo porque ja respondeu") end if getPlayerStorageValue(cid, 23412) == 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] O sistema não esta ativo porque você esta preso") end if tostring(getPlayerStorageValue(cid, 23446)) == resp then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] Você acertou a respota") setPlayerStorageValue(cid, 23410, 1) return true end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] Você errou a resposta") end function activeAntiBot(cid, pos, time) if isPlayer(cid) then if getPlayerStorageValue(cid, 23412) == 1 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] Você esta preso por uso de bot") end local random = math.random(#question) local perg = question[random].perg local resp = question[random].resp doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[ANTI-BOT] diga a resposta falando /resp(reposta) ("..perg..")") setPlayerStorageValue(cid, 23446, resp) setPlayerStorageValue(cid, 23448, perg) setPlayerStorageValue(cid, 23410, 0) addEvent(doJailforBot, time, cid, pos) end return true end
Agora vá em talkactions e crie um arquivo lua chamado de resp e coloque isto:
function onSay(cid, words, param, channel) if not param or param == " " or param == "" then doPlayerSendCancel(cid, "Você precisa dizer a respota") return true end return respQuestion(cid, param) end
Coloque esta tag em talkactions.xml:
<talkaction words="/resp" event="script" value="resp.lua"/>
Agora vá em creaturescripts e crie um arquivo lua chamado de anti-bot e coloque isto:
local jail= {x=1497, y=1488, z=5} local time = 36000 local temp = 3600*1000 --- Tempo para o sistema do anti banimento for ativado function onLogin(cid) function repeatAntiBot(cid, jail, temp, time) activeAntiBot(cid, jail, time) addEvent(activeAntiBot, temp, cid, jail, time) end repeatAntiBot(cid, jail, temp, time) return true end
Coloque esta tag em creaturescrips.xml:
<event type="login" name="bot" event="script" value="anti-bot.lua"/>
Registre o evento em login.lua:
registerCreatureEvent(cid, "bot")
Vamos as configurações basicas:
{perg = "Qual e o nome verdadeiro do beeki", resp = "Fabio"},
Em perg você deve colocar a pergunta que poderá aparecer.
Em resp deve colocar a resposta da pergunta.
Atenção ao colocar caracteres minusculos ou maisculos pois eles podem alterar a senha.