• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Configurable Death penalty

Exiled Pain

Fervid Learner
Joined
Jan 8, 2008
Messages
552
Reaction score
4
Well I would like to know if something like this already exist or if not this could be a nice request for those who know there way in C++ codes, or even if it could be possible (don’t know) in a simple .lua file.

Now the thing I’m talking about is DEATH PENALTY.

I would like to put 2 different death penalties that could be configured from an external file, (maybe config.lua or something like that) and that you could choose the death penalty you get when you die from another player, or the second one, when you die from a monster.

This way people could configure a low experience drop when players are killed by other players (lets say 1% death penalty) and loose another rate when killed by monsters (lets say 5%).

So that’s my request anyone could point me out if it exist already something that works this way on a regular PVP world, or if not, anyone that could create this.

Thanks!!!
 
Ok found the last part in the database, suppose I would just have to modify the loss_ default number from 10 to what ever I want??

But didn’t understood well the first part and dint find that file, where can if find it...
I'm using forgottenserver REV 884 and didn’t see in the battle section in config.lua the deathLosePercent = 10 seen in earlier releases. So Im still kind of lost here :p... (WARNING noob coming through) :D

But anyway could you elaborate a little bit more how is possible to differentiate death loss percent of players deaths when dying from monsters and another different death loss % when dying from other players . Thanks!
 
But didn’t understood well the first part and dint find that file, where can if find it...
I'm using forgottenserver REV 884 and didn’t see in the battle section in config.lua the deathLosePercent = 10 seen in earlier releases. So Im still kind of lost here :p... (WARNING noob coming through) :D
In trunk, deathLossPercent was deprecated, and instead of it we use loss_* fields at `players` table, where you can set different percent for lv, skills, items and maglv.
Ok found the last part in the database, suppose I would just have to modify the loss_ default number from 10 to what ever I want??
Yes.
But anyway could you elaborate a little bit more how is possible to differentiate death loss percent of players deaths when dying from monsters and another different death loss % when dying from other players . Thanks!
Told you, use onDeath() creature event.
Code:
local updateLoss = 1
if isPlayer(killer) ~= TRUE then
updateLoss = 5
end

<... queries etc ...>
 
Back
Top