Hey,
im trying to make a item that recovers some MP, but in order to use, you must be out of battle (without the icon when u go into a battle and appear 2 small swords).
Here's what im trying to the script check:
right now, it's not working...any sugestion? thanks
im trying to make a item that recovers some MP, but in order to use, you must be out of battle (without the icon when u go into a battle and appear 2 small swords).
Here's what im trying to the script check:
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == "itemid" then
if getCreatureCondition(cid, CONDITION_INFIGHT) == 0 then
doPlayerAddMana(cid,100)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getPlayerPosition(cid),10)
else
doPlayerSendCancel(cid,"You must be out of fight to recover mana.")
end
end
end