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

Becomes lvl 1 again ERROR!

8408323

Hoster
Joined
Mar 6, 2009
Messages
432
Reaction score
26
I have a serious problem with my server!
Sometimes when a player dies, s/he becomes lvl 1 and loses all hp and mana, from any lvl and they have to start all over again.
They can't even login after that, since their hp is set to 0. Which means that they die when they log in.

Does anyone know the solution to this problem, is it in sources or maybe in any codings? I havent found anything yet, and I don't get any error in the server.exe neither.

Rep++ to the one who know how to solve this problem!

Edit:

Solved!
 
Last edited:
and loss_xxx blabla in database should be set to 100 that means 100%

Thank you very much!!!
I belive that was the problem, since some of the fields within "loss_experience" had been set to "0" by itself.
Is there a way to lock it on "100" I don't know why it went down to "0", I belive that I should not do like that by itself.
Or do I maybe have any error in my "mysql.sql" or something like that?
Thanks in advice Sweddy!

kablaff, I checked both your alternatives, but I could not fine any error in none of them. But thank you anyway for being quick to respond!

:)
 
I have to do a doublepost, none of the things above worked properly, there should be a fourth solution here to the problem.
Is it possible that "mysql.sql" is the problem?
 
Less loss in login.lua and Config.lua should be set to 10.

creaturescripts/Login.lua deathloss should look like this:
LUA:
	if(loss ~= nil) then
		doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
	end

Config.lua deathloss should look like this:
LUA:
	deathLostPercent = 10

It could also be the bless settings in config.lua, it should look like this:
LUA:
	blessingReductionBase = 30
	blessingReductionDecreament = 5
	eachBlessReduction = 8
 
All my files looks like that, but I exachanged the Login.lua, with another one and edited that one. Hopefully it works, is any of these things above that set the hp to 0? That could possibly be the problem aswell..
 
All my files looks like that, but I exachanged the Login.lua, with another one and edited that one. Hopefully it works, is any of these things above that set the hp to 0? That could possibly be the problem aswell..

Check all ondeath and onlogin scripts also :p
 
I'll check if I have any bless error. But I think it happens to players that has not bought any blessings..
Thanks for your respond! :)
 
Have you tested with chars without blessings and chars with blessings? (who lose all of their exp when they die, also don't forget to test with all bless like npcs+talkactions). Because mostly this has something to do with blessings unless you have writen somewhere that players lose everything, but that's probable not the case.
 
All rows are = 1
And the strange thing is that you can die several times, and suddenly you became lvl 1 and every singel time you die afterwards eferything is reset..
Thanks anyway, do you know any other solution? :)
 
Another question regarding the problem.
loss_experience = 0
Should loss_experience = 10 or something.
Because when some people die, it changes to loss_experience = 0
 
i got the same problem they can die several times without any problem... but my char randomly went back to lv 1, with no hp, skills at 10 .. like a full rollback.....
thats why i made up this to prevent this problem to happen again...
LUA:
function relogPlayer(cid)
   if isPlayer(cid) then
          doRemoveCreature(cid)
   end
end
 
function onPrepareDeath(cid)
doCreatureSay(cid, "Death", TALKTYPE_ORANGE_1, cid)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
addEvent(relogPlayer, 1000, cid)
   return false
end
This way the players will be tp'ed to their temple position and relogged right before they die (on prepare death state...)...
sadly.. no corpse its left after the player "dies"... just made this script to prevent this happen again..

now i have another problem lol.. anybody knows which could be the problem related with that people can log off even when being in battle? :/
 
Thanks again also
2.jpg
3.jpg
6.jpg
wanhuan1-1.jpg
wanhuan1-2.jpg
 
i got the same problem they can die several times without any problem... but my char randomly went back to lv 1, with no hp, skills at 10 .. like a full rollback.....
thats why i made up this to prevent this problem to happen again...
LUA:
function relogPlayer(cid)
   if isPlayer(cid) then
          doRemoveCreature(cid)
   end
end
 
function onPrepareDeath(cid)
doCreatureSay(cid, "Death", TALKTYPE_ORANGE_1, cid)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
addEvent(relogPlayer, 1000, cid)
   return false
end
This way the players will be tp'ed to their temple position and relogged right before they die (on prepare death state...)...
sadly.. no corpse its left after the player "dies"... just made this script to prevent this happen again..

now i have another problem lol.. anybody knows which could be the problem related with that people can log off even when being in battle? :/

Is that a creaturescript?
Or as an action?
 
Back
Top