function AISMN_BecomeDrunk::OnEnter(%this, %cmpAI)
{
   echo("MH_Stage Drunk\n");
   %object  = GetThisObject(%cmpAI);
   %object.mountImage("bottle", 2);
   %object.setAi("com_drunk");
   StopMoving(%cmpAI);
   SetSpeedScalar(%cmpAI, 0.3);
   slgUnemployObject(%object);
   
   %cmpChar = slgQueryInterface(%object, $CID_CHARACTER);
   if(%cmpChar.isCollecting()) {
      %cmpChar.stopCollecting();
   }
   
   // Restore any lost happiness from lack of home and job
   RestoreLostHappinessFromHome(%cmpAI);
   RestoreLostHappinessFromJob(%cmpAI);
   UpdateUnhappinessIcon(%object);
   
   // Set drunk state and happiness
   LoseHappinessFromDrunk(%cmpAI);
   
   %client = ClientGroup.getObject(0);
   %ghostID = %client.getGhostId(%object);
   commandToClient(%client, 'RemoveFromGroupSelection', %ghostID);
   
   // Play drunk sound
   svrPlaySFXSound(audio_gotdrunk, %client);
   return;
}

function AISMN_BecomeDrunk::OnExit(%this,%obj)
{
   return;
}

function AISMN_BecomeDrunk::Update(%this,%obj)
{   
   ReturnValue(%obj,0);
   return;
}
