IfSpawned
  tmpargument = 0
  SetState
  tmpx = rand & 4000 - 2000 + selfx
  tmpy = rand & 4000 - 2000 + selfy
  Teleport
IfTimeOut
  IfBumped			// 
    SetTargetToWhoeverBumped	  //
      IfTargetCanOpenStuff	    //
        tmpargument = rand & 3		        //
        SendMessage		        //
        tmpargument = 180
        SetTime
IfAttacked
  GetContent
  tmpargument = 5
  //GetState
  BeatModule
  EnableExport
  // Fix the end text
  ClearEndMessage
  GetContent
  AddEndMessage
  EndModule
IfStateIs0
  SetTargetToNearbyEnemy
    tmpargument = ACTIONMJ
    DoAction
    KeepAction
    tmpargument = 0
    PlaySound
    tmpargument = 1
    SetState
Else
  SetTargetToNearbyEnemy
    tmpargument = 0
  Else
    tmpargument = ACTIONDA
    DoAction
    tmpargument = 0
    PlaySound
    SetState
End				// Finished with this character
