// v2.1.0 - Added the new died var. for the convo file.
// v2.0.0 -
//::////////////////////////////////////////////////////////////////////////////
//:: FileName:  hark_d_opt_rese2
//::////////////////////////////////////////////////////////////////////////////
/*
   This will reset the caller to a just spawned in condition. The caller will
  retain their current level, equipment and location however.
*/
//::////////////////////////////////////////////////////////////////////////////
#include "hark_i0_henshout"
//::////////////////////////////////////////////////////////////////////////////
void main()
{
  // Clear the master object.
  SetRealMaster(OBJECT_INVALID);

  // Clear the Death and Dying variables.
  SetDidDie(OBJECT_SELF, FALSE);
  SetMasterDied(OBJECT_SELF, FALSE);
  SetAssociateState(NW_ASC_MODE_DYING, FALSE);
  SPS(OBJECT_SELF, PWS_PLAYER_STATE_ALIVE);

  // Reset the respawn location.
  SetRespawnLocationSpecific(OBJECT_SELF, GetAssociateStartLocation());

  // Reset State to the spawn in conditions.
  SetFollowDistance(HS_FOLLOW_CLOSE);
  SetAssociateState(NW_ASC_IS_BUSY, FALSE);
  SetAssociateState(NW_ASC_RETRY_OPEN_LOCKS, TRUE);
  SetAssociateState(NW_ASC_MODE_DEFEND_MASTER, FALSE);
  SetAssociateState(NW_ASC_USE_RANGED_WEAPON, FALSE);
  SetAssociateState(NW_ASC_HEAL_AT_50, TRUE);
  SetAssociateState(NW_ASC_HEAL_OTH_AT_50, TRUE);
  SetAssociateState(NW_ASC_HEAL_SLF_AT_50, TRUE);
  SetAssociateState(NW_ASC_HEAL_OTH, TRUE);
  SetAssociateState(NW_ASC_HEAL_HEN, TRUE);
  SetAssociateState(NW_ASC_HEAL_FAM, FALSE);
  SetAssociateState(NW_ASC_HEAL_ANI, FALSE);

  // Clear weapon state and re-equip.
  ExecuteScript(sReEquipScript, OBJECT_SELF);
}
//::////////////////////////////////////////////////////////////////////////////
