IF
  Global("start","LOCALS",0)
THEN
  RESPONSE #100
    ReallyForceSpell(Myself,WIZARD_DETECT_INVISIBILITY)
    ReallyForceSpell(NearestEnemyOf(Myself),2326)//WIZARD_DISPEL_MAGIC)
    ApplySpell(Myself,WIZARD_STONE_SKIN)
    ApplySpell(Myself,WIZARD_SPELL_TURNING)
    SetGlobal("start","LOCALS",1)
END

IF
  Global("prep2","LOCALS",0)
THEN
  RESPONSE #100
    ApplySpell(Myself,WIZARD_HASTE)
    ReallyForceSpell(NearestEnemyOf(Myself),COM_DRUID_SUMMON_LIGHTNING_ELEMENTAL)
    ReallyForceSpell(NearestEnemyOf(Myself),COM_DRUID_SUMMON_LIGHTNING_ELEMENTAL)
    SetGlobal("prep2","LOCALS",1)
END

IF
  Global("weak","GLOBAL",0)
  HPLT(Myself,85)
THEN
  RESPONSE #100
    ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
    ReallyForceSpell(Myself,WIZARD_HASTE)
    SetGlobal("weak","GLOBAL",1)
END

IF
  HPLT(Myself,50)
  Global("dire","LOCALS",0)
THEN
  RESPONSE #100
    ApplySpell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
    ApplySpell(Myself,CLERIC_REGENERATE)
    SetGlobal("dire","LOCALS",1)
END

IF
  Global("grazprep","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobalTimer("magicmissile","GLOBAL",14)
    SetGlobal("grazprep","LOCALS",1)
END

IF
  Global("fearme","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobalTimer("fear","GLOBAL",20)
    SetGlobal("fearme","LOCALS",1)
END

IF
  Global("grazprep","LOCALS",1)
  GlobalTimerExpired("magicmissile","GLOBAL")
THEN
  RESPONSE #100
    ForceSpell(NearestEnemyOf(Myself),BEHOLDER_MAGIC_MISSILE)
    ForceSpell(SecondNearestEnemyOf(Myself),BEHOLDER_MAGIC_MISSILE)
    SetGlobal("grazprep","LOCALS",0)
END

IF
  Global("fearme","LOCALS",1)
  GlobalTimerExpired("fear","GLOBAL")
THEN
  RESPONSE #100
    ForceSpell(NearestEnemyOf(Myself),WIZARD_SYMBOL_FEAR)
    SetGlobal("fearme","LOCALS",0)
END

IF
  Global("bleed","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobalTimer("bleeder","GLOBAL",10)
    SetGlobal("bleed","LOCALS",1)
END

IF
  Global("Bleed","LOCALS",1)
  GlobalTimerExpired("bleeder","GLOBAL")
THEN
  RESPONSE #100
    ForceSpell(NearestEnemyOf(Myself),COM_HEMOPHILIA)
    ForceSpell(SecondNearestEnemyOf(Myself),COM_HEMOPHILIA)
    SetGlobal("Bleed","LOCALS",2)
END

IF
  Global("lava","LOCALS",0)
THEN
  RESPONSE #100
    SetGlobal("lava","LOCALS",1)
    SetGlobalTimer("lavaaid","GLOBAL",28)
END

IF
  Global("lava","LOCALS",1)
  GlobalTimerExpired("lavaaid","GLOBAL")
THEN
  RESPONSE #100
    ReallyForceSpell(Myself,CLERIC_SUMMON_LAVA_ELEMENTAL)
    ReallyForceSpell(Myself,CLERIC_SUMMON_LAVA_ELEMENTAL)
    SetGlobal("lava","LOCALS",2)
END

IF
  AttackedBy([GOODCUTOFF],DEFAULT)
THEN
  RESPONSE #100
    MoveToObject(NearestEnemyOf(Myself))
END

IF
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    EquipMostDamagingMelee()
    Attack(NearestEnemyOf(Myself))
END

