login.lua
registerCreatureEvent(cid, "AntiBot")
Por Markzi, 02 de out. de 2017 em Tópicos Sem Resposta
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino

login.lua
registerCreatureEvent(cid, "AntiBot")
Oi @Poccnn,
O Meu login.lua ficou assim:
-- Events
for i = 1, #events do
player:registerEvent(events)
player:registerEvent("AutoLoot")
registerCreatureEvent(cid, "AntiBot")
end
Continua não funcionando. att
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino

sua distro é versão 1.0+ então remove essa tag dele e deixa como estava.
Me diz ai o que ele faz? ou não faz.
Ele abre o canal de antibot?
Envia as mensagens?
Estas matando uma serie de monstro e nada acontece?
@poccnn,
pelo visto só funciona em 1.2 =/
abri em 1.2 e rodou
Vou ter que reviver, entrei com contato com o proprietario e ele quis adaptar o script para 1.3, porém me cobrou 300 reais!!!!!!!!!
Não é possível que não de para rodar ele no tfs 1.3, por favor me ajude nisto.
O script não roda, simplesmente não roda, ele não bugga, não da erro no distro, não executa após matar os bixos, nada!!!!
Porém no tfs 1.2 é totalmente funcional e perfeito!
AJUDEEEE!!
info
Grupo: Visconde
Registrado: 26/08/12
Posts: 318
Reputação: +118
Gênero: Masculino

Eu nunca mexi com TFS 1.X, então não sei bem como funciona, mas é bem parecido com os TFS 0.X, muda realmente o jeito de utilizar as funções (pelo que me parece)
Eu aconselharia você a estudar um pouco como são usadas essas funções nesse seu TFS e adapta-la você mesmo...
Veja se tem alguma função a mais que não possui nesse seu TFS, alguma função nas sources, sei lá. Caso não possua fica mais fácil.
Eu não sei nada de script... não sei nem quais são as funções desse script para incluir, posso falar contigo privado?
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino

Em 07/10/2017 at 17:42, Markzi disse:
Vou ter que reviver, entrei com contato com o proprietario e ele quis adaptar o script para 1.3, porém me cobrou 300 reais!!!!!!!!!
Não é possível que não de para rodar ele no tfs 1.3, por favor me ajude nisto.
O script não roda, simplesmente não roda, ele não bugga, não da erro no distro, não executa após matar os bixos, nada!!!!
Porém no tfs 1.2 é totalmente funcional e perfeito!
AJUDEEEE!!
Eu desconheço piamente as versões 1.0+, mas sei que não existem diferenças imensas entre o 1.2 e o 1.3, salvo se forem distros de compilações de terceiros; ex: crying damson X mystic spirit; mesmo ambos sendo tfs team.
Me diz ai qual o servidor 1.2 que tu usou para testar e o 1.3 que tu quer adaptar. Verei o que posso fazer.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Administrador
Registrado: 26/02/07
Posts: 254
Reputação: +205
Gênero: Masculino
Char no Tibia: Frenvius

info
Grupo: Campones
Registrado: 04/08/17
Posts: 9
Reputação: +1
Boa noite!
Acabo de instalar um script anti-bot que encontrei em um forum concorrente, porem, o mesmo não funciona na minha distro, mesmo o sistema estar designado para 1.x, não funcionou no meu 1.3 e não apresentou qualquer bug... apenas nenhum funcionamento.
Se puderem me ajudar! agradeço pois sou leigo em scripts.
creaturescript/scripts/antibot.lua
--[[ ## SCRIPT BY: Pedriinz ## ## CONTACT SKYPE: pedrosz4 ## ]] ANTI_BOT_SYSTEM = { config = { minMonstersToCheck = 2, -- O sistema irá escolher aleatoriamente um número de monstros entre esses dois valores para verificar. maxMonstersToCheck = 4, channelId = 10, -- Id do channel que será aberto para realizar a verificação. timeToAnswer = 10, -- Quanto tempo em segundos o jogador tem para responder a verificação. monstersForNotCheck = {'rat', 'bug', 'tiger'}, -- Monstros que não serão verificados pelo sistema. notations = 3, -- Quantas notificações o jogador pode receber antes de ser banido. banDays = 1, -- Quantidade de dias o personagem vai ficar banido por utilizar bot. storageForNotations = 1222, -- Storage onde ficará salvo as notations. storageForOpenChat = 10383, -- Storage que permitira o chat ser aberto. (Aconselho não mudar). }, questions = { [1] = {question = 'Digite quantas letras possui a palavra: Carro', answer = '5'}, [2] = {question = 'O que significa Ying e Yang?', answer = 'bem e o mal'}, [3] = {question = 'Qual é a cor do sol?', answer = 'amarelo'}, --[numero seguinte] = {question = 'pergunta', answer = 'resposta'}, }, cache = { players = { --[player:getId()] = {count = 1} }, question = 0, }, messages = { reason = {msg = 'Você foi banido por utilizar bot 100% AFK.'}, notation = {msg = 'Você foi penalizado e recebeu um notificação. Lembre-se que após receber 3 notificações você será banido. Você possui %d notificações no momento.', type = MESSAGE_EVENT_ADVANCE}, attention = {msg = '[Anti-Bot] Atenção! Você só possui %d segundos para responder a verificação.', type = TALKTYPE_CHANNEL_O}, channel_enter = {msg = '[Anti-Bot] Você está sobre suspeitas de uso aplicativos não autorizados.\nPor favor, confirme a verificação a seguir, você possui %d segundos para isso.', type = TALKTYPE_CHANNEL_O}, channel_close = {msg = '[Anti-Bot] Para sua segurança, não é possivel fechar este channel antes da verificação. Por favor responda o que lhe foi perguntado para que não seja penalizado.', type = TALKTYPE_CHANNEL_O}, wrong_answer = {msg = '[Anti-Bot] Resposta errada, por favor tente novamente.', type = TALKTYPE_CHANNEL_O}, correct_answer = {msg = '[Anti-Bot] Você respondeu corretamente, obrigado e bom jogo! Você já pode fechar este channel.', type = TALKTYPE_CHANNEL_O}, unconfirmed = {msg = 'Você não realizou a verificação corretamente, por isso você foi penalizado. Este channel já pode ser fechado.', type = TALKTYPE_CHANNEL_O}, } } function vericationBot(cid) local player = Player(cid) local timeNow = os.time() if not player then return true end if not ANTI_BOT_SYSTEM.cache.players[player:getId()] or ANTI_BOT_SYSTEM.cache.players[player:getId()].verified == false then return true else player:sendChannelMessage("", ANTI_BOT_SYSTEM.messages.unconfirmed.msg, ANTI_BOT_SYSTEM.messages.unconfirmed.type, ANTI_BOT_SYSTEM.config.channelId) ANTI_BOT_SYSTEM.cache.players[player:getId()] = nil if player:getStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations) < ANTI_BOT_SYSTEM.config.notations then if player:getStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations) ~= -1 then player:setStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations, math.max(player:getStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations) + 1)) else player:setStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations, 1) end player:teleportTo(player:getTown():getTemplePosition()) player:sendTextMessage(ANTI_BOT_SYSTEM.messages.notation.type, string.format(ANTI_BOT_SYSTEM.messages.notation.msg, math.max(player:getStorageValue(ANTI_BOT_SYSTEM.config.storageForNotations)))) else player:teleportTo(player:getTown():getTemplePosition()) db.query("INSERT INTO `account_bans` (`account_id`, `reason`, `banned_at`, `expires_at`, `banned_by`) VALUES (" ..getAccountNumberByPlayerName(player:getName())..", "..db.escapeString(ANTI_BOT_SYSTEM.messages.reason.msg)..", "..timeNow..", "..timeNow + (ANTI_BOT_SYSTEM.config.banDays * 86400) ..", 1)") player:remove() end end return true end function onKill(creature, target) local targetMonster = target:getMonster() local player = creature:getPlayer() local random = math.random(ANTI_BOT_SYSTEM.config.minMonstersToCheck, ANTI_BOT_SYSTEM.config.maxMonstersToCheck) if not targetMonster then return true end if isInArray(ANTI_BOT_SYSTEM.config.monstersForNotCheck, targetMonster:getName():lower()) then return true end if not ANTI_BOT_SYSTEM.cache.players[player:getId()] then ANTI_BOT_SYSTEM.cache.players[player:getId()] = {count = 1, verified = false} else if ANTI_BOT_SYSTEM.cache.players[player:getId()].count >= random then ANTI_BOT_SYSTEM.cache.players[player:getId()] = {count = math.max(ANTI_BOT_SYSTEM.cache.players[player:getId()].count), verified = true} player:openChannel(ANTI_BOT_SYSTEM.config.channelId) player:getPosition():sendMagicEffect(CONST_ME_TUTORIALSQUARE) else ANTI_BOT_SYSTEM.cache.players[player:getId()] = {count = math.max(ANTI_BOT_SYSTEM.cache.players[player:getId()].count) + 1, verified = false} end end return true endcreaturescript/creaturescript.xml
creaturescript/scripts/others/login.lua
'AntiBot',chatchannels/chatchannels.xml
chatchannels/scripts/antibot.lua
function onJoin(player) if not player then return true end if not ANTI_BOT_SYSTEM.cache.players[player:getId()] or ANTI_BOT_SYSTEM.cache.players[player:getId()].verified == false then player:popupFYI('You can\'t open this channel.') return false end addEvent(function() player:sendChannelMessage("", string.format(ANTI_BOT_SYSTEM.messages.channel_enter.msg, ANTI_BOT_SYSTEM.config.timeToAnswer), ANTI_BOT_SYSTEM.messages.channel_enter.type, ANTI_BOT_SYSTEM.config.channelId) end, 300) addEvent(function() local random = math.random(#ANTI_BOT_SYSTEM.questions) player:sendChannelMessage("", ANTI_BOT_SYSTEM.questions[random].question, TALKTYPE_CHANNEL_R1, ANTI_BOT_SYSTEM.config.channelId) ANTI_BOT_SYSTEM.cache.question = random end, 2000) addEvent(vericationBot, ANTI_BOT_SYSTEM.config.timeToAnswer * 1000, player:getId()) return true end function onLeave(player) if not player then return true end if ANTI_BOT_SYSTEM.cache.players[player:getId()] then player:openChannel(ANTI_BOT_SYSTEM.config.channelId) addEvent(function() player:sendChannelMessage("", ANTI_BOT_SYSTEM.messages.channel_close.msg, ANTI_BOT_SYSTEM.messages.channel_close.type, ANTI_BOT_SYSTEM.config.channelId) end, 300) end end function onSpeak(player, type, message) player:sendChannelMessage(player:getName(), message, TALKTYPE_CHANNEL_Y, ANTI_BOT_SYSTEM.config.channelId) if message ~= ANTI_BOT_SYSTEM.questions[ANTI_BOT_SYSTEM.cache.question].answer then addEvent(function() player:sendChannelMessage("", ANTI_BOT_SYSTEM.messages.wrong_answer.msg, ANTI_BOT_SYSTEM.messages.wrong_answer.type, ANTI_BOT_SYSTEM.config.channelId) end, 300) else addEvent(function() player:sendChannelMessage("", ANTI_BOT_SYSTEM.messages.correct_answer.msg, ANTI_BOT_SYSTEM.messages.correct_answer.type, ANTI_BOT_SYSTEM.config.channelId) end, 300) ANTI_BOT_SYSTEM.cache.players[player:getId()] = nil end return false endOBRIGADO!