IF
  Global("D0Flee","LOCALS",0)
  Detect(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    SetGlobal("D0Flee","LOCALS",1)
    RunAwayFrom(NearestEnemyOf(Myself),15)
END

IF
  OR(2)
    AttackedBy([ANYONE],DEFAULT)
    HitBy([ANYONE],CRUSHING)
THEN
  RESPONSE #100
    RunAwayFrom(LastSeenBy(Myself),5)
END

IF
  True()
THEN
  RESPONSE #100
    RandomWalkContinuous()
END
