Well my custom mana runes couse debugg why?
local function notpossible(fromPosition)
doSendMagicEffect(fromPosition,CONST_ME_POFF)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
local mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(toPosition,CONST_ME_LOSEENERGY)
doCreatureSay(itemEx.uid,"Large ManaHeal!!",19)
doPlayerAddMana(itemEx.uid, 40000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return true
end
local function notpossible(fromPosition)
doSendMagicEffect(fromPosition,CONST_ME_POFF)
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
local mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(toPosition,CONST_ME_LOSEENERGY)
doCreatureSay(itemEx.uid,"Large ManaHeal!!",19)
doPlayerAddMana(itemEx.uid, 40000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
else
notpossible(fromPosition)
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return true
end