• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[C++] Respawn Player on Death

Status
Not open for further replies.

Joey

Emulation Addict
Hey,

is there a Funtion when a player is death in a area?
I want to respawn an player if he is death (killed by world / creatures) in an specific area.
 

Rochet2

Moderator / Eluna Dev
You could try making a script that will resurrect the player killed on these hooks:
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Scripting/ScriptMgr.h#L688L695
So make a PlayerScript

The script might fail if the hooks are called before the player is actually killed.
For that you may either need to then make some core modding or make a timer with 0ms delay with BasicEvent for the player who died and resurrect him when the timed event fires. (fires on next update call)

And just check the areaIDs etc before doing anything ofc.
 

darksoke

OnTop500
that'd be a bad thing for PVP i have added a script for that before and it just broke the PVP .... you might want to teleport the player to a graveyard before resurecting
 
Status
Not open for further replies.
Top