• 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!

TFS 0.X Exp Loss on Death

potinho

Advanced OT User
Joined
Oct 11, 2009
Messages
1,403
Solutions
17
Reaction score
151
Location
Brazil
Hello everyone, everything good?

I'm facing a problem on my server. I want to reduce the EXP loss penalty when a player dies, but whatever field I change, it goes back to level 1 when it dies. I only changed config.lua and died without bless, it lost little, but when I put bless it returned level 1. If I change config.lua and login.lua, it returns level 1 in both scenarios. How do I reduce the EXP loss penalty?

Lua:
deathLostPercent = 10

Lua:
  local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end
 
Hello everyone, everything good?

I'm facing a problem on my server. I want to reduce the EXP loss penalty when a player dies, but whatever field I change, it goes back to level 1 when it dies. I only changed config.lua and died without bless, it lost little, but when I put bless it returned level 1. If I change config.lua and login.lua, it returns level 1 in both scenarios. How do I reduce the EXP loss penalty?

Lua:
deathLostPercent = 10

Lua:
  local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end

And if u have set deathLostPercent = 10 and u multiple it by 10 then u have -100%, so you remove full exp from player :p

deathLostPercent = 10 >> (-10%)
You result is >> EXP * (-10% * 10) = 0
 

And if u have set deathLostPercent = 10 and u multiple it by 10 then u have -100%, so you remove full exp from player :p

deathLostPercent = 10 >> (-10%)
You result is >> EXP * (-10% * 10) = 0
which the correct way do downsize exp loss? i want to put 7 or 5%
 
which the correct way do downsize exp loss? i want to put 7 or 5%
Lua:
  local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss)
    end
Lua:
deathLostPercent = 7
This way?
Remember blessing and promotions reduce drop value too.

Prepare player to test who have earned 100 exp. Then kill him and check how many % drop (simple 100=100%) So you can easy fix everything.
Preparing environment for test is the key.
 
deathLosePercent = -1
Olá a todos, tudo bem?

Estou enfrentando um problema no meu servidor. Eu quero reduzir a penalidade de perda de EXP quando um jogador morre, mas qualquer que seja o campo que eu mude, ele volta ao nível 1 quando morre. Só mudei config.lua e morri sem bless, perdeu pouco, mas quando coloco bless ele retornou nível 1. Se eu mudar config.lua e login.lua, ele retorna nível 1 nos dois cenários. Como reduzo a penalidade de perda de EXP?

Lua:
deathLostPercent = 10

Lua:
 perda local = getConfigValue('deathLostPercent')
    if(perda ~= nil) então
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, perda * 10)
    fim
 
Lua:
  local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss)
    end
Lua:
deathLostPercent = 7
This way?
Remember blessing and promotions reduce drop value too.

Prepare player to test who have earned 100 exp. Then kill him and check how many % drop (simple 100=100%) So you can easy fix everything.
Preparing environment for test is the key.
tried this way, but when die with bless, player turn level 1
Post automatically merged:

deathLosePercent = -1
where?
 
this number -1 is the compiler's default, so it calculates on a level basis. then you edit only in the script if it doesn't work you have to edit in the project.
 
tried this way, but when die with bless, player turn level 1
Post automatically merged:


where?
Read thread that i paste before... U cant go to under zero with blessings. How much one bless reduce? What is you setup.
deathLostPercent = 10 change to deathLostPercent = 20 and test it on player with 100 exp, how many exp points drop. Then you will know everything, where to search and how to setup values...
 
Back
Top