Saints Anathema
Old School Doleran
Tested and Working for 0.2.4
Credits go to Kio a player from my server, we upgraded and this isnt working for 0.4 so i thought id release it anyways ive never seen a variation of it like this on here so maybe someone can learn something from it
not doing this for rep, i didnt make it, im just sharing it
and then ofcourse
Credits go to Kio a player from my server, we upgraded and this isnt working for 0.4 so i thought id release it anyways ive never seen a variation of it like this on here so maybe someone can learn something from it
not doing this for rep, i didnt make it, im just sharing it
Code:
function onSay(cid, words, param)
-- variables
local bless = {1, 2, 3, 4, 5}
local level = getPlayerLevel(cid)
local cost = 5000 -- Cost in gp.function onSay(cid, words, param)
local totalCost = level * cost
-- script
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You have already all blessings.")
return TRUE
end
end
if(doPlayerRemoveMoney(cid, totalCost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerSendCancel(cid, "You bought all blessing.")
else
doPlayerSendCancel(cid, "You don/'t have enough money.")
end
return TRUE
end
and then ofcourse
Code:
<talkaction words="!bless" script="bless.lua"/>