Emerald has public functions you can call to make it easier to make custom scripts.
Returning an animal to its starting position Edit
Emerald automatically handles this when an animal is exhausted or cooling down, but if you need to call it from a custom script, you simply do the below after you have gotten a reference of Emerald.
Applying damage to an animal Edit
If you would like to apply damage to an animal from an external script, you can do the following. The variable "damage" is the amount of damage you'd like to be dealt to the animal. This can also be used for ranged damage. Be sure to have a reference of Emerald when you do this.