Reset henchman on pc logout

What it does
This will run a check every time a client logs out, and if a henchman has no master, it will return said henchman to a predetermined spot. Helpful for PW situations so your henchmen don't end up in the bottom of dungeons etc. when their master logs off.

How to use
Goes in the OnClientLeave event for the module. You'll need one "block" of code for every henchman, and a "start point" waypoint to send them to when their master leaves. Replace "myhenchman" with the tag of your henchman, and replace "myhechman_startpoint" with the tag of the waypoint you want them to return to.

The Script
void main { object oHench = (GetObjectByTag("myhenchman")); object oHenchstart = (GetObjectByTag ( "myhenchman_startpoint" )); object oMaster = GetMaster(oHench); if (!GetIsObjectValid( oMaster )) {   AssignCommand (oHench, ActionJumpToObject (oHenchstart)); } }