local aol_otswe = {
cost = 10000,
buy_text = "You have bought amulet of loss! if you wear it, you will not lose any kind of items expect if you are red skull.",
cancel_text = "Sorry but you dont have afford to buy amulet of loss!",
effect = 49
}
local bless_otswe = {
cost = 50000,
cancel_text = "Sorry, but you are already blessed by the gods!",
buy_text = "You have been blessed by the gods!",
effect = CONST_ME_HOLYDAMAGE,
cancel_text_onbuy = "Sorry, but you dont have afford to buy bless!"
}
function onSay(cid, words, param)
if words == "!aol" then
if doPlayerRemoveMoney(cid, aol_otswe.cost) == TRUE then
doPlayerAddItem(cid,2173,1)
doSendMagicEffect(getPlayerPosition(cid), aol_otswe.effect)
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, aol_otswe.buy_text)
else
doPlayerSendCancel(cid, aol_otswe.cancel_text)
end
return true
end
end
if words == "!bless" then
if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid,bless_otswe.cancel_text)
else
if doPlayerRemoveMoney(cid, bless_otswe.cost) == TRUE then
doPlayerAddBlessing(cid, 1)
doPlayerAddBlessing(cid, 2)
doPlayerAddBlessing(cid, 3)
doPlayerAddBlessing(cid, 4)
doPlayerAddBlessing(cid, 5)
doSendMagicEffect(getPlayerPosition(cid), bless_otswe.effect)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,bless_otswe.buy_text)
else
doPlayerSendCancel(cid, "bless_otswe.cancel_text_onbuy")
end
end
return true
end