IF
 InParty("Saerileth")
 Global("FoundKesevar","GLOBAL",3)
 Global("FoundGunshain","GLOBAL",1)
 Detect("Saerileth")
 THEN
 RESPONSE #100
 SetGlobal("FoundKesevar","GLOBAL",4)
 StartDialogueNoSet("Saerileth")
 END



IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_COMET)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_COMET)
END


IF
  See(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),7)
  HaveSpell(WIZARD_ABI_DALZIMS_HORRID_WILTING)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_SPHERE_OF_CHAOS)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_SPHERE_OF_CHAOS)
END


IF
  See(NearestEnemyOf(Myself))
  Range(NearestEnemyOf(Myself),7)
  HaveSpell(WIZARD_ABI_DALZIMS_HORRID_WILTING)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_FINGER_OF_DEATH)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_FINGER_OF_DEATH)
END



IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_CHAIN_LIGHTNING)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_CHAIN_LIGHTNING)
END


IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_STONE_SKIN)
  CheckStatLT(Myself,1,STONESKINS)
THEN
  RESPONSE #100
    Spell(Myself,WIZARD_STONE_SKIN)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_LOWER_RESISTANCE)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_LOWER_RESISTANCE)
END


IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_MELF_ACID_ARROW)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_MELF_ACID_ARROW)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_MAGIC_MISSILE)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_MAGIC_MISSILE)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_STONE_SKIN)
  CheckStatLT(Myself,1,STONESKINS)
THEN
  RESPONSE #100
    Spell(Myself,WIZARD_STONE_SKIN)
END


IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_FLAME_ARROW)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_FLAME_ARROW)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_CHAOS)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_CHAOS)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WIZARD_VAMPIRIC_TOUCH)
THEN
  RESPONSE #100
    Spell(NearestEnemyOf(Myself),WIZARD_VAMPIRIC_TOUCH)
END

IF
  See(NearestEnemyOf(Myself))
  HaveSpell(WARRIOR_GREATER_DEATHBLOW)
THEN
  RESPONSE #100
    Spell(Myself,WARRIOR_GREATER_DEATHBLOW)
END


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