IF
  See(NearestEnemyOf(Myself))
  Global("goldz1","LOCALS",0)
  Global("goldzhate","GLOBAL",0)
THEN
  RESPONSE #100
    SetGlobal("goldzhate","GLOBAL",1)
    ForceSpell(Myself,WIZARD_STONE_SKIN)
    ForceSpell(Myself,WIZARD_HASTE)
    ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET)
    SetGlobal("goldz1","LOCALS",1)
END

IF
  !See(NearestEnemyOf(Myself))
  HPPercentLT(Myself,95)
THEN
  RESPONSE #100
    ForceSpell(Myself,CLERIC_CURE_SERIOUS_WOUNDS)
END

IF
  HPLT(Myself,100)
  Global("goldzDEATH","LOCALS",0)
THEN
  RESPONSE #100
    ReallyForceSpell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
    ReallyForceSpell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
    ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
    SetGlobal("goldzDEATH","LOCALS",1)
END

IF
  See(NearestEnemyOf(Myself))
  Global("goldzFEAR","LOCALS",0)
THEN
  RESPONSE #100
    ReallyForceSpell(NearestEnemyOf(Myself),DRAGON_FEAR)
    SetGlobal("goldzFEAR","LOCALS",1)
    SetGlobalTimer("goldzDRAGONBREATH","GLOBAL",1)
    ForceSpell(NearestEnemyOf(Myself),DRAGON_WING_BUFFET)
END

IF
  See(NearestEnemyOf(Myself))
  Global("goldz2","LOCALS",0)
THEN
  RESPONSE #100
    ReallyForceSpell(NearestEnemyOf(Myself),CLERIC_FIRE_STORM)
    ReallyForceSpell(NearestEnemyOf(Myself),WIZARD_CLOUDKILL)
    SetGlobal("goldz2","LOCALS",1)
END

IF
  GlobalTimerExpired("goldzDRAGONBREATH","GLOBAL")
  See(NearestEnemyOf(Myself))
  Range(LastSeenBy(Myself),11)
  Global("WingBuffet","LOCALS",0)
THEN
  RESPONSE #100
    ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET)
    Wait(1)
    SetGlobal("WingBuffet","LOCALS",1)
  RESPONSE #70
    Continue()
END

IF
  See(NearestEnemyOf(Myself))
  !Range(LastSeenBy(Myself),10)
  GlobalTimerExpired("goldzDRAGONBREATH","GLOBAL")
THEN
  RESPONSE #100
    SetGlobal("WingBuffet","LOCALS",0)
    ForceSpell(LastSeenBy(Myself),RED_DRAGON_BREATH)
    SetGlobalTimer("goldzDRAGONBREATH","GLOBAL",18)
END

IF
  Global("WingBuffet","LOCALS",1)
  See(NearestEnemyOf(Myself))
  Range(LastSeenBy(Myself),11)
THEN
  RESPONSE #100
    SetGlobal("WingBuffet","LOCALS",0)
    SetGlobalTimer("goldzDRAGONBREATH","GLOBAL",18)
END

IF
  See(NearestEnemyOf(Myself))
  Global("goldzOffense","LOCALS",0)
THEN
  RESPONSE #100
    ForceSpell(NearestEnemyOf(Myself),WIZARD_MAZE)
    ForceSpell(SecondNearestEnemyOf(Myself),WIZARD_MAZE)
    SetGlobal("goldzOffense","LOCALS",1)
END

IF
  See(NearestEnemyOf(Myself))
  Global("Haste","LOCALS",0)
THEN
  RESPONSE #100
    ForceSpell(Myself,WIZARD_HASTE)
    SetGlobal("Haste","LOCALS",1)
END

IF
  See(NearestEnemyOf(Myself))
  Global("goldzDOMINATE","LOCALS",0)
THEN
  RESPONSE #100
    ForceSpell(WorstAC,WIZARD_DOMINATION)
    ForceSpell(BestAC,WIZARD_DOMINATION)
    SetGlobal("goldzDOMINATE","LOCALS",1)
END

IF
  Global("goldzSilence","LOCALS",0)
  OR(2)
    See(NearestEnemyOfType([0.0.0.MAGE_ALL]))
    See(NearestEnemyOfType([0.0.0.CLERIC_ALL]))
THEN
  RESPONSE #100
    ForceSpell(LastSeenBy(Myself),DRAGON_SILENCE)
    SetGlobal("goldzSilence","LOCALS",1)
    AttackOneRound(LastSeenBy(Myself))
    AttackOneRound(LastSeenBy(Myself))
END

IF
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
    EquipMostDamagingMelee()
    AttackReevaluate(NearestEnemyOf(Myself),35)
  RESPONSE #10
    ReallyForceSpell(LastSeenBy(Myself),COM_DRUID_SUMMON_LIGHTNING_ELEMENTAL)
    ReallyForceSpell(LastSeenBy(Myself),COM_DRUID_SUMMON_LIGHTNING_ELEMENTAL)
END

IF
  Allegiance(Myself,ENEMY)
THEN
  RESPONSE #100
    MoveToObject(NearestEnemyOf(Myself))
END

IF
  AttackedBy([GOODCUTOFF],DEFAULT)
  Allegiance(Myself,NEUTRAL)
THEN
  RESPONSE #100
    Enemy()
END

