Extrom
New Member
- Joined
- Aug 10, 2008
- Messages
- 39
- Reaction score
- 0
Whenever I die with blessings, I lose exp, skills etc, basically everything except my backpack so something's gotta be wrong here.
--My config.lua
--My blessing script
I do not believe the fault lies in the talkaction script, I've tried a few others and the problem remains.
All help is appreciated!
--My config.lua
Lua:
-- Blessings
blessings = true
blessingOnlyPremium = true
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 10
deathLostPercent = 10
--My blessing script
Lua:
-- !blessing by artofwork
local bless = {1, 2, 3, 4, 5}
local cost = 50000
local maxlevel = 50000
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
local new_cost = (lvl * cost) / 500
local target = getPlayerGUID(cid)
for i = 1, table.maxn(bless) do
if(getPlayerBlessing(cid, bless[i])) then
doPlayerSendCancel(cid, "You have already have been blessed.")
return TRUE
end
end
if (getPlayerLevel(cid) >= maxlevel) then
if(doPlayerRemoveMoney(cid, new_cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
doPlayerSendTextMessage(cid,22,"You have been successfully blessed.!")
end
else
doPlayerPopupFYI(cid, "You need "..new_cost.." to buy blessings.")
end
elseif(getPlayerLevel(cid) < maxlevel) then
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doPlayerPopupFYI(cid, "You have successfully been blessed.")
else
doPlayerPopupFYI(cid, "You need to have "..cost.."gp to buy blessings.")
end
end
return FALSE
end
I do not believe the fault lies in the talkaction script, I've tried a few others and the problem remains.
All help is appreciated!
Last edited by a moderator: