IF
    Heard([ANYONE],111)
THEN
    RESPONSE #100
        MoveToObject(NearestEnemyOf(Myself))
        Continue()
END

IF
    AttackedBy([GOODCUTOFF],DEFAULT)
    Allegiance(Myself,NEUTRAL)
THEN
    RESPONSE #100
        Enemy()
END

IF
    See(NearestEnemyOf(Myself))
    !Range(NearestEnemyOf(Myself),5)
THEN
    RESPONSE #17
        EquipRanged()
        AttackOneRound(NearestEnemyOf(Myself))
    RESPONSE #17
        EquipRanged()
        AttackOneRound(SecondNearestEnemyOf(Myself))
    RESPONSE #17
        EquipRanged()
        AttackOneRound(ThirdNearestEnemyOf(Myself))
    RESPONSE #17
        EquipRanged()
        AttackOneRound(FourthNearestEnemyOf(Myself))
    RESPONSE #17
        EquipRanged()
        AttackOneRound(FifthNearestEnemyOf(Myself))
    RESPONSE #17
        EquipRanged()
        AttackOneRound(SixthNearestEnemyOf(Myself))
END

IF
    See(NearestEnemyOf(Myself))
    Range(NearestEnemyOf(Myself),5)
THEN
    RESPONSE #100
        EquipMostDamagingMelee()
        AttackReevaluate(NearestEnemyOf(Myself),30)
END

IF
    AttackedBy([ANYONE],DEFAULT)
THEN
    RESPONSE #100
        AttackReevaluate(LastAttackerOf(Myself),30)
END


