Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. local storage = 44122 -- storage for cooldown
  2. local sec = 30 -- 30 secconds cooldown
  3.  
  4. local condition = createConditionObject(CONDITION_ATTRIBUTES)
  5. setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 20)
  6. setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 1000)
  7.  
  8. function onCastSpell(cid, var)
  9. if getExhausted(cid, storage) then
  10. setExhausted(cid, storage, sec)
  11. doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
  12. return doAddCondition(cid, condition)
  13. else
  14. return doPlayerSendCancel(cid, 'You are exhausted Metamorphosis for: ' .. exhaustion.get(cid, storage) + 1 ..' seconds.') and false
  15. end
  16. return true
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement