hello i need help with this Script
I want when player use Mixed rune to do not Lose one Rune!
I hope you understand,sorry for my language
LUA:
local vocations = {1, 2, 5, 6}
function onUse(cid, item, frompos, item2, topos)
local vocation = getPlayerVocation(cid)
if not isInArray(vocations, vocation) then
doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
doPlayerSendCancel(cid, "Your vocation cannot use this rune. It can be used by bla bla bla..")
return true
end
local mLvl = getPlayerMagLevel(cid)
if mLvl >= 0 then
doSendMagicEffect(topos, CONST_ME_MAGIC_GREEN)
doCreatureSay(cid, "Mixed Rune", TALKTYPE_MONSTER)
doPlayerAddMana(cid, 50000)
doCreatureAddHealth(cid, 30000)
if item.type > 1 then
doChangeTypeItem(item.uid, item.type-1)
end
else
doSendMagicEffect(frompos, CONST_ME_MAGIC_POFF)
doPlayerSendCancel(cid, "You don't have the required magic level to use that rune.")
end
return true
end
I want when player use Mixed rune to do not Lose one Rune!
I hope you understand,sorry for my language
Last edited: