// ZZ> Death and let the player team win
IfKilled
  tmpargument = 0
  SendMessageNear
  PlaySound
  SpawnPoof

  //Reduce size
  tmpargument = 40			  
  SetBumpSize				  
  tmpargument = 35			  
  SetBumpHeight				  			  

  // Drop money
  tmpargument = 65535
  DropMoney

			  

JoinEvilTeam

//Ouch
IfAttacked				// Counter attack
  SetTargetToWhoeverAttacked		  //
    IfTargetIsOnHatedTeam		    //
      BecomeLeader			      //
      tmpargument = 1			      // Enter combat mode
      SetState				      //
      SetTurnModeToWatchTarget
    Else				    //
      SetTargetToOldTarget		      //
  tmpargument = rand & 1 + 1		  //
  PlaySound

IfTargetKilled				// Return to watch mode
  tmpargument = 0			  //
  SetState				  //

IfBumped				// Attack whoever it bumped
  SetTargetToWhoeverBumped		  //
  IfTargetIsOnHatedTeam			  // Make sure it's an enemy
    DoNothing
  Else					  // Scooch around friendly
    tmpx = rand & 255 + targetx - 128	    //
    tmpy = rand & 255 + targety - 128	    //
    ClearWaypoints			    //
    AddWaypoint				    //
    SetTargetToOldTarget		    //

IfTimeOut				// This is done every so often
  IfStateIs0
    tmpx = selfx
    tmpy = selfy
    SetTargetToNearestEnemy
      IfFacingTarget
        SetTurnModeToWatchTarget
        tmpargument = 1
        SetState
      Else
        SetTurnModeToSpin
  IfStateIs1
    tmpx = targetdistance
    tmpy = 1000
    IfXIsLessThanY
      tmpx = targetx
      tmpy = targety
    Else
      tmpx = selfx
      tmpy = selfy
      tmpargument = 0
      SetState
  ClearWaypoints			  //
  AddWaypoint				  //
  tmpargument = rand & 15 + 30		  // Wait a while and try again
  SetTime				  //
End					// Finished with this character
