Ir para conteúdo
Banner com Efeitos

brendoonh

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    brendoonh recebeu reputação de Quatroqueijos em (Resolvido)[Pedido] Comando !withdraw   
    function onSay(cid, words, param) local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT) } if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end end testa ai
  2. Gostei
    brendoonh deu reputação a Vodkart em Desenvolvimento de Castle War (Ex TibiaRPGBrasil   
    Olá, estou querendo desenvolver um CASTLE WAR parecido com esse do TibiaRPGBrasil, porém se alguém tiver uma ideia para implementar o sistema, vai ser de grande ajuda!
     
     
    Algumas ideias minhas já estão em desenvolvimento, por exemplo:
     
     
    [ + ] Ao dominar o castelo, todos da guild que participaram, irão receber um premio 
    [ + ] Premio diário para todos da Guild dona do castelo( ex: 20:00 Horas) Vai receber mesmo estando offline, porque vai para o DP.
    [ + ] Premio para o player que deu mais dano da Guild
    [ + ] Premio: As 4 vocação(sorc,druid,kina,pala) que mais bateu ganharia prêmios aleatórios.
    [ + ] Sala com geradores onde os dono do castelo poderão subir sua stamina mais rápido
    [ + ] Exp Bônus
    [ + ] O castelo será resetado todo domingo as 05:00 da manhã e irá abrir as 20:00 para disputa do mesmo(configurável)
     
     
    Tópico base:
     
     
  3. Gostei
    brendoonh recebeu reputação de gabirucola em (Resolvido)[Pedido] Comando !withdraw   
    function onSay(cid, words, param) local config = { bankSystemEnabled = getBooleanFromString(getConfigInfo('bankSystem')), playerIsFighting = hasCondition(cid, CONDITION_INFIGHT) } if config.bankSystemEnabled == TRUE then if config.playerIsFighting == FALSE then local m = tonumber(param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires param.") return TRUE end if(not m) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Command requires numeric param.") return TRUE end m = math.abs(m) if m <= getPlayerBalance(cid) then doPlayerWithdrawMoney(cid, m) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Here you are, " .. m .. " gold. Your account balance is " .. getPlayerBalance(cid) .. ".") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "There is not enough gold on your account.") end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Bank can not be used in fight.") return TRUE end else return FALSE end end testa ai
  4. Gostei
    brendoonh recebeu reputação de Infused em [PEDIDO]4 Baus Que So pode Escolher 1   
    Crie 1 arquivo com o nome 4bauQuest em data/actions/script cole isso dentro:
    --- Made by Mazen --- function onUse(cid, item, fromPosition, itemEx, toPosition) if item.uid == 12901 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Demon Legs.") doPlayerAddItem(cid,2495,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12902 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid,22,"You have found a Rainbow Shield.") doPlayerAddItem(cid,8905,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12903 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Spellbook of Dark Mysteries.") doPlayerAddItem(cid,8918,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end elseif item.uid == 12904 then queststatus = getPlayerStorageValue(cid,50090) if queststatus == -1 then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"You have found a Royal Crossbow.") doPlayerAddItem(cid,8851,1) setPlayerStorageValue(cid,50090,1) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR,"It is empty.") end end return 1 end  
    Adicione essa tag em action.xml
    <action uniqueid="12901" script="4bauQuest.lua"/> <action uniqueid="12902" script="4bauQuest.lua"/> <action uniqueid="12903" script="4bauQuest.lua"/> <action uniqueid="12904" script="4bauQuest.lua"/> Mude o ID do item nessa parte:
    doPlayerAddItem(cid,2495,1) = ID do bau 12901
    doPlayerAddItem(cid,8905,1) = ID do bau 12902
    doPlayerAddItem(cid,8918,1) = ID do bau 12903
    doPlayerAddItem(cid,8851,1) = ID do bau 12904
     
    Deu pra entender??
  5. Obrigado
    brendoonh deu reputação a Theodorojose em Pasta Logs, o que pode ser?   
    Amigo, então sinceramente eu não sei oque pode ser...
    Dei uma pesquisada e ví que pode ter algo relacionado as Sources do Server que travaram as Log's.
    Minha "ajuda" fica ate aqui. Desculpa por não ter ajudado muito.
  6. Curtir
    brendoonh deu reputação a Bruno Carvalho em [TalkAction] Player Check System   
    Versão: 3.2
    Versão de tibia: 9.4+ (Funciona em anteriores)
    Descrição: Existem muitos scripts que ajudam o administrador do servidor a cuidar dele, um deles é saber coisas sobre quem está jogando e se está sendo honesta. Eu peguei alguns scripts e estou juntando em um para diminuir o tamanho e ter uma fácil verificação.

    TAG:
    <talkaction log="yes" words="!p;/p" access="5" event="script" value="playercheck.lua"/> Script:
    Talkactions/scripts/playercheck.lua

    local config = { check = {"check", "viwer", "verificar", "ver"}, delete = {"del", "delete", "deletar"}, search = {"search", "procurar"} } function getItemsInContainer(cont, sep) local text = "" local tsep = "" local count = "" for i=1, sep do tsep = tsep.."-" end tsep = tsep..">" for i=0, getContainerSize(cont.uid)-1 do local item = getContainerItem(cont.uid, i) if isContainer(item.uid) == FALSE then if item.type > 0 then count = "("..item.type.."x)" end text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count.." ("..item.itemid..")" else if getContainerSize(item.uid) > 0 then text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")" text = text..getItemsInContainer(item, sep+2).." ("..item.itemid..")" else text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")" end end end return text end function onSay(cid, words, param, channel) local slotName = {"Cabeça", "Amuleto", "Backpack", "Armor", "Mao Direita", "Mao Esquerda", "Legs", "Pés", "Ring", "Ammo Slot"} local t = string.explode(param, ",") if(table.isStrIn(param, config.check)) then if getPlayerGroupId (cid) >= 5 then local player = getPlayerByNameWildcard(t[2]) if isPlayer(player) == TRUE then local text = getPlayerName(player).."'s Equipment: " for i=1, 10 do text = text.."\n\n" local item = getPlayerSlotItem(player, i) if item.itemid > 0 then if isContainer(item.uid) == TRUE then text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..") "..getItemsInContainer(item, 1) else text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..")" end else text = text..slotName[i]..": Empty" end end doShowTextDialog(cid, 6579, text) else doPlayerSendCancel(cid, "This player is not online.") end end elseif(table.isStrIn(param, config.delete)) then if getPlayerGroupId(cid) >= 5 then local player = getPlayerByNameWildcard(t[3]) if isPlayer(player) == TRUE then count = t[4] if(not t[4]) then count = 1 end if getPlayerItemCount(player, t[2]) > 0 then if doPlayerRemoveItem(player, t[2], count) then doPlayerSendCancel(cid, "Item Deletado.") else doPlayerSendCancel(cid, "Este player não esta quantidade.") end else doPlayerSendCancel(cid, "Este player não tem o item.") end end end elseif(table.isStrIn(param, config.search)) then if getPlayerGroupId (cid) >= 5 then local player = getPlayerByNameWildcard(t[3]) local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = ".. t[2] ..");") local msg = "Resultados da busca pelo item ".. t[2] .." em seu banco de dados:\n\n" if result:getID() ~= -1 then while true do local name = result:getDataString("name") local online = result:getDataInt("online") msg = msg .. name .." [".. (online == 1 and "Online" or "Offline") .."]\n" if not result:next() then break end end else msg = msg .. "O item não foi encontrado em nenhum jogador." end doShowTextDialog(cid, t[2], msg) end end return true end Explicação:
    Quando o god digita:
    /p check, (PNAME) - Ele verifica os items que o player tem.
    /p del, (ID), (PNAME), (COUNT) - Ele deleta o item de determinado player (Se não colocar o count ele irá remover somente 1).
    /p search, (ID) - Ele verifica quantos players tem tal item e se está online.

    Créditos:
    Oneshot
    CaioODemais
    Comedinha (Bruno Carvalho)
     
  7. Curtir
    brendoonh deu reputação a Lekstar em (Resolvido)Golden Ingot [Ajuda]   
    Problema Resolvido !
     
    meu item "Gold bar" era apenas um item qualquer com uma action changegold, após adcionar o atributo :
    o item Gold bar passou a ter valor  resolvendo o problema.
     
    Worth = Valor
    10000 = 1KK
    agora que o item contém valor, os npcs e scripts reconheceram o mesmo como dinheiro.
  8. Obrigado
    brendoonh deu reputação a Leohige em (Resolvido)Script tp, acrescentar contagem regressiva   
    Testa e vê se funciona
     
     
  9. Obrigado
    brendoonh deu reputação a Leohige em (Resolvido)verificar tempo   
    Testa esse script para ver se vai funcionar, se acontecer algum erro copia e cole como resposta, pois estou sem um servidor da mesma versão para testar.
     
    Agora para não sair o comando no default, copie o código novamente do meu post anterior e substitua pelo que está em seu servidor, dei uma editada lá.
     
    data/talkactions/scripts/addvip.lua
     
     
    data/talkactions/talkactions.xml
     
     
  10. Obrigado
    brendoonh deu reputação a Leohige em (Resolvido)verificar tempo   
    Vê se isso funciona
     
    data/talkactions/scripts/checkvip.lua
     
     
    data/talkactions/talkactions.xml
     
     
  11. Obrigado
    brendoonh deu reputação a Vodkart em (Resolvido)verificar tempo   
    function onSay(cid, words, param) local a = os.time() local b = math.floor((getPlayerStorageValue(cid, 19234) - a)/(24 * 60 * 60)) return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Você tem ".. (b < 0 and 0 or b) .." dias de VIP no character.") end  
  12. Curtir
    brendoonh deu reputação a Dwarfer em (Resolvido)Usar item e adicionar ppoints   
    Em actions/scripts crie um arquivo.lua:
     
     
    No actions.xml: <action itemid="ID_DO_ITEM" script="NOMEDOARQUIVO.lua" />
  13. Curtir
    brendoonh deu reputação a Sekk em (Resolvido)Help corrigir erro mysql   
    Pode ser q esse tfs n aceita sqlite, somente mysql
  14. Curtir
    brendoonh deu reputação a KotZletY em (Resolvido)Erro na distro "pairs"   
    @brendoonh tem um for tentando percorrer uma "tabela", porém algo está dentro do pairs está retornando um booleano. 
     
    Poste o script aqui. Tentarei ajudar!
  15. Curtir
    brendoonh deu reputação a KotZletY em (Resolvido)Erro na distro "pairs"   
    @brendoonh não cara, o erro é de algum mod do seu servidor.
  16. Obrigado
    brendoonh deu reputação a Dwarfer em (Resolvido)Erro Raspadinha   
  17. Gostei
    brendoonh deu reputação a Dwarfer em (Resolvido)Erro Raspadinha   
    Li "raspadinha" vim no tópico correndo pensando que era outra coisa, mas era só o script mesmo 
    Fiz umas mudanças, se me permite.
     
     
  18. Gostei
    brendoonh deu reputação a Dwarfer em (Resolvido)Erro Raspadinha   
  19. Obrigado
    brendoonh deu reputação a Dwarfer em (Resolvido)Acrescentar função no sistema ppoints   
    Você vai substituir esses que você mandou aqui. Você tem que retirar a tag que o eventype = "logout" e deixar a tag que o eventype = "login" que você tinha adicionado antes quando configurando o sistema. 
  20. Obrigado
    brendoonh deu reputação a Dwarfer em (Resolvido)Acrescentar função no sistema ppoints   
    No creaturescripts:
     
     
    E retire a tag  <event type="logout" name="PlayerResetPointsTimer" event="script" value="points.lua"/> do creaturescripts.xml.
     
    No globalevents:
     
     
    No talkactions:
     
     
  21. Obrigado
    brendoonh deu reputação a Dwarfer em (Resolvido)Acrescentar função no sistema ppoints   
    3) Sim, todas no mysql. 
     
    Você pediu para que resetasse os pontos, então é só apagar a coluna. 
  22. Gostei
    brendoonh deu reputação a Dwarfer em (Resolvido)Acrescentar função no sistema ppoints   
    Como você queria dar os pontos àqueles que ficaram X tempo online no seu servidor, o que eu fiz foi pegar o tempo online do player toda hora que ele entra no servidor. Esse problema aí aconteceu porque você não deslogou antes de dar o reload e já estava com o os.time() na storage. Então, ao somar o os.time() com o tempo que você ficou online pela última vez, deu esse número grande. Se você tivesse a storage de 1219 igual a -1 ou mesmo 0, funcionaria corretamente. 
     
  23. Gostei
    brendoonh deu reputação a Dwarfer em (Resolvido)Acrescentar função no sistema ppoints   
    Não é gambiarra. Você pode executar na sua database:
     
    Para excluir os p_points das contas:
     
    ALTER TABLE `accounts` DROP `p_points`
     
    Aí você pode adicionar novamente: 
    ALTER TABLE `accounts` ADD `p_points` INTEGER NOT NULL DEFAULT 0
     
    E para setar aos players o storage 1219 igual a -1: 
     
    UPDATE `player_storage` SET `value`=-1 WHERE `key`= 1219
     
     
  24. Gostei
    brendoonh deu reputação a Neeg em Baiak Energy 8.60   
    BAIAK ENERGY 2017
     
    Olá pessoal do TK, Encontrei esse servidor no meu pendrive é decidi postar para vocês!
    Creio que o servidor tenha alguns bugs, Não irei dar suporte pois não sei quase nada sobre o servidor, não fui eu que editei.
     
    Informações:
    * Cast System
    * Castle 24hrs
    * Castle48hrs
    * VIP 1, 2, 3
    * Hunt 450+
    * Sets Donates funcionando
    * Area Donate
    * Trainers 100%
     
    Contando com todos eventos atuais:
    - Zombie Event
    - Snowball War Event
    - Capture the Flag
    - Battlefield
    - Desert War
    - Defend The Tower
    - Zombie
    - Fire storm
    - Boss King
     
    - Downloads:
    * Baiak Energy: http://www.mediafire.com/file/ocydotkwocyiyyg/Baiak_Energy.rar
    * Distro (x32) (x64): http://www.mediafire.com/file/2fnkiakur9nbek9/OTX.rar
     
    - Scans:
    * Baiak Energy: https://virustotal.com/#/file/b4088d1c9849e694c429cf587fc6aba90cd2cbbd3e4b6def2314104d55b39633/detection
    * Distro (x32) (x64): https://virustotal.com/#/file/fc02e2d68a0b84a6bcbd73f845b89cc6a1e7403362181d984cda30992422cc40/detection
     

  25. Gostei
    brendoonh deu reputação a Pedriinz em [TFS 1.x] Anti Bot   
    Como o nome do tópico diz, eu trouxe para vocês um sistema de anti bot.
    Minha intenção é atualizar este código ao máximo, deixando o mesmo bastante customizável.
     
    Quaisquer erros ou problemas por favor me deixe saber.
     


     
    Como ele funciona?
    Após um jogador matar uma quantidade x de monstros, o sistema irá realizar uma verificação com ele para saber se o mesmo está ou não 100% afk.
    Essa verificação é feita através de um channel que se abre após o jogador matar a quantidade de monstros, realizando uma pergunta para o jogador.
     
    O que é possível configurar?
    Praticamente tudo! Você também pode adicionar quantas perguntas desejar! Organizei o script para que qualquer um possa realizar as configurações que desejar. Confira:
    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}, } }  
    Tudo dentro desses espaços pode ser configurado sem nenhuma complicação!
     
    Instalação:
     
    Vá na pasta creaturescript/scripts do seu servidor e crie um arquivo com o nome de antibot.lua e adicione o seguinte conteúdo:
    --[[ ## 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 end Após feito isso, abre o arquivo creaturescript/creaturescript.xml e adicione esta linha:
     
    <!-- Anti Bot by Pedriinz --> <event type="kill" name="AntiBot" script="antibot.lua" /> Feito isso, abra o arquivo: creaturescript/scripts/others/login.lua e registre o script com a tag:
    'AntiBot', Exemplo:
    local events = { 'ElementalSpheresOverlords', 'BigfootBurdenVersperoth', 'Razzagorn', 'Shatterer', 'Zamulosh', 'The Hunger', 'AntiBot', } Agora, abre o arquivo chatchannels/chatchannels.xml e adicione a seguinte tag:
    <channel id="10" name="Anti Bot" public="1" script="antibot.lua" /> Lembre-se que o ID deve ser o mesmo que você configurou no script principal lá em cima.
     
    Agora abra a pasta chatchannels/scripts/ crie um script chamado antibot.lua e adicione:
    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 end Pronto! O seu antibot foi instalado com sucesso!
    O código foi totalmente feito por mim, então os créditos são meus.
     
    Qualquer sugestão para melhorias, por favor poste para que eu possa fazer
    Abraços! 

Informação Importante

Confirmação de Termo