vejsa
Banned User
- Joined
- Nov 3, 2007
- Messages
- 434
- Reaction score
- 0
Hey this is my problem..
That is my manarune script.. I need to add vocation id to them so mages can use 1 manarune.. knights can use 1 and pallys 1.. they are all diffrent manarunes.. Its a action script not a spell.. So if any one can help me out that would be awesome!
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) == TRUE then
local level, mlevel = getPlayerLevel(cid), getPlayerMagLevel(cid)
local mana_minimum = level * 2 + mlevel * 2 - 35
local mana_maximum = level * 3 + mlevel * 1
doPlayerAddMana(cid, math.random(mana_minimum, mana_maximum))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
return TRUE
end
That is my manarune script.. I need to add vocation id to them so mages can use 1 manarune.. knights can use 1 and pallys 1.. they are all diffrent manarunes.. Its a action script not a spell.. So if any one can help me out that would be awesome!