//-----------------------------------------------------------------------------
// ZZ> Yell at the player
IfTooMuchBaggage
  tmpdistance = rand & 2047 + 10000
  tmpargument = 12
  PlaySound
  tmpargument = 11
  SendMessageNear
  tmpargument = 100
  SetReloadTime


//-----------------------------------------------------------------------------
// ZZ> Gong sound
IfCleanedUp
  tmpargument = 11
  tmpdistance = 8000
  PlayFullSound


//------------------------------------------------------------------------------
// ZZ> Handle healing factor
IfTimeOut
  tmpargument = 3
  IfArmorIs
    tmpargument = [CLAW]
    IfHoldingItemID
      tmpargument = 256
      HealSelf
  tmpargument = 200
  SetTime


//------------------------------------------------------------------------------
// ZZ> Scream and shout
IfUsed
  tmpdistance = rand & 2047 + 10000
  tmpargument = tmpdistance & 1 + 9
  PlaySound


//------------------------------------------------------------------------------
// ZZ> Handle being bored by cheering or sneezing
IfBored
  tmpx = rand & 1
  tmpy = 0
  IfXIsEqualToY
    tmpargument = 10
    SendMessageNear
    tmpargument = 8
    tmpdistance = rand & 2047 + 10000
    PlaySound
  Else
    tmpargument = 9
    SendMessageNear
    tmpargument = 2
    tmpdistance = rand & 2047 + 10000
    PlaySound
    tmpargument = ACTIONDB
    DoAction


//------------------------------------------------------------------------------
// ZZ> Handle death by sending a message and other stuff
IfKilled
  tmpargument = 4
  tmpdistance = rand & 2047 + 10000
  PlaySound
  tmpargument = 3
  IfArmorIs
    tmpargument = MESSAGECOSTUME
  Else
    tmpargument = MESSAGEDEATH
  IfTargetIsOnSameTeam
    tmpargument = MESSAGEFRAG
    IfTargetIsSelf
      tmpargument = MESSAGEACCIDENT
  SendMessage

  // Drop goodies
  tmpargument = 65535
  DropMoney
  DropKeys

  // Make the character body
  tmpargument = 45
  SetBumpHeight


//------------------------------------------------------------------------------
// ZZ> For helper AIs
IfLeaderKilled
  BecomeLeader


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



//------------------------------------------------------------------------------
// ZZ> Handle being healed by spitting out a message and stopping retreat
IfHealed
  tmpargument = 8
  SendMessageNear
  tmpargument = 7
  tmpdistance = rand & 2047 + 10000
  PlaySound



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