function onUse(cid, item, fromPosition, itemEx, toPosition)
if (isPlayer(itemEx.uid) ~= TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You can use it only on players.")
return FALSE
end
if (getPlayerStorageValue(cid, 11553) ~= 1) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You need to be a V.I.P. to use this rune.")
return FALSE
end
local pos = getCreaturePosition(itemEx.uid)
local mana = {
100, -- Min
500 -- Max
}
local positions = {
{x = pos.x - 1, y = pos.y - 1, z = pos.z},
{x = pos.x - 1, y = pos.y + 1, z = pos.z},
{x = pos.x + 1, y = pos.y - 1, z = pos.z},
{x = pos.x + 1, y = pos.y + 1, z = pos.z}
}
doPlayerAddMana(itemEx.uid, math.random(mana[1], mana[2])
for i = 1, #positions do
doSendMagicEffect(positions[i], CONST_ME_ICEAREA)
doSendMagicEffect(positions[i], CONST_ME_FIREATTACK)
end
return TRUE
end