I've been testing this for a couple of hours now and only found 1 bug so far, which will be fixed at the next server save. The bug is causing the level you were downgraded to, to show up on the deathlist and isn't more serious than that.
About the issue in this thread, it is to be
impossible to downgrade from Level 342 to 338 if you are promoted.
These are the variables that I use in the formula which means that you are Level 342 with 100% to go to Level 343.
>>> x = 342.0
>>> exp = 655095100
This is the formula for how much experience you will lose if you are promoted but have no blessings.
>>> 0.7 * ((x + 50) * (50 * (pow(x, 2) - (5 * x) + 8)) / exp) / 100 * exp
15813946.4
655095100 - 15813946 = 639281154
With 639281154 experience, you are at Level 339.
This is the formula for how much experience you will lose if you are promoted and have all 5 regular blessings.
>>> 0.7 * pow(0.92,5) * ((x + 50) * (50 * (pow(x, 2) - (5 * x) + 8)) / exp) / 100 * exp
10422679.881115157
655095100 - 10422679 = 644672421
With 644672421 experience, you are at Level 340.
The formulas are taken from:
Death - TibiaWiki - Quests, Items, Spells, and more, and have been used on both our servers since 15th June 2012.
I have tested this multiple times on our testserver, with the exact same code as LunarForce. If you are 100% sure that you were Level 342, can you tell me around when you advanced to that? If I can confirm it by looking it up in a database backup, then I'll have a deeper look into this, but from what I can tell after all the testing I've done today you weren't above level 341 when you died, which explains that you dropped down to level 338 if you didn't have blessings.
About the bugs you want to report, I'm not sure when I'll be online on LunarForce but if you don't want to report them in the bug reports thread on the forum or to a tutor, then please send me a private message here on the forum or a mail to
[email protected].