This code provides a way to make players invulnerable for a short time upon resurrection so they will not be killed immediately after. It also allows one or more skills to be disabled while players are invulnerable so they wont exploit their temporary safe status, restores all stats and removes the deathrobe. It provides commands for self resurrection as well as pet resurrection and stones for both. The commands may individually be enalbed or disabled. An option allows for random selected messages from a message list to be broadcast upon player death, the message can include information about the incident (victim, killer, and number of deaths for the victim today). the messages are completely free form and configurable.
It consists of three parts: a set of C# class files that is added to your custom folder, an xml configuration file, and a few lines of code that must be inserted into your PlayerMobile.cs.
The following changes must be made to your PlayerMobile.cs to support the Safe Res Feature. Its really only four lines of code to be added and four commented out but I have included the surrounding lines to make it easy to find exactly where to insert the new lines. Each modified line includes a comment so that the modifications are easy to identify and remove if need be.
1 - Find this line:
private DesignContext m_DesignContext;and change to this:
private DesignContext m_DesignContext;2 - Find this block:
if (this.Alive && !wasAlive )and change to this:
3 - Find this method:
and change to this:
No code need be changed to configure the system. Instead, the system is configured by modifying SafeResConfig.xml. This file must be placed in your RunUO/Data folder to take effect.
Requires the Xanthos Utilities package.
You may use or modify this system in any way you desire, however I ask that you leave the original headers in the source files if you re-write or redistribute the sources in any way.
- Xan