Jeovani
New Member
when using the !bless the character shines and removes the value of the blessing, but when it dies, drop to bag
my ot version TFS 0.3.6
talkactions.xml
bless.lua
Config.lua
plss help me
my ot version TFS 0.3.6
talkactions.xml
<talkaction words="!bless" event="script" value="bless.lua"/>
bless.lua
function onSay(cid, words, param)
local fail = 0
if getPlayerLevel(cid) < 31 then
cost = 2000
else
cost = ((getPlayerLevel(cid) - 30) * 200) + 2000
end
if cost > 20000 then
cost = 20000
end
for i = 1, 5 do
if getPlayerBlessing(cid, i) then
fail = fail + 1
else
if doPlayerRemoveMoney(cid, cost) == TRUE then
doPlayerAddBlessing(cid, i)
if i == 5 and not(fail == 5) then
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_RED)
end
else
doPlayerSendCancel(cid, "You do not have enough money to buy all the blessings!")
break
end
end
end
if fail == 5 then
doPlayerSendCancel(cid, "You already have all the blessings!")
end
return TRUE
end
Config.lua
-- Blessings
blessingsOnlyPremium = "no"
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8
plss help me