Abbeh
New Member
Good evening,
Is there anyone that has a working "!promotion" and a working "!bless" talkaction script?
This code makes "!aol" works, but not "!bless"..
Is there anyone that has a working "!promotion" and a working "!bless" talkaction script?
Code:
local aol_otswe = {
cost = 10000,
buy_text = "You have bought an Amulet of Loss! You are now protected against item loss as long as you wear it.",
cancel_text = "Sorry but you can't afford an Amulet of Loss.",
effect = 49
}
local bless_otswe = {
cost = 15000,
cancel_text = "Sorry, but you have already been blessed by the gods!",
buy_text = "You have been blessed by the gods!",
effect = CONST_ME_HOLYDAMAGE,
cancel_text_onbuy = "Sorry, but you can't afford the blessings!"
}
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
This code makes "!aol" works, but not "!bless"..
Last edited: