Rickolajten
Member
- Joined
- Jul 21, 2008
- Messages
- 175
- Reaction score
- 16
I did search and found some threads, tried everything and nothing worked.. so i'm curious what could be the cause of this.
I have tried setting all _loss in my database to 100, trying different scripts etc.. experimenting in my config, nothing works.
Everytime someone writes !bless and gets the bless, then goes and die he go from lvl 200 to 1, or 400 to 1.. level doesnt matter.
Using TFS 0.3.6
bless.lua
from talkactions.xml
from config
from creaturescripts.xml
I have tried setting all _loss in my database to 100, trying different scripts etc.. experimenting in my config, nothing works.
Everytime someone writes !bless and gets the bless, then goes and die he go from lvl 200 to 1, or 400 to 1.. level doesnt matter.
Using TFS 0.3.6
bless.lua
Code:
local bless = {1, 2, 3, 4, 5}
local cost = 50000
function onSay(cid, words, param)
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, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doCreatureSay(cid, "You are now blessed by the Five Gods!" ,19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "You don\'t have enough money.")
end
return TRUE
end
from talkactions.xml
Code:
<talkaction words="!bless" script="bless.lua"/>
from config
Code:
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8
from creaturescripts.xml
Code:
function onLogin(cid)
local loss = getConfigValue('deathLostPercent')
if(loss ~= nil) then
doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
Last edited: