Hello,
I got bored so i going to release a script which i made 5-8min ago, i didnt test it but i hope it works.
Since, i was lazy to fix. Thanks to Limos which corrected the errors.
Talkactions.xml
Then make a lua file in talkactions/scripts and name it "ab"
Enjoy!
I got bored so i going to release a script which i made 5-8min ago, i didnt test it but i hope it works.
Since, i was lazy to fix. Thanks to Limos which corrected the errors.
Talkactions.xml
Code:
<talkaction words="!aol" case-sensitive="no" event="script" value="ab.lua"/>
<talkaction words="!bless" case-sensitive="no" event="script" value="ab.lua"/>
Then make a lua file in talkactions/scripts and name it "ab"
Lua:
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
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
return doPlayerSendCancel(cid,bless_otswe.cancel_text)
end
end
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
return true
end
Enjoy!
Last edited: