Ir para conteúdo

(Resolvido)[Ajuda] Colocar pausa de tempo entre os laços do for

Featured Replies

Postado
  • 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.



 tumblr_mwfeg45FIV1qk4cb3o4_500.gif

  • Respostas 11
  • Visualizações 472
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

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

Postado
  • 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo