Postado Julho 8, 2015 9 anos Solução local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 6, 6, 5.5, 6) function onCastSpell(cid, var) if getGlobalStorageValue(STORAGE) >= os.time() then doPlayerSendCancel(cid,"Voce tem que esperar ".. getGlobalStorageValue(STORAGE) - os.time() .." pra usar denovo.") else setGlobalStorageValue(STORAGE, os.time() + 5) return doCombat(cid, combat, var) end Muda o STORAGE, pra um storage qualquer sem ta sendo usado, esse 5 é o cooldown Editado Julho 8, 2015 9 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Julho 8, 2015 9 anos local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 6, 6, 5.5, 6) local cooldown = 5 -- tempo de exhaust, segundos local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, 6 * 15 * 100) function onCastSpell(cid, var) if exhaustion.check(cid,299) then doPlayerSendCancel(cid, "Sua spell tem "..exhaustion.get(cid, 299).." segundos de cooldown.") exhaustion.set(cid,299,cooldown) return doCombat(cid, combat, var) end return true end spells.xml exhaustion="2000" Editado Julho 8, 2015 9 anos por rogaforyn2 (veja o histórico de edições) Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
Postado Julho 8, 2015 9 anos Autor sem sucesso =( ~~~~ após dar uma olhadinha eu peguei seu script local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 6, 6, 5.5, 6) function onCastSpell(cid, var) if getGlobalStorageValue(23000) >= os.time() then doPlayerSendCancel(cid,"Voce tem que esperar ".. getGlobalStorageValue(23000) - os.time() .." pra usar denovo.") else setGlobalStorageValue(23000, os.time() + 5) return doCombat(cid, combat, var) end end e vi que estava faltando um End , então adicionei e funcionou ! Obrigado =) Editado Julho 8, 2015 9 anos por kazaana (veja o histórico de edições)
Postado Julho 8, 2015 9 anos Esqueci de identar, mas era só você me mandar o erro do console e eu corrigia. Life is so meaningless, there is nothing worth a smile So goodbye, I'll miss you sugestões?
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.