IF
	See([ENEMY])
        !GlobalTimerNotExpired("RukMilteTriggerT","LOCALS")
THEN
	RESPONSE #100
                SetGlobalTimer("RukMilteTriggerT","LOCALS",60)
                DisplayStringHead(Myself,@79)
                ApplySpell(Myself,WIZARD_MIRROR_IMAGE)
                ApplySpell(Myself,WIZARD_SPIRIT_ARMOR)
                ApplySpell(Myself,WIZARD_STONE_SKIN)
                ApplySpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
                ApplySpell(Myself,WIZARD_SPELL_IMMUNITY_DIVINATION)
                Wait(6)
                Continue()
END

IF
	See([ENEMY])
        !GlobalTimerNotExpired("RukMilteContingencyT","LOCALS")
THEN
	RESPONSE #100
                SetGlobalTimer("RukMilteContingencyT","LOCALS",60)
                DisplayStringHead(Myself,@80)
                ApplySpell(Myself,WIZARD_PROTECTION_FROM_FIRE)
                ApplySpell(Myself,WIZARD_PROTECTION_FROM_COLD)
                ApplySpell(Myself,WIZARD_FIRE_SHIELD_RED)
                ApplySpell(Myself,WIZARD_IMPROVED_INVISIBILITY)
                ApplySpell(Myself,WIZARD_MISLEAD)
                Wait(6)
                Continue()
END

IF
	See([ENEMY])
        !GlobalTimerNotExpired("RukMilteSequencerT","LOCALS")
THEN
	RESPONSE #100
                SetGlobalTimer("RukMilteSequencerT","LOCALS",60)
                DisplayStringHead(Myself,@81)
                ApplySpell(Myself,WIZARD_GLOBE_OF_INVULNERABILITY)
                ApplySpell(Myself,WIZARD_SPELL_SHIELD)
                ApplySpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
                ApplySpell(Myself,WIZARD_TRUE_SIGHT)
                ApplySpell(Myself,WIZARD_SIMULACRUM)
                Wait(6)
                Continue()
END

IF
	See([ENEMY])
        !GlobalTimerNotExpired("RukMilteMORDENT","LOCALS")
THEN
	RESPONSE #100
                SetGlobalTimer("RukMilteMORDENT","LOCALS",120)
                ForceSpell(Myself,WIZARD_MORDENKAINENS_SWORD)
                ForceSpell(Myself,WIZARD_MORDENKAINENS_SWORD)
                ForceSpell(Myself,WIZARD_MORDENKAINENS_SWORD)
                Continue()
END

IF
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 100, RESISTMAGIC)
        HPLT(LastSeenBy(Myself), 60)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_POWER_WORD_KILL)
END

IF
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 100, RESISTMAGIC)
        CheckStatGT(LastSeenBy(Myself), 10, SAVEVSDEATH)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_WAIL_OF_THE_BANSHEE)
END

IF
        CheckStatGT(Myself, 99, RESISTFIRE)
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 100, RESISTMAGIC)
        CheckStatLT(LastSeenBy(Myself), 100, RESISTFIRE)
        !GlobalTimerNotExpired("CLOUD","LOCALS")
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                SetGlobalTimer("CLOUD","LOCALS",60)
                ForceSpell(LastSeenBy(Myself),WIZARD_INCENDIARY_CLOUD)
END

IF
        CheckStatGT(Myself, 99, RESISTFIRE)
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 100, RESISTMAGIC)
        CheckStatLT(LastSeenBy(Myself), 100, RESISTFIRE)
        !GlobalTimerNotExpired("METEOR","LOCALS")
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                SetGlobalTimer("METEOR","LOCALS",60)
                ForceSpell(LastSeenBy(Myself),WIZARD_METEOR_SWARM)
END

IF
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 100, RESISTMAGIC)
        CheckStatLT(LastSeenBy(Myself), 100, MAGICDAMAGERESISTANCE)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
                Continue()
END

IF
	See([ENEMY])
        CheckStatGT(LastSeenBy(Myself), 30, RESISTMAGIC)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_LOWER_RESISTANCE)
                ReallyForceSpell(LastSeenBy(Myself),WIZARD_LOWER_RESISTANCE)
                ReallyForceSpell(LastSeenBy(Myself),WIZARD_LOWER_RESISTANCE)
END

IF
	See([ENEMY])
        CheckStatLT(LastSeenBy(Myself), 10, SAVEVSDEATH)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON)
                ReallyForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON)
                ReallyForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON)
END

IF
        OR(13)
          StateCheck(LastSeenBy(Myself), STATE_INVISIBLE)
          StateCheck(LastSeenBy(Myself), STATE_IMPROVEDINVISIBILITY)
          StateCheck(LastSeenBy(Myself), STATE_MIRRORIMAGE)
          StateCheck(LastSeenBy(Myself), STATE_HASTED)
	  HasBounceEffects(LastSeenBy(Myself))
	  HasImmunityEffects(LastSeenBy(Myself))
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_ENERGY)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_MISLEAD)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_TENSERS_TRANSFORMATION)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_ENERGY)
          CheckStatGT(LastSeenBy(Myself),0,STONESKINS)
          CheckStatGT(LastSeenBy(Myself),0,IMPROVEDHASTE)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
                Continue()
END

IF
        OR(13)
          StateCheck(LastSeenBy(Myself), STATE_INVISIBLE)
          StateCheck(LastSeenBy(Myself), STATE_IMPROVEDINVISIBILITY)
          StateCheck(LastSeenBy(Myself), STATE_MIRRORIMAGE)
          StateCheck(LastSeenBy(Myself), STATE_HASTED)
	  HasBounceEffects(LastSeenBy(Myself))
	  HasImmunityEffects(LastSeenBy(Myself))
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_MAGIC_ENERGY)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_MISLEAD)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_TENSERS_TRANSFORMATION)
	  CheckStatGT(LastSeenBy(Myself),0,WIZARD_PROTECTION_FROM_ENERGY)
          CheckStatGT(LastSeenBy(Myself),0,STONESKINS)
          CheckStatGT(LastSeenBy(Myself),0,IMPROVEDHASTE)
	!InMyGroup(LastSeenBy(Myself))
THEN
	RESPONSE #100
                ForceSpell(LastSeenBy(Myself),WIZARD_SPELL_STRIKE)
                ReallyForceSpell(LastSeenBy(Myself),WIZARD_BREACH)
END