Postado Outubro 31, 2017 7 anos Alguem sabe me informar pq não funciona esse script.. Mostrar conteúdo oculto local config = { tempo = 3 -- tempo, em segundos que o efeito demorará para sair. } function msg(cid) local monster = "Ice Pet" if isCreature and getCreatureName(cid) == monster then doSendMagicEffect(getThingPos(cid), 37) doSendAnimatedText(getThingPos(cid), "level: ".. getPlayerStorageValue(cid, RegenPercent.stora) .. "", 147) LoopReg(cid) addEvent(function() msg(cid) end, config.tempo) end end function onThink(cid, interval) if getPlayerStorageValue(cid, 70070) ~= 1 then return true end if (getPlayerStorageValue(cid, 70070) - os.time()) <= 0 then --164334 é para guardar o intervalo de tempo. msg(cid) setPlayerStorageValue(cid, 70070, config.tempo + os.time()) else return true end return TRUE end
Postado Novembro 1, 2017 7 anos @Tchuka Ve se funciona esse Mostrar conteúdo oculto local config = { tempo = 3 -- tempo, em segundos que o efeito demorará para sair. timeleft = os.time() + tempo*1000 } function msg(cid) local monster = "Ice Pet" if isCreature and getCreatureName(cid) == monster then doSendMagicEffect(getThingPos(cid), 37) doSendAnimatedText(getThingPos(cid), "level: ".. getPlayerStorageValue(cid, RegenPercent.stora) .. "", 147) LoopReg(cid) addEvent(function() msg(cid) end, config.tempo) end end function onThink(cid, interval) if getPlayerStorageValue(cid, 70070) ~= 1 then return true end if (getPlayerStorageValue(cid, 70070)) <= 0 then --164334 é para guardar o intervalo de tempo. msg(cid) setPlayerStorageValue(cid, 70070, config.timeleft) else return true end return TRUE end
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.