Baldur's Gate Wiki:Game source files/BCS/DRAGRED

Firkraag's override script is as follows: IF 	See(NearestEnemyOf(Myself)) Global("RemoveMagic","LOCALS",0) THEN RESPONSE #100 ForceSpell(Myself,DRAGON_STONE_SKIN) // SPIN694.SPL (Stoneskin) ForceSpell(LastSeenBy(Myself),WIZARD_REMOVE_MAGIC) // SPWI302.SPL (Remove Magic) SetGlobal("StoneSkin","LOCALS",1) SetGlobal("RemoveMagic","LOCALS",1) END IF 	!Detect([PC]) HPLT(Myself,50) CombatCounter(0) THEN RESPONSE #100 SetGlobal("RemoveMagic","LOCALS",0) SetGlobal("WingBuffet","LOCALS",0) SetGlobal("Haste","LOCALS",0) SetGlobal("DRAGONFEAR","LOCALS",0) ForceSpell(Myself,CLERIC_HEAL) // SPPR607.SPL (Heal) END IF 	See(NearestEnemyOf(Myself)) Global("DRAGONFEAR","LOCALS",0) THEN RESPONSE #100 ReallyForceSpell(NearestEnemyOf(Myself),DRAGON_FEAR) // SPIN895.SPL (Dragon Fear) ReallyForceSpell(NearestEnemyOf(Myself),DRAGON_LOWER_FIRE) // SPIN682.SPL (Lower Fire Resistance) SetGlobal("DRAGONFEAR","LOCALS",1) SetGlobalTimer("REDDRAGONBREATH","GLOBAL",1) ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet) END IF 	GlobalTimerExpired("REDDRAGONBREATH","GLOBAL") See(NearestEnemyOf(Myself)) Range(LastSeenBy(Myself),11) Global("WingBuffet","LOCALS",0) THEN RESPONSE #100 ForceSpell(LastSeenBy(Myself),DRAGON_WING_BUFFET) // SPIN695.SPL (Wing Buffet) Wait(1) SetGlobal("WingBuffet","LOCALS",1) RESPONSE #60 Continue END IF 	See(NearestEnemyOf(Myself)) !Range(LastSeenBy(Myself),10) GlobalTimerExpired("REDDRAGONBREATH","GLOBAL") THEN RESPONSE #100 SetGlobal("WingBuffet","LOCALS",0) ForceSpell(LastSeenBy(Myself),RED_DRAGON_BREATH) // SPIN894.SPL (Red Dragon Breath) ReallyForceSpell(LastSeenBy(Myself),RED_DRAGON_HIT) // SPIN693.SPL (No such index) SetGlobalTimer("REDDRAGONBREATH","GLOBAL",THREE_ROUNDS) END IF 	Global("WingBuffet","LOCALS",1) See(NearestEnemyOf(Myself)) Range(LastSeenBy(Myself),11) THEN RESPONSE #100 SetGlobal("WingBuffet","LOCALS",0) SetGlobalTimer("REDDRAGONBREATH","GLOBAL",THREE_ROUNDS) END IF 	See(NearestEnemyOf(Myself)) Global("Offense1","LOCALS",0) THEN RESPONSE #100 ForceSpell(LastSeenBy(Myself),WIZARD_GREATER_MALISON) // SPWI412.SPL (Greater Malison) SetGlobal("Offense1","LOCALS",1) END IF 	See(NearestEnemyOf(Myself)) Global("Haste","LOCALS",0) THEN RESPONSE #100 ForceSpell(Myself,WIZARD_HASTE) // SPWI305.SPL (Haste) SetGlobal("Haste","LOCALS",1) END IF 	See(NearestEnemyOf(Myself)) Global("HoldPerson","LOCALS",0) THEN RESPONSE #100 ForceSpell(LastSeenBy(Myself),CLERIC_HOLD_PERSON) // SPPR208.SPL (Hold Person) SetGlobal("HoldPerson","LOCALS",1) END IF 	Global("Silence","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) // SPIN692.SPL (Silence, 15' Radius) SetGlobal("Silence","LOCALS",1) AttackOneRound(LastSeenBy(Myself)) AttackOneRound(LastSeenBy(Myself)) END IF 	See(NearestEnemyOf(Myself)) Delay(6) GlobalLT("CharmPerson","LOCALS",3) THEN RESPONSE #100 ForceSpell(NearestEnemyOf(Myself),WIZARD_CHARM_PERSON) // SPWI104.SPL (Charm Person) IncrementGlobal("CharmPerson","LOCALS",1) END IF 	See(NearestEnemyOf(Myself)) THEN RESPONSE #100 EquipMostDamagingMelee AttackReevaluate(NearestEnemyOf(Myself),35) RESPONSE #10 ForceSpell(LastSeenBy(Myself),WIZARD_MELF_ACID_ARROW) // SPWI211.SPL (Melf's Acid Arrow) END IF 	Allegiance(Myself,ENEMY) THEN RESPONSE #100 MoveToObject(NearestEnemyOf(Myself)) END IF 	AttackedBy([GOODCUTOFF],DEFAULT) Allegiance(Myself,NEUTRAL) THEN RESPONSE #100 Enemy END