Ir para conteúdo

Featured Replies

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

 

 

  • Respostas 11
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRE

Postado

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 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
  • 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 por kazaana (veja o histórico de ediçõ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.

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.7k

Informação Importante

Confirmação de Termo