Postado Agosto 2, 2019 6 anos local t = { duration = 3, -- duração da novo outfit (em segundos) newLooktype = 111, -- looktype da nova outfit effect = 10, -- efeito que aparecerá cooldown = 10, -- tempo para usar a magia novamente (em segudos) storage = 54897 -- só modifique se necessário } local a = { ml = 2, -- ml que o player irá ganhar skillfist = 0, -- fist que o player irá ganhar skillsword = 0, -- sword que o player irá ganhar skillaxe = 0, -- axe que o player irá ganhar skillclub = 0, -- club que o player irá ganhar skilldistance = 0, -- distance que o player irá ganhar skillshield = 0 -- shield que o player irá ganhar } function onCastSpell(cid, var) if getPlayerStorageValue(cid, t.storage) > os.time() then doPlayerSendCancel(cid, "Você precisa esperar para soltar esta magia novamente.") return false end setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, a.ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, a.skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, a.skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, a.skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, a.skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, a.skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, a.skillshield) doCreatureSetNoMove(cid, true) local out = getCreatureOutfit(cid) out.lookType = t.newLooktype doSetCreatureOutfit(cid, out, t.duration * 1000) setPlayerStorageValue(cid, t.storage, t.cooldown + os.time()) addEvent(function() if isPlayer(cid) then doCreatureSetNoMove(cid, false) doSendMagicEffect(getPlayerPosition(cid), t.effect) end end, t.duration * 1000) return true end Testa aí, brother Spoiler Dbo Absalon/GOD Revolution Citar "Sábio é aquele que conhece os limites da própria ignorância." Sócrates
Postado Agosto 2, 2019 6 anos Autor 3 horas atrás, The Nayol disse: local t = { duration = 3, -- duração da novo outfit (em segundos) newLooktype = 111, -- looktype da nova outfit effect = 10, -- efeito que aparecerá cooldown = 10, -- tempo para usar a magia novamente (em segudos) storage = 54897 -- só modifique se necessário } local a = { ml = 2, -- ml que o player irá ganhar skillfist = 0, -- fist que o player irá ganhar skillsword = 0, -- sword que o player irá ganhar skillaxe = 0, -- axe que o player irá ganhar skillclub = 0, -- club que o player irá ganhar skilldistance = 0, -- distance que o player irá ganhar skillshield = 0 -- shield que o player irá ganhar } function onCastSpell(cid, var) if getPlayerStorageValue(cid, t.storage) > os.time() then doPlayerSendCancel(cid, "Você precisa esperar para soltar esta magia novamente.") return false end setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, a.ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, a.skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, a.skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, a.skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, a.skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, a.skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, a.skillshield) doCreatureSetNoMove(cid, true) local out = getCreatureOutfit(cid) out.lookType = t.newLooktype doSetCreatureOutfit(cid, out, t.duration * 1000) setPlayerStorageValue(cid, t.storage, t.cooldown + os.time()) addEvent(function() if isPlayer(cid) then doCreatureSetNoMove(cid, false) doSendMagicEffect(getPlayerPosition(cid), t.effect) end end, t.duration * 1000) return true end Testa aí, brother @The Nayol Acabei de fazer o teste aqui, não funcionou, apenas aparece o effect 1 vez, ele some e os atributos não são dados ao personagem.
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.