local cost = 10101
function onUse(cid, item, fromPosition, itemEx, toPosition)
for i = 1,5 do
if (getPlayerBlessing(cid, i) == true) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
elseif (getPlayerMoney(cid) < cost) then
doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_WHITE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need atleast ".. cost .." gold coins to be blessed.")
else
doPlayerRemoveMoney(cid, cost)
doPlayerAddBlessing(cid, i)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doSendAnimatedText(getCreaturePosition(cid), "Blessed!", TEXTCOLOR_TEAL)
doCreatureSay(cid, "You have been blessed by all five of the gods.", TALKTYPE_ORANGE_1)
end
return doRemoveItem(item.uid)
end
end