BrunooMaciell 84 Postado Dezembro 10, 2012 Share Postado Dezembro 10, 2012 Estou com uma duvida relacionado a ant bot !! tem ja o systema de ant bot pra poketibia ?? se nao tiver ... sera que alguem pode fazer um pra min de ant bot system pra poketibia ?? podia ate ser caso o player entrasse ou desse use sei la no bot o cliente automaticamente dava dbug ou outra coisa sei la !! Rep++++++ Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/ Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 10, 2012 Share Postado Dezembro 10, 2012 Já tentou utilizar o do Vodkart para seu poketibia? Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1408985 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Dezembro 10, 2012 Autor Share Postado Dezembro 10, 2012 qual ?? Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1408999 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 10, 2012 Share Postado Dezembro 10, 2012 (editado) @Corrigindo, desculpe não é dele o Sistema. Mas irei passar mesmo assim: Crie um arquivo chamado antibot.lua na pasta data/talkactions/scripts e cole isso dentro: -- local variables local storages = {first_num = 20123, second_num = 20124, result = 20125, answer = 20126, prisioned = 20127, prisiontime = 20128, wrong_answers = 20129} -- end local variables function onSay(cid, words, param) local first_num = getPlayerStorageValue(cid,storages.first_num) local second_num = getPlayerStorageValue(cid,storages.second_num) local result = getPlayerStorageValue(cid,storages.result) local answer = getPlayerStorageValue(cid,storages.answer) local prisioned = getPlayerStorageValue(cid,storages.prisioned) param = tonumber(param) if (prisioned ~= 1 and answer ~= 1 and result > 0) then if (param == result) then if (getPlayerStorageValue(cid,storages.wrong_answers) <= 3) then doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Right answer, thank you for answering.") setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.answer,1) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) else doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Right answer, but you had already answered more than 3 wrong times.") end else doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Wrong answer!") wrong_answers_now = getPlayerStorageValue(cid,storages.wrong_answers) setPlayerStorageValue(cid,storages.wrong_answers,wrong_answers_now+1) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: You had already got ".. getPlayerStorageValue(cid,storages.wrong_answers).." wrong answers! The limit is 3.") end end end Agora na pasta data/creaturescripts/scripts crie um arquivo com o mesmo nome, antibot.lua e adicione isso dentro: -- configs local mintoanswer = 2 -- A CADA QUANTOS MINUTOS IRÁ PERGUNTAR local delayAntiBot = 30 -- MINUTOS DE DELAY local maxgroupid = 1 -- ATÉ QUE GROUP ID O ANTI BOT FUNCIONARA, 1 = SO PRA PLAYERS local prisionpos = {x=83,y=122,z=7} -- SE NAO RESPONDER A PERGUNTA, PRENDERÁ (CONFIGURE) local prisionminutes = 10 -- MINUTOS DENTRO DA CADEIA local templepos = {x=95, y=117, z=7} -- COLOQUE POSIÇÃO DO TEMPLO -- end configs -- local variables local storages = {first_num = 20123, second_num = 20124, result = 20125, answer = 20126, prisioned = 20127, prisiontime = 20128, wrong_answers = 20129} -- end local variables function onLogin(cid) local prisioned = getPlayerStorageValue(cid,storages.prisioned) if (prisioned == 1) then local prisiontime = getPlayerStorageValue(cid,storages.prisiontime) local timenow = os.time() if (timenow >= prisiontime) then setPlayerStorageValue(cid,storages.prisiontime,0) setPlayerStorageValue(cid,storages.prisioned,0) doTeleportThing(cid, templepos) else prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) doTeleportThing(cid, prisionpos) end end if (delayAntiBot <= mintoanswer) then debugPrint("Error! Anti Bot System debugs: variable delayAntiBot need to be higher than mintoanswer.") else if (getPlayerGroupId(cid) <= maxgroupid) then antiBotEvent = addEvent(antiBot,1000,{cid=cid}) else doPlayerSendTextMessage(cid, 20, "People with group ID higher than ".. maxgroupid .." don't have this system.") end end return TRUE end function onLogout(cid) stopEvent(prisionEvent) stopEvent(antiBotEvent) stopEvent(checkAnswerEvent) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.wrong_answers,0) return TRUE end function antiBot(parameters) local cid = parameters.cid local playerpos = getCreaturePosition(cid) local playerpz = getTilePzInfo(playerpos) local playername = getPlayerName(cid) local prisioned = getPlayerStorageValue(cid,storages.prisioned) if (playerpz ~= 1 and prisioned ~= 1) then local first_num = math.random(1,9) local second_num = math.random(1,9) local result = first_num+second_num setPlayerStorageValue(cid,storages.first_num,first_num) setPlayerStorageValue(cid,storages.second_num,second_num) setPlayerStorageValue(cid,storages.result,result) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Hello, "..playername.."! You have ".. mintoanswer .." minute(s) to answer how much is ".. first_num .." + ".. second_num ..". To answer say: !antibot \"number.") doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: Example: 20+20 = 40, then you would say !antibot \"40.") checkAnswerEvent = addEvent(checkAnswer,mintoanswer*60*1000,{cid=cid}) end antiBotEvent = addEvent(antiBot,delayAntiBot*60*1000,{cid=cid}) end function checkAnswer(parameters) local cid = parameters.cid local first_num = getPlayerStorageValue(cid,storages.first_num) local second_num = getPlayerStorageValue(cid,storages.second_num) local result = getPlayerStorageValue(cid,storages.result) local answer = getPlayerStorageValue(cid,storages.answer) local prisioned = getPlayerStorageValue(cid,storages.prisioned) local wrong_answers = getPlayerStorageValue(cid,storages.wrong_answers) if (wrong_answers > 3) then doTeleportThing(cid, prisionpos) setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,1) setPlayerStorageValue(cid,storages.prisiontime,os.time()+(prisionminutes*60)) doPlayerSendTextMessage(cid, 20, "Time limit! You had been prisioned for ".. prisionminutes .." minute(s) because answered many wrong times.") prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) else if (answer ~= 1 and prisioned ~= 1 and result > 0) then doTeleportThing(cid, prisionpos) setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,1) setPlayerStorageValue(cid,storages.wrong_answers,0) setPlayerStorageValue(cid,storages.prisiontime,os.time()+(prisionminutes*60)) doPlayerSendTextMessage(cid, 20, "Time limit! You had been prisioned for ".. prisionminutes .." minute(s).") prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) else setPlayerStorageValue(cid,storages.first_num,0) setPlayerStorageValue(cid,storages.second_num,0) setPlayerStorageValue(cid,storages.result,0) setPlayerStorageValue(cid,storages.answer,0) setPlayerStorageValue(cid,storages.prisioned,0) setPlayerStorageValue(cid,storages.wrong_answers,0) doPlayerSendTextMessage(cid, 20, "Yunie Anti Bot System: You are ok, but in some minutes you are going to be asked again.") end end end function checkprisioned(parameters) local cid = parameters.cid local prisioned = getPlayerStorageValue(cid,storages.prisioned) local prisiontime = getPlayerStorageValue(cid,storages.prisiontime) local timenow = os.time() if (prisioned == 1) then if (timenow >= prisiontime) then doPlayerSendTextMessage(cid, 20, "You had completed your time here in the prision! You may now relog to go to the city.") else prisionEvent = addEvent(checkprisioned,1000,{cid=cid}) end end end Agora as tags, creaturescripts.xml: <event type="login" name="AntiBotLogin" script="antibot.lua"/> <event type="logout" name="AntiBotLogout" script="antibot.lua"/> Agora em talkactions.xml: <talkaction words="!antibot" script="antibot.lua"/> @CREDITOS = YUNIE Editado Dezembro 10, 2012 por Roksas Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409021 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Dezembro 11, 2012 Autor Share Postado Dezembro 11, 2012 Vou testa aqui caso pege normal !! volto aqui e tido Rep+ ^^ Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409087 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 11, 2012 Share Postado Dezembro 11, 2012 Tudo bem, aguardo sua resposta! Boa sorte, rsrs. Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409100 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Dezembro 11, 2012 Autor Share Postado Dezembro 11, 2012 nao pego ;( Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409131 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 11, 2012 Share Postado Dezembro 11, 2012 Erro no Distro? Como foi? Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409137 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Dezembro 11, 2012 Autor Share Postado Dezembro 11, 2012 tipo na hora que os players era pra coloca o codigo !! o serve caio =/ Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409142 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 11, 2012 Share Postado Dezembro 11, 2012 Certeza que o motivo foi o Script? Tente só + uma vez Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409148 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Dezembro 11, 2012 Autor Share Postado Dezembro 11, 2012 vou ver aqui mais quando fizerao issu na hora de digita o numero caia o serve !! vamos ver aqui de novo ^^ Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409226 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Dezembro 11, 2012 Share Postado Dezembro 11, 2012 Tomare que funcione! Boa sorte, quando forem digitar, fique de olho no Distro, provavelmente aparecerá um erro lá e fechará. Tente tirar print o mais rápido o possível,rsrs. Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1409433 Compartilhar em outros sites More sharing options...
Yan Oliveira 214 Postado Dezembro 19, 2012 Share Postado Dezembro 19, 2012 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1417547 Compartilhar em outros sites More sharing options...
Stigal 584 Postado Abril 20, 2018 Share Postado Abril 20, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/201067-encerrado-duvida-ant-bot/#findComment-1733266 Compartilhar em outros sites More sharing options...
Posts Recomendados