rilleman
New Member
- Joined
- Feb 14, 2010
- Messages
- 269
- Reaction score
- 0
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000) -- time in seconds x1000
function onUse(cid, item, fromPosition, itemEx, toPosition)
local manamax = getPlayerMaxMana(cid)
local min = 3 -- this means 3% minimum healing
local max = 5 -- this means 5% maximum healing
local mana_add = math.random((manamax * (min/100)), (manamax * (max/100)))
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
Im using this script, but I want it to say ex: "Manarune" and the volym of mana that were gained, like:
First manarune
843+ mana