Buddex
New Member
I did search on forum and tested about 10 bless scripts. I have found only 1 which works for me here: http://otland.net/threads/bless-makes-people-level-1-when-they-die.204778/ But.. I have only one little problem when I buy !bless once, i am blessed all time in game, its like forever bless. How to change when I die then I need to buy again !bless. PEaCe!
My bless.lua (talkaction)
local config = {
blessStorage = 12345, -- The storage value you will use to store a players blessings
blessCost = 50000 -- The price of blessings
}
function onSay(cid, words, param)
if(getCreatureStorage(cid, config.blessStorage) <= 0) then
if(doPlayerRemoveMoney(cid, config.blessCost)) then
doCreatureSetStorage(cid, config.blessStorage, 1)
doCreatureSay(cid, "You are now blessed by the Five Gods!", 19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You need ".. config.blessCost .."gp to buy blessings.")
end
else
doPlayerSendCancel(cid, "You are already blessed.")
end
return true
end
My bless.lua (talkaction)
local config = {
blessStorage = 12345, -- The storage value you will use to store a players blessings
blessCost = 50000 -- The price of blessings
}
function onSay(cid, words, param)
if(getCreatureStorage(cid, config.blessStorage) <= 0) then
if(doPlayerRemoveMoney(cid, config.blessCost)) then
doCreatureSetStorage(cid, config.blessStorage, 1)
doCreatureSay(cid, "You are now blessed by the Five Gods!", 19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You need ".. config.blessCost .."gp to buy blessings.")
end
else
doPlayerSendCancel(cid, "You are already blessed.")
end
return true
end