IF
  Die()
THEN
  RESPONSE #100
    ReallyForceSpellDead(Myself,VAMPIRE_GAS_FORM_CHANGE)
END

IF
  HPLT(Myself,10)
THEN
  RESPONSE #100
    ReallyForceSpellDead(Myself,VAMPIRE_BAT_FORM_CHANGE)
    AddExperienceParty(7500) // 75% of 10000
END

IF
  TimeGT(5)
  TimeLT(DUSK_END)
  AreaType(OUTDOOR)
THEN
  RESPONSE #100
    ReallyForceSpellDead(Myself,VAMPIRE_BAT_FORM_CHANGE)
END

IF
  See(NearestEnemyOf(Myself))
  Global("Prep","LOCALS",0)
  !StateCheck(Myself,STATE_REALLY_DEAD)
THEN
  RESPONSE #100
    SetGlobal("Seen","LOCALS",1)
    ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
    DisplayString(Myself,39968) // Spell Trigger - Fired
    ReallyForceSpell(Myself,WIZARD_GLOBE_OF_INVULNERABILITY)
    ReallyForceSpell(Myself,WIZARD_SPELL_TURNING)
    ReallyForceSpell(Myself,WIZARD_PROTECTION_FROM_NORMAL_MISSILES)
    ReallyForceSpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
    ReallyForceSpell(Myself,WIZARD_PROTECTION_FROM_ELECTRICITY)
    SetGlobal("Prep","LOCALS",1)
END

IF
  See(NearestEnemyOf(Myself))
  CheckStatLT(Myself,1,STONESKINS)
  Global("Prep1","LOCALS",0)
  !StateCheck(Myself,STATE_REALLY_DEAD)
THEN
  RESPONSE #100
    DisplayString(Myself,29736) // Contingency - Stoneskin
    ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
    SetGlobal("Prep1","LOCALS",1)
END

IF
  See(NearestEnemyOf(Myself))
  CheckStatLT(Myself,1,STONESKINS)
  Global("Prep","LOCALS",1)
  !StateCheck(Myself,STATE_REALLY_DEAD)
THEN
  RESPONSE #100
    DisplayString(Myself,39969) // Spell Sequencer - Fired
    ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
    ReallyForceSpell(Myself,WIZARD_MIRROR_IMAGE)
    ReallyForceSpell(Myself,WIZARD_FIRE_SHIELD_RED)
    SetGlobal("Prep","LOCALS",2)
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  See(NearestEnemyOf(Myself))
  StateCheck(Myself,STATE_SILENCED)
  HaveSpell(WIZARD_VOCALIZE)
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    Spell(Myself,WIZARD_VOCALIZE)
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !See(NearestEnemyOf(Myself))
  Detect(NearestEnemyOf(Myself))
  Global("Seen","LOCALS",1)
  HaveSpell(WIZARD_TRUE_SIGHT)
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    Spell(Myself,WIZARD_TRUE_SIGHT)
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !HasBounceEffects(Myself)
  !HasImmunityEffects(Myself)
  HaveSpell(WIZARD_SPELL_TURNING)
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    Spell(Myself,WIZARD_SPELL_TURNING)
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  See(NearestEnemyOf(Myself))
  OR(2)
    CheckStatGT(Myself,0,STONESKINS)
    !AttackedBy([ANYONE],DEFAULT)
  OR(3)
    HasBounceEffects(Myself)
    HasImmunityEffects(Myself)
    !AttackedBy([ANYONE],DEFAULT)
  HaveSpell(WIZARD_SIMULACRUM)
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    Spell(Myself,WIZARD_SIMULACRUM)
END

IF
  OR(10)
    See(Nearest([GOODCUTOFF]))
    See(SecondNearest([GOODCUTOFF]))
    See(ThirdNearest([GOODCUTOFF]))
    See(FourthNearest([GOODCUTOFF]))
    See(FifthNearest([GOODCUTOFF]))
    See(SixthNearest([GOODCUTOFF]))
    See(SeventhNearest([GOODCUTOFF]))
    See(EighthNearest([GOODCUTOFF]))
    See(NinthNearest([GOODCUTOFF]))
    See(TenthNearest([GOODCUTOFF]))
  Allegiance(Myself,ENEMY)
  Global("Seen","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobalTimer("IL","LOCALS",30)
    SetGlobalTimer("IS","LOCALS",12)
    SetGlobal("Seen","LOCALS",1)
    Continue()
END

IF
  OR(11)
    See(TenthNearestEnemyOf(Myself))
    See(NinthNearestEnemyOf(Myself))
    See(EighthNearestEnemyOf(Myself))
    See(SeventhNearestEnemyOf(Myself))
    See(SixthNearestEnemyOf(Myself))
    See(FifthNearestEnemyOf(Myself))
    See(FourthNearestEnemyOf(Myself))
    See(ThirdNearestEnemyOf(Myself))
    See(SecondNearestEnemyOf(Myself))
    See(NearestEnemyOf(Myself))
    See(LastAttackerOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(TenthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(TenthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",TenthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(TenthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(TenthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(TenthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(TenthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",TenthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(TenthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(TenthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(TenthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(NinthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(NinthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",NinthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NinthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(NinthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(NinthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(NinthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",NinthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(NinthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(NinthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(NinthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(EighthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(EighthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",EighthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(EighthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(EighthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(EighthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(EighthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",EighthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(EighthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(EighthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(EighthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(SeventhNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SeventhNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SeventhNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SeventhNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(SeventhNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SeventhNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SeventhNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",SeventhNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SeventhNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SeventhNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SeventhNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SixthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SixthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SixthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(SixthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SixthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SixthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",SixthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SixthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SixthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SixthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(FifthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(FifthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",FifthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FifthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(FifthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(FifthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(FifthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",FifthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(FifthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(FifthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(FifthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(FourthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",FourthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FourthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(FourthNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(FourthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(FourthNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",FourthNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(FourthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(FourthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(FourthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(ThirdNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(ThirdNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",ThirdNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(ThirdNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(ThirdNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(ThirdNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(ThirdNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",ThirdNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(ThirdNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(ThirdNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(ThirdNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SecondNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SecondNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SecondNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(SecondNearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SecondNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SecondNearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",SecondNearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SecondNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SecondNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SecondNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(NearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(NearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",NearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(NearestEnemyOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(NearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(NearestEnemyOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",NearestEnemyOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(NearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(NearestEnemyOf(Myself),35,RESISTMAGIC)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  !StateCheck(LastAttackerOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(LastAttackerOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",LastAttackerOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(LastAttackerOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStat(LastAttackerOf(Myself),0,178)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(LastAttackerOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(LastAttackerOf(Myself),CAVALIER)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CHWRAITH",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NOA3",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("CLCK30",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM14",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("IPSION",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("MISCBC",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SW1H32",LastAttackerOf(Myself))
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(LastAttackerOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(LastAttackerOf(Myself),35,RESISTMAGIC)
  See(LastAttackerOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A3","LOCALS")
  See(LastSeenBy(Myself))
  !Allegiance(LastSeenBy(Myself),ENEMY)
  Allegiance(Myself,ENEMY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",LastSeenBy(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(LastSeenBy(Myself),1,129)
  !StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A3","LOCALS",24)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_FEAR)
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A3","LOCALS",28)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_FEAR)
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A3","LOCALS",32)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_FEAR)
  RESPONSE #100
    SetGlobalTimer("A2","LOCALS",6)
END

IF
  OR(11)
    See(TenthNearestEnemyOf(Myself))
    See(NinthNearestEnemyOf(Myself))
    See(EighthNearestEnemyOf(Myself))
    See(SeventhNearestEnemyOf(Myself))
    See(SixthNearestEnemyOf(Myself))
    See(FifthNearestEnemyOf(Myself))
    See(FourthNearestEnemyOf(Myself))
    See(ThirdNearestEnemyOf(Myself))
    See(SecondNearestEnemyOf(Myself))
    See(NearestEnemyOf(Myself))
    See(LastAttackerOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(TenthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(TenthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",TenthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(TenthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(TenthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(TenthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(TenthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(TenthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(TenthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",TenthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",TenthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",TenthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",TenthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",TenthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",TenthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",TenthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",TenthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",TenthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",TenthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(TenthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(TenthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(TenthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(NinthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(NinthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",NinthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NinthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NinthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NinthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(NinthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(NinthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(NinthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",NinthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",NinthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",NinthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",NinthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",NinthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",NinthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",NinthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",NinthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",NinthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",NinthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(NinthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(NinthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(NinthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(EighthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(EighthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",EighthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(EighthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(EighthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(EighthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(EighthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(EighthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(EighthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",EighthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",EighthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",EighthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",EighthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",EighthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",EighthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",EighthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",EighthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",EighthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",EighthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(EighthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(EighthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(EighthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(SeventhNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SeventhNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SeventhNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SeventhNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SeventhNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SeventhNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SeventhNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(SeventhNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SeventhNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",SeventhNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",SeventhNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",SeventhNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",SeventhNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",SeventhNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",SeventhNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",SeventhNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",SeventhNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",SeventhNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",SeventhNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SeventhNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SeventhNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SeventhNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(SixthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SixthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SixthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SixthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SixthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SixthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SixthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(SixthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SixthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",SixthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",SixthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",SixthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",SixthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",SixthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",SixthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",SixthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",SixthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",SixthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",SixthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SixthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SixthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SixthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(FifthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(FifthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",FifthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FifthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FifthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FifthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(FifthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(FifthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(FifthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",FifthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",FifthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",FifthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",FifthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",FifthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",FifthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",FifthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",FifthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",FifthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",FifthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(FifthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(FifthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(FifthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(FourthNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(FourthNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",FourthNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FourthNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(FourthNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(FourthNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(FourthNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(FourthNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(FourthNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",FourthNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",FourthNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",FourthNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",FourthNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",FourthNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",FourthNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",FourthNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",FourthNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",FourthNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",FourthNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(FourthNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(FourthNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(FourthNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(ThirdNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(ThirdNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",ThirdNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(ThirdNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(ThirdNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(ThirdNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(ThirdNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(ThirdNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(ThirdNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",ThirdNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",ThirdNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",ThirdNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",ThirdNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",ThirdNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",ThirdNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",ThirdNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",ThirdNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",ThirdNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",ThirdNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(ThirdNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(ThirdNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(ThirdNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(SecondNearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(SecondNearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",SecondNearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SecondNearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(SecondNearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(SecondNearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(SecondNearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(SecondNearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(SecondNearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",SecondNearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",SecondNearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",SecondNearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",SecondNearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",SecondNearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",SecondNearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",SecondNearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",SecondNearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",SecondNearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",SecondNearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(SecondNearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(SecondNearestEnemyOf(Myself),35,RESISTMAGIC)
  See(SecondNearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(NearestEnemyOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(NearestEnemyOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",NearestEnemyOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NearestEnemyOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(NearestEnemyOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(NearestEnemyOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(NearestEnemyOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(NearestEnemyOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(NearestEnemyOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",NearestEnemyOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",NearestEnemyOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",NearestEnemyOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",NearestEnemyOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",NearestEnemyOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",NearestEnemyOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",NearestEnemyOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",NearestEnemyOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",NearestEnemyOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",NearestEnemyOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(NearestEnemyOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(NearestEnemyOf(Myself),35,RESISTMAGIC)
  See(NearestEnemyOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  !StateCheck(LastAttackerOf(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(LastAttackerOf(Myself),0,SANCTUARY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",LastAttackerOf(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),1,129)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),1,116)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,164)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,123)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,MINORGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,SHIELDGLOBE)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(LastAttackerOf(Myself),1,158)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStatGT(LastAttackerOf(Myself),0,119)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !CheckStat(LastAttackerOf(Myself),4,162)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS") // Berserk is obvious enough to be noticed early
    !StateCheck(LastAttackerOf(Myself),STATE_BERSERK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Class(LastAttackerOf(Myself),MONK)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !Kit(LastAttackerOf(Myself),INQUISITOR)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("HELM06",LastAttackerOf(Myself)) // Helm of A1 Protection
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("NPCHAN",LastAttackerOf(Myself)) // Corthala Family Armor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquiped("SHLD25",LastAttackerOf(Myself)) // Shield of Harmony +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("REAVER",LastAttackerOf(Myself)) // Unholy Reaver
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SPER07",LastAttackerOf(Myself)) // Spear of the Unicorn +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("STAF11",LastAttackerOf(Myself)) // Staff of the Magi
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H35",LastAttackerOf(Myself)) // Adjatha The Drinker +2
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW1H54",LastAttackerOf(Myself)) // The Equalizer
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("SW2H14",LastAttackerOf(Myself)) // Lilarcor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    !HasItemEquipedReal("MISCBC",LastAttackerOf(Myself)) // Blackrazor
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatGT(LastAttackerOf(Myself),2,SAVEVSSPELL)
  OR(2)
    GlobalTimerNotExpired("IL","LOCALS")
    CheckStatLT(LastAttackerOf(Myself),35,RESISTMAGIC)
  See(LastAttackerOf(Myself))
  False()
THEN
  RESPONSE #100
    Continue()
END

IF
  !GlobalTimerNotExpired("Cast","LOCALS")
  !GlobalTimerNotExpired("A2","LOCALS")
  See(LastSeenBy(Myself))
  !Allegiance(LastSeenBy(Myself),ENEMY)
  Allegiance(Myself,ENEMY)
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !HasItemEquiped("clck26",LastSeenBy(Myself)) // Cloak of Mirroring
  OR(2)
    GlobalTimerNotExpired("IS","LOCALS")
    !CheckStatGT(LastSeenBy(Myself),1,129)
  !StateCheck(LastSeenBy(Myself),STATE_IMPROVEDINVISIBILITY)
  !CheckStatGT(LastSeenBy(Myself),0,SANCTUARY)
THEN
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A2","LOCALS",28)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_DOMINATION)
  RESPONSE #100
    SetGlobalTimer("A2","LOCALS",6)
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A2","LOCALS",32)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_DOMINATION)
  RESPONSE #100
    SetGlobalTimer("Cast","LOCALS",6)
    SetGlobalTimer("A2","LOCALS",24)
    ReallyForceSpell(LastSeenBy(Myself),VAMPIRE_DOMINATION)
END
