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

Death System Tibia Real

yoiker

Member
Joined
Jan 21, 2012
Messages
194
Solutions
1
Reaction score
9
Could someone have been able to do this that can help me in doing it as it is in real tibia? I saw that a user of this same forum "WibbenZ" rewrote about this in the tfs of github but it was not a PR so I do not know if by chance he have it or not

- Instead of fully kicking the client, we should teleport the player to temple - that way the player can still read what the server log etc said before death.

- You get information about your death before the "You are dead" window is sent.

Code:
You are dead.
You were killed by X and X and X.
You were blessed with X.
You are still blessed with X.
You died during PvP.
The death penalty has been reduced by 80% because it was an unfair fight.
You lost X experience and 0.22% of all your skills.
You did not wear an Amulet of Loss.
You did not lose any items.

Be it help or opinions will be accepted, thanks for watching the post!
 
Well I started but never finished, had problems finding a way to not kick the player but still run all of the death code.
But it would be a nice thing to add :)
 
Well I started but never finished, had problems finding a way to not kick the player but still run all of the death code.
But it would be a nice thing to add :)
I think the same thing as you, the thing is that in this case I have no idea how to do it for what you said starts in player.cpp but I do not know how much there is to move and I do not think I do
 
I think the same thing as you, the thing is that in this case I have no idea how to do it for what you said starts in player.cpp but I do not know how much there is to move and I do not think I do

I don't think anything there is wrong, how ever here: https://github.com/otland/forgottenserver/blob/master/src/protocolgame.cpp#L397-L407
When a player accepts the death window that code is executed and what we do is disconnect the player insted of sending something to add the creature again.
 
No, when you accept the death nothing will happen or the client is gonna crash.

https://github.com/otland/forgottenserver/blob/master/src/protocolgame.cpp#L400
When you accept it sends 0x0F, thats when we send disconnect().
And that is what we need to change, we need a way to tell the client that we wanna reconnect the player aswell as telling the server that we wanna reconnect.
I see something complicated since it is something new this for me to edit the death but if I understand your point and I appreciate your time to clarify those things :D.
 
I see something complicated since it is something new this for me to edit the death but if I understand your point and I appreciate your time to clarify those things :D.

Ye well it might be super easy or super hard haha
You need to check what we send when you first enter the game, then remove things the client already knows, you might be able to use OTClient for that.
Then remove those from ex ProtocolGame::sendAddCreature(...).

An easier way would be to ex use OTClient to see what packages Tibia sends to the client when you accept the death window, then see what functions they are in TFS and then send them insted of disconnect().

:p
 
Ye well it might be super easy or super hard haha
You need to check what we send when you first enter the game, then remove things the client already knows, you might be able to use OTClient for that.
Then remove those from ex ProtocolGame::sendAddCreature(...).

An easier way would be to ex use OTClient to see what packages Tibia sends to the client when you accept the death window, then see what functions they are in TFS and then send them insted of disconnect().

:p
Well, thanks and as you leave disconnect() can there be one that is also used to reconnect the character at the time of death? I think I'm understanding you better
 
Well, thanks and as you leave disconnect() can there be one that is also used to reconnect the character at the time of death? I think I'm understanding you better

Well that is what we need to try and find, right now it just disconnects (as it did in older Tibia versions)... But today they just reconnect so we have to use mix of addCreature etc
But it all depends on what the client keeps after we die and it sends the "im dead" byte, it might keep everything and that we just need to get TFS to understand that the creature just got teleported or we have to send certain things to the client (ex vip list, light, position etc)
 
Well that is what we need to try and find, right now it just disconnects (as it did in older Tibia versions)... But today they just reconnect so we have to use mix of addCreature etc
But it all depends on what the client keeps after we die and it sends the "im dead" byte, it might keep everything and that we just need to get TFS to understand that the creature just got teleported or we have to send certain things to the client (ex vip list, light, position etc)
Thank you for all these informations you wrote here, they are really helpful.
I'm trying to get this to work, and I noticed few things, player is getting removed when you dead, it does not happen on real tibia, looks like real tibia is just teleporting the player and removing his experience as you said.

Difference is as follows, in tfs we can see our corpse lying on the ground, on real tibia we can still see our character. In tfs backpacks are not closed when dead, on real tibia they are.

Also looks like Tibia is teleporting the player in moment of death, because you can see the icon from protection zone, so the character is in protection zone, but you cant see it yet.

IMO Client keeps all informations, the one that needs to be updated are battle list and player position.

I can be wrong too :p

You can see it here:
 
Thank you for all these informations you wrote here, they are really helpful.
I'm trying to get this to work, and I noticed few things, player is getting removed when you dead, it does not happen on real tibia, looks like real tibia is just teleporting the player and removing his experience as you said.

Difference is as follows, in tfs we can see our corpse lying on the ground, on real tibia we can still see our character. In tfs backpacks are not closed when dead, on real tibia they are.

Also looks like Tibia is teleporting the player in moment of death, because you can see the icon from protection zone, so the character is in protection zone, but you cant see it yet.

IMO Client keeps all informations, the one that needs to be updated are battle list and player position.

I can be wrong too :p

You can see it here:

Yeah I have tried most of the functions, best thing to do is to trace the packets sent from Tibia when you die (hopefully ppl know to use a noob char xD)
Then check the flash client protocol to see if we are missing some function or just write a new one that sends those packets.

It would be great to have and one of the things I really like with playing RL, guess I gave up abit to early :p
 
Yeah I have tried most of the functions, best thing to do is to trace the packets sent from Tibia when you die (hopefully ppl know to use a noob char xD)
Then check the flash client protocol to see if we are missing some function or just write a new one that sends those packets.

It would be great to have and one of the things I really like with playing RL, guess I gave up abit to early :p
I was trying yesterday to check how all this works and in tfs the screen gets frozen, when te character is removed from the map.
Creature::removeCreature()
But if its removed that doesnt mean that player is disconnected right?

I tried to not remove player, but then he is just dying in infinite loop because monsters can see.

I don't know how to add removed creature again, thats main problem or is it even possible?

Because I tried with g_game.placeCreature() from protocolgame::login but It fails.

I'm really bad in c++, thus I have no idea how is the connection between client and server working.
Player is connecting to character list and then when he is choosing character, login function is executing?

Login function is adding the creature to map, but finally connect function is sending it "sendAddCreature".

I tried to sendAddCreature, when removed but all you can see is your dead body and the monsters that killed you, and that your positiom changed, but you cant see it, you are frozen in the time of death. Its like you are in temple, but your character is still removed.
 
I was trying yesterday to check how all this works and in tfs the screen gets frozen, when te character is removed from the map.
Creature::removeCreature()
But if its removed that doesnt mean that player is disconnected right?

I tried to not remove player, but then he is just dying in infinite loop because monsters can see.

I don't know how to add removed creature again, thats main problem or is it even possible?

Because I tried with g_game.placeCreature() from protocolgame::login but It fails.

I'm really bad in c++, thus I have no idea how is the connection between client and server working.
Player is connecting to character list and then when he is choosing character, login function is executing?

Login function is adding the creature to map, but finally connect function is sending it "sendAddCreature".

I tried to sendAddCreature, when removed but all you can see is your dead body and the monsters that killed you, and that your positiom changed, but you cant see it, you are frozen in the time of death. Its like you are in temple, but your character is still removed.

I think we are disconnecting the player when we remove it.

Well it should be posible, I went through all the login functions to see what is sent etc, tried to modify AddCreature etc and a bunch of other things but didn't find anything that worked.
Best would be to trace the packets and then write a function that sends those packets, because either it's that we remove the player from the game when we disconnect and have to write a new "remove" function for when the player dies or that we are missing some packets that Cip is sending when the player dies and dosn't want to exit(by clicking the exit button when you die~)

Most likely because we remove the creature, but im not 100%

Didn't the OX server have this?
Maybe @Jo3Bingham has something that can guide us in the right direction?
 
If you are talking about the trash malucoo server then not, they added login function to execute thinking it would work.
But it is really crashing the server.

I would track the packets, I don't know how to do it XD
 
If you are talking about the trash malucoo server then not, they added login function to execute thinking it would work.
But it is really crashing the server.

I would track the packets, I don't know how to do it XD

No not sure what that server is, im talking about the RL map that was advertised here on OTLand, with flash client etc etc

Google packet sniffer, I think there is a map editor / tracker that should work, but then you would have to update it to the latest protocol.
 
Well I tried something and all I can do is sniff packet like:

Code:
0C 00 83 01 00 00 6A 92 74 DD BC 89 F2 94

I have no idea how to get byte out of this.
Btw. this is "move north" packet.
 
Last edited:
@WibbenZ, you are correct. I implemented this in the OX server. I can't remember the exact specifics, but, from what I remember, when a player dies its connection to the game server is dropped, and the player object is removed from the game. Obviously, you want to not do either of these. Sorry I can't be of more help, I'm on mobile and not home at the moment.
 
Back
Top