jeppsonskate
Member
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 700) -- time in seconds x1000
function onUse(cid, item, fromPosition, itemEx, toPosition)
local manamax = getPlayerMaxMana(cid)
local min = 1200
local max = 1300
local mana_add = math.random((min), (max))
if(hasCondition(cid, CONDITION_EXHAUST)) then
doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
return doPlayerSendCancel(cid, "You are exhausted")
end
doPlayerAddMana(cid, mana_add)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
doSendAnimatedText(getPlayerPosition(cid),""..mana_add.."", TEXTCOLOR_LIGHTBLUE)
doAddCondition(cid, exhaust)
return true
end
<action itemid="2307" event="script" value="liquids/Donate manarune.lua"/>
Got this scripts for my manarune, but all vocations can use it. I want ONLY mages can use it!.
How do i do?