antiblock
Elveron
  • Chatbox

    You don't have permission to chat.
    Load More
  • 0
Sign in to follow this  
obetuno

[Dúvida] Programação Lua Na Energysystem

Question

Ao clicar no cristal de energia (ID: 51002) ele fornece os bonus, mas ao clicar de novo... ELE SOMA ! http://cyber-gamers.org/public/style_emoticons/default/55158.gif

Não era para ser "acumulativo"... Era para poder usar o cristal novamente depois de um tempo, senão ele vai acumular e deixar todos os jogadores IMORTAIS :P

Peguei a quest da file do rancoroso e estou com esse problema, talves possa mudar algo para corrigir.

AQUI TEM A PARTE QUE DEVO ALTERAR: (é só o final do script)

when 61002.use begin

if getenergytime() > get_time() then

chat("O efeito da energia já está ativa, aguarde o término para reutilizar.")

return

end

local anz = number(1,10)

boni_list = {}

boni_list [1] = {apply.ATTBONUS_HUMAN, 15}

boni_list [2] = {apply.ATTBONUS_MONSTER, 10}

boni_list [3] = {apply.CRITICAL_PCT, 10}

boni_list [4] = {apply.PENETRATE_PCT, 10}

boni_list [5] = {apply.MAX_HP, 1000}

boni_list [6] = {apply.MAX_SP, 2000}

boni_list [7] = {apply.HP_REGEN, 30}

boni_list [8] = {apply.STEAL_HP, 10}

boni_list [9] = {apply.ATT_GRADE_BONUS, 75}

boni_list [10] = {apply.ATT_GRADE_BONUS, 50}

-- test_chat(anz)

-- test_chat(boni_list[anz][1])

-- test_chat(boni_list[anz][2])

affect.add_collect(boni_list[anz][1],boni_list[anz][2],7200)

setenergy(anz,boni_list[anz][2],get_time() + 7200)

cmdchat("energysystem "..anz.."|"..boni_list[anz][2].."#"..(get_time() + 7200))

item.remove()

chat("De repente se sente uma leveza no corpo, o cristal lhe concedeu a energia!")

end

Esta linha: if getenergytime() > get_time() then está correto ? Pois não está funcionando...

Dá para usar quantos cristais quiser...

Ajuda ??? Dou http://cyber-gamers.org/public/style_emoticons/default/451960.gif !

Share this post


Link to post
Share on other sites

1 answer to this question

antiblock
Elveron
Guest
This topic is now closed to further replies.
Sign in to follow this