Could anyone help me to rewrite this script so that it is not on mana potions only health potions?
Lua:
local manaPot = 7488
function onUse(cid, item, frompos, item2, topos)
if(item.itemid == manaPot) then
if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 6 then
if getPlayerLevel(cid) > 200 then
doSendAnimatedText(getPlayerPosition(cid), "Achh..!", TEXTCOLOR_ORANGE)
if(doTargetCombatMana(0, cid, 700, 700, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
return FALSE
end
else
doPlayerSendTextMessage(cid, 21, "Masz za maly poziom.")
end
else
doPlayerSendTextMessage(cid, 21, "nie posiadasz wymaganej profesji.")
end
end
return TRUE
end