natanl2
New Member
- Joined
- May 4, 2012
- Messages
- 28
- Reaction score
- 0
Hello. I'm owner of a Tibia OTserver 8.6, REV 0.4 and I'm having a big problem... The bless rate isn't 100%, sometimes when the player die (even with bless), he drop... Anyone know how to fix it?
Config.lua - Bless rates
Bless.lua - Talkaction
Thanks!
Config.lua - Bless rates
Code:
-- Blessings
blessings = true
blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecrement = 5
eachBlessReduction = 8
Bless.lua - Talkaction
Code:
-- !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, "Voce ja tem bless.")
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])
doSendAnimatedText(getThingPos(cid), "Abencoado", math.random(1, 255))
end
else
doPlayerSendCancel(cid, "Voce precisa de "..new_cost.." gps.")
end
elseif(getPlayerLevel(cid) < maxlevel) then
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
for i = 1, table.maxn(bless) do
doPlayerAddBlessing(cid, bless[i])
end
doSendAnimatedText(getThingPos(cid), "Abencoado", math.random(1, 255))
else
doPlayerSendCancel(cid, "Voce precisa de "..cost.." gps.")
end
end
return FALSE
end
Thanks!