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

Windows Two quick questions about client bugs and health bug

Niioxce

Otland lurker
Joined
Jun 22, 2012
Messages
324
Reaction score
4
Location
Sweden
Okay, so i have a few bugs on my server and im almost ripping my hair off. So i have a few questions for you guys to answer :)

First question: When im getting up to about level 100k - 1200k the client start to act really wierd, for example i do so much damage when i crit that i actually heal the target like ALOT Around 5-500M, is there a fix for this? Any experienced users here who knows what the problem is?

Second question: When one of my players "me" dies he respawn with 0 health and get's demoted to level 1 and just keeps dying in spawn over and over again. ("Might it be the bless?")

I get no error in the console when something like this happends.

There is probably alot more bugs that i did not cover but these are the main bugs i want to fix.

TFS 0.4 0.3.6
 
1rst. I think theres some kind of max level, after that the server cant handle some informations, idk.
2nd. This happens with all character or just the promoted ones?
The deathLostPercent =10 (config.lua) must be equal to doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss *10)(login.lua -> creaturescripts). Check it or it may be your vocations.xml too.
 
1rst. I think theres some kind of max level, after that the server cant handle some informations, idk.
2nd. This happens with all character or just the promoted ones?
The deathLostPercent =10 (config.lua) must be equal to doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss *10)(login.lua -> creaturescripts). Check it or it may be your vocations.xml too.
Yea, the first one im not quite sure too :/ i've edited the max level, but i could just turn crits off..

2nd. This happens with all character or just the promoted ones?
The deathLostPercent =10 (config.lua) must be equal to doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss *10)(login.lua -> creaturescripts). Check it or it may be your vocations.xml too.
Oh, i gave my players flags so they could login anytime, i just did that to bypass mc so i could test the pve :p
Thanks bud,
Still curious about the first question tho.
 
Glad to know that i coul help at least with one question.

About the first one, have you edited the sources or just lua changes?
 
I think so. The sources werent coded to handle such huge levels... Thats the only cause i can figure out :(

Ps. I think theres some kind of edition to increase the max level inside the sources, try to find it

PS2: https://otland.net/threads/c-how-to-increase-maximum-level-on-server.230364/
I've already done that and it works to pretty much level up to infinity.. :p I changed the formula to
Code:
static uint64_t getExpForLevel(uint32_t lv)
{
static std::map<uint32_t, uint64_t> cache;
lv--;

std::map<uint32_t, uint64_t>::iterator it = cache.find(lv);
if(it != cache.end())
return it->second;

uint64_t exp = ((150ULL * lv * lv) - (50ULL * lv * lv) + (1200ULL)) / 3ULL;
cache[lv] = exp;
return exp;
}
 
first i would think about disabling it... but its the easy way..
check this post, see if it helps, i will keep on researching
https://otland.net/threads/tfs-1-0-critical-hit-permanent.212908/
I'll try that now :p
Btw here is an image that exactly shows you what it does.
http://prntscr.com/6j9o5n

Edit: Bigger image!
http://prntscr.com/6j9p5e

PS: I noticed that sometimes it does heal for Millions and sometimes it deal it's proper damage which is 10 because the rotworms hp is 10 :p
 
Im looking at the sources, trying to understand how the critical hit system works. I think, as level, it has some max hit to calculate too. You could try to disable it and script a new system.
 
Im looking at the sources, trying to understand how the critical hit system works. I think, as level, it has some max hit to calculate too. You could try to disable it and script a new system.
Or just remove the critical system completly, it would be pretty overkill to have that on an highexp server :p

But, i'm glad that you took your time to help me with this annoying shit buddy!
So here take my follow!
 
the thing is the max range of an int32_t (which combat is in sources) is –2,147,483,648, if your damage excels that number then it'll bug out and give you a random positive number
 
Back
Top