// v2.0.0 -
//::////////////////////////////////////////////////////////////////////////////
//:: FileName:  hark_o0_go_home
//::////////////////////////////////////////////////////////////////////////////
/*
   This script should be called after the henchman is fired or they quit. They
  will attempt to go to the home waypoint, falling back to the respawn location
  and start location on error.
*/
//::////////////////////////////////////////////////////////////////////////////
#include "hark_i0_henlvl"
//::////////////////////////////////////////////////////////////////////////////
void main()
{
  Debug(DEBUG_43);
  location lWay1 = GetRespawnLocation();
  location lWay2 = GetLocation(GetObjectByTag(HS_HOME_OBJ + GetTag(OBJECT_SELF)));
  location lWay3 = GetAssociateStartLocation();
  if (GetIsObjectValid(GetAreaFromLocation(lWay1)))
    { DelayCommand(0.4, TravelToLocation(lWay1)); }
  else if (GetIsObjectValid(GetAreaFromLocation(lWay2)))
    { DelayCommand(0.4, TravelToLocation(lWay2)); }
  else if (GetIsObjectValid(GetAreaFromLocation(lWay3)))
    { DelayCommand(0.4, TravelToLocation(lWay3)); }
}
//::////////////////////////////////////////////////////////////////////////////
