local cost = 50000
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1, 5 do
if(getPlayerBlessing(cid, i)) then
doPlayerSendCancel(cid, "You already have all of the blessings.")
return true
end
end
if(getPlayerMoney(cid) < cost) then
doPlayerSendCancel(cid, "You do not have enough money.")
elseif(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
else
for v = 1, 5 do
doPlayerAddBlessing(cid, v)
end
doPlayerRemoveMoney(cid, cost)
doSendMagicEffect(getThingPos(cid), CONST_ME_FIREWORK_BLUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have received all of the blessings!")
doRemoveItem(item.uid)
end
return true
end