IF
	GlobalGT("Cb_DSACKsFeintStart","AR3521",1)
THEN
	RESPONSE #100
		ChangeAIScript("CBBDAWCL",CLASS)
		StartDialogNoSet(LastAttackerOf(Myself))
END

IF
	Global("Cb_DSACKsFeintStart","AR3521",1)
	!Exists("CBBDFHJD")
THEN
	RESPONSE #100
		CreateCreature("CBBDFHJD",[-1.-1],0)
		Continue()
END

IF
	Global("Cb_DSACKsFeintStart","AR3521",1)
	!Exists("CBBDFHJE")
THEN
	RESPONSE #100
		CreateCreature("CBBDFHJE",[-1.-1],0)
		Continue()
END

IF
	Global("Cb_DSACK_WeaponChoice","AR3521",1)
	Global("Cb_DSACKsFeintStart","AR3521",1)
	OR(2)
		HitBy([GOODCUTOFF],MISSILE)
		HitBy([GOODCUTOFF],SLASHING)
THEN
	RESPONSE #100
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	Global("Cb_DSACK_WeaponChoice","AR3521",2)
	Global("Cb_DSACKsFeintStart","AR3521",1)
	HitBy([GOODCUTOFF],MISSILE)
THEN
	RESPONSE #100
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	Global("Cb_DSACK_WeaponChoice","AR3521",3)
	Global("Cb_DSACKsFeintStart","AR3521",1)
	OR(2)
		HitBy([GOODCUTOFF],PIERCING)
		HitBy([GOODCUTOFF],MISSILE)
THEN
	RESPONSE #100
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	!GlobalTimerNotExpired("DRAGONFEAR","LOCALS")
THEN
	RESPONSE #100
		SetGlobalTimer("DRAGONFEAR","LOCALS",100)
		PlaySound("ABAZIG02")
		Continue()
END

IF
	!GlobalTimerNotExpired("Prepare2","LOCALS")
	!CheckStatGT(Myself,0,STONESKINS)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("Prepare2","LOCALS",1000)
		DisplayString(Myself,73139)
		ApplySpell(Myself,DRAGON_STONE_SKIN)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
		Continue()
END

IF
	!GlobalTimerNotExpired("Prepare2","LOCALS")
	!CheckStatGT(Myself,0,STONESKINS)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("Prepare2","LOCALS",1000)
		DisplayString(Myself,73139)
		ApplySpell(Myself,DRAGON_STONE_SKIN)
		ReallyForceSpell(Myself,BEHOLDER_SPELL_TURNING)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
		Continue()
END

IF
	!GlobalTimerNotExpired("SpellTrigger1","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("SpellTrigger1","LOCALS",1000)
		DisplayString(Myself,39968)
		ReallyForceSpell(Myself,WIZARD_IMPROVED_HASTE)
		ReallyForceSpell(Myself,HEAL_NO_VISUAL)
		ReallyForceSpell(Myself,0)
		ReallyForceSpell(Myself,0)
		Continue()
END

IF
	OR(5)
		SpellCast([GOODCUTOFF],WIZARD_CLOUDKILL)
		SpellCast([GOODCUTOFF],WIZARD_INCENDIARY_CLOUD)
		SpellCast([GOODCUTOFF],WIZARD_DEATH_FOG)
		SpellCast([GOODCUTOFF],WIZARD_FOG_CLOUD)
		SpellCast([GOODCUTOFF],WIZARD_STINKING_CLOUD)
	!GlobalTimerNotExpired("WINGBUFFET","LOCALS")
	Global("Cb_DSACKsFeintStart","AR3531",1)
	Global("Cb_DSACK_SpellLevel","AR3521",1)
THEN
	RESPONSE #100
		SetGlobalTimer("WINGBUFFET","LOCALS",8)
		ForceSpell(NearestEnemyOf(Myself),DRAGON_WING_BUFFET)
		Wait(1)
		ApplySpell(Myself,0)
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	OR(4)
		SpellCast([GOODCUTOFF],WIZARD_CLOUDKILL)
		SpellCast([GOODCUTOFF],WIZARD_INCENDIARY_CLOUD)
		SpellCast([GOODCUTOFF],WIZARD_DEATH_FOG)
		SpellCast([GOODCUTOFF],WIZARD_FOG_CLOUD)
	!GlobalTimerNotExpired("WINGBUFFET","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("WINGBUFFET","LOCALS",8)
		ForceSpell(NearestEnemyOf(Myself),DRAGON_WING_BUFFET)
		Wait(1)
		ApplySpell(Myself,0)
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	SpellCast([GOODCUTOFF],WIZARD_STINKING_CLOUD)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("WINGBUFFET","LOCALS",8)
		ForceSpell(NearestEnemyOf(Myself),DRAGON_WING_BUFFET)
		Wait(1)
		ApplySpell(Myself,0)
		Continue()
END

IF
	OR(5)
		SpellCast([GOODCUTOFF],WIZARD_CLOUDKILL)
		SpellCast([GOODCUTOFF],WIZARD_INCENDIARY_CLOUD)
		SpellCast([GOODCUTOFF],WIZARD_DEATH_FOG)
		SpellCast([GOODCUTOFF],WIZARD_FOG_CLOUD)
		SpellCast([GOODCUTOFF],WIZARD_STINKING_CLOUD)
	!GlobalTimerNotExpired("WINGBUFFET","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("WINGBUFFET","LOCALS",8)
		ForceSpell(NearestEnemyOf(Myself),DRAGON_WING_BUFFET)
		Wait(1)
		ApplySpell(Myself,0)
		Continue()
END

IF
	!GlobalTimerNotExpired("dbMalison","LOCALS")
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("dbMalison","LOCALS",1000)
		ForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON)
		Continue()
END

IF
	!CheckStatGT(Myself,0,STONESKINS)
	!GlobalTimerNotExpired("DragonStoneSkin","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("DragonStoneSkin","LOCALS",60)
		ForceSpell(Myself,DRAGON_STONE_SKIN)
		Continue()
END

IF
	!CheckStatGT(Myself,0,STONESKINS)
	!GlobalTimerNotExpired("DragonStoneSkin","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #33
		SetGlobalTimer("DragonStoneSkin","LOCALS",60)
		ForceSpell(Myself,DRAGON_STONE_SKIN)
		ForceSpell(LastSeenBy(Myself),WIZARD_SECRET_WORD)
		Continue()
	RESPONSE #33
		SetGlobalTimer("DragonStoneSkin","LOCALS",60)
		ForceSpell(Myself,DRAGON_STONE_SKIN)
		ForceSpell(LastSeenBy(Myself),WIZARD_BREACH)
		Continue()
	RESPONSE #34
		SetGlobalTimer("DragonStoneSkin","LOCALS",60)
		ForceSpell(Myself,DRAGON_STONE_SKIN)
		ForceSpell(LastSeenBy(Myself),WIZARD_PIERCE_MAGIC)
		Continue()
END

IF
	OR(6)
		Class(LastSeenBy(Myself),PALADIN_ALL)
		Class(LastSeenBy(Myself),DRUID_ALL)
		Class(LastSeenBy(Myself),CLERIC_ALL)
		Class(LastSeenBy(Myself),BARD_ALL)
		Class(LastSeenBy(Myself),MAGE)
		Class(LastSeenBy(Myself),SORCERER)
	!StateCheck(LastSeenBy(Myself),STATE_SILENCED)
	!HasBounceEffects(LastSeenBy(Myself))
	!GlobalTimerNotExpired("dbSilence","LOCALS")
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("dbSilence","LOCALS",15)
		ForceSpell(LastSeenBy(Myself),DRAGON_SILENCE)
		Continue()
END

IF
	CheckStatLT(Myself,50,RESISTMAGIC)
	!GlobalTimerNotExpired("RegainMagic","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("RegainMagic","LOCALS",15)
		ApplySpell(Myself,0)
		Continue()
END

IF
	!CheckStatGT(LastSeenBy(Myself),50,RESISTMAGIC)
	!GlobalTimerNotExpired("Barrage","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_CHAOS)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_SLOW)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_POWER_WORD_BLIND)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_PRISMATIC_SPRAY)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_FEEBLEMIND)
		Continue()
END

IF
	!CheckStatGT(LastSeenBy(Myself),50,RESISTMAGIC)
	!GlobalTimerNotExpired("Barrage","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_CHAOS)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_MAZE)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_FINGER_OF_DEATH)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_SLOW)
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_POWER_WORD_BLIND)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_PRISMATIC_SPRAY)
		Continue()
	RESPONSE #100
		SetGlobalTimer("Barrage","LOCALS",18)
		ForceSpell(LastSeenBy(Myself),WIZARD_FEEBLEMIND)
		Continue()
END

IF
	!HasBounceEffects(Myself)
	!StateCheck(LastSeenBy(Myself),STATE_SILENCED)
	!GlobalTimerNotExpired("SpellTurn","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("SpellTurn","LOCALS",15)
		ForceSpell(Myself,BEHOLDER_SPELL_TURNING)
		Continue()
END

IF
	Global("Prepare2","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		DisplayString(Myself,73139)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_SYMBOL_FEAR)
		SetGlobal("Prepare2","LOCALS",1)
		Continue()
END

IF
	Global("Prepare2","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		DisplayString(Myself,73139)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
		ReallyForceSpell(Myself,WIZARD_IMPROVED_MANTLE)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_SYMBOL_FEAR)
		SetGlobal("Prepare2","LOCALS",1)
		Continue()
END

IF
	Global("CbSpyDidThis1","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis1","LOCALS",1)
		Spell(Myself,WIZARD_TRUE_SIGHT)
		ForceSpell(LastSeenBy(Myself),WIZARD_MELF_ACID_ARROW)
		Continue()
END

IF
	Global("CbSpyDidThis1","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis1","LOCALS",1)
		Spell(Myself,WIZARD_TRUE_SIGHT)
		ForceSpell(LastSeenBy(Myself),WIZARD_METEOR_SWARM)
		Continue()
END

IF
	OR(3)
		SpellCast([PC],WIZARD_PROJECT_IMAGE)
		SpellCast([PC],WIZARD_SIMULACRUM)
		SpellCast([PC],WIZARD_MISLEAD)
	!GlobalTimerNotExpired("TrueSight","LOCALS")
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",1)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("TrueSight","LOCALS",30)
		SetGlobal("Cb_DSACKsFeintStart","AR3521",2)
		SetGlobal("Cb_DSACKsFeintLose","AR3521",1)
END

IF
	OR(6)
		Gender(LastSeenBy(Myself),ILLUSIONARY)
		SpellCast([PC],WIZARD_PROJECT_IMAGE)
		SpellCast([PC],WIZARD_SIMULACRUM)
		SpellCast([PC],WIZARD_MISLEAD)
		StateCheck(LastSeenBy(Myself),STATE_BLUR)
		StateCheck(LastSeenBy(Myself),STATE_MIRRORIMAGE)
	!GlobalTimerNotExpired("TrueSight","LOCALS")
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("TrueSight","LOCALS",30)
		ForceSpell(Myself,WIZARD_TRUE_SIGHT)
		Continue()
END

IF
	See([GOODCUTOFF.0.0.0.0.SUMMONED])
	Global("Summon","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_DEATH_SPELL)
		SetGlobal("Summon","LOCALS",1)
		Continue()
END

IF
	!GlobalTimerNotExpired("dbDispel","LOCALS")
	!StateCheck(LastSeenBy(Myself),STATE_SILENCED)
	!StateCheck(LastSeenBy(Myself),STATE_STUNNED)
	!StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
	OR(5)
		StateCheck(LastSeenBy(Myself),STATE_HASTED)
		StateCheck(LastSeenBy(Myself),STATE_BLESS)
		StateCheck(LastSeenBy(Myself),STATE_DRAWUPONHOLYMIGHT)
		CheckStatGT(LastSeenBy(Myself),0,0)
		CheckStatGT(LastSeenBy(Myself),0,0)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobalTimer("dbDispel","LOCALS",30)
		ForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
END

IF
	!GlobalTimerNotExpired("dbDispel","LOCALS")
	!StateCheck(LastSeenBy(Myself),STATE_SILENCED)
	!StateCheck(LastSeenBy(Myself),STATE_STUNNED)
	!StateCheck(LastSeenBy(Myself),STATE_SLEEPING)
	OR(5)
		StateCheck(LastSeenBy(Myself),STATE_HASTED)
		StateCheck(LastSeenBy(Myself),STATE_BLESS)
		StateCheck(LastSeenBy(Myself),STATE_DRAWUPONHOLYMIGHT)
		CheckStatGT(LastSeenBy(Myself),0,0)
		CheckStatGT(LastSeenBy(Myself),0,0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("dbDispel","LOCALS",30)
		ForceSpell(LastSeenBy(Myself),WIZARD_DISPEL_MAGIC)
		Continue()
END

IF
	Global("CbSpyDidThis2","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis2","LOCALS",1)
		Spell(Myself,WIZARD_TIME_STOP)
		Continue()
END

IF
	OR(3)
		Class(LastSeenBy(Myself),BARD_ALL)
		Class(LastSeenBy(Myself),MAGE)
		Class(LastSeenBy(Myself),SORCERER)
	OR(2)
		HasBounceEffects(LastSeenBy(Myself))
		HasImmunityEffects(LastSeenBy(Myself))
	!GlobalTimerNotExpired("dbSecret","LOCALS")
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobalTimer("dbSecret","LOCALS",30)
		ForceSpell(LastSeenBy(Myself),WIZARD_SECRET_WORD)
		Continue()
	RESPONSE #50
		SetGlobalTimer("dbSecret","LOCALS",30)
		ForceSpell(LastSeenBy(Myself),WIZARD_BREACH)
		Continue()
	RESPONSE #25
		SetGlobalTimer("dbSecret","LOCALS",30)
		ForceSpell(LastSeenBy(Myself),WIZARD_PIERCE_MAGIC)
		Continue()
END

IF
	Global("CbSpyDidThis3","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis3","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_NPC_SYMBOL_STUN)
		Continue()
END

IF
	Global("CbSpyDidThis3","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis3","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_NPC_SYMBOL_STUN)
		Continue()
END

IF
	Global("Prepare","LOCALS",0)
	!CheckStatGT(Myself,0,STONESKINS)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		ApplySpell(Myself,WIZARD_STONE_SKIN)
		SetGlobal("Prepare","LOCALS",1)
		Continue()
END

IF
	Global("CbSpyDidThis4","LOCALS",0)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis4","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_NPC_SYMBOL_FEAR)
		Continue()
END

IF
	Global("SpellTrigger","LOCALS",0)
	HPGT(Myself,0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		DisplayString(Myself,39968)
		ReallyForceSpell(Myself,WIZARD_IMPROVED_HASTE)
		ReallyForceSpell(Myself,WIZARD_MISLEAD)
		ReallyForceSpell(LastSeenBy(Myself),WIZARD_DEATH_SPELL)
		SetGlobal("SpellTrigger","LOCALS",1)
		Continue()
END

IF
	Global("CbSpyDidThis5","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis5","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_WAIL_OF_THE_BANSHEE)
END

IF
	StateCheck(Myself,STATE_SILENCED)
THEN
	RESPONSE #100
		Spell(Myself,WIZARD_VOCALIZE)
END

IF
	Global("CbSpyDidThis6","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis6","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_SUN_FIRE)
		Continue()
END

IF
	Global("Prepare","LOCALS",1)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		Spell(Myself,WIZARD_SPELL_TURNING)
		SetGlobal("Prepare","LOCALS",2)
END

IF
	Global("CbSpyDidThis7","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis7","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_ABI_DALZIMS_HORRID_WILTING)
		Continue()
END

IF
	!HasBounceEffects(Myself)
	!HasImmunityEffects(Myself)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		Spell(Myself,WIZARD_SPELL_TURNING)
		Continue()
END

IF
	Global("CbSpyDidThis8","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis8","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_FINGER_OF_DEATH)
END

IF
	Global("Prepare2","LOCALS",1)
	HPPercentLT(Myself,100)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		DisplayString(Myself,40252)
		ApplySpell(Myself,WIZARD_PROTECTION_FROM_MAGIC_WEAPONS)
		SetGlobal("Prepare2","LOCALS",2)
		Continue()
END

IF
	Global("CbSpyDidThis9","LOCALS",0)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThis9","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_PRISMATIC_SPRAY)
		Continue()
END

IF
	Global("Cb_DSACK_SpellLevel","AR3521",3)
	Global("Cb_DSACK_Maze","LOCALS",0)
THEN
	RESPONSE #100
		SetGlobal("Cb_DSACK_Maze","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_MAZE)
		Continue()
END

IF
	Global("CbSpyDidThisA","LOCALS",0)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThisA","LOCALS",1)
		Spell(Myself,WIZARD_SUMMON_EFREET)
		Continue()
END

IF
	!HasImmunityEffects(Myself)
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
		ReallyForceSpell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
		Continue()
END

IF
	!HasImmunityEffects(Myself)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		ReallyForceSpell(Myself,WIZARD_STONE_SKIN)
		ReallyForceSpell(Myself,CLERIC_CURE_CRITICAL_WOUNDS)
		SpellNoDec(Myself,WIZARD_IMPROVED_MANTLE)
		Continue()
END

IF
	Global("CbSpyDidThisB","LOCALS",0)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThisB","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_FLESH_TO_STONE)
		Continue()
END

IF
	Global("CbSpyDidThisC","LOCALS",0)
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThisC","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_DISINTEGRATE)
		Continue()
END

IF
	Global("CbSpyDidThisD","LOCALS",0)
	OR(2)
		Global("Cb_DSACK_SpellLevel","AR3521",2)
		Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SetGlobal("CbSpyDidThisD","LOCALS",1)
		Spell(LastSeenBy(Myself),WIZARD_DOMINATION)
		Continue()
END

IF
	Detect([GOODCUTOFF])
	!See([GOODCUTOFF])
	Global("Cb_DSACK_SpellLevel","AR3521",2)
THEN
	RESPONSE #100
		SpellNoDec(Myself,WIZARD_SUMMON_EFREET)
		Continue()
END

IF
	Detect([GOODCUTOFF])
	!See([GOODCUTOFF])
	Global("Cb_DSACK_SpellLevel","AR3521",3)
THEN
	RESPONSE #100
		SpellNoDec(Myself,WIZARD_INVISIBLE_STALKER)
		Continue()
	RESPONSE #100
		SpellNoDec(Myself,WIZARD_SUMMON_EFREET)
		Continue()
END

IF
	See([GOODCUTOFF])
THEN
	RESPONSE #100
		AttackReevaluate(LastSeenBy(Myself),12)
END

IF
	!See([GOODCUTOFF])
THEN
	RESPONSE #100
		MoveToObject([GOODCUTOFF])
END

IF
	AttackedBy([GOODCUTOFF],DEFAULT)
THEN
	RESPONSE #100
		AttackReevaluate(LastAttackerOf(Myself),10)
END

