IF
	!GlobalTimerNotExpired("CAST","LOCALS")
    HasItem("WAND04",Myself) // Wand of Paralyzation
    See(NearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(SecondNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(ThirdNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(FourthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(FifthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(SixthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),2,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),25,RESISTMAGIC)
    See(NearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(SecondNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(ThirdNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(FourthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(FifthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(SixthNearestEnemyOf(Myself))
    OR(13)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
        CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
        CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
        CheckStatLT(LastSeenBy(Myself),-1,SAVEVSWANDS)
        StateCheck(LastSeenBy(Myself),STATE_BERSERK)
        CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
        Kit(LastSeenBy(Myself),UNDEADHUNTER)
        Kit(LastSeenBy(Myself),INQUISITOR)
        HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
        HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
        HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
        StateCheck(LastSeenBy(Myself),2148802605)
        CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
    See(NearestEnemyOf(Myself))
    False()
THEN
    RESPONSE #100
END

IF
	!GlobalTimerNotExpired("CAST","LOCALS")
    HasItem("WAND04",Myself) // Wand of Paralyzation
    !CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_DEFLECTION)
    !CheckStatGT(LastSeenBy(Myself),0,WIZARD_SPELL_TURNING)
    !CheckStatGT(LastSeenBy(Myself),0,CLERIC_SHIELD_OF_THE_ARCHONS)
    CheckStatGT(LastSeenBy(Myself),-2,SAVEVSWANDS)
    !StateCheck(LastSeenBy(Myself),STATE_BERSERK)
    !CheckStat(LastSeenBy(Myself),1,SCRIPTINGSTATE4)
    !Kit(LastSeenBy(Myself),UNDEADHUNTER)
    !Kit(LastSeenBy(Myself),INQUISITOR)
    !HasItemEquiped("RING09",LastSeenBy(Myself)) // Ring of Free Action
    !HasItemEquiped("NPPLAT",LastSeenBy(Myself)) // Firecam Full-Plate Armor
    !HasItemEquiped("SHLD25",LastSeenBy(Myself)) // Shield of Harmony +2
    !CheckStatGT(LastSeenBy(Myself),75,RESISTMAGIC)
THEN
    RESPONSE #100
        SetGlobalTimer("CAST","LOCALS",6)
        DisplayStringHead(Myself,31971) // uses a wand
        DisplayStringHead(Myself,6690) // Wand of Paralyzation
        UseItem("WAND04",LastSeenBy(Myself)) // Wand of Paralyzation
END
