//-----------------------------------------------------------------------------
//Gong sound
IfCleanedUp
  tmpargument = 2
  PlayFullSound

//------------------------------------------------------------------------------
//Scream and shout
IfUsed
  tmpargument = 10
  PlaySound

//------------------------------------------------------------------------------
//Handle being bored by cheering or sneezing
IfBored
  tmpargument = 6
  SendMessageNear
  tmpargument = rand & 1 + 8
  PlaySound
  tmpargument = ACTIONMC
  DoAction

//------------------------------------------------------------------------------
//Handle death by sending a message and other stuff
IfKilled
  tmpargument = 6
  PlaySound
  tmpargument = 3
  IfArmorIs
    tmpargument = MESSAGECOSTUME
  Else
    tmpargument = MESSAGEDEATH
  IfTargetIsOnSameTeam
    tmpargument = MESSAGEFRAG
    IfTargetIsSelf
      tmpargument = MESSAGEACCIDENT
  SendMessage

  // Drop goodies
  tmpargument = 1+selflevel*selflevel*100
  DropMoney
  DropKeys

  // Make the character body
  tmpargument = 45
  SetBumpHeight

//------------------------------------------------------------------------------
//For helper AIs
IfLeaderKilled
  BecomeLeader

//------------------------------------------------------------------------------
//Handle being attacked by blocking or countering or running away
IfAttacked
  // Pick either 0 or 7, Parry or Combat
  SetTargetToWhoeverAttacked
  IfTargetIsOnSameTeam
    tmpargument = 3
    PlaySound
    tmpargument = MESSAGEOUCH
    SendMessageNear
  Else
    tmpargument = rand & 1 + 4
    PlaySound

//------------------------------------------------------------------------------
//Handle having too much in inventory
IfTooMuchBaggage
  tmpargument = 1
  SendMessageNear
  tmpargument = 7
  PlaySound
  tmpargument = 50
  SetReloadTime

//------------------------------------------------------------------------------
End
//------------------------------------------------------------------------------
