Ir para conteúdo

Yunie Anti Bot System


noobinhu

Posts Recomendados

A sim mais o erro está no arquivo da talkactions não da creaturescripts.

 

Bem aqui está o erro:

[26/01/2009 19:54:36] Warning: [Event::loadScript] Can not load script. data/talkactions/scripts/antibot.lua

[26/01/2009 19:54:36] data/talkactions/scripts/antibot.lua:29: ')' expected (to close '(' at line 28) near 'ges'

 

^^

Link para o comentário
Compartilhar em outros sites

Agora esta aparecendo isso!

 

[27/01/2009 10:55:33] Lua Script Error: [CreatureScript Interface]

[27/01/2009 10:55:33] data/creaturescripts/scripts/antibot.lua:onLogin

 

[27/01/2009 10:55:33] luaDebugPrint(). Error! Anti Bot System debugs: variable delayAntiBot need to be higher than mintoanswer.

 

O que estou fazendo de errado?

 

-- Yunie Anti Bot System

-- XTibia Forums

-- www.xtibia.com/forum/

 

 

-- configs

local mintoanswer = 2 -- minutes to answer anti bot system

local delayAntiBot = 2 -- minutes of delay of delayAntiBot

local maxgroupid = 1 -- groupid higher than this don't have antiBotSystem Activated

local prisionpos = {x=427,y=504,z=7} -- if don't answer, go to this pos

local prisionminutes = 1 -- time inside the prision

local templepos = {x=427, y=504, z=7} -- after the prisionminutes, back to this position (temple is recommended)

-- 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)

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

 

-- 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

Link para o comentário
Compartilhar em outros sites

@Eletross

É um erro dentro do script mesmo, eu coloquei que a variável delayAntiBot tem que ser maior que o tempo de resposta, pois se não um player vai acabar de responder e ter que responder denovo já...

 

Ou seja, delayAntiBot tem que ser maior que o mintoanswer.

Link para o comentário
Compartilhar em outros sites

E tu arrumo ?

Vo testar aqui e edito!

 

EDITED

 

Pronto, parei e dei uma olhada, eu tava fazendo bobagem mesmo x)

Agora traduzi e coloquei no meu server, fico muito bom!

Origado pela ajuda o/

 

EDITED DENOVO

 

Tipo, funciono certinho mas...

Dps q o player acerta uma vez a resposta, passa 30 minutos e o antibot num inicia novamente, responde uma vez quando loga, e joga quanto quizer sem problemas com o antibot...

 

Vo postar aqui como ta, ai tu da uma olhada...

 

<?xml version="1.0" encoding="UTF-8"?>

<creaturescripts>

<event type="login" name="PlayerLogin" script="login.lua"/>

<event type="login" name="AntiBotLogin" script="antibot.lua"/>

<event type="death" name="PlayerDeath" script="playerdeath.lua"/>

<event type="logout" name="AntiBotLogout" script="antibot.lua"/>

</creaturescripts>

 

-- Next Anti Bot System

-- XTibia Forums

-- www.xtibia.com/forum/

 

 

-- configs

local mintoanswer = 2 -- minutes to answer anti bot system

local delayAntiBot = 30 -- minutes of delay of delayAntiBot

local maxgroupid = 1 -- groupid higher than this don't have antiBotSystem Activated

local prisionpos = {x=445,y=488,z=7} -- if don't answer, go to this pos

local prisionminutes = 5 -- time inside the prision

local templepos = {x=449, y=488, z=7} -- after the prisionminutes, back to this position (temple is recommended)

-- 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)

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, "Next Anti Bot System: Oi, "..playername.."! Voce tem ".. mintoanswer .." minutos para dar o resultado da conta ".. first_num .." + ".. second_num ..". Escreva: !antibot \"resultado.")

doPlayerSendTextMessage(cid, 20, "Next Anti Bot System: Exemplo: 20+20 = 40, ai voce escreve !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, "Tempo esgotado! Voce ficara aqui por ".. prisionminutes .." minutos.")

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, "Tempo esgotado! Voce ficara aqui por ".. prisionminutes .." minutos.")

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, "Next Anti Bot System: Ok, muito obrigado.")

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, "Seu tempo acabou, voce pode relogar e voltar a jogar.")

else

prisionEvent = addEvent(checkprisioned,1000,{cid=cid})

end

end

end

 

<?xml version="1.0" encoding="UTF-8"?>

<talkactions>

<!-- player talkactions -->

<talkaction words="!buypremiumarrixnosaaswz" script="buyprem.lua"/>

<talkaction words="!leavehouse" script="leavehouse.lua"/>

<talkaction words="/changesddgexasd" script="changesex.lua"/>

<talkaction words="!uptime" script="uptime.lua"/>

<talkaction words="!deathlist" script="deathlist.lua"/>

<talkaction words="!getmoney" script="getmoney.lua"/>

<talkaction words="!ranks" script="highscores.lua"/>

<talkaction words="!crew" script="crew.lua" />

<talkaction words="!antibot" script="antibot.lua"/>

 

<!-- test talkactions -->

<talkaction words="!x" script="animationeffect.lua"/>

 

 

<!-- Gods -->

<talkaction words="/save" script="save.lua"/>

<talkaction words="/bc" script="bc.lua"/>

 

 

</talkactions>

 

-- 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, "Next Anti Bot System: Esta correto, muito obrigado.")

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, "Next Anti Bot System: Voce ja errou mais de 3 vezes.")

end

else

doPlayerSendTextMessage(cid, 20, "Next Anti Bot System: Esta errado!")

wrong_answers_now = getPlayerStorageValue(cid,storages.wrong_answers)

setPlayerStorageValue(cid,storages.wrong_answers,wrong_answers_now+1)

doPlayerSendTextMessage(cid, 20, "Next Anti Bot System: Voce ja tem ".. getPlayerStorageValue(cid,storages.wrong_answers).." respostas incorretas! Limite de 3.")

end

end

end

Editado por Eletross
Link para o comentário
Compartilhar em outros sites

Testei rapidinho denovo, e deu certo.

 

Ele pergunta denovo sim, uma coisa que você pode estar fazendo é estar com seu char dentro de protection zone, e em protection zone o Anti Bot não ativa, pois lá as pessoas poderão ficar afk.

 

Script que testei:

-- Yunie Anti Bot System

-- XTibia Forums

-- www.xtibia.com/forum/

 

 

-- configs

local mintoanswer = 0.5 -- minutes to answer anti bot system

local delayAntiBot = 1 -- minutes of delay of delayAntiBot

local maxgroupid = 1 -- groupid higher than this don't have antiBotSystem Activated

local prisionpos = {x=83,y=122,z=7} -- if don't answer, go to this pos

local prisionminutes = 10 -- time inside the prision

local templepos = {x=95, y=117, z=7} -- after the prisionminutes, back to this position (temple is recommended)

-- 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

 

PS.: Espero que você não tenha tirado os meus créditos do script, colocado para esse tal de 'Next' e depois postar em outro fórum com créditos dele, pois eu visito todos fóruns constantemente e tenho conhecidos em todos também.

Link para o comentário
Compartilhar em outros sites

Testei rapidinho denovo, e deu certo.

 

Ele pergunta denovo sim, uma coisa que você pode estar fazendo é estar com seu char dentro de protection zone, e em protection zone o Anti Bot não ativa, pois lá as pessoas poderão ficar afk.

 

Script que testei:

 

 

PS.: Espero que você não tenha tirado os meus créditos do script, colocado para esse tal de 'Next' e depois postar em outro fórum com créditos dele, pois eu visito todos fóruns constantemente e tenho conhecidos em todos também.

 

Não se preocupe, não vou postar em outro forum, Next eh nome do meu servidor, soh por isso...

Quando testei, fiquei andando pela cidade, ataquei 2 bixos, entrei no depot q era pz zone, ai passo 30 minutos, ele não acuso! A pessoa tem q ficar 30 minutos em uma area de atke para ele ativar então ?

 

E agradeço novamente pelo script, muito bom, vai me ajudar muito no next, obrigado!

E muito obrigado pelo suporte tbm!

Link para o comentário
Compartilhar em outros sites

[01/02/2009 21:56:27] Lua Script Error: [CreatureScript Interface]

[01/02/2009 21:56:27] in a timer event called from:

[01/02/2009 21:56:27] data/creaturescripts/scripts/antibot.lua:onLogin

 

[01/02/2009 21:56:27] luaGetCreaturePosition(). Creature not found

 

[01/02/2009 21:56:27] Lua Script Error: [CreatureScript Interface]

[01/02/2009 21:56:27] in a timer event called from:

[01/02/2009 21:56:27] data/creaturescripts/scripts/antibot.lua:onLogin

 

[01/02/2009 21:56:27] attempt to index a number value

[01/02/2009 21:56:27] stack traceback:

[01/02/2009 21:56:27] [C]: in function 'getTilePzInfo'

[01/02/2009 21:56:27] data/creaturescripts/scripts/antibot.lua:63: in function <data/creaturescripts/scripts/antibot.lua:59>

 

Pq ta acontecendo isso agora?

da uma olhada!

Link para o comentário
Compartilhar em outros sites

Dá sim, mas não vou adatpá-lo no momento, estou cheio de scripts para fazer =z...

 

Erros acima devido ao não ter a function getTilePzInfo no distro.

Editado por noobinhu
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...