• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Help] Player lose 3 lv if death by monster

patrick_cvs

New Member
Joined
Apr 21, 2020
Messages
12
Reaction score
0
Hi guys, I'm making a test server, but I found a problem and I can't fix it. The player lost 3 levels every time he dies to monsters .
I've tried to use these two options: On config.lua

1588032654665.png

10 and -1, both the player keeps losing 3 levels

server I'm using as a base:

if you can help me I will be very grateful
 
Do they use blessings ?

Yes,
i sed this script for bless.
look please.

local config = {
bless = 5,
cost = 50000
}

function onSay(cid, words, param)

if getPlayerBlessing(cid, 5) then
doPlayerSendCancel(cid, "Voce ja tem todas as bless.")
return false
end

if dplayer:removeMoney(cid, config.cost) then
for i = 1, bless do doPlayerAddBlessing(cid, i) end
doCreatureSay(cid, "You have been blessed by all of eight gods!", 19)
doSendMagicEffect(getPlayerPosition(cid), 49)
else
doPlayerSendCancel(cid, "Você não tem dinheiro suficiente.")
return false
end
end
 
Like @Lessaire said did you try 0 and if it dosen`t work then you have to edit source probably, But you can go to /data/lib/core find player.lua there should be

LUA:
function Player.getLossPercent(self)
    local blessings = 0
    local lossPercent = {
        [0] = 100,
        [1] = 70,
        [2] = 45,
        [3] = 25,
        [4] = 10,
        [5] = 0
    }
 
Like @Lessaire said did you try 0 and if it dosen`t work then you have to edit source probably, But you can go to /data/lib/core find player.lua there should be

LUA:
function Player.getLossPercent(self)
    local blessings = 0
    local lossPercent = {
        [0] = 100,
        [1] = 70,
        [2] = 45,
        [3] = 25,
        [4] = 10,
        [5] = 0
    }

I'm pretty sure this is only used to loot drop by creaturescripts droploot.lua.

Player experience loss on death is handled here:

and lossPercent for everything other than loot drop is calculated here:
 
I'm pretty sure this is only used to loot drop by creaturescripts droploot.lua.

Player experience loss on death is handled here:

and lossPercent for everything other than loot drop is calculated here:



Is there any way I can change it and let it lose only 40% of the level regardless of the level?
 
Back
Top