Postado Agosto 24, 2014 10 anos Autor Mesma coisa no life. Mas valeu pelas tentativas, eu acho que ele executa todos os testes quando lança a spell, e não no momento dos eventos, isso que não soluciona. Por isso procurava uma pausa de tempo na execução do for.
Postado Agosto 24, 2014 10 anos Solução elseif spell == "Leech Seed" then setPlayerStorageValue(cid, 498587, 1) for var = 1,10 do addEvent(function() if not isCreature(target) or not isCreature(cid) then return false end if getPlayerStorageValue(cid, 498587) == 1 then doSendDistanceShoot(getThingPosWithDebug(cid), getThingPosWithDebug(target), 1) doSendMagicEffect(getThingPosWithDebug(cid), 12) doSendMagicEffect(getThingPosWithDebug(target), 45) doAreaCombatHealth(cid, GRASSDAMAGE, getThingPosWithDebug(target), 0, -min, -max, 14) local newlife = getCreatureHealth(target) - getCreatureHealth(target) if getCreatureHealth(target) >= 1 then doCreatureAddHealth(cid, newlife) doSendAnimatedText(getThingPosWithDebug(cid), "+"..newlife.."", 32) end end end, 1000*var) end OBS: Não testei!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.