Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local storage = 44122 -- storage for cooldown
- local sec = 30 -- 30 secconds cooldown
- local condition = createConditionObject(CONDITION_ATTRIBUTES)
- setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, 20)
- setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 1000)
- function onCastSpell(cid, var)
- if getExhausted(cid, storage) then
- setExhausted(cid, storage, sec)
- doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
- return doAddCondition(cid, condition)
- else
- return doPlayerSendCancel(cid, 'You are exhausted Metamorphosis for: ' .. exhaustion.get(cid, storage) + 1 ..' seconds.') and false
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement