local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
function onUse(cid, item, frompos, item2, topos)
local vocations = {1,2,5,6}
if(hasCondition(cid, CONDITION_EXHAUST)) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You are exhausted")
return true
end
if isInArray(vocations, getPlayerVocation(cid)) then
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Light me!MR", TALKTYPE_ORANGE_1)
doPlayerAddMana(cid, 10000)
doAddCondition(cid, exhaust)
else
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "This rune is only for sorcerers and druids.")
end
return true
end