vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i have problem with my uh script cuz i try add min level and vocation to use but after it not work ;/
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local mlevel = getPlayerMagLevel(cid)
local mana_leg = (getCreatureMaxHealth(cid) / 17)
local mana_c = (getPlayerLevel(cid) * 4)
local manafull = (mana_leg + mana_c)
local mana_add = manafull
if(getPlayerLevel(cid) >= 10000) and (getPlayerVocation(cid) == 8) then
doCreatureAddHealth(cid, mana_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "U-UH", TALKTYPE_ORANGE_1)
else
doCreatureSay(itemEx.uid, "WRONG!", TALKTYPE_ORANGE_1)
end
end