Postado Junho 2, 2017 7 anos Alguém manja colocar aquele system que fica trocando a outfit do player, tipo brilhando em uma action que uso ? creio que esse script é do @xWhiteWolf. Se alguém puder ajudar agradeço desde já TK! Função na 050-function: Spoiler RegenPercent = { storage = 789159, -- storage do check mp = 2, -- porcentagem que vai ganhar de mana por segundo hp = 2, -- porcentagem que vai ganhar em hp por segundo secs = 1, -- em quanto em quanto segundos que vai healar hours = 2 -- quantas horas irá ficar healando } function LoopRegen(uid) if isPlayer(uid) then if getPlayerStorageValue(uid, RegenPercent.storage) > os.time() then doCreatureAddMana(uid, getCreatureMaxMana(uid)/100*RegenPercent.mp) doCreatureAddHealth(uid, getCreatureMaxHealth(uid)/100*RegenPercent.hp) addEvent(function() LoopRegen(uid) end, RegenPercent.secs*1000) end end end Action: Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, RegenPercent.storage) < os.time() then doCreatureSetStorage(cid, RegenPercent.storage, os.time()+RegenPercent.hours*60*60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Agora você esta healando 2% de mana e life por "..RegenPercent.hours.." horas, não podendo usar outra Amethyst"..(RegenPercent.hours == 1 and "." or "s." )) LoopRegen(cid) doRemoveItem(item.uid, 1) doSendMagicEffect(getCreaturePosition(cid), math.random(28,28)) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Desculpe, mas o item ainda está ativo e você continua com o buff.") 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.