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

Do you remember / can check if any certain packets are sent to the client when the player accepts the death / reconnects?
 
Do you remember / can check if any certain packets are sent to the client when the player accepts the death / reconnects?
I don't remember. I can check when I get home. It's easy to check, however, just std::cout the packet type in ProtocolGame->parsePacket() and watch the console to see if there's any output when you click whichever button in the death window. Just make sure the client hasn't been disconnected from the game server beforehand (I can't remember if TFS does this or not).
 
I don't remember. I can check when I get home. It's easy to check, however, just std::cout the packet type in ProtocolGame->parsePacket() and watch the console to see if there's any output when you click whichever button in the death window. Just make sure the client hasn't been disconnected from the game server beforehand (I can't remember if TFS does this or not).

Yeah but I ment if we are missing some send function to the client from the server.
Would appreciate if you can check it :)
 
I was checking this whole day today.

I managed to get rid of removing the creature and instead teleporting it to temple, but if we do not remove the creature, player can still see what its going on near him, on real Tibia you can see your character in black hp and everything is frozen, just like it happens when player is removed in tfs(but you cant see your character)
 
You want to do everything from here down except for the sendInventoryItem() calls, unless, for example, the player dropped their backpack and you replace it with a bag like real Tibia does.
Thanks, but how do I handle player death, like monsters and people can see the player. My main problem is that I don't know how to make the screen frozen like when player is removed, because if I could, I can just teleport the player to temple and unfreeze screen in temple.

Btw. TFS is not disconnecting removed player, you have to logout.
 
Last edited:
Still struggling with this, I cannot find way to make player screen freeze and be invisible to other players and monsters :/
Invisiblity can be solved by just teleporting the player to temple, but I don't know how to make screen freeze :(
 
Back
Top Bottom