IF
  Allegiance(Myself,GOODCUTOFF)
  !See([ENEMY])
  CombatCounter(0)
  Range(Player1,20)
THEN
  RESPONSE #100
    NoAction()
END

IF
  Allegiance(Myself,GOODCUTOFF)
  !See([ENEMY])
  CombatCounter(0)
  !Range(Player1,20)
THEN
  RESPONSE #100
    MoveToObject(Player1)
END

IF
  Allegiance(Myself,ENEMY)
  Delay(6)
  !GlobalTimerNotExpired("Spell","LOCALS")
  OR(2)
    NumCreatureLT([ENEMY.0.DEMONIC],3)
    NumCreatureVsPartyLT([ENEMY.0.DEMONIC],0)
  HaveSpellRES("GATE2")
  !Range(NearestEnemyOf(Myself),10)
  OR(2)
    NumInPartyAliveGT(2)
    DifficultyGT(EASY)
  RandomNum(2,1)
THEN
  RESPONSE #100
    SetGlobalTimer("Spell","LOCALS",6)
    SpellRES("GATE2",Myself)  // ~Gate~
END

IF
  !StateCheck(Myself,STATE_INVISIBLE)
  !StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
  HaveSpell(SUCCUBUS_ETHEREAL)
  Range(NearestEnemyOf(Myself),8)
  Range(SecondNearestEnemyOf(Myself),8)
  !GlobalTimerNotExpired("Spell","LOCALS")
  !DifficultyLT(NORMAL)
  RandomNumLT(4,3)
THEN
  RESPONSE #100
    SetGlobalTimer("Spell","LOCALS",6)
    RemoveSpell(SUCCUBUS_ETHEREAL)
    ForceSpell(Myself,SUCCUBUS_ETHEREAL)
END

IF
  !StateCheck(Myself,STATE_INVISIBLE)
  !StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
  OR(2)
    Range([GOODCUTOFF.0.0.MAGE_ALL],28)
    Range([GOODCUTOFF.0.0.CLERIC_ALL],28)
  HaveSpell(SUCCUBUS_ETHEREAL)
  !GlobalTimerNotExpired("Spell","LOCALS")
  !DifficultyLT(NORMAL)
  RandomNumLT(6,4)
THEN
  RESPONSE #100
    SetGlobalTimer("Spell","LOCALS",6)
    RemoveSpell(SUCCUBUS_ETHEREAL)
    ForceSpell(Myself,SUCCUBUS_ETHEREAL)
END

IF
  !StateCheck(Myself,STATE_INVISIBLE)
  !StateCheck(Myself,STATE_IMPROVEDINVISIBILITY)
  HaveSpell(SUCCUBUS_ETHEREAL)
  HPPercentLT(Myself,40)
  !GlobalTimerNotExpired("Spell","LOCALS")
  !DifficultyLT(NORMAL)
THEN
  RESPONSE #100
    SetGlobalTimer("Spell","LOCALS",6)
    RemoveSpell(SUCCUBUS_ETHEREAL)
    ForceSpell(Myself,SUCCUBUS_ETHEREAL)
END

IF
  Range(NearestEnemyOf(Myself),10)
  !General(NearestEnemyOf(Myself),UNDEAD)
  !General(NearestEnemyOf(Myself),GENERAL_ITEM)
  !General(NearestEnemyOf(Myself),GENERAL_ITEM)
  !GlobalTimerNotExpired("ParalyzeAura","LOCALS")
  !CheckStatGT(NearestEnemyOf(Myself),0,SCRIPTINGSTATE1)
  !StateCheck(Myself,STATE_INVISIBLE)
THEN
  RESPONSE #100
    SetGlobalTimer("ParalyzeAura","LOCALS",6)
    ReallyForceSpellRES("nabpara",NearestEnemyOf(Myself))  // ~Paralyzation Aura~
END

IF
  Range(SecondNearestEnemyOf(Myself),10)
  !General(SecondNearestEnemyOf(Myself),UNDEAD)
  !General(SecondNearestEnemyOf(Myself),GENERAL_ITEM)
  !GlobalTimerNotExpired("ParalyzeAura","LOCALS")
  !CheckStatGT(SecondNearestEnemyOf(Myself),0,SCRIPTINGSTATE1)
  !StateCheck(Myself,STATE_INVISIBLE)
THEN
  RESPONSE #100
    SetGlobalTimer("ParalyzeAura","LOCALS",6)
    ReallyForceSpellRES("nabpara",SecondNearestEnemyOf(Myself))  // ~Paralyzation Aura~
END

IF
  Range(ThirdNearestEnemyOf(Myself),10)
  !General(ThirdNearestEnemyOf(Myself),UNDEAD)
  !General(ThirdNearestEnemyOf(Myself),GENERAL_ITEM)
  !GlobalTimerNotExpired("ParalyzeAura","LOCALS")
  !CheckStatGT(ThirdNearestEnemyOf(Myself),0,SCRIPTINGSTATE1)
  !StateCheck(Myself,STATE_INVISIBLE)
THEN
  RESPONSE #100
    SetGlobalTimer("ParalyzeAura","LOCALS",6)
    ReallyForceSpellRES("nabpara",ThirdNearestEnemyOf(Myself))  // ~Paralyzation Aura~
END

IF
  Global("TargetSilence","LOCALS",0)
  OR(6)
    Class(NearestEnemyOf(Myself),PALADIN_ALL)
    Class(NearestEnemyOf(Myself),BARD_ALL)
    Class(NearestEnemyOf(Myself),DRUID_ALL)
    Class(NearestEnemyOf(Myself),CLERIC_ALL)
    Class(NearestEnemyOf(Myself),MAGE_ALL)
    Class(NearestEnemyOf(Myself),SORCERER)
  !StateCheck(NearestEnemyOf(Myself),STATE_SILENCED)
  !StateCheck(NearestEnemyOf(Myself),STATE_INVISIBLE)
  !StateCheck(NearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !HasItem("AMUL21",NearestEnemyOf(Myself))  // ~Amulet of Power~
  !CheckStatLT(NearestEnemyOf(Myself),0,SAVEVSSPELL)
  !Range(NearestEnemyOf(Myself),15)
  See(NearestEnemyOfType(Myself))
THEN
  RESPONSE #100
    SetGlobal("TargetSilence","LOCALS",1)
END

IF
  Global("TargetSilence","LOCALS",0)
  OR(6)
    Class(SecondNearestEnemyOf(Myself),PALADIN_ALL)
    Class(SecondNearestEnemyOf(Myself),BARD_ALL)
    Class(SecondNearestEnemyOf(Myself),DRUID_ALL)
    Class(SecondNearestEnemyOf(Myself),CLERIC_ALL)
    Class(SecondNearestEnemyOf(Myself),MAGE_ALL)
    Class(SecondNearestEnemyOf(Myself),SORCERER)
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_SILENCED)
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_INVISIBLE)
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !HasItem("AMUL21",SecondNearestEnemyOf(Myself))  // ~Amulet of Power~
  !CheckStatLT(SecondNearestEnemyOf(Myself),0,SAVEVSSPELL)
  !Range(SecondNearestEnemyOf(Myself),15)
  See(SecondNearestEnemyOfType(Myself))
THEN
  RESPONSE #100
    SetGlobal("TargetSilence","LOCALS",1)
END

IF
  Global("TargetSilence","LOCALS",0)
  OR(6)
    Class(FourthNearestEnemyOf(Myself),PALADIN_ALL)
    Class(FourthNearestEnemyOf(Myself),BARD_ALL)
    Class(FourthNearestEnemyOf(Myself),DRUID_ALL)
    Class(FourthNearestEnemyOf(Myself),CLERIC_ALL)
    Class(FourthNearestEnemyOf(Myself),MAGE_ALL)
    Class(FourthNearestEnemyOf(Myself),SORCERER)
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_SILENCED)
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_INVISIBLE)
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !HasItem("AMUL21",FourthNearestEnemyOf(Myself))  // ~Amulet of Power~
  !CheckStatLT(FourthNearestEnemyOf(Myself),0,SAVEVSSPELL)
  !Range(FourthNearestEnemyOf(Myself),15)
  See(FourthNearestEnemyOfType(Myself))
THEN
  RESPONSE #100
    SetGlobal("TargetSilence","LOCALS",1)
END

IF
  Global("TargetSilence","LOCALS",0)
  OR(6)
    Class(SixthNearestEnemyOf(Myself),PALADIN_ALL)
    Class(SixthNearestEnemyOf(Myself),BARD_ALL)
    Class(SixthNearestEnemyOf(Myself),DRUID_ALL)
    Class(SixthNearestEnemyOf(Myself),CLERIC_ALL)
    Class(SixthNearestEnemyOf(Myself),MAGE_ALL)
    Class(SixthNearestEnemyOf(Myself),SORCERER)
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_SILENCED)
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_INVISIBLE)
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !HasItem("AMUL21",SixthNearestEnemyOf(Myself))  // ~Amulet of Power~
  !CheckStatLT(SixthNearestEnemyOf(Myself),0,SAVEVSSPELL)
  !Range(SixthNearestEnemyOf(Myself),15)
  See(SixthNearestEnemyOfType(Myself))
THEN
  RESPONSE #100
    SetGlobal("TargetSilence","LOCALS",1)
END

IF
  !GlobalTimerNotExpired("Spell","LOCALS")
  !Allegiance(Myself,GOODCUTOFF)
  Global("TargetSilence","LOCALS",1)
  Range(NearestEnemyOf(Myself),15)
  RandomNum(3,1)
THEN
  RESPONSE #50
    SetGlobal("TargetSilence","LOCALS",0)
    SetGlobalTimer("Spell","LOCALS",6)
    SpellNoDec(LastSeenBy(Myself),CLERIC_SILENCE_15_FOOT)
  RESPONSE #50
    SetGlobal("TargetSilence","LOCALS",0)
    SetGlobalTimer("Spell","LOCALS",6)
    ForceSpell(LastSeenBy(Myself),CLERIC_SILENCE_15_FOOT)
END

IF
  !GlobalTimerNotExpired("Spell","LOCALS")
  !Allegiance(Myself,GOODCUTOFF)
  Global("TargetSilence","LOCALS",1)
  !Range(NearestEnemyOf(Myself),15)
  RandomNumLT(8,5)
THEN
  RESPONSE #50
    SetGlobal("TargetSilence","LOCALS",0)
    SetGlobalTimer("Spell","LOCALS",6)
    SpellNoDec(LastSeenBy(Myself),CLERIC_SILENCE_15_FOOT)
  RESPONSE #50
    SetGlobal("TargetSilence","LOCALS",0)
    SetGlobalTimer("Spell","LOCALS",6)
    ForceSpell(LastSeenBy(Myself),CLERIC_SILENCE_15_FOOT)
END

IF
  Global("TargetSilence","LOCALS",1)
THEN
  RESPONSE #100
    SetGlobal("TargetSilence","LOCALS",0)
END

IF
  Allegiance(Myself,GOODCUTOFF)
  CombatCounter(0)
THEN
  RESPONSE #100
    NoAction()
END

IF
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]),STATE_SILENCED)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]),STATE_STUNNED)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]),STATE_PANIC)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]),STATE_SLEEPING)
  CheckStatLT(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]),100,SPELLFAILUREPRIEST)
  See(SecondNearest([GOODCUTOFF.0.0.CLERIC_ALL]))
  False()
THEN
  RESPONSE #100
END

IF
  !StateCheck([GOODCUTOFF.0.0.CLERIC_ALL],STATE_SILENCED)
  !StateCheck([GOODCUTOFF.0.0.CLERIC_ALL],STATE_STUNNED)
  !StateCheck([GOODCUTOFF.0.0.CLERIC_ALL],STATE_PANIC)
  !StateCheck([GOODCUTOFF.0.0.CLERIC_ALL],STATE_SLEEPING)
  CheckStatLT([GOODCUTOFF.0.0.CLERIC_ALL],100,SPELLFAILUREPRIEST)
  See([GOODCUTOFF.0.0.CLERIC_ALL])
  False()
THEN
  RESPONSE #100
END

IF
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]),STATE_SILENCED)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]),STATE_STUNNED)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]),STATE_PANIC)
  !StateCheck(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]),STATE_SLEEPING)
  CheckStatLT(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]),100,SPELLFAILUREMAGE)
  See(SecondNearest([GOODCUTOFF.0.0.LONG_BOW]))
  False()
THEN
  RESPONSE #100
END

IF
  !StateCheck([GOODCUTOFF.0.0.LONG_BOW],STATE_SILENCED)
  !StateCheck([GOODCUTOFF.0.0.LONG_BOW],STATE_STUNNED)
  !StateCheck([GOODCUTOFF.0.0.LONG_BOW],STATE_PANIC)
  !StateCheck([GOODCUTOFF.0.0.LONG_BOW],STATE_SLEEPING)
  CheckStatLT([GOODCUTOFF.0.0.LONG_BOW],100,SPELLFAILUREMAGE)
  See([GOODCUTOFF.0.0.LONG_BOW])
  False()
THEN
  RESPONSE #100
END

IF
  Range(NearestEnemyOf(Myself),8)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

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

IF
  Range(NearestEnemyOf(Myself),8)
  OR(2)
    CheckStatGT(NearestEnemyOf(Myself),4,NUMBEROFATTACKS)
    StateCheck(NearestEnemyOf(Myself),STATE_HASTED)
  !StateCheck(NearestEnemyOf(Myself),STATE_STUNNED)
  !StateCheck(NearestEnemyOf(Myself),STATE_PANIC)
  !StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
  !StateCheck(NearestEnemyOf(Myself),STATE_SLEEPING)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  !CheckStatGT(SixthNearestEnemyOf(Myself),0,SCRIPTINGSTATE3)
  !HasItem("AMUL21",SixthNearestEnemyOf(Myself))  // ~Amulet of Power~
  !HasItemEquiped("Blun25",SixthNearestEnemyOf(Myself))
  !Kit(SixthNearestEnemyOf(Myself),32)
  !CheckStatGT(SixthNearestEnemyOf(Myself),0,128)
  !Gender(SixthNearestEnemyOf(Myself),ILLUSIONARY)
  OR(2)
    !Gender(SixthNearestEnemyOf(Myself),SUMMONED)
    LevelGT(SixthNearestEnemyOf(Myself),10)
  OR(2)
    CheckStatGT(SixthNearestEnemyOf(Myself),0,ARMORCLASS)
    HPPercentLT(SixthNearestEnemyOf(Myself),30)
  !CheckStatLT(SixthNearestEnemyOf(Myself),-9,ARMORCLASS)
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_HELPLESS)
  Range(SixthNearestEnemyOf(Myself),25)
  See(SixthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  !CheckStatGT(FourthNearestEnemyOf(Myself),0,SCRIPTINGSTATE3)
  !HasItem("AMUL21",FourthNearestEnemyOf(Myself))  // ~Amulet of Power~
  !HasItemEquiped("Blun25",FourthNearestEnemyOf(Myself))
  !Kit(FourthNearestEnemyOf(Myself),32)
  !CheckStatGT(FourthNearestEnemyOf(Myself),0,128)
  !Gender(FourthNearestEnemyOf(Myself),ILLUSIONARY)
  OR(2)
    !Gender(FourthNearestEnemyOf(Myself),SUMMONED)
    LevelGT(FourthNearestEnemyOf(Myself),10)
  OR(2)
    CheckStatGT(FourthNearestEnemyOf(Myself),0,ARMORCLASS)
    HPPercentLT(FourthNearestEnemyOf(Myself),30)
  !CheckStatLT(FourthNearestEnemyOf(Myself),-9,ARMORCLASS)
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_HELPLESS)
  Range(FourthNearestEnemyOf(Myself),25)
  See(FourthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  !CheckStatGT(SecondNearestEnemyOf(Myself),0,SCRIPTINGSTATE3)
  !HasItem("AMUL21",SecondNearestEnemyOf(Myself))  // ~Amulet of Power~
  !HasItemEquiped("Blun25",SecondNearestEnemyOf(Myself))
  !Kit(SecondNearestEnemyOf(Myself),32)
  !CheckStatGT(SecondNearestEnemyOf(Myself),0,128)
  !Gender(SecondNearestEnemyOf(Myself),ILLUSIONARY)
  OR(2)
    !Gender(SecondNearestEnemyOf(Myself),SUMMONED)
    LevelGT(SecondNearestEnemyOf(Myself),10)
  OR(2)
    CheckStatGT(SecondNearestEnemyOf(Myself),0,ARMORCLASS)
    HPPercentLT(SecondNearestEnemyOf(Myself),30)
  !CheckStatLT(SecondNearestEnemyOf(Myself),-9,ARMORCLASS)
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_HELPLESS)
  Range(SecondNearestEnemyOf(Myself),25)
  See(SecondNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  !CheckStatGT(NearestEnemyOf(Myself),0,SCRIPTINGSTATE3)
  !HasItem("AMUL21",NearestEnemyOf(Myself))  // ~Amulet of Power~
  !HasItemEquiped("Blun25",NearestEnemyOf(Myself))
  !Kit(NearestEnemyOf(Myself),32)
  !CheckStatGT(NearestEnemyOf(Myself),0,128)
  !Gender(NearestEnemyOf(Myself),ILLUSIONARY)
  OR(2)
    !Gender(NearestEnemyOf(Myself),SUMMONED)
    LevelGT(NearestEnemyOf(Myself),10)
  OR(2)
    CheckStatGT(NearestEnemyOf(Myself),0,ARMORCLASS)
    HPPercentLT(NearestEnemyOf(Myself),30)
  !CheckStatLT(NearestEnemyOf(Myself),-9,ARMORCLASS)
  !StateCheck(NearestEnemyOf(Myself),STATE_HELPLESS)
  Range(NearestEnemyOf(Myself),25)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
END

IF
  Allegiance(Myself,ENEMY)
  Allegiance(LastSeenBy(Myself),EVILCUTOFF)
  See([GOODCUTOFF])
THEN
  RESPONSE #100
    MoveToObject([GOODCUTOFF])
END

IF
  Allegiance(Myself,ENEMY)
  OR(2)
    !Allegiance(LastSeenBy(Myself),GOODCUTOFF)
    !See([GOODCUTOFF])
THEN
  RESPONSE #100
    MoveToObject(Player1)
END

IF
  Allegiance(Myself,GOODCUTOFF)
  !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
  See([EVILCUTOFF])
THEN
  RESPONSE #100
    MoveToObject([EVILCUTOFF])
END

IF
  Allegiance(Myself,GOODCUTOFF)
  OR(2)
    !Allegiance(LastSeenBy(Myself),EVILCUTOFF)
    !See([EVILCUTOFF])
THEN
  RESPONSE #100
    RandomWalkContinuous()
END

IF
  StateCheck(LastSeenBy(Myself),STATE_DEAD)
THEN
  RESPONSE #100
    AttackOneRound(NearestEnemyOf(Myself))
END

IF
  !GlobalTimerNotExpired("Spell","LOCALS")
  !GlobalTimerNotExpired("VampiricTouch","LOCALS")
  Range(LastSeenBy(Myself),5)
  !StateCheck(Myself,STATE_INVISIBLE)
  !CheckStatGT(LastSeenBy(Myself),0,129)
  OR(5)
    HPPercentLT(Myself,50)
    CheckStatGT(LastSeenBy(Myself),0,128)
    CheckStatGT(LastSeenBy(Myself),0,SCRIPTINGSTATE3)
    HasItem("AMUL21",LastSeenBy(Myself))  // ~Amulet of Power~
    HasItemEquiped("BLUN25",LastSeenBy(Myself))
  RandomNumLT(9,7)
THEN
  RESPONSE #50
    SetGlobalTimer("Spell","LOCALS",6)
    SetGlobalTimer("VampiricTouch","LOCALS",300)
    SpellNoDec(LastSeenBy(Myself),WIZARD_VAMPIRIC_TOUCH)
  RESPONSE #50
    SetGlobalTimer("Spell","LOCALS",6)
    SetGlobalTimer("VampiricTouch","LOCALS",300)
    ForceSpell(LastSeenBy(Myself),WIZARD_VAMPIRIC_TOUCH)
END

IF
  !GlobalTimerNotExpired("Spell","LOCALS")
  !GlobalTimerNotExpired("VampiricTouch","LOCALS")
  Range(LastSeenBy(Myself),5)
  !StateCheck(Myself,STATE_INVISIBLE)
  !CheckStatGT(LastSeenBy(Myself),0,129)
  !HPPercentLT(Myself,50)
  !CheckStatGT(LastSeenBy(Myself),0,128)
  !CheckStatGT(LastSeenBy(Myself),0,SCRIPTINGSTATE3)
  !HasItem("AMUL21",LastSeenBy(Myself))  // ~Amulet of Power~
  !HasItemEquiped("BLUN25",LastSeenBy(Myself))
  RandomNumLT(15,7)
THEN
  RESPONSE #50
    SetGlobalTimer("Spell","LOCALS",6)
    SetGlobalTimer("VampiricTouch","LOCALS",300)
    SpellNoDec(LastSeenBy(Myself),WIZARD_VAMPIRIC_TOUCH)
  RESPONSE #50
    SetGlobalTimer("Spell","LOCALS",6)
    SetGlobalTimer("VampiricTouch","LOCALS",300)
    ForceSpell(LastSeenBy(Myself),WIZARD_VAMPIRIC_TOUCH)
END

IF
  !Range(LastSeenBy(Myself),10)
  !GlobalTimerNotExpired("Running","LOCALS")
  OR(3)
    CheckStat(LastSeenBy(Myself),0,SCRIPTINGSTATE3)
    CheckStatLT(LastSeenBy(Myself),100,MAGICDAMAGERESISTANCE)
    CheckStatLT(LastSeenBy(Myself),100,RESISTSLASHING)
THEN
  RESPONSE #100
    MoveToObject(LastSeenBy(Myself))
END

IF
  StateCheck(Myself,STATE_INVISIBLE)
  HPPercentLT(Myself,40)
  !GlobalTimerNotExpired("Running","LOCALS")
THEN
  RESPONSE #100
    SetGlobalTimer("Running","LOCALS",5)
    RunAwayFrom(NearestEnemyOf(Myself),75)
END

IF
  Range(LastSeenBy(Myself),10)
  !GlobalTimerNotExpired("Running","LOCALS")
  OR(3)
    CheckStat(LastSeenBy(Myself),0,SCRIPTINGSTATE3)
    CheckStatLT(LastSeenBy(Myself),100,MAGICDAMAGERESISTANCE)
    CheckStatLT(LastSeenBy(Myself),100,RESISTSLASHING)
THEN
  RESPONSE #100
    AttackOneRound(LastSeenBy(Myself))
END

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

