diff --git a/Skyrim.esm b/Skyrim.esm index 848243b2..91bce97d 100644 Binary files a/Skyrim.esm and b/Skyrim.esm differ diff --git a/_build/Used Skyrim scripts.txt b/_build/Used Skyrim scripts.txt index a0bf3b4a..e7f28b4e 100644 --- a/_build/Used Skyrim scripts.txt +++ b/_build/Used Skyrim scripts.txt @@ -63,18 +63,7 @@ defaultsetmultiavtriggerscript.* defaultsetstageonenter.* defaultsetstagetrigscript.* dialoguefollowerscript.* -dlc2hermaeusmorafacefxscript.* -dlc2miraakcombatmagiclevelingscript.* -dlc2miraakscript.* -dlc2mq05hermaeusmorafxscript.* -dlc2mq06miraakbossbattle.* -dlc2mq06script.* -dlc2mqbosstentaclecontroller.* -dlc2soulstealscript.* -dlc2standingstonescript.* -dlc2tamedragonscript.* doorbar.* -dragonperchscript.* dragonpriestactorscript.* dragontowerwallscript.* dunarcherpressureplatescript.* @@ -129,7 +118,6 @@ magicsetactoralphascript.* mg08paralysiseffectscript.* movingtrap.* mqgreybeardabsorbscript.* -mqkilldragonscript.* ms10questscript.* ms11questscript.* nightingalesecdoorscript.* @@ -195,4 +183,3 @@ weaponracktriggerscript.* webdestructiblescript.* werewolfchangeeffectscript.* werewolftransformvisual.* -wifunctionsscript.* diff --git a/scripts/dlc2hermaeusmorafacefxscript.pex b/scripts/dlc2hermaeusmorafacefxscript.pex deleted file mode 100644 index f7ac1f39..00000000 Binary files a/scripts/dlc2hermaeusmorafacefxscript.pex and /dev/null differ diff --git a/scripts/dlc2miraakcombatmagiclevelingscript.pex b/scripts/dlc2miraakcombatmagiclevelingscript.pex deleted file mode 100644 index 30a8456d..00000000 Binary files a/scripts/dlc2miraakcombatmagiclevelingscript.pex and /dev/null differ diff --git a/scripts/dlc2miraakscript.pex b/scripts/dlc2miraakscript.pex deleted file mode 100644 index 2ac8f15b..00000000 Binary files a/scripts/dlc2miraakscript.pex and /dev/null differ diff --git a/scripts/dlc2mq05hermaeusmorafxscript.pex b/scripts/dlc2mq05hermaeusmorafxscript.pex deleted file mode 100644 index 0b26895d..00000000 Binary files a/scripts/dlc2mq05hermaeusmorafxscript.pex and /dev/null differ diff --git a/scripts/dlc2mq06miraakbossbattle.pex b/scripts/dlc2mq06miraakbossbattle.pex deleted file mode 100644 index 1159b312..00000000 Binary files a/scripts/dlc2mq06miraakbossbattle.pex and /dev/null differ diff --git a/scripts/dlc2mq06script.pex b/scripts/dlc2mq06script.pex deleted file mode 100644 index 9e5e4c2b..00000000 Binary files a/scripts/dlc2mq06script.pex and /dev/null differ diff --git a/scripts/dlc2mqbosstentaclecontroller.pex b/scripts/dlc2mqbosstentaclecontroller.pex deleted file mode 100644 index 456ea74a..00000000 Binary files a/scripts/dlc2mqbosstentaclecontroller.pex and /dev/null differ diff --git a/scripts/dlc2soulstealscript.pex b/scripts/dlc2soulstealscript.pex deleted file mode 100644 index a5a72fd4..00000000 Binary files a/scripts/dlc2soulstealscript.pex and /dev/null differ diff --git a/scripts/dlc2standingstonescript.pex b/scripts/dlc2standingstonescript.pex deleted file mode 100644 index b63b6530..00000000 Binary files a/scripts/dlc2standingstonescript.pex and /dev/null differ diff --git a/scripts/dlc2tamedragonscript.pex b/scripts/dlc2tamedragonscript.pex deleted file mode 100644 index 30f7dae3..00000000 Binary files a/scripts/dlc2tamedragonscript.pex and /dev/null differ diff --git a/scripts/dragonactorscript.pex b/scripts/dragonactorscript.pex index ea7a699a..d234dc47 100644 Binary files a/scripts/dragonactorscript.pex and b/scripts/dragonactorscript.pex differ diff --git a/scripts/dragonperchscript.pex b/scripts/dragonperchscript.pex deleted file mode 100644 index 2f55c23c..00000000 Binary files a/scripts/dragonperchscript.pex and /dev/null differ diff --git a/scripts/mqkilldragonscript.pex b/scripts/mqkilldragonscript.pex deleted file mode 100644 index 242ea8d1..00000000 Binary files a/scripts/mqkilldragonscript.pex and /dev/null differ diff --git a/scripts/wifunctionsscript.pex b/scripts/wifunctionsscript.pex deleted file mode 100644 index e9d0795c..00000000 Binary files a/scripts/wifunctionsscript.pex and /dev/null differ diff --git a/source/scripts/dlc2hermaeusmorafacefxscript.psc b/source/scripts/dlc2hermaeusmorafacefxscript.psc deleted file mode 100644 index 968e75da..00000000 --- a/source/scripts/dlc2hermaeusmorafacefxscript.psc +++ /dev/null @@ -1,132 +0,0 @@ -Scriptname DLC2HermaeusMoraFaceFXSCRIPT extends ObjectReference -{Plays all of the HM face fx when activated} - -ObjectReference Property myHMface01 Auto -ObjectReference Property myHMface02 Auto -ObjectReference Property myHMface03 Auto -ObjectReference Property myHMface04 Auto -ObjectReference Property myHMface05 Auto -ObjectReference Property myHMface06 Auto -ObjectReference Property myHMface07 Auto -ObjectReference Property myHMface08 Auto - -int iMaxCount = 10 ; max times to loop waiting for 3D to load - -auto State Waiting -; default state -endState - -State HermaeusMoraAppear - -Event OnBeginState() ;;;this bloc makes the hermaeus mora art appear - if (myHMface01) - myHMface01.disable();;this delay gets same peices out of sync - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface01.enable();;;;;;;;;;;; - waitfor3D(myHMface01) - myHMface01.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface02) - myHMface02.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface03) - myHMface03.disable();;this delay gets same peices out of sync - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface03.enable() ;;;;;; - waitfor3D(myHMface03) - myHMface03.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface04) - myHMface04.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface05) - myHMface05.disable();;this delay gets same peices out of sync - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface05.enable();;;;;;;;;;;; - waitfor3D(myHMface05) - myHMface05.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface06) - myHMface06.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface07) - myHMface07.disable();;this delay gets same peices out of sync - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface07.enable();;;;;;;;;;;; - waitfor3D(myHMface07) - myHMface07.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - if (myHMface08) - myHMface08.SetAnimationVariableFloat("fToggleBlend", 1.0) - endif -EndEvent - -endState - -State HermaeusMoraDisappear - -Event OnLoad() - ; failsafe in case HM was unloaded when changed to disappeared state - myHMface01.Disable() - myHMface02.Disable() - myHMface03.Disable() - myHMface04.Disable() - myHMface05.Disable() - myHMface06.Disable() - myHMface07.Disable() - myHMface08.Disable() -EndEvent - -Event OnBeginState() ;;;this bloc makes the hermaeus mora art disappear - if (myHMface01) - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface01.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface02) - myHMface02.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface03) - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface03.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface04) - myHMface04.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface05) - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface05.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface06) - myHMface06.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface07) - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface07.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - if (myHMface08) - myHMface08.SetAnimationVariableFloat("fToggleBlend", 0.0) - endif -EndEvent - -endState - -function ChangeState(bool bHermaeusMoraAppear = true) - if bHermaeusMoraAppear - GotoState("HermaeusMoraAppear") - else - gotoState("HermaeusMoraDisappear") - endif -endFunction - -; pass in ref, returns when 3D is loaded or maxCount reached in loop -function waitFor3D(ObjectReference myFace) -; debug.trace(self + " waiting to load " + myFace) -; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" +myFace.Is3DLoaded()) - int iCount = 0 - while !myFace.Is3DLoaded() && iCount < iMaxCount - iCount = iCount + 1 - utility.wait(Utility.RandomFloat(0.2, 0.5)) -; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" +myFace.Is3DLoaded()) - endwhile -endFunction - diff --git a/source/scripts/dlc2miraakcombatmagiclevelingscript.psc b/source/scripts/dlc2miraakcombatmagiclevelingscript.psc deleted file mode 100644 index 5b9b087f..00000000 --- a/source/scripts/dlc2miraakcombatmagiclevelingscript.psc +++ /dev/null @@ -1,100 +0,0 @@ -Scriptname DLC2MiraakCombatMagicLevelingScript extends ReferenceAlias - -Int Property Stage1 = 37 Auto hidden -Int Property Stage2 = 44 Auto hidden -Int Property Stage3 = 51 Auto hidden -Int Property Stage4 = 58 Auto hidden -Int Property Stage5 = 65 Auto hidden - - - -Function SetMiraakCombatLevel() - Actor miraak = GetActorRef() - ;EquipSpell(DLC1dunHarkonConjureGargoyleLeftHand, 0) - - ;Other spells (Bats, Mistform, Invisibility, Conjure Gargoyle) are added, force-cast, and/or removed via script - ;on an as-needed basis. - - if (miraak.GetLevel() >= Stage4) - miraak.AddPerk( MageArmor30 ) - miraak.AddPerk( MageArmor50 ) - miraak.AddPerk( MagicResistance30 ) - miraak.AddPerk( MagicResistance50 ) - miraak.AddPerk( Bladesman60 ) - miraak.AddPerk( Bladesman90 ) - ElseIf (miraak.GetLevel() >= Stage3) - miraak.AddPerk( MageArmor30 ) - miraak.AddPerk( MageArmor50) - miraak.AddPerk( MagicResistance30 ) - miraak.AddPerk( Bladesman60 ) - ElseIf (miraak.GetLevel() >= Stage2) - miraak.AddPerk( MageArmor30 ) - miraak.AddPerk( MagicResistance30 ) - miraak.AddPerk( Bladesman60 ) - ElseIf (miraak.GetLevel() >= Stage1) - miraak.AddPerk( MageArmor30 ) - miraak.AddPerk( MagicResistance30 ) - Else - - EndIf -EndFunction -;/ -Function ReequipDrainSpell() - if (GetLevel() >= Stage4) - EquipSpell(DLC1DunHarkoncrVampireDrain06, 0) - EquipSpell(DLC1HarkonDrain06AltNew, 0) - ElseIf (GetLevel() >= Stage3) - EquipSpell(DLC1DunHarkoncrVampireDrain05, 0) - EquipSpell(DLC1HarkonDrain05AltNew, 0) - ElseIf (GetLevel() >= Stage2) - EquipSpell(DLC1DunHarkoncrVampireDrain04, 0) - EquipSpell(DLC1HarkonDrain04AltNew, 0) - ElseIf (GetLevel() >= Stage1) - EquipSpell(DLC1DunHarkoncrVampireDrain03, 0) - EquipSpell(DLC1HarkonDrain03AltNew, 0) - Else - EquipSpell(DLC1DunHarkoncrVampireDrain02, 0) - EquipSpell(DLC1HarkonDrain02AltNew, 0) - EndIf -EndFunction -/; - -;/ -SPELL Property ReanimateCorpseLeftHand Auto -SPELL Property RevenantLeftHand Auto -SPELL Property RaiseZombieLeftHand Auto -SPELL Property crVampireDrain02 Auto -SPELL Property crVampireDrain03 Auto -SPELL Property crVampireDrain04 Auto -SPELL Property crVampireDrain05 Auto -SPELL Property crVampireDrain06 Auto -/; -;Perk Property Necromancy Auto -;Perk Property SavageStrike Auto -Perk Property MagicResistance30 Auto -Perk Property MagicResistance50 Auto -;Perk Property HackAndSlash60 Auto -;Perk Property HackAndSlash90 Auto -Perk Property Bladesman60 Auto -Perk Property Bladesman90 Auto -;Perk Property WindWalker Auto -;Perk Property DarkSouls Auto -;Perk Property AugmentedFrost Auto -Perk Property MageArmor30 Auto -Perk Property MageArmor50 Auto - - -;Weapons -Weapon Property DLC2MKMiraakFightSword1 auto -Weapon Property DLC2MKMiraakFightSword2 auto -Weapon Property DLC2MKMiraakFightSword3 auto -Weapon Property DLC2MKMiraakFightSword4 auto -Weapon Property DLC2MKMiraakFightSword5 auto -Weapon Property DLC2MKMiraakFightSword6 auto - -Weapon Property DLC2MKMiraakFightStaff1 auto -Weapon Property DLC2MKMiraakFightStaff2 auto -Weapon Property DLC2MKMiraakFightStaff3 auto -Weapon Property DLC2MKMiraakFightStaff4 auto -Weapon Property DLC2MKMiraakFightStaff5 auto -Weapon Property DLC2MKMiraakFightStaff6 auto \ No newline at end of file diff --git a/source/scripts/dlc2miraakscript.psc b/source/scripts/dlc2miraakscript.psc deleted file mode 100644 index b320d7c3..00000000 --- a/source/scripts/dlc2miraakscript.psc +++ /dev/null @@ -1,126 +0,0 @@ -Scriptname DLC2MiraakScript extends Actor -{Actor on base DLC2Miraak actors. Attach this if you need your Miraak to appear/disappear and call these functions.} - -;Notes: This assumes you only want him to AppearOnLoad once per Appear()/Disappear() function calls - -;PLEASE TALK TO jduvall BEFORE EDITING THIS SCRIPT. Thanks :) - -bool property AppearOnLoad auto -{Optional: default = false -If true will call the Appear() function without moving him to AppearAtRef, assuming you've already placed him where he needs to be} - -ObjectReference Property AppearAtRef auto -{Optional - When Miraak appears, where he is moved to. - For example, Player} - -ObjectReference Property DisappearToRef auto -{Optional (USE IF AppearOnLoad is true - other wise next time you are in the area he will appear) -When Miraak disappears, where he is moved to. -For example: -DLC2SoulStealMiraakSpawnMarker in DLC2aaaMarkers cell - an xmarker in a holding cell} - -Explosion Property DLC2MiraakTeleportExp auto -Explosion Property DLC2MiraakTeleportReturnExp auto - - - -EffectShader property DLC2MiraakTeleportStartFXS auto -EffectShader property DLC2MiraakTeleportReturnFXS auto - - - -ImageSpaceModifier Property DLC2MiraakTeleportIMODStatic auto - -bool Appeared - -Event OnUpdate() - ;assumes this is only ever called for the IMOD effect - - bool IMOD = false - - int distance = 1500 - - While Appeared - if GetDistance(Game.GetPlayer()) <= distance && IMOD == false - IMOD = true - DLC2MiraakTeleportIMODStatic.ApplyCrossFade(3) - endif - - if GetDistance(Game.GetPlayer()) > distance && IMOD == true - IMOD = false - ImageSpaceModifier.RemoveCrossFade(3) - endif - endWhile - - -EndEvent - - -Function OnLoad() - if AppearOnLoad && Appeared == false - Appeared = true - Appear(MoveToAppearAtRef = false) - endif - -EndFunction - -Function Appear(bool MoveToAppearAtRef = true, bool UseIMOD = true) - -; debug.trace(self + "Appear()") - - Appeared = true - - if MoveToAppearAtRef && AppearAtRef - MoveTo(AppearAtRef, 200) - endif - - if IsDisabled() - Enable(true) - endif - -; debug.trace(self + "setAlpha(0)") - setAlpha(0) - - -; debug.trace(self + "Placing Explosion.") - PlaceAtMe(DLC2MiraakTeleportExp) - - if UseIMOD - RegisterForSingleUpdate(0.001) - endif - -; debug.trace(self + "Waiting...") - utility.wait(2) - - setAlpha(1, true) - - DLC2MiraakTeleportStartFXS.play(self) - -; debug.trace(self + "setAlpha(1, true)") - - - -EndFunction - -Function Disappear() - - Appeared = false - - placeAtMe(DLC2MiraakTeleportReturnExp) - - DLC2MiraakTeleportReturnFXS.play(self) - - utility.wait(0.5) - - ImageSpaceModifier.RemoveCrossFade(3) - - setAlpha(0, true) - - Disable(true) - - if DisappearToRef - MoveTo(DisappearToRef) - endif - -EndFunction diff --git a/source/scripts/dlc2mq05hermaeusmorafxscript.psc b/source/scripts/dlc2mq05hermaeusmorafxscript.psc deleted file mode 100644 index 77ce6d57..00000000 --- a/source/scripts/dlc2mq05hermaeusmorafxscript.psc +++ /dev/null @@ -1,87 +0,0 @@ -Scriptname DLC2MQ05HermaeusMoraFXScript extends ObjectReference -{specific for MQ05 Skaal scene} - - -ObjectReference[] Property myHMface Auto - -int newState = 0 -int lastState = 0 -int iMaxCount = 10 ; max times to loop waiting for 3D to load - -auto State Waiting -; default state -endState - -State HermaeusMoraAppear - -Event OnBeginState() ;;;this bloc makes the hermaeus mora art appear - - int iIndex = lastState - while iIndex < newState -; debug.trace(self + " iIndex=" + iIndex) - if myHMFace[iIndex] -; debug.trace(self + " enabling " + myHMface[iIndex]) - myHMface[iIndex].disable() - ;;this delay gets same peices out of sync - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface[iIndex].enable() - int iCount = 0 - while !myHMface[iIndex].Is3DLoaded() && iCount < iMaxCount -; debug.trace(self + " iCount=" + iCount + ", is3dloaded=" + myHMface[iIndex].Is3DLoaded()) - iCount = iCount + 1 - utility.wait(Utility.RandomFloat(0.2, 0.5)) - endwhile - myHMface[iIndex].SetAnimationVariableFloat("fToggleBlend", 1.0) - endif - iIndex = iIndex + 1 - endWhile - ; save last state - lastState = newState -EndEvent - -endState - -State HermaeusMoraDisappear - -Event OnLoad() - ; failsafe in case HM was unloaded when changed to disappeared state - int iIndex = 0 - while iIndex < myHMface.length - if myHMface[iIndex] - myHMface[iIndex].Disable() - endif - iIndex = iIndex + 1 - endWhile -EndEvent - -Event OnBeginState() ;;;this bloc makes the hermaeus mora art disappear - int iIndex = 0 - while iIndex < lastState - if myHMface[iIndex] - utility.wait(Utility.RandomFloat(0.2, 0.5)) - myHMface[iIndex].SetAnimationVariableFloat("fToggleBlend", 0.0) - endif - iIndex = iIndex + 1 - endWhile - newState = 0 - lastState = 0 -EndEvent - -endState - -function ChangeState(bool bHermaeusMoraAppear = true, int iChangeToState = -1) - if bHermaeusMoraAppear - ; enable faces to new state - if iChangeToState == -1 - newState = newState + 1 - else - newState = iChangeToState - endif - GotoState("HermaeusMoraAppear") - else - gotoState("HermaeusMoraDisappear") - endif -endFunction - - - diff --git a/source/scripts/dlc2mq06miraakbossbattle.psc b/source/scripts/dlc2mq06miraakbossbattle.psc deleted file mode 100644 index c894df8c..00000000 --- a/source/scripts/dlc2mq06miraakbossbattle.psc +++ /dev/null @@ -1,1098 +0,0 @@ -ScriptName DLC2MQ06MiraakBossBattle extends ReferenceAlias -{This is the Main Fight Control Script for the Miraak Boss fight at the end of the DLC} - -;This script is a bit of a beast so I tried to break it up into many smaller functions -;In general, the ProcessOnUpdateOROnHitEvent Function is the major update loop -;There are several times where the sprint or teleport functions wait for a bool to be true -; These are set by the end of the scene they start or by the magic effect on the shout -; A timer was added as a safety measure in case something went wrong -; This was a pain to set up so tinker with it at your own peril -;The tentacle attacks that were originally part of the fight were disabled since it felt a bit too chaotic -;There are many properties like SelfActor and SelfRef, which might seem unnecessary -; This is to cut down on unneeded casting for clarity and performance -; better to cast it as an actor and store that once, then keep casting it over and over - -;General Actor Properties -Quest property DLC2MQ06 Auto -Actor property SelfActor auto hidden -ObjectReference property SelfRef auto hidden -Actor property PlayerActor auto hidden -ActorBase property selfBase auto hidden -Actor property ActorDragon1 auto hidden -Actor property ActorDragon2 auto hidden -Actor property ActorDragon3 auto hidden -Faction Property DLC2TameDragonFaction auto -Actor property TameDragon auto hidden -ReferenceAlias property Dragon1 auto -ReferenceAlias property Dragon2 auto -ReferenceAlias property Dragon3 auto -ReferenceAlias property TameDragonAlias auto - -;Initialization Properties -bool property scriptVariablesInitialized = false auto hidden -bool property initialized = false auto hidden -MusicType property DLC2MUSCombatBoss Auto -float property currentTime auto hidden - -bool property isMounted auto hidden -int property DragonBeingRidden = 1 auto hidden -bool property DragonRiddenWasFlying auto hidden -bool property DragonRiddenIsFlying auto hidden -bool property Dragon1isFlying auto hidden -bool property Dragon2isFlying auto hidden -bool property Dragon3isFlying auto hidden -bool property Dragon1isDead = false auto hidden -bool property Dragon2isDead = false auto hidden -bool property Dragon3isDead = false auto hidden -int property playerPosition = 0 auto hidden ;Didn't end up using this -{This property tells us where the player is, generally - 0 = Center - 1 = 2 o'clock - 2 = 3 o'clock - 3 = 5 o'clock - 4 = 7 o'clock - 5 = 9 o'clock - 6 = 11 o'clock} - -;Dragon Markers -objectReference property DLC2MQ06DragonLandingMarkerFar auto -objectreference Property DLC2MQ06DragonKillLandingMarker002 auto -objectreference Property DLC2MQ06DragonKillLandingMarker003 auto -bool Property CanSprintInCombat = True auto -bool property TameDragonShouldNeverLand = True auto -bool property fireMiraakKill = false auto -{Default = true} -;-------------------------------------------------------------- -;Initialization Block -;--------------------------------------- - -Function InitializeMiraakBattle() - if (!scriptVariablesInitialized) -; debug.Trace(self + ": INITIALIZING MIRAAK BATTLE") - InitializeScriptVariables() - EndIf -EndFunction - -Function InitializeScriptVariables() -; debug.Trace(self + ": Initializing Script Vars") - SetMiraakCombatLevel() - currentTime = Utility.GetCurrentRealTime() - TentacleTimer = currentTime + TentacleTimeDelayInit - TimeToSwapCombatStyle = currentTime + MaxTimeInMagicCombatStyle - ;TimeOfLastTeleport = currentTime - SelfActor = Self.GetActorRef() - SelfActor.StartDeferredKill() - selfBase = SelfActor.GetActorBase() - SelfRef = (SelfActor as objectreference) - PlayerActor = Game.GetPlayer() as Actor - ActorDragon1 = Dragon1.GetActorRef() - ActorDragon2 = Dragon2.GetActorRef() - ActorDragon3 = Dragon3.GetActorRef() - DLC2TameDragonOrbitMarker.moveto(SelfActor) - SelfBase.SetEssential(False) - SetRewardGear() - ((Self as referenceAlias) as DLC2MiraakCombatMagicLevelingScript).SetMiraakCombatLevel() - scriptVariablesInitialized = True - tentacleController = (DLC2MQBossTentacleControllerRef as DLC2MQBossTentacleController) - DLC2MiraakStreakE.Play(selfActor, -1) - ;sets mirakk fade speed - selfActor.SetSubGraphFloatVariable("fDampRate", fadeSpeedFast) ;sets how fast miraak fades in and out - CheckDragons() - if TameDragonShouldNeverLand - SetTameDragonCanLand(canLand = false) - endif -EndFunction - -Event OnCombatStateChanged(Actor akTarget, int aeCombatState) - if (!initialized) - initialized = True - if (!scriptVariablesInitialized) - InitializeScriptVariables() - EndIf - currentTime = Utility.GetCurrentRealTime() - ;TimeOfLastCombatStyleSwap = currentTime - ;TimeOfLastTeleport = currentTime -; ;Debug.Trace("Start the music!") - DLC2MUSCombatBoss.Add() - GoToState("Ready") - OnUpdate() - - EndIf -EndEvent -;-------------------------------------------------------------- -;States Block -;-------------------------------------------------------------- - -;Normal Combat State -Auto State Ready - Event onBeginState() -; Debug.Trace(self + ": Starting Ready State") - EndEvent - ;This is empty, but it uses the default onHit and ProcessOnUpdateOROnHitEvent - ;Other states will clear these so they do not run. -EndState - -;Busy State, in case needed -State Busy - Event onBeginState() -; Debug.Trace(self + ": Starting Busy State") - EndEvent - Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) - ;Do Nothing - EndEvent - Function ProcessOnUpdateOROnHitEvent(ObjectReference aggressor, Form weap) - ;Do Nothing - EndFunction -EndState - -State Done - Event onBeginState() -; Debug.Trace(self + ": Starting Done State") - EndEvent - Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) - ;Do Nothing - EndEvent - Function ProcessOnUpdateOROnHitEvent(ObjectReference aggressor, Form weap) - ;Do Nothing - EndFunction - Function OnUpdate() - ;Do Nothing - endFunction -EndState - -State runningMiraakDeathState - Event onBeginState() -; Debug.Trace(self + ": Starting runningMiraakDeathState State") - EndEvent - Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) - ;Do Nothing - EndEvent - Function ProcessOnUpdateOROnHitEvent(ObjectReference aggressor, Form weap) - ;Do Nothing - EndFunction - Function OnUpdate() - if fireMiraakKill - goToState("Done") - MiraakDeath() - else - RegisterForSingleUpdate(1) - endif - endFunction -endState -;-------------------------------------------------------------- -;Main Battle Loops: OnHit and OnUpdate -;--------------------------------------- - -;Every second, we check to see if we need to update Miraaks's state. -Function OnUpdate() - If !runningMiraakDeathEvent - ProcessOnUpdateOROnHitEvent(None, None) - RegisterForSingleUpdate(1) - EndIf -EndFunction - -;On hit, check to see which state we're in and respond accordingly. -Event OnHit(ObjectReference aggressor, Form weap, Projectile proj, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) - ProcessOnUpdateOROnHitEvent(aggressor, weap) -EndEvent - -;*****************************************************************************; -;We have to handle both types of events in this single function to prevent interleaving errors from asynchronus events. -; This is where we kick off all the events -;*****************************************************************************; -Function ProcessOnUpdateOROnHitEvent(ObjectReference aggressor, Form weap) - if !runningMiraakDeathEvent - GoToState("Busy") - endif - float healthPercentage = SelfActor.GetAVPercentage("Health") - currentTime = Utility.GetCurrentRealTime() - isMounted = game.getPlayer().IsOnMount() - CurrentCombatStyle = DLC2MQ06MiraakCombatStyle.GetValue() as int - ;If all three dragons are not dead, check dragons - if !Dragon1isDead && !Dragon2isDead && !Dragon3isDead - CheckDragons() - endif - - If !scriptVariablesInitialized - ;if we aren't initialized don't do anything - elseif FightIsOver - GoToState("runningMiraakDeathState") - else - if totalDragonsKilled == 0 && healthPercentage <= dragonDrainThreshold1 && !runningDragonKillEvent && !sprintBusy - runningDragonKillEvent = True -; debug.Trace(self + ": DRAGON KILL EVENT 1") - sprintBusy = True - RunDragonKillEvent() - elseif totalDragonsKilled == 1 && healthPercentage <= dragonDrainThreshold2 && !runningDragonKillEvent && !sprintBusy - runningDragonKillEvent = True -; debug.Trace(self + ": DRAGON KILL EVENT 2") - sprintBusy = True - RunDragonKillEvent() - elseif totalDragonsKilled == 2 && healthPercentage <= dragonDrainThreshold3 && !runningDragonKillEvent && !sprintBusy - runningDragonKillEvent = True -; debug.Trace(self + ": DRAGON KILL EVENT 3") - sprintBusy = True - RunDragonKillEvent() - elseif totalDragonsKilled == 3 && healthPercentage <= finalKillThreshold && !runningDragonKillEvent && !runningMiraakDeathEvent && !sprintBusy - runningMiraakDeathEvent = true -; debug.Trace(self + ": MIRAAK KILL EVENT") - sprintBusy = True - RunMiraakDeathEvent() - ElseIf CanSprintInCombat && (aggressor == Game.GetPlayer()) && currentTime > (lastSprintTime + minTimebetweenSprints) && !sprintBusy && !runningDragonKillEvent && !runningMiraakDeathEvent && healthPercentage >= minSprintHealthThreshold -; ;Debug.Trace("Miraak: Registered normal hit.") - TimerPreviousHit06 = TimerPreviousHit05 - TimerPreviousHit05 = TimerPreviousHit04 - TimerPreviousHit04 = TimerPreviousHit03 - TimerPreviousHit03 = TimerPreviousHit02 - TimerPreviousHit02 = TimerPreviousHit01 - TimerPreviousHit01 = currentTime - - if selfActor.getDistance(playerActor) < 1000 && (TimerPreviousHit01 - TimerPreviousHit06 < 8) - sprintBusy = True - SprintAway(pickClosest = false) - PickNewCombatStyle() - ElseIf selfActor.getDistance(playerActor) >= 1000 && (TimerPreviousHit01 - TimerPreviousHit04 < 6) - sprintBusy = True - SprintAway(pickClosest = true) - PickNewCombatStyle() - EndIf - Endif - ;If (!SelfActor.IsInCombat()) - ; SelfActor.StartCombat(Game.GetPlayer()) - ;EndIf - - ;Make sure Miraak doesn't fall below ~50 health - ;If he does he won't run his packages correctly - if !runningMiraakDeathEvent - ;This should keep miraak above negative health - CheckMiraakHealthAndModIfNeeded() - endif - ;Combat Style Swap - if !runningDragonKillEvent && !runningMiraakDeathEvent - - if TimeToSwapCombatStyle <= currentTime && !IsMounted -; debug.Trace(self + ": Timer up - Time To Swap Combat Style") - PickNewCombatStyle() - elseif IsMounted && DragonRiddenWasFlying != DragonRiddenIsFlying -; debug.Trace(self + ": FlyingState change - Time To Swap Combat Style") - PickNewCombatStyle() - endif - endif - ;Check if it is okay to do tentacle attacks - ; okay = no alive dragons on the ground, and player not mounted - ;We decided the tentacle attacks were too much, but they can be turned back on - ;by setting the DoTentacleAttacks property to true - if DoTentacleAttacks - if Dragon1isFlying || Dragon1isDead - if Dragon2isFlying || Dragon2isDead - if Dragon3isFlying || Dragon3isDead - if !isMounted && !runningMiraakDeathEvent && !runningDragonKillEvent - ;This is where we kick off tentacle attacks - if TentacleTimer <= currentTime ;&& "Player is on the ground" -; debug.Trace(self + ": Time for Tentacle Attack") - int TargetArea = utility.randomInt(-1,6) -; debug.Trace(self + ": Tentacle Target Area = " + TargetArea) - TriggerTentacleAttack(TargetArea) - TentacleTimer = currentTime + TentacleTimeDelay - endif - EndIf - EndIf - endif - endif - Endif - endif - if !runningMiraakDeathEvent && !runningDragonKillEvent - GoToState("Ready") - endif -EndFunction - -Function CheckDragons() - bool TameDragonFound = false - if !Dragon1isDead - Dragon1isFlying = ActorDragon1.isFlying() - if !TameDragonFound && ActorDragon1.IsInFaction(DLC2TameDragonFaction) - TameDragon = ActorDragon1 - TameDragonFound = true - EndIf - EndIf - if !Dragon2isDead - Dragon2isFlying = ActorDragon2.isFlying() - if !TameDragonFound && ActorDragon2.IsInFaction(DLC2TameDragonFaction) - TameDragon = ActorDragon2 - TameDragonFound = true - EndIf - EndIf - if !Dragon3isDead - Dragon3isFlying = ActorDragon3.isFlying() - if !TameDragonFound && ActorDragon3.IsInFaction(DLC2TameDragonFaction) - TameDragon = ActorDragon3 - TameDragonFound = true - EndIf - EndIf - if !TameDragonFound - TameDragon = None - DragonRiddenWasFlying = False - DragonRiddenIsFlying = False - else - DragonRiddenWasFlying = DragonRiddenIsFlying - DragonRiddenIsFlying = TameDragon.IsFlying() - endif - TameDragonAlias.ForceRefTo(TameDragon) -EndFunction - -;-------------------------------------------------------------- -;Dragon Kill Functions -;-------------------------------------------------------------- -;Properties for Dragon Drain Events and overall combat Tracking -float property dragonDrainThreshold1 = 0.3 auto hidden -float property dragonDrainThreshold2 = 0.3 auto hidden -float property dragonDrainThreshold3 = 0.3 auto hidden -float property minSprintHealthThreshold = 0.5 auto hidden -float property finalKillThreshold = 0.1 auto hidden -int property totalDragonsKilled = 0 auto hidden -bool property runningDragonKillEvent = false auto hidden -bool property runningMiraakDeathEvent = false auto hidden -bool property FightIsOver = false auto hidden -spell property DLC2MiraakDragonKillSpell auto -Scene Property DLC2MQ06MiraakKillDragonScene Auto -ReferenceAlias Property DragonToKillAlias Auto -Actor Property DragonToKill auto hidden -spell property DLC2MiraakFakeShoutSpell auto -bool property waitingForDragonKillSceneToEnd auto hidden -bool property PreferToKillPlayerDragon = False auto -Quest Property DLC2TameDragon auto -;DLC2TameDragonScript is the script used -; We call ReleaseDragon() when we kill the tamed dragon - -Function MiraakStealsSoul() -; debug.Trace(self + ": MIRAAK STEALS DRAGON SOUL") - totalDragonsKilled += 1 - ; update MQ06 to use in conditions - (GetOwningQuest() as DLC2MQ06Script).MiraakDragonsKilled = totalDragonsKilled - selfActor.RestoreActorValue("health", 1000) -; debug.Trace(self + ": END FIGHT DRAGONS KILLED = " + totalDragonsKilled) -endFunction - -Function RunDragonKillEvent() - ;int sceneWaitSafety = 0 - objectReference dragonKillLandingMarker -; debug.Trace(self + ": RUNNING DRAGON KILL EVENT") - ;Select which dragon we are going to kill - PickDragonToKill() -; debug.Trace(self + ": DragonToKill = " + DragonToKill) - - if totalDragonsKilled == 0 - dragonKillLandingMarker = DLC2MQ06DragonKillLandingMarker002 - ElseIf totalDragonsKilled == 1 - dragonKillLandingMarker = DLC2MQ06DragonKillLandingMarker003 - Elseif totalDragonsKilled == 2 - dragonKillLandingMarker = DLC2MQ06DragonLandingMarkerFar - endif - ;If this is the tamed dragon and the player is not riding it, release the dragon. - if DragonToKill == TameDragon && !isMounted - (DLC2TameDragon as DLC2TameDragonScript).ReleaseDragon() - endif - ; Set Dragon to Kill alias - DragonToKill.SetForcedLandingMarker(dragonKillLandingMarker) - - DragonToKill.SetAllowFlying(false) - SetDragonNoLand() - ;;;;;;;;!!!! - DragonToKill.StartDeferredKill() - if DragonToKill.isflying() - DragonToKill.damageAV("health", 5000) - endif - DragonToKillAlias.ForceRefTo(DragonToKill) - ;Move Miraak to safe room - objectReference teleportAwayTarget = PickTeleportMarkerNearby() - SelfActor.AddSpell(DLC2MiraakEtherealFXSpell) - selfActor.SetGhost(true) - SprintToTargetAndTeleportAway(teleportAwayTarget) - -EndFunction - -Function SetDragonNoLand() - if !Dragon1isDead && ActorDragon1 != DragonToKill - ActorDragon1.SetAV("Variable07", 1) - ActorDragon1.EvaluatePackage() - endif - if !Dragon2isDead && ActorDragon2 != DragonToKill - ActorDragon2.SetAV("Variable07", 1) - ActorDragon2.EvaluatePackage() - endif - if !Dragon3isDead && ActorDragon3 != DragonToKill - ActorDragon3.SetAV("Variable07", 1) - ActorDragon3.EvaluatePackage() - endif -endFunction - -Function SetDragonsCanLand() - if !Dragon1isDead && ActorDragon1 != TameDragon - ActorDragon1.SetAV("Variable07", 0) - ActorDragon1.EvaluatePackage() - endif - if !Dragon2isDead && ActorDragon1 != TameDragon - ActorDragon2.SetAV("Variable07", 0) - ActorDragon2.EvaluatePackage() - endif - if !Dragon3isDead && ActorDragon1 != TameDragon - ActorDragon3.SetAV("Variable07", 0) - ActorDragon3.EvaluatePackage() - endif -endFunction - -bool TameDragonCanLandCurrently -Function SetTameDragonCanLand(bool canLand = true) - TameDragonCanLandCurrently = canLand - if !TameDragon.isDead() - if canLand - ActorDragon1.SetAV("Variable07", 0) - else - ActorDragon1.SetAV("Variable07", 1) - endif - ActorDragon1.EvaluatePackage() - EndIf -endFunction - -Actor Function PickDragonToKill() - DragonToKill = NONE - if PreferToKillPlayerDragon - ;If we prefer to kill the player's dragon... - DragonToKill = TameDragon - elseif totalDragonsKilled < 2 - ;Pick a dragon that is not the player's tamed dragon - if !Dragon1isDead && ActorDragon1 != TameDragon - DragonToKill = ActorDragon1 - elseif !Dragon2isDead && ActorDragon2 != TameDragon - DragonToKill = ActorDragon2 - elseif !Dragon3isDead && ActorDragon3 != TameDragon - DragonToKill = ActorDragon3 - EndIf - else ;There is only one dragon left, pick which ever it is - if !Dragon1isDead ;&& ActorDragon1 != TameDragon - DragonToKill = ActorDragon1 - elseif !Dragon2isDead ;&& ActorDragon2 != TameDragon - DragonToKill = ActorDragon2 - elseif !Dragon3isDead ;&& ActorDragon3 != TameDragon - DragonToKill = ActorDragon3 - EndIf - endif -endFunction - -Function DragonKillSceneEnded() - waitingForDragonKillSceneToEnd = False -; debug.Trace(self + ": Dragon Kill Scene has ended") - if !DragonToKill.isDead() - DragonToKill.EndDeferredKill() - DragonToKill.damageAV("health", 10000) - endif - self.getActorRef().RemoveSpell(DLC2MiraakFakeShoutSpell) - ;while !DragonToKill.isDead() - ; utility.wait(2.0) - ;endwhile - while selfActor.GetAVPercentage("health") < 0.9 - utility.wait(0.5) - endwhile - ;selfBase.SetEssential(True) - selfActor.SetGhost(False) - SelfActor.RemoveSpell(DLC2MiraakEtherealFXSpell) - SetDragonsCanLand() - runningDragonKillEvent = false - GoToState("Ready") -endFunction - -;This function tracks with dragons have already been killed -Function TrackDragonDeath(int DragonNumber) -; Debug.trace(Self + "TrackDragonDeath >> DragonKilled = " + DragonNumber) - if DragonNumber == 1 - Dragon1isDead = True - if DragonToKill == ActorDragon1 && waitingForDragonKillSceneToEnd - DragonKillSceneEnded() - EndIf - elseif DragonNumber == 2 - Dragon2isDead = True - if DragonToKill == ActorDragon2 && waitingForDragonKillSceneToEnd - DragonKillSceneEnded() - EndIf - elseif DragonNumber == 3 - Dragon3isDead = True - if DragonToKill == ActorDragon3 && waitingForDragonKillSceneToEnd - DragonKillSceneEnded() - EndIf - endif -endFunction - -;-------------------------------------------------------------- -;Miraak Kill Functions -;-------------------------------------------------------------- -;MiraakDeathSequence Properties -VisualEffect Property DragonAbsorbEffect Auto -VisualEffect Property DragonAbsorbManEffect Auto -sound property NPCDragonDeathSequenceWind auto -sound property NPCDragonDeathSequenceExplosion auto -EffectShader Property DragonPowerAbsorbFXS Auto -Spell Property DLC2KillMiraakSpell auto -GlobalVariable Property DLC2SoulStealCount Auto -objectReference property MQ06MiraakDeathMarker auto -idle property IdleDLC02MiraakDeathFinish auto -Armor Property DLC2MiraakSkeleton Auto ; miraaks skeleton for death fx -ObjectReference property DLC2MQ06CenterPoolRef auto -ObjectReference property DLC2MQ06CenterPoolFakeRef auto - -VisualEffect Property DLC2MiraakAbsorbManE Auto ;..autofills -VisualEffect Property DLC2MiraakAbsorbE Auto ;...autofills - - -EffectShader Property DLC2MiraakBitsFXS Auto -EffectShader Property DLC2MiraakBitsLite2FXS Auto -EffectShader Property DLC2MiraakSmokeFXS Auto -EffectShader Property DLC2MiraakMagicFXS Auto -Armor Property DLC2MiraakSkinHider auto -Sound Property QSTMiraakDeathBurnMarker auto - -Function RunMiraakDeathEvent() - ;runningMiraakDeathEvent == True -; Debug.Trace(self + ": RunMiraakDeathEvent") - GoToState("runningMiraakDeathState") - ;Enable the fake water plane in the center and disable the real one - ;Thjs is necessary for Miraak to be able to enter the furniture while under the platform - ;DLC2MQ06CenterPoolFakeRef.enable(abFadeIn = false) - ;DLC2MQ06CenterPoolRef.disable(abFadeout = True) - objectReference teleportAwayTarget = PickTeleportMarkerNearby() - SelfActor.AddSpell(DLC2MiraakEtherealFXSpell) - selfActor.SetGhost(true) - SprintToTargetAndTeleportAway(teleportAwayTarget) - -endFunction - -Event MiraakDeath() -; Debug.Trace(self + ": MiraakDeath") -; This is the bit that plays the absorb stuff, needed to move it up for Miraak - ;display dragon absorb effect art. One part on dragon one part on player. - ;mirak fades down - DLC2MiraakBitsLite2FXS.Play(selfActor) - utility.wait(1) - selfActor.playSubgraphAnimation("SkinFadeOutLong") - QSTMiraakDeathBurnMarker.Play(SelfActor) - DLC2MiraakBitsFXS.Play(selfActor) - utility.wait(0.1) - selfActor.playSubgraphAnimation("stage2") - - - utility.wait(3) - DLC2MiraakMagicFXS.Play(selfActor) - DLC2MiraakMagicFXS.Stop(selfActor) - utility.wait(3) - selfActor.Playidle(IdleDLC02MiraakDeathFinish) - - DLC2MiraakBitsLite2FXS.Stop(selfActor) - DLC2MiraakBitsFXS.Stop(selfActor) - DragonAbsorbEffect.Play(SelfActor, 8, PlayerActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor -;; dragonRef.placeAtME(MAGDragonPowerAbsorbExplosion) - DragonAbsorbManEffect.Play(PlayerActor, 8, SelfActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - NPCDragonDeathSequenceWind.play(SelfActor) - NPCDragonDeathSequenceExplosion.play(SelfActor) - utility.wait(1.0) -;;;;;;;;;;;;;Start of what actually kills Miraak;;;;;;;;;;;;;;;;;;;; -;;;;;;;;;The Combat Spell Apllied here ends the Deferred Kill - selfActor.SetGhost(false) - ;equip the skin hider so we don't see bare hands & feet - SelfActor.Equipitem(DLC2MiraakSkinHider) - ;This is the spell that actually KILLS Miraak - PlayerActor.doCombatSpellApply(DLC2KillMiraakSpell, selfActor) - - ;Tell the Tentacle furniture to finish playing and retract - MQ06MiraakDeathMarker.PlayAnimation("TPlay02") - ; Sounds for when the wispy particles being to fly at the player. -;;;;;;;;;THis is the end of the actual kill stuff - - utility.wait(10) - DLC2MiraakSmokeFXS.Play(selfActor) - utility.wait(3) - DLC2MiraakSmokeFXS.Stop(selfActor) - utility.wait(2) - selfActor.playSubgraphAnimation("stage3") - - ;utility.wait(3.0) - - DLC2MUSCombatBoss.Remove() - ;Make it rain!!! (souls) - PlayerActor.ModActorValue("DragonSouls", 3 + DLC2SoulStealCount.GetValueInt() + totalDragonsKilled) - DragonPowerAbsorbFXS.Stop(PlayerActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor -endEvent -;-------------------------------------------------------------- -;Fight Utility Functions -;--------------------------------------- -;;;;;;;;;;;;;;;;CombatStyle Functions;;;;;;;;;;;;;;;;;;;;; - -;Combat Style Properties -weapon property MiraakSword auto hidden -;weapon property DLC2MiraakApocryphaSword auto -weapon property MiraakStaff auto hidden -Spell Property DLC2LightningStormRightHand auto -objectreference property Sword1 auto hidden -objectreference property Staff auto hidden -objectreference property DLC2TameDragonOrbitMarker auto -float TimeToSwapCombatStyle = 0.0 -float MaxTimeInMagicCombatStyle = 30.0 -float MaxTimeInStaffCombatStyle = 10.0 -float MaxTimeInMeleeCombatStyle = 30.0 -GlobalVariable property DLC2MQ06MiraakCombatStyle auto -{This variable controls which combat style Miraak is using. -This is set via combat override Package. -It also is used to adjust his spells and equipment when changing combat style. - 0 = Staff - 1 = Magic (noStaff) - 2 = Melee - 3 = AntiAir (Kill Players flying Dragon)} -int property CurrentCombatStyle auto hidden - -Function PickNewCombatStyle() -; debug.Trace(self + ": Running SwapMiraakCombatStyle") - CurrentCombatStyle = DLC2MQ06MiraakCombatStyle.GetValue() as int - int NewCombatStyle = CurrentCombatStyle - if isMounted && TameDragon && DragonRiddenIsFlying - ChangeMiraakCombatStyle(3);Use AntiAir - else - ;Ensure we are using a new combat style - While NewCombatStyle == CurrentCombatStyle - NewCombatStyle = utility.RandomInt(0,2) - endWhile - ChangeMiraakCombatStyle(NewCombatStyle) - endif -endFunction - -Function ChangeMiraakCombatStyle(int NewCombatStyle = 1) -; debug.Trace(self + ": Running ChangeMiraakCombatStyle NewCombatStyle = " + NewCombatStyle) - if NewCombatStyle == 0 ;Staff - ;Set the global that changes his combat override packages - DLC2MQ06MiraakCombatStyle.SetValue(0) - ;Remove Spells & Equipment - if Sword1 - selfActor.removeItem(sword1) - SelfActor.UnequipItem(sword1) - endif - SelfActor.RemoveSpell(DLC2LightningStormRightHand) - SelfActor.UnEquipSpell(DLC2LightningStormRightHand, 1) - ;Add Spells & Equipment - Staff = SelfActor.EquipItem(MiraakStaff) - - ;Reset the combat Timer - TimeToSwapCombatStyle = currentTime + MaxTimeInStaffCombatStyle - elseif NewCombatStyle == 1 ;Magic (NoStaff) - ;Set the global that changes his combat override packages - DLC2MQ06MiraakCombatStyle.SetValue(1) - ;Remove Spells & Equipment - if Sword1 - SelfActor.UnequipItem(sword1) - selfActor.removeItem(sword1) - endif - if Staff - SelfActor.UnequipItem(Staff) - selfActor.removeItem(Staff) - endif - SelfActor.RemoveSpell(DLC2LightningStormRightHand) - SelfActor.UnEquipSpell(DLC2LightningStormRightHand, 1) - ;Add Spells & Equipment - - ;Reset the combat Timer - TimeToSwapCombatStyle = currentTime + MaxTimeInMeleeCombatStyle - elseif NewCombatStyle == 2 ;Melee - ;Set the global that changes his combat override packages - DLC2MQ06MiraakCombatStyle.SetValue(2) - ;Remove Spells & Equipment - SelfActor.RemoveSpell(DLC2LightningStormRightHand) - SelfActor.UnEquipSpell(DLC2LightningStormRightHand, 1) - if Staff - SelfActor.UnequipItem(Staff) - selfActor.removeItem(Staff) - endif - ;Add Spells & Equipment - sword1 = SelfActor.EquipItem(MiraakSword) - - ;Reset the combat Timer - TimeToSwapCombatStyle = currentTime + MaxTimeInMagicCombatStyle - ElseIf NewCombatStyle == 3 ;AntiAir - ;Set the global that changes his combat override packages - DLC2MQ06MiraakCombatStyle.SetValue(3) - ;Remove Spells & Equipment - if Sword1 - SelfActor.UnequipItem(sword1) - selfActor.removeItem(sword1) - endif - if Staff - SelfActor.UnequipItem(Staff) - selfActor.removeItem(Staff) - endif - ;Add Spells & Equipment - SelfActor.AddSpell(DLC2LightningStormRightHand) - - ;Reset the combat Timer - TimeToSwapCombatStyle = currentTime + 10.0 - Else -; debug.Trace(self + ": ChangeCombatStyle was passed invalid int >> " + NewCombatStyle) - endif - - SelfActor.EvaluatePackage() -endFunction - -Function CheckMiraakHealthAndModIfNeeded() - float miraakHealth = selfActor.getActorValue("health") - if miraakHealth < 10.0 - if miraakHealth < 0.0 - miraakHealth = 0 - miraakHealth - EndIf - selfActor.RestoreActorValue("Health", 10.0 + miraakHealth) - endif -EndFunction -;;;;;;;;;;;;;;;;End of CombatStyle Functions;;;;;;;;;;;;;;;;;;;;; - - -;Setting this inside the script to avoid interleaving errors -Function setPlayerPositionVariable(int newPosition) - playerPosition = newPosition -endFunction - -;;;;;;;;;;;;;;;;Sprint Functions;;;;;;;;;;;;;;;;;;;;; - -;Whirlwind Sprint Properties -ReferenceAlias Property SprintTarget auto -Scene Property DLC2MQ06MiraakSprintScene auto -bool Property waitingForSprintSceneToEnd auto hidden -objectreference[] Property DLC2MQ06SprintTargets auto -Spell Property DLC2MiraakEtherealFXSpell auto - -Function SprintAway(bool pickClosest = false) - objectreference Target - Target = PickSprintAwayTarget(pickClosest) - ;FadeInSprintFX() -; ;debug.Trace(self + ": Sprinting to Target= " + Target) - SprintTarget.ForceRefTo(Target) - SelfActor.AddSpell(DLC2MiraakEtherealFXSpell) - selfActor.SetGhost(true) - DLC2MQ06MiraakSprintScene.start() -endFunction - - -Function SprintToTarget(objectreference Target) -; ;debug.Trace(self + ": Sprinting to Target= " + Target) - ;FadeInSprintFX() - ;utility.wait(0.2) - int sceneWaitSafety = 0 - waitingForSprintSceneToEnd = True - SprintTarget.ForceRefTo(Target) - DLC2MQ06MiraakSprintScene.start() - ;/ - While waitingForSprintSceneToEnd && sceneWaitSafety < 20 - utility.Wait(0.2) -; debug.Trace(self + ": Waiting for Sprint Scene To End >> " + sceneWaitSafety) - sceneWaitSafety += 1 - CheckMiraakHealthAndModIfNeeded() - endWhile - /; - ;FadeInSprintFX() -endFunction - -Function SprintToTargetAndTeleportAway(objectreference Target) - int sceneWaitSafety = 0 -; debug.Trace(self + ": SprintToTargetAndTeleportAway Target= " + Target) - teleportBusy = true - SprintToTarget(Target) - ;/ - waitingForSprintSceneToEnd = True - While waitingForSprintSceneToEnd && sceneWaitSafety < 4 - utility.Wait(1.0) -; debug.Trace(self + ": Waiting for Sprint Scene To End >> " + sceneWaitSafety) - sceneWaitSafety += 1 - CheckMiraakHealthAndModIfNeeded() - endWhile - /; - ;TeleportAway() -endFunction - -Function SprintSceneEnded() - ;utility.wait(0.1) - ;FadeOutSprintFX() -; Debug.Trace(self + ": SprintSceneEnded") - lastSprintTime = currentTime - if waitingForSprintSceneToEnd - waitingForSprintSceneToEnd = False - TeleportAway() - elseif !runningMiraakDeathEvent && !runningDragonKillEvent - SelfActor.RemoveSpell(DLC2MiraakEtherealFXSpell) - selfActor.SetGhost(false) - waitingForSprintSceneToEnd = False - endif - sprintBusy = False -; debug.Trace(self + ": Sprint Scene has ended") -endFunction - -ObjectReference Function PickSprintAwayTarget(bool pickClosest = false) - ObjectReference NewSprintTarget - ;Identify the closest teleport point, offset from it +/-2, and go there. - int closestPoint = 0 - int i = 0 - float ClosestDistance = 6000.0 - float Distance = 0.0 - float MinDistance = 2000.0 - int listLength = DLC2MQ06SprintTargets.Length - 1 -; Debug.Trace(self + "DLC2MQ06SprintTargets length = " + listLength) - if pickClosest - While (i < listLength) - Distance = playerActor.getDistance(DLC2MQ06SprintTargets[i]) - if (Distance < ClosestDistance) - NewSprintTarget = DLC2MQ06SprintTargets[i] - ClosestDistance = Distance - EndIf - i = i + 1 - EndWhile - else - Distance = 0.0 - While Distance < MinDistance - i = utility.RandomInt(0, DLC2MQ06SprintTargets.Length) - NewSprintTarget = DLC2MQ06SprintTargets[i] - Distance = playerActor.getDistance(NewSprintTarget) - EndWhile - endif - return NewSprintTarget -EndFunction - - - -;;;;;;;;;;;;;;;;End of Sprint Functions;;;;;;;;;;;;;;;;;;;;; - -;;;;;;;;;;;;;;;;Teleport Functions;;;;;;;;;;;;;;;;;;;;; -;Teleport Properties -objectreference property DLC2MiraakFightTeleportMarkerMid auto -objectreference property DLC2MiraakFightTeleportMarker01 auto -objectreference property DLC2MiraakFightTeleportMarker02 auto -objectreference property DLC2MiraakFightTeleportMarker03 auto -objectreference property DLC2MiraakFightTeleportMarker04 auto -objectreference property DLC2MiraakFightTeleportMarker05 auto -objectreference property DLC2MiraakFightTeleportMarker06 auto -objectreference property DLC2MQ06FightFallTeleportMarker auto -objectreference property DLC2MQ06KillSceneFallTeleportMarker auto -FormList Property DLC2MQ06TeleportTargetFL auto -objectreference property DLC2MQ06MiraakSaferoom auto -Explosion Property DLC2MQ06MiraakTeleportExplosion auto -Explosion Property DLC2MiraakAwayExplosion auto -Explosion Property DLC2MiraakBackExplosion auto -Scene property DLC2MQ06PlayerFallRecoveryScene auto -Scene property DLC2MQ06MiraakFallRecoveryScene auto - -;objectReference[] property TeleportPoints auto -;Static property MiraakTeleportMarker Auto - -float fadeSpeedDefault = 0.03 ; this is the default value of fDampRate fades over about 2 seconds -float fadeSpeedFast = 0.05 ; about 1 second fade time - -VisualEffect Property DLC2MiraakStreakE Auto ;streak art...autofills -bool teleportFromOffCliff = false -bool teleportBusy -Function TeleportMiraakFromOffCliff() -; Debug.Trace(self + ": TeleportMiraakFromOffCliff>> ") -; Debug.Trace("runningMiraakDeathEvent = " + runningMiraakDeathEvent + " > runningDragonKillEvent = " + runningDragonKillEvent) - if !teleportBusy - teleportFromOffCliff = true - if runningMiraakDeathEvent && !SelfActor.isDead() - TeleportMiraak(DLC2MQ06KillSceneFallTeleportMarker) - else - TeleportAway() - endif - endif -EndFunction - -Function TeleportPlayerFromOffCliff() -; Debug.Trace(self + ": TeleportPlayerFromOffCliff") - game.GetPlayer().PlaceAtMe(DLC2MQ06MiraakTeleportExplosion) - DLC2MQ06FightFallTeleportMarker.PlaceAtMe(DLC2MQ06MiraakTeleportExplosion) - game.GetPlayer().MoveTo(DLC2MQ06FightFallTeleportMarker) -EndFunction - -Function TeleportMiraak(objectReference teleportTarget) -; Debug.Trace(self + ": TeleportMiraak to >> " + teleportTarget) - teleportTarget.PlaceAtMe(DLC2MiraakBackExplosion) - utility.wait(0.1) - selfActor.moveto(teleportTarget) - ;miraak fades up - ;utility.wait(0.05) - If !SelfActor.isDead() - selfActor.playSubgraphAnimation("SkinFadeIn") - endif - teleportBusy = false -endFunction - -Function TeleportAway() -; Debug.Trace(self + ": TeleportAway>>") -; Debug.Trace("runningMiraakDeathEvent = " + runningMiraakDeathEvent + " > runningDragonKillEvent = " + runningDragonKillEvent) - teleportBusy = true - selfActor.PlaceAtMe(DLC2MiraakAwayExplosion) - selfActor.moveto(DLC2MQ06MiraakSaferoom) - ;If we are in the MiraakDeathEvent move to the furniture and start the scene - if runningMiraakDeathEvent -; Debug.Trace(self + ": TeleportAway >>> runningMiraakDeathEvent") - selfActor.equipItem(DLC2MiraakSkeleton) - SelfActor.RemoveSpell(DLC2MiraakEtherealFXSpell) - DLC2MiraakStreakE.Stop(selfActor) - SelfActor.Moveto(MQ06MiraakDeathMarker) - DLC2MQ06.SetStage(500) - teleportBusy = false - elseif runningDragonKillEvent -; Debug.Trace(self + ": TeleportAway >>> runningDragonKillEvent") - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;!!!! - while DragonToKill.isflying() && !DragonToKill.isDead() - utility.wait(1.0) -; debug.Trace(self + ": DragonKill waiting for landing") - endWhile - self.getActorRef().AddSpell(DLC2MiraakFakeShoutSpell) - waitingForDragonKillSceneToEnd = True - DLC2MQ06MiraakKillDragonScene.Start() - TeleportMiraak(DLC2MiraakFightTeleportMarkerMid) - elseif teleportFromOffCliff -; Debug.Trace(self + ": TeleportAway >>> teleportFromOffCliff") - teleportFromOffCliff = false - utility.Wait(0.2) - TeleportMiraak(DLC2MQ06FightFallTeleportMarker) - if !SelfActor.isDead() - DLC2MQ06MiraakFallRecoveryScene.Start() - endif - teleportBusy = false - endif -EndFunction - - -Function TeleportPlayerToTarget(objectreference teleportTarget) -; Debug.Trace(self + ": TeleportPlayerToTarget") - teleportTarget.PlaceAtMe(DLC2MQ06MiraakTeleportExplosion) - Game.getPlayer().moveto(teleportTarget) - DLC2MQ06PlayerFallRecoveryScene.Start() -endFunction - -ObjectReference Function PickTeleportMarkerNearby() - ObjectReference closestMarker = Game.FindClosestReferenceOfAnyTypeInList(DLC2MQ06TeleportTargetFL, selfRef.getPositionX(), selfRef.getPositionY(), selfRef.getPositionZ(), 6000.0) - if (closestMarker == None) -; Debug.Trace(self + ": Could not pick nearby Teleport point!!!") - EndIf - - - return closestMarker -EndFunction -;;;;;;;;;;;;;;;;End of Teleport Functions;;;;;;;;;;;;;;;;;;;;; - -;;;;;;;;;;;;;;;;Tentacle Attack Functions;;;;;;;;;;;;;;;;;;;;; -;The following functions are for talking to the tentacle attack controller -;Properties for Tentacle Controller -DLC2MQBossTentacleController property tentacleController auto hidden -objectreference property DLC2MQBossTentacleControllerRef auto -float property TentacleTimer auto hidden -float property TentacleTimeDelayInit = 15.0 auto hidden -float property TentacleTimeDelay = 15.0 auto hidden -bool property DoTentacleAttacks = false auto - -Function TriggerTentacleAttack(int TargetArea) - if TargetArea == -1 ;Attack FULL - TriggerTentacleAttackFull(bClockwise = false, fAttackTimer = 0.5) - elseif TargetArea >= 0 && TargetArea <= 6 - TriggerTentacleAttackSingle(TargetArea, bClockwise = false, fAttackTimer = 0.5) - EndIf -EndFunction - -Function TriggerTentacleAttackFull(bool bClockwise = false, float fAttackTimer = 0.5) - ;Set properties then register for single update - ; RegisterForSingleUpdate is used to kick off new thread - tentacleController.fullSweep = true - tentacleController.clockwise = bClockwise - tentacleController.attackTimer = fAttackTimer - tentacleController.RegisterForSingleUpdate(0.1) -endFunction - -Function TriggerTentacleAttackSingle(int itargetArea = 1, bool bClockwise = false, float fAttackTimer = 0.5) - ;Set properties then register for single update - ; RegisterForSingleUpdate is used to kick off new thread - tentacleController.targetArea = itargetArea - tentacleController.clockwise = bClockwise - tentacleController.attackTimer = fAttackTimer - tentacleController.RegisterForSingleUpdate(0.1) -endFunction - -;;;;;;;;;;;;;;;;Miraak Combat Leveling Function;;;;;;;;;;;;;;;;;;;;; -;Weapons - -Int Property Stage1 = 37 Auto hidden -Int Property Stage2 = 44 Auto hidden -Int Property Stage3 = 51 Auto hidden -Int Property Stage4 = 58 Auto hidden -Int Property Stage5 = 65 Auto hidden - -Weapon Property DLC2MKMiraakFightSword1 auto -Weapon Property DLC2MKMiraakFightSword2 auto -Weapon Property DLC2MKMiraakFightSword3 auto -Weapon Property DLC2MKMiraakFightSword4 auto -Weapon Property DLC2MKMiraakFightSword5 auto -Weapon Property DLC2MKMiraakFightSword6 auto - -Weapon Property DLC2MKMiraakFightStaff1 auto -Weapon Property DLC2MKMiraakFightStaff2 auto -Weapon Property DLC2MKMiraakFightStaff3 auto -Weapon Property DLC2MKMiraakFightStaff4 auto -Weapon Property DLC2MKMiraakFightStaff5 auto -Weapon Property DLC2MKMiraakFightStaff6 auto - -Function SetMiraakCombatLevel() - Actor miraak = GetActorRef() - ;Pick the leveled gear that Miraak will use and store it - if (miraak.GetLevel() >= Stage5) - MiraakSword = DLC2MKMiraakFightSword6 - MiraakStaff = DLC2MKMiraakFightStaff6 - elseif (miraak.GetLevel() >= Stage4) - MiraakSword = DLC2MKMiraakFightSword5 - MiraakStaff = DLC2MKMiraakFightStaff5 - ElseIf (miraak.GetLevel() >= Stage3) - MiraakSword = DLC2MKMiraakFightSword4 - MiraakStaff = DLC2MKMiraakFightStaff4 - ElseIf (miraak.GetLevel() >= Stage2) - MiraakSword = DLC2MKMiraakFightSword3 - MiraakStaff = DLC2MKMiraakFightStaff3 - ElseIf (miraak.GetLevel() >= Stage1) - MiraakSword = DLC2MKMiraakFightSword2 - MiraakStaff = DLC2MKMiraakFightStaff2 - Else ;base gear - MiraakSword = DLC2MKMiraakFightSword1 - MiraakStaff = DLC2MKMiraakFightStaff1 - EndIf -EndFunction - -;;;;;;;;;;;;;;;;End Miraak Combat Leveling Function;;;;;;;;;;;;;;;;;;;;; - - -;;;;;;;;;;;;;;;;Set Reward Gear Function;;;;;;;;;;;;;;;;;;;;; - ;Ended up doing this thorough DeathItems but kept the old script here - ;This function controls if we give the player light or heavy mask -GlobalVariable Property DLC2MQ06MaskHeavyChance auto -GlobalVariable Property DLC2MQ06MaskLightChance auto -Function SetRewardGear() - if playerActor.getActorValue("Heavyarmor") > playerActor.getActorValue("LightArmor") - DLC2MQ06MaskHeavyChance.SetValue(0) - DLC2MQ06MaskLightChance.SetValue(100) - else - DLC2MQ06MaskLightChance.SetValue(0) - DLC2MQ06MaskHeavyChance.SetValue(100) - endif -EndFunction -Function SwapToRewardGear() -EndFunction -;;;;;;;;;;;;;;;;End Reward Gear Function;;;;;;;;;;;;;;;;;;;;; - -;Hit Timestamps -float TimerPreviousHit01 = 0.0 ;Timestamps that record when the player hits Miraak with an attacked. -float TimerPreviousHit02 = 0.0 ;Used to approximately detect when he's been 'cornered' so he can escape. -float TimerPreviousHit03 = 0.0 -float TimerPreviousHit04 = 0.0 -float TimerPreviousHit05 = 0.0 -float TimerPreviousHit06 = 0.0 -float TimerOfRecord = 0.0 ;Timer used to determine when Miraak was cornered. -float minTimebetweenSprints = 10.0 -float lastSprintTime = 0.0 -bool sprintBusy = false - -ObjectReference Property MQ06MiraakDeathTeleportMarker Auto diff --git a/source/scripts/dlc2mq06script.psc b/source/scripts/dlc2mq06script.psc deleted file mode 100644 index cd3cda4d..00000000 --- a/source/scripts/dlc2mq06script.psc +++ /dev/null @@ -1,72 +0,0 @@ -Scriptname DLC2MQ06Script extends Quest Conditional - -event OnUpdate() -; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord1) = " + Game.IsWordUnlocked(DLC2BendToWillWord1)) -; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord2) = " + Game.IsWordUnlocked(DLC2BendToWillWord2)) -; debug.trace(self + " IsWordUnlocked(DLC2BendToWillWord3) = " + Game.IsWordUnlocked(DLC2BendToWillWord3)) - - ; watch for player to unlock words - if Game.IsWordUnlocked(DLC2BendToWillWord1) && Game.IsWordUnlocked(DLC2BendToWillWord2) && Game.IsWordUnlocked(DLC2BendToWillWord3) - SetStage(100) - else - RegisterForSingleUpdate(5.0) - endif -endEvent - -; this function clears the "mind control" state of all the pillars -function ClearMindControl() - DLC2PillarBuildSandboxMarkerTOGGLEBeast.Disable() - DLC2PillarBuildSandboxMarkerTOGGLEEarth.Disable() - DLC2PillarBuildSandboxMarkerTOGGLESun.Disable() - DLC2PillarBuildSandboxMarkerTOGGLEWater.Disable() - DLC2PillarBuildSandboxMarkerTOGGLEWind.Disable() - ; mark Tree Stone freed - DLC2StandingStoneTreeREF.Freed = true -endFunction - -Function EnableHM(bool enabling) - if (enabling) - DLC2MQ06HermaeusMoraENDFXRef.ChangeState() - HermaeusMoraTA.Enable() - else - DLC2MQ06HermaeusMoraENDFXRef.ChangeState(false) - HermaeusMoraTA.Disable() - endif -EndFunction - -Function EnableHMBattle(bool enabling, int iNewState = -1) - if (enabling) - DLC2MQ06HermaeusMoraBattleFXRef.ChangeState(true, iNewState) - else - DLC2MQ06HermaeusMoraBattleFXRef.ChangeState(false) - endif -EndFunction - -; called by dragon alias script if dragon unloads after being tamed (so he can't fly) but before player rides him -function MoveTameDragonFailsafe(Actor dragon) - -endFunction - - -WordOfPower Property DLC2BendToWillWord1 Auto -WordOfPower Property DLC2BendToWillWord2 Auto -WordOfPower Property DLC2BendToWillWord3 Auto - -Location Property DLC2Book01DungeonLocation Auto -Location Property DLC2ApocrypaMiraaksTowerLocation Auto - -ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEBeast Auto -ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEEarth Auto -ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLESun Auto -ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEWater Auto -ObjectReference Property DLC2PillarBuildSandboxMarkerTOGGLEWind Auto - -ObjectReference Property HermaeusMoraTA auto - -int Property MiraakDragonsKilled Auto Conditional -DLC2StandingStoneScript Property DLC2StandingStoneTreeREF Auto - -DLC2HermaeusMoraFaceFXSCRIPT Property DLC2MQ06HermaeusMoraENDFXRef Auto - -DLC2MQ05HermaeusMoraFXScript Property DLC2MQ06HermaeusMoraBattleFXRef Auto - diff --git a/source/scripts/dlc2mqbosstentaclecontroller.psc b/source/scripts/dlc2mqbosstentaclecontroller.psc deleted file mode 100644 index dcc2947d..00000000 --- a/source/scripts/dlc2mqbosstentaclecontroller.psc +++ /dev/null @@ -1,193 +0,0 @@ -ScriptName DLC2MQBossTentacleController extends objectReference - - -ObjectReference property DLC2MQBossTentacleChainStart001 auto -ObjectReference property DLC2MQBossTentacleChainStart002 auto -ObjectReference property DLC2MQBossTentacleChainStart003 auto -ObjectReference property DLC2MQBossTentacleChainStart004 auto -ObjectReference property DLC2MQBossTentacleChainStart005 auto -ObjectReference property DLC2MQBossTentacleChainStart006 auto -ObjectReference property DLC2MQBossTentacleChainStartCenter auto -ObjectReference property DLC2MQBossTentacleChainEnd001 auto -ObjectReference property DLC2MQBossTentacleChainEnd002 auto -ObjectReference property DLC2MQBossTentacleChainEnd003 auto -ObjectReference property DLC2MQBossTentacleChainEnd004 auto -ObjectReference property DLC2MQBossTentacleChainEnd005 auto -ObjectReference property DLC2MQBossTentacleChainEnd006 auto -ObjectReference property DLC2MQBossTentacleChainEndCenter auto - -bool property fullSweep auto hidden -int property targetArea = 0 auto hidden -bool property clockwise = false auto hidden -float property attackTimer = 0.5 auto hidden - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; State Block -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;This is the state where we are ready to go -auto State waiting - event OnUpdate() -; debug.Trace(self + ": Has recieved OnUpdate") - goToState("Busy") - if fullSweep -; debug.Trace(self + ": Should Trigger Full Sweep") - fullSweep = false - AttackWithFullSweep() - else;if targetArea != 0 -; debug.Trace(self + ": Should Trigger Target Area") - AttackTargetArea() - endif - endEvent -endState - -;Override the functions so we do nothing else -state Busy - event OnUpdate() - endEvent -endState - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Function Block -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -Function AttackWithFullSweep() -; debug.Trace(self + ": Starting AttackWithFullSweep") - objectReference currentLink - if !clockwise - DLC2MQBossTentacleChainStart001.Activate(DLC2MQBossTentacleChainStart001) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart001.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - DLC2MQBossTentacleChainStart002.Activate(DLC2MQBossTentacleChainStart002) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart002.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - DLC2MQBossTentacleChainStart003.Activate(DLC2MQBossTentacleChainStart003) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart003.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - DLC2MQBossTentacleChainStart004.Activate(DLC2MQBossTentacleChainStart004) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart004.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - DLC2MQBossTentacleChainStart005.Activate(DLC2MQBossTentacleChainStart005) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart005.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - DLC2MQBossTentacleChainStart006.Activate(DLC2MQBossTentacleChainStart006) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart006.getLinkedRef() - while currentLink - currentLink.Activate(currentLink) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - else ;clockwise is true - ;;;;;;;;;;;;;;;;;;NEED to do other attack here - endif - goToState("Waiting") -endFunction - - - -Function AttackTargetArea() -; debug.Trace(self + ": Starting AttackTargetArea") - objectReference currentLink - if !clockwise - if targetArea == 0 - DLC2MQBossTentacleChainStartCenter.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStartCenter.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 1 - DLC2MQBossTentacleChainStart001.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart001.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 2 - DLC2MQBossTentacleChainStart002.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart002.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 3 - DLC2MQBossTentacleChainStart003.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart003.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 4 - DLC2MQBossTentacleChainStart004.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart004.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 5 - DLC2MQBossTentacleChainStart005.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart005.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - elseif targetArea == 6 - DLC2MQBossTentacleChainStart006.Activate(self) - utility.Wait(attackTimer) - currentLink = DLC2MQBossTentacleChainStart006.getLinkedRef() - while currentLink - currentLink.Activate(self) - currentLink = currentLink.getLinkedRef() - utility.Wait(attackTimer) - endWhile - else -; debug.Trace(self + ": attackTargetArea triggered with area 0") - endif - else ;clockwise is true - ;;;;;;;;;;;;;;;;;;NEED to do other attack here - endif - targetArea = 0 - goToState("Waiting") -endFunction - - - diff --git a/source/scripts/dlc2soulstealscript.psc b/source/scripts/dlc2soulstealscript.psc deleted file mode 100644 index f812bb29..00000000 --- a/source/scripts/dlc2soulstealscript.psc +++ /dev/null @@ -1,208 +0,0 @@ -Scriptname DLC2SoulStealScript extends Quest conditional -{Script attached to DLC2SoulSteal quest} - -ReferenceAlias Property Player auto -ReferenceAlias Property Miraak auto -ReferenceAlias Property Dragon auto - -Scene Property DLC2SoulStealScene auto - -Message Property DLC2SoulStealMsg auto - -MQKillDragonScript Property MQKillDragon auto - -quest property DLC2MQ02 auto -quest Property DLC2MQ06 auto - -MQGreybeardAbsorbScript property MQ105 auto - -bool Property TestMiraak auto ;if true, then ShouldMiraakAppear() always returns true -{If true, he always appears when player kills a dragon} - -GlobalVariable Property DLC2SoulStealCount auto ;if miraak steals soul this goes up one, goes back down if player takes it back - -bool fightPlayer conditional ;while this is true he will fight the player before disappearing, when this is false, he will disappear when done straling soul - -bool MiraakStoleSoul conditional ;scene got to the point where Miraak started to steal the soul - -int secondsBeforeGivingUp = 120 ;houw many seconds until we give up if Miraak hasn't started absorbing the soul - -bool apprearedOnce - -WordOfPower Property DLC2BendToWillWord1 auto - -bool MiraakMadeHisIntroduction -quest property DLC2MQ01 auto -quest Property MQ104 auto - -Faction Property MQNoDragonAbsorb auto - -; for Greybeard effect -VisualEffect Property FXGreybeardAbsorbEffect Auto -EffectShader Property GreybeardPowerAbsorbFXS Auto -EffectShader Property GreybeardPlayerPowerAbsorbFXS Auto -sound property NPCDragonDeathSequenceWind auto -sound property NPCDragonDeathSequenceExplosion auto - - - -Event OnUpdate() -; Debug.Trace(self + "OnUpdate()") - if MiraakStoleSoul == false - DLC2SoulStealScene.Stop() - endif -EndEvent - -Function StartTimer() -; Debug.Trace(self + "StartTimer()") - RegisterForSingleUpdate(secondsBeforeGivingUp) -EndFunction - -Function EndTimer() - unregisterForUpdate() -; Debug.Trace(self + "EndTimer()") -EndFunction - -bool Function TryMiraakMakeHisIntroduction(Actor DragonRef) - - bool returnVar = false - -; Debug.Trace(self + "TryMiraakMakeHisIntroduction() -- ALWAYS RETURNS FALSE NOW") - -; if MiraakMadeHisIntroduction == false && MQ104.GetStage() >=150 && Game.GetPlayer().IsInCombat() == false && DragonRef.isInFaction(MQNoDragonAbsorb) == false -; MiraakMadeHisIntroduction = true -; returnVar = true -; Debug.Trace(self + "TryMiraakMakeHisIntroduction() Miraak is going to make his introductory appearance, calling setStage 0 on DLC2MQ01") -; DLC2MQ01.SetStage(0) -; endif -; -; Debug.Trace(self + "TryMiraakMakeHisIntroduction() returning: " + returnVar) - - RETURN returnVar - -EndFunction - -bool Function ShouldMiraakAppear(Actor DragonRef) -; Debug.Trace(self + "ShouldMiraakAppear() checking quest stages and other logic") - - bool returnVar = false - int chanceToAppear = 25 - - if DLC2MQ02.GetStage() >= 200 && DLC2MQ06.GetStage() < 500 && DragonRef.isInFaction(MQNoDragonAbsorb) == false - if Game.IsWordUnlocked(DLC2BendToWillWord1) || Game.GetPlayer().GetActorValue("DragonSouls") > 0 - if Utility.RandomInt(1,100) <= chanceToAppear || apprearedOnce == false - apprearedOnce = true - returnVar = true - endif - endif - endif - - if TestMiraak == true -; Debug.Trace(self + "ShouldMiraakAppear() -- TestMiraak == true, so forcing returnVar to true") - returnVar = true - endif - -; Debug.Trace(self + "ShouldMiraakAppear() returning: " + returnVar) - return returnVar - -EndFunction - -Function MiraakAppears(ObjectReference DragonRef) -; Debug.Trace(self + "MiraakAppears()" + DragonRef) - Dragon.ForceRefTo(DragonRef) - - DLC2MiraakScript MiraakRef = Miraak.GetReference() as DLC2MiraakScript - MiraakRef.AppearAtRef = DragonRef - MiraakRef.Appear() - MiraakRef.SetNoBleedoutRecovery(true) - - ;clear tracking variables from previous incarnations - fightPlayer = false - MiraakStoleSoul = false - - ;START THE "TIMER" - StartTimer() - - DLC2SoulStealScene.start() - -EndFunction - -Function MiraakDisappears() -; Debug.Trace(self + "MiraakDisappears()") - DLC2MiraakScript MiraakRef = Miraak.GetReference() as DLC2MiraakScript - MiraakRef.Disappear() - MiraakRef.SetNoBleedoutRecovery(false) - MiraakRef.RestoreAV("Health", 999999999) - - ;if Miraak disappears before he stole the soul, put the dragon back in the state that lets the player steal it's soul - if MiraakStoleSoul == false - (Dragon.GetActorReference() as DragonActorScript).gotoState("deadAndWaiting") - endif - -EndFunction - -Function StealSoul() - EndTimer() -; Debug.Trace(self + "StealSoul()") - MiraakStoleSoul = true - ModDLC2SoulStealCount(1) - MQKillDragon.DeathSequence(Dragon.GetActorReference(), Miraak.GetActorReference()) -EndFunction - -Function FinishStealingSoul() -; Debug.Trace(self + "FinishStealingSoul()") - DLC2SoulStealMsg.show() -EndFunction - -Function PlayerAttackedMiraak() - EndTimer() -; Debug.Trace(self + "PlayerAttackedMiraak()") - fightPlayer = true - -EndFunction - -Function PlayerTakesSoulBack() -; Debug.Trace(self + "PlayerTakesSoulBack()") - utility.wait(1) - AbsorbSoulFromMiraak(Miraak.GetActorReference()) - Game.GetPlayer().modActorValue("dragonsouls", 1) - ModDLC2SoulStealCount(-1) -EndFunction - -Function ModDLC2SoulStealCount(int amountToMod) -; Debug.Trace(self + "ModDLC2SoulStealCount()") - DLC2SoulStealCount.setValue(DLC2SoulStealCount.GetValue() + amountToMod) -EndFunction - -Function MiraakDetached() -; Debug.Trace(self + "MiraakDetached()") - if DLC2SoulStealScene.IsPlaying() -; Debug.Trace(self + "MiraakDetached() DLC2SoulStealScene is playing, calling stop()") - DLC2SoulStealScene.Stop() - endif -EndFunction - - -;CRIBBED FROM MQGreybeardAbsorbScript "AbsorbSoul()" -function AbsorbSoulFromMiraak(Actor target) -; Debug.Trace(self + "AbsorbSoulFromMiraak()") - - Actor PlayerRef = Game.GetPlayer() - - ;Play art and fx shaders on player and targeted grybeard - FXGreybeardAbsorbEffect.Play(target, 7, PlayerRef) - GreybeardPowerAbsorbFXS.Play(target) - GreybeardPlayerPowerAbsorbFXS.Play(PlayerRef) - - ; Sounds for when the wispy particles being to fly at the player. - NPCDragonDeathSequenceWind.play(target) - NPCDragonDeathSequenceExplosion.play(target) - - utility.wait(7) - - ;remove magic shaders - GreybeardPowerAbsorbFXS.Stop(target) - GreybeardPlayerPowerAbsorbFXS.Stop(PlayerRef) - -EndFunction - diff --git a/source/scripts/dlc2standingstonescript.psc b/source/scripts/dlc2standingstonescript.psc deleted file mode 100644 index 7f2604f1..00000000 --- a/source/scripts/dlc2standingstonescript.psc +++ /dev/null @@ -1,112 +0,0 @@ -Scriptname DLC2StandingStoneScript extends ObjectReference - -PROJECTILE Property DLC2VoicePushProjectile01 Auto -PROJECTILE Property DLC2VoicePushProjectile03 Auto -SPELL Property DLC2SpellLearned Auto -bool property Freed auto hidden -float DelayReady - -auto State Waiting - -Event OnActivate(ObjectReference akActionRef) - gotoState("Busy") -; debug.Trace("STANDING STONE: I've been touched") - if akActionRef == game.GetPlayer() - if Freed == true -; debug.Trace("STANDING STONE: has been freed - DelayReady: " + DelayReady + ", GameDays: " + GameDaysPassed.GetValue()) - if GameDaysPassed.GetValue() > DelayReady && game.GetPlayer().HasSpell(DLC2SpellLearned) == false -; debug.Trace("STANDINGSTONE: it's been a day since the spell was last added") - DelayReady = GameDaysPassed.GetValue() + 0.75 - PlayAnimation("stage3") - DLC2StoneActivateSound.play(self) - (akActionRef as actor).AddSpell(DLC2SpellLearned, true) -; debug.Trace("STANDINGSTONE: DLC2SacredStoneSpell" + DLC2SacredStoneSpell) - DLC2SacredStoneSpell.Cast(akActionRef) - else - DLC2StandingStoneNotReadyMsg.Show() - endif - else - WorkOnPillar(false) - endif - else - if Freed == false && (akActionRef as Actor) - WorkOnPillarNPC(akActionRef as Actor) - endif - endif - gotoState("Waiting") -EndEvent - -endState - -State Busy - ; do nothing -EndState - -function WorkOnPillarNPC(Actor pillarNPC) - ; put into alias - FollowerAtPillar.ForceRefTo(pillarNPC) - ; clear favor state - pillarNPC.SetDoingFavor(false) - ; work on pillar scene - DLC2PillarFollowerScene.Start() -endFunction - -function WorkOnPillar(bool bSleepMove = true) - if GetLinkedRef() - ; player blacks out, wakes up working on pillar - Game.DisablePlayerControls() - if bSleepMove == false - FadeToBlackImod.Apply() - MAGStandingStoneActivateA.Play(Game.GetPlayer()) - utility.wait(2) - FadeToBlackImod.PopTo(FadeToBlackHoldImod) - else - FadeToBlackImod.PopTo(FadeToBlackHoldImod) - utility.wait(2) - endif - Game.ForceThirdPerson() - ; put player in furniture - Game.GetPlayer().MoveTo(GetLinkedRef()) - DLC2PillarMiraakVoice.Start() - utility.wait(2) - FadeToBlackHoldImod.PopTo(FadeToBlackBackImod) - FadeToBlackHoldImod.Remove() - MAGStandingStoneActivateB.Play(Game.GetPlayer()) - utility.wait(2) -; debug.trace(self + " enabling controls") - Game.EnablePlayerControls() - while GetLinkedRef().IsFurnitureInUse() - utility.wait(1.0) - endWhile - DLC2PillarMiraakVoice.Stop() - DLC2Pillar.SetStage(100) ; runs Neloth scene, tracks player having touched pillar once - endif - -endFunction - - -ImageSpaceModifier Property FadeToBlackImod Auto - -ImageSpaceModifier Property FadeToBlackHoldImod Auto - -ImageSpaceModifier Property FadeToBlackBackImod Auto - -Topic Property DLC2PillarBlockingTopic Auto - -Scene Property DLC2PillarMiraakVoice Auto - -Quest Property DLC2Pillar Auto - -GlobalVariable Property GameDaysPassed Auto - -Message Property DLC2StandingStoneNotReadyMsg Auto - -Scene Property DLC2PillarFollowerScene Auto -ReferenceAlias Property FollowerAtPillar Auto - -Sound Property MAGStandingStoneActivateA Auto -Sound Property MAGStandingStoneActivateB Auto - -SPELL Property DLC2SacredStoneSpell Auto - -Sound Property DLC2StoneActivateSound Auto diff --git a/source/scripts/dlc2tamedragonscript.psc b/source/scripts/dlc2tamedragonscript.psc deleted file mode 100644 index 75927a91..00000000 --- a/source/scripts/dlc2tamedragonscript.psc +++ /dev/null @@ -1,330 +0,0 @@ -Scriptname DLC2TameDragonScript extends Quest Conditional - -bool bAllowRestrain = false ; this gets set to true at the start of Tame sequence, false during EndWait to prevent accidentally rerestraining him - -function TameDragon(actor newDragon) -; debug.trace(self + " TameDragon START") - ; if alias already has something in it (that's alive), do nothing - if dragonReleasedAlias.GetRef() && !dragonReleasedAlias.GetActorRef().IsDead() - ; do nothing, dragon is in the process of being released -; debug.trace(self + " TameDragon: time's up, do nothing") - ; if this is not the current target, give a message -; if dragonReleasedAlias.GetRef() != newDragon - DLC2TameDragonResistMSG.Show() -; endif - return - elseif DragonAlias.GetRef() && !dragonAlias.GetActorRef().IsDead() - ; if we're hitting a tamed dragon again, tell him to land - ; otherwise, do nothing (can't tame 2 dragons at once) - if DragonAlias.GetActorRef() == newDragon && newDragon.GetActorValue("variable01") != 99 - ; we're hitting an already tamed dragon with tame again - tell him to land - LandDragon() - else - ; show "resists" message - DLC2TameDragonResistMSG.Show() - endif - ; no matter what - don't do anything else - return - endif -; debug.trace(self + " TameDragon: trying to tame...") - ; if dragon is not in an interior, then check if it's in an allowed worldspace - if not, do nothing - if !newDragon.IsInInterior() && !DLC2TameDragonAllowedWorldspaces.HasForm(newDragon.GetWorldSpace()) -; debug.trace(self + " TameDragon: dragon is in invalid worldspace + " + newDragon.GetWorldSpace() + ", do nothing") - return - endif - - ; reset allow restrain flag - bAllowRestrain = true - - ; move orbit marker to player's position - DLC2TameDragonOrbitMarker.Moveto(Game.GetPlayer()) - - ; always hold him on the ground to start - ; give "no fly" ability so it doesn't interfere with scripted "no fly" - newDragon.AddSpell(DLC2TameDragonNoFlyAbility) - - ; put dragon in alias - DragonAlias.ForceRefTo(newDragon) - ; stop combat - newDragon.StopCombatAlarm() - - ; start scene - ; check for special case: MQ06 - if newDragon.IsInFaction(DLC2MQ06DragonFaction) && DLC2MQ06.GetStage() >= 10 && DLC2MQ06.GetStage() < 300 - ; this is the MQ06 dragon - first time tamed - bMQ06DragonTaming = true - DLC2MQ06TameDragonScene.Start() - else - bMQ06DragonTaming = false - DLC2TameDragonScene1.Start() - endif - - ; heal the dragon - newDragon.RestoreActorValue("Health", 9999) -endFunction - -; call this function to get the dragon to briefly land next to the player -function LandDragon() -; debug.trace(self + " LandDragon: dragon " + dragonAlias.GetRef() + " landing again") - Actor dragonActor = dragonAlias.GetActorRef() - ; reset actor value - if dragonActor.GetActorValue("variable01") != 99 - dragonActor.SetActorValue("Variable01", 0) - else - return - endif - - ; move orbit marker to player's position - DLC2TameDragonOrbitMarker.Moveto(Game.GetPlayer()) - - ; always hold him on the ground to start - ; give "no fly" ability so it doesn't interfere with scripted "no fly" - dragonActor.AddSpell(DLC2TameDragonNoFlyAbility) - - ; start scene - DLC2TameDragonScene2.Start() -endFunction - -; check if dragon is in valid worldspace - if not, release immediately -function ValidateWorldspace() -; debug.trace(self + " ValidateWorldspace") - if DLC2TameDragonAllowedWorldspaces.HasForm(Game.GetPlayer().GetWorldSpace()) == false -; debug.trace(self + " player in invalid worldspace " + Game.GetPlayer().GetWorldSpace() + " - release dragon") - EndWait() - ReleaseDragon() - endif - -endFunction - -; call this when initial scene is ended or player tries to ride him -function EndWait() -; debug.trace(self + " EndWait") - Actor dragonActor = dragonAlias.GetActorRef() - - ; if he's not in a "waiting" state, do nothing - if dragonActor.HasSpell(DLC2TameDragonNoFlyAbility) == false -; debug.trace(self + " EndWait: not in waiting state, do nothing") - return - endif - - ; can't restrain him again - bAllowRestrain = false - ; unrestrain him - RestrainDragon(false) - ; set crime faction - dragonActor.SetCrimeFaction(DLC2TameDragonFaction) - - ; let him fly if allowed - dragonActor.RemoveSpell(DLC2TameDragonNoFlyAbility) - dragonActor.RemoveSpell(DLC2abCalmDragon) - - ; safety check: if dragon is not in aliases, must have been released (probably by player aggroing it) - if dragonAlias.GetActorRef() != dragonActor -; debug.trace(" EndWait - dragonAlias doesn't match, do nothing else") - return - endif - - ; set "done waiting" variable - if dragonActor.GetActorValue("variable01") == 0 - dragonActor.SetActorValue("variable01", 1) - endif - - dragonActor.EvaluatePackage() - ; register for summon duration (not for MQ06 dragon) - if !bMQ06DragonTaming - RegisterForSingleUpdateGameTime(fTameHours) - endif - - ; try adding the calm again in case it didn't work the first time -; debug.trace(self + " adding DLC2abCalmDragon to dragon") - dragonActor.AddSpell(DLC2abCalmDragon) - utility.wait(2) - dragonActor.RemoveSpell(DLC2abCalmDragon) - - ; if player is riding, increment riding variable - if dragonActor.IsBeingRidden() - if iDragonsRiddenCount == 0 - RegisterForSingleUpdate(8.0) - endif - ; only increment if not already in tamed faction - if !dragonActor.IsInFaction(DLC2TamedDragonTrackingFaction) - dragonActor.AddToFaction(DLC2TamedDragonTrackingFaction) - iDragonsRiddenCount = iDragonsRiddenCount + 1 - if iDragonsRiddenCount >= iDragonsRiddenAchievementCount - Game.AddAchievement(73) - endif - endif - endif -endFunction - -; call this when timer runs out or dragon dies -function ReleaseDragon() -; debug.trace(self + " ReleaseDragon") - ; set actor value to indicate he wants to be released when possible - Actor dragonActor = dragonAlias.GetActorRef() - ; don't do this more than once to the same dragon - if dragonActor.GetActorValue("variable01") != 99 - dragonActor.SetActorValue("variable01", 99) - ; try to dispel now or later - TryToReleaseDragon(dragonActor) - endif -endFunction - -event OnUpdateGameTime() -; debug.trace(self + " OnUpdate") - ; is dragon waiting to be released? - Actor dragonActor = dragonAlias.GetActorRef() - if dragonActor.GetActorValue("variable01") == 99 - TryToReleaseDragon(dragonActor) - else - ; time to dispel - ReleaseDragon() - endif -endEvent - -int tempCount = 0 - -function TryToReleaseDragon(actor dragonActor) - tempCount += 1 -; debug.trace(self + " TryToReleaseDragon " + tempCount) - - ; if player is not riding, release - if dragonActor.IsBeingRidden() == 0 - ; RELEASE: - dragonActor.SetRestrained(false) ; just in case - dragonAlias.Clear() - dragonReleasedAlias.ForceRefTo(dragonActor) - ; if in combat with player, release immediately - if dragonActor.IsHostileToActor(Game.GetPlayer()) -; debug.trace(self + " hostile to player, release immediately") - FinishRelease() - else -; debug.trace(self + " normal release, fly away before releasing") - ; move into "released" alias (no riding allowed) - DLC2TameDragonReleaseScene.Start() - endif - else - ; player is riding - need him to land - ; FOR NOW - no time limit if player is riding - ; just keep checking for player to be not riding - -; dragonActor.SetAllowFlyingEx(false, false, true) - -; if dragonActor.GetFlyingState() == 0 && dragonActor.IsBeingRidden() == 1 && Game.GetPlayer().IsOnMount() == 1 - ; force player to dismount -; Game.GetPlayer().Dismount() - ; give time for dismount to finish -; RegisterForSingleUpdateGameTime(0.1) -; else - RegisterForSingleUpdateGameTime(0.1) -; endif - endif -endFunction - -; called when escape scene ends -function FinishRelease() - actor dragonActor = dragonReleasedAlias.GetActorRef() -; debug.trace(" FinishRelease: dragon=" + dragonActor) - ; clear actor value - dragonActor.SetActorValue("variable01", 0) -; debug.trace(self + " FinishRelease - variable01=" + dragonactor.GetActorValue("variable01")) - ; failsafe - dragonActor.RemoveSpell(DLC2TameDragonNoFlyAbility) - ; clear aliases - dragonAlias.Clear() - dragonReleasedAlias.Clear() - ; not teammate any more -; debug.trace(self + " FinishRelease - dragon NOT teammate") - dragonActor.SetPlayerTeammate(false) - dragonActor.SetCrimeFaction(none) - dragonActor.EvaluatePackage() -endFunction - -function DragonDead() - ; called by OnDeath block on dragon - ; stop pending updates if any - UnregisterForUpdateGameTime() -endFunction - -function RestrainDragon(bool bRestrain) - ; this is to prevent him from responding to attacks when on the ground - ; only do this when not flying! - actor dragonActor = dragonAlias.GetActorRef() - if bRestrain && dragonActor.GetActorValue("variable01") != 99 - while dragonActor.GetFlyingState() > 0 && bAllowRestrain - utility.wait(1.0) - endwhile -; debug.trace(self + " ready to restrain dragon") - ; only restrain if the allow flag is still true - if bAllowRestrain -; debug.trace(self + " restraining dragon") - dragonActor.SetRestrained(true) - ; stop combat/alarms again to be sure - dragonActor.StopCombatAlarm() - ; add calm ability - has to be AFTER restraining him -; debug.trace(self + " adding DLC2abCalmDragon to dragon") - dragonActor.AddSpell(DLC2abCalmDragon) - endif - ; TRY MAKING TEAMMATE here - do it even if restrain can't happen - dragonActor.SetPlayerTeammate(true, false) - else -; debug.trace(self + " UN-Restraining dragon") - dragonActor.SetRestrained(false) - endif -endFunction - -; this is used only for displaying the first-time help message -bool bLearnMessageDisplayed = false -event OnUpdate() - if !bLearnMessageDisplayed - bLearnMessageDisplayed = true - DLC2LearnDragonRidingMsg.Show() - endif -endEvent - - -ReferenceAlias Property dragonAlias Auto -ReferenceAlias Property dragonReleasedAlias Auto - -Scene Property DLC2TameDragonScene1 Auto -{ normal tame scene to hold dragon on ground when you first tame him} - -Scene Property DLC2TameDragonScene2 Auto -{ tame scene to hold dragon on ground after already tamed, if hit by the spell again } - -Scene Property DLC2MQ06TameDragonScene Auto -{ MQ06 tame dragon scene } - -Faction Property DLC2MQ06DragonFaction Auto -{ used to check for MQ06 dragon } - -Quest Property DLC2MQ06 Auto - -Float Property fTameHours = 1.0 Auto Conditional -{duration of tame in game hours} - -Scene Property DLC2TameDragonReleaseScene Auto - -ObjectReference Property DLC2TameDragonOrbitMarker Auto -{ default object that the orbit package uses - code also moves this to fast travel destination } - -FormList Property DLC2TameDragonAllowedWorldspaces Auto -{ formlist of allowed worldspaces - dragon can only be tamed/ridden in these worldspaces } - -bool bMQ06DragonTaming ; set to true when we've tamed the MQ06 dragon first time - -SPELL Property DLC2TameDragonNoFlyAbility Auto - -SPELL Property DLC2abCalmDragon Auto - -Faction Property DLC2TameDragonFaction Auto - -Message Property DLC2TameDragonResistMSG Auto - -int Property iDragonsRiddenAchievementCount = 5 Auto -int iDragonsRiddenCount = 0 - -Message Property DLC2LearnDragonRidingMsg Auto - -Faction Property DLC2TamedDragonTrackingFaction Auto diff --git a/source/scripts/dragonactorscript.psc b/source/scripts/dragonactorscript.psc index 5234afc7..91985532 100644 --- a/source/scripts/dragonactorscript.psc +++ b/source/scripts/dragonactorscript.psc @@ -8,8 +8,7 @@ ImageSpaceModifier property dragonFOVfx auto {FX played for various impacts in dragon combat} float property deathFXrange = 1024.0 auto {max range to play death FX on player} -quest property MQkillDragon auto -{used to invoke deathSequence() function in MQKillDragonScript.psc} + actor property player auto hidden {For quick reference and clean-looking script} float property FOVfalloff auto hidden @@ -28,9 +27,6 @@ armor property forestDragonSkin auto int property dragonBreed = 0 auto {deprecated - do not use} -WIFunctionsScript Property WI Auto ;added by jduvall -{Pointer to WIFunctionsScript on WI quest. Used to create script event to get nearby NPCs to react to the death of the dragon} - ImpactDataSet Property FXDragonTakeoffImpactSet Auto {Impact data set to use for the dragon takeoff} ImpactDataSet Property FXDragonLandingImpactSet Auto @@ -52,7 +48,7 @@ WorldSpace Property DLC2ApocryphaWorld auto ;|_____________| EVENT onInit() ; just initialize any variables, etc. - player = game.getPlayer() ; store player reference + player = game.GetForm(0x14) as Actor ; store player reference FOVfalloff = 1600 ; range at which impact doesn't play FOV if deathFXrange == 0 @@ -124,15 +120,7 @@ WorldSpace Property DLC2ApocryphaWorld auto Event OnLocationChange(Location akOldLoc, Location akNewLoc) - ;USED TO GET DIALOGUE CONDITIONED ON DRAGON HAVING ATTACKED A TOWN -- only happens if he lands on the ground in a location - ie death, or to land to fight (not on a perch) - ;see also DragonPerchScript -; debug.trace(self + "OnLocationChange() calling WI.RegisterDragonAttack(" +akNewLoc + ")") - ;USKP 2.0.3 - So. Now it seems like you won't even call this out of here with a None? Ok..... - if( akNewLoc != None ) - WI.RegisterDragonAttack(akNewLoc, self) - EndIf - if !isDead() && isGhost() ; redundancy check to prevent invincible, "ghosted" dragons from respawning. setGhost(FALSE) @@ -147,10 +135,7 @@ STATE alive ; redundancy check to prevent invincible, "ghosted" dragons from respawning. setGhost(FALSE) endif - - if akTarget == Game.GetPlayer() - WI.updateWIDragonTimer() ;used to prevent dragons from appearing too frequently - endif + endEvent EVENT onAnimationEvent(objectReference deliverator, string eventName) @@ -205,69 +190,13 @@ STATE alive endEVENT EVENT onDeath(actor killer) - ;debug.trace("Remove mouth/injury FX art, begin death FX sequence for " + self) - ;USKP 2.1.3 Bug #19214 - Dialogue in the quest has options that get skipped with this line below the gotoState call. - WI.startWIDragonKillQuest(self) ;used to create a scene if any NPCs are nearby when the dragon dies. See WIFunctionsScript attached to WI quest which creates a story manager script event, and WIDragonKilled quest which handles the scene. - gotoState("deadAndWaiting") - - ; removing update registration in favor of a while() in the STATE below - ;registerForUpdate(1) + DispelAllSpells() + gotoState("deadDisintegrated") endEVENT endSTATE -STATE deadAndWaiting - - ;-------------------CHANGED FOR DLC2--------------------------- - EVENT onBeginState() - - MQKillDragonScript MQKillDragonS = MQkillDragon as MQKillDragonScript - - ;If in Apocrypha, this is the boss fight so do not wait for distance - if DLC2ApocryphaLocation && DLC2ApocryphaWorld && (game.getPlayer().isInLocation(DLC2ApocryphaLocation) || game.getPlayer().getWorldSpace() == DLC2ApocryphaWorld) - gotoState("deadDisintegrated") - MQkillDragonS.deathSequence(self) - RegisterForSingleUpdateGameTime(0.5) - elseif MQKillDragonS.ShouldMiraakAppear(self) && MiraakAppeared == false - gotoState("deadDisintegrated") -; Debug.Trace(self + "MiraakAppears") - MiraakAppeared = true - MQkillDragonS.deathSequence(self, MiraakAppears = true) - RegisterForSingleUpdateGameTime(0.5) - else - ;NORMAL BASE GAME BEHAVIOR - while getDistance(player) > deathFXrange - utility.wait(1.0) - endWhile -; debug.trace("player close enough to absorb" + self) - gotoState("deadDisintegrated") - MQkillDragonS.deathSequence(self) - RegisterForSingleUpdateGameTime(0.5) - - endif - - endEVENT - ;-------------------------------------------------------------------------------------------- - - ; EVENT onUpdate() - ; if getDistance(player) < deathFXrange -; ; debug.trace("player close enough to absorb" + self) - ; gotoState("deadDisintegrated") - ; unRegisterforUpdate() - ; (MQkillDragon as MQKillDragonScript).deathSequence(self) - ; endif - ;endEVENT -endSTATE - STATE deadDisintegrated - ; nothing happens here - dead and just bones. - event OnUpdateGameTime() - cell myDragonCell = self.getparentcell() - if !myDragonCell.IsAttached() - NoStalking() - else - RegisterForSingleUpdateGameTime(0.5) - endIf - endEvent + ; nothing happens here - just dead endSTATE ; _____________ @@ -282,23 +211,6 @@ function AnimateFOV(float fFOVfalloff = 1600.0) if FOVpower > 1.0 FOVpower = 1.0 ; clamp to prevent wacky values endif -; ;debug.trace("player is " + playerDist + " from landing dragon") -; ;debug.trace("dragon FOV fx power is" + FOVpower) dragonFOVfx.apply(FOVpower) ;animated FOV effect. Strength based on distance from player endif endFunction - -Bool function IsDurnehviir() - - return self.GetActorBase() as form == game.GetFormFromFile(0x000030D8, "Dawnguard.esm") -endFunction - -function NoStalking() - - if self.IsDurnehviir() - return - else - self.DispelAllSpells() - self.SetCriticalStage(self.CritStage_DisintegrateEnd) - endIf -endFunction \ No newline at end of file diff --git a/source/scripts/dragonperchscript.psc b/source/scripts/dragonperchscript.psc deleted file mode 100644 index d48a2cbc..00000000 --- a/source/scripts/dragonperchscript.psc +++ /dev/null @@ -1,19 +0,0 @@ -Scriptname DragonPerchScript extends ObjectReference -{Script attached to all dragon perches. ASSUMES THE ONLY THING ABLE TO ACTIVATE THE PERCH IS A DRAGON!} - -WIFunctionsScript Property WI Auto ;added by jduvall -{Pointer to WIFunctionsScript on WI quest.} - -;Primary use at the moment, is to register a dragon attack on towns, should a dragon perch somewhere in a town -jduvall - -Event OnActivate(ObjectReference akActionRef) - - ;*** !!! ASSUMES THE ONLY THING ABLE TO ACTIVATE THE PERCH IS A DRAGON !!!! *** - -; debug.trace(self + "OnActivate(" + akActionRef + ") calling WI.RegisterDragonAttack()") - - ;SEE ALSO: DragonActorScript - WI.RegisterDragonAttack(GetEditorLocation(), akActionRef as Actor) - - -EndEvent diff --git a/source/scripts/mqkilldragonscript.psc b/source/scripts/mqkilldragonscript.psc deleted file mode 100644 index 1c7d1e68..00000000 --- a/source/scripts/mqkilldragonscript.psc +++ /dev/null @@ -1,514 +0,0 @@ -Scriptname MQKillDragonScript extends Quest Conditional -{holds property and dragon death function, until we have base actor scripts} - -import game -import debug -import utility -import sound - - -;************************************************ -; this is what actually does the death sequence -; change timing and art here -;************************************************ - -;------------------------ADDED FOR DLC2--------------------- -bool Function TryMiraakMakeHisIntroduction(Actor DragonRef) - - RETURN DLC2SoulSteal.TryMiraakMakeHisIntroduction(DragonRef) - -EndFunction - - -bool Function ShouldMiraakAppear(Actor DragonRef) - - RETURN DLC2SoulSteal.ShouldMiraakAppear(DragonRef) - -EndFunction -;---------------------------------------------------------------- - - -function DeathSequence(Actor dragonRef, Actor AbsorbActor = None, bool MiraakAppears = False) -;ADDED "Actor AbsorbActor = none, bool MiraakAppears = false" FOR DLC2 - - ;ADDED FOR DLC2---------------------------------- - if game.getPlayer().isInLocation(DLC2ApocryphaLocation) || game.getPlayer().getWorldSpace() == DLC2ApocryphaWorld - if AbsorbActor == none -; Debug.Trace(self + "Miraak Soul Stealing in Apocrypha Boss Fight") - ;Start an alternate version of the death sequence that gets to the soul absorb faster - MQ06DeathSequence(dragonRef, DLC2MiraakMQ06Ref, false) - return - endif - else - if AbsorbActor == none - AbsorbActor = Game.GetPlayer() - - endif - - if MiraakAppears -; Debug.Trace(self + "Calling DLC2SoulSteal.MiraakAppears()") - DLC2SoulSteal.MiraakAppears(dragonRef) - return - endif - endif - ;------------------------------------------------ - - - if dragonRef.IsInFaction(NoDragonAbsorb) - return - endif - - ; Add Skeleton to dragon's inventory. - dragonRef.AddItem(DragonUnderskin) - - ; Dragon wings particles bits - - FXDragonDeathLHandBits.Play(dragonRef, 12) - FXDragonDeathRHandBits.Play(dragonRef, 12) - - - wait(0.2) - - ;Equip skeleton under skin - dragonRef.EquipItem(DragonUnderskin) - wait(0.5) - dragonRef.PlaySubGraphAnimation("UnderSkinFadeOut") - - ;*** WORLD INTERACTION FUNCTION -- jduvall - WI.PlayerIsCurrentlyAbsorbingPower(dragonRef) - bIsAbsorbing = true - - ; Start effect shader decorating holes in the base skin - DragonHolesFXS.Play(dragonRef) - ; Play disintegrating skin. - dragonRef.PlaySubGraphAnimation( "SkinFadeOut" ) -;;; - ; Play imagespace modifier which is timed to match sequence. - DragonPowerAbsorbISM.Apply() - - ; Sound of dragon carcass first bursts into flames until the flames die off. Must be turned off - int soundInstanceFireID = NPCDragonDeathSequenceFireLPM.play(dragonRef) - - wait(1) - - ;Small bits rising from dragon fx shader. - DragonHolesBitsLiteFXS.Play(dragonRef) - - wait(1) - ;Bigger bits rising from dragon fx shader. - DragonHolesBitsFXS.Play(dragonRef) - - wait(2) - - - - wait(1.75) - ;Play blood fade out if it is there - dragonRef.PlaySubGraphAnimation("BloodFade") - - ; Magic particles on wings - FXDragonDeathRHandFire.Play(dragonRef, 12) - FXDragonDeathLHandFire.Play(dragonRef, 12) - - wait(1.0) - ; magic fire fx shader - DragonHolesMagicFXS.Play(dragonRef) - DragonHolesMagicFXS.Stop(dragonRef);;;;;;;;;;;;;;;;;;;;;;;; - - wait(0.25) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - ;StopDragon bits fxs - DragonHolesBitsFXS.Stop(dragonRef) - DragonHolesBitsLiteFXS.Stop(dragonRef) - ;Stop holes fx shader now that main dragon skin is un-worn - DragonHolesFXS.Stop(dragonRef) - - ; Play light emitting magic shader on dragon -;; DragonHolesLightFXS.Play(dragonRef) - - wait(1.8) - ;unequipp invisible art - if dragonRef.IsEquipped(DragonBloodHeadFXArmor) == true - dragonRef.unEquipItem(DragonBloodHeadFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodTailFXArmor) == true - dragonRef.unEquipItem(DragonBloodTailFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodWingLFXArmor) == true - dragonRef.unEquipItem(DragonBloodWingLFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodWingRFXArmor) == true - dragonRef.unEquipItem(DragonBloodWingRFXArmor) - endif - - ;display dragon absorb effect art. One part on dragon one part on player. - DragonAbsorbEffect.Play(dragonRef, 8, AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor -;; dragonRef.placeAtME(MAGDragonPowerAbsorbExplosion) - DragonAbsorbManEffect.Play(AbsorbActor, 8, dragonRef) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - ; Sounds for when the wispy particles being to fly at the player. - NPCDragonDeathSequenceWind.play(dragonRef) - NPCDragonDeathSequenceExplosion.play(dragonRef) - - wait(0.1) - - ; On man power absorb effect shader. - DragonPowerAbsorbFXS.Play(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - - if AbsorbActor == Game.GetPlayer() ;***DLC2 - wait(1) - ; turn off remaining effect bits and magic leak fxshaders - - wait(1) - - Endif - - ; ghost the dragon so you can't hit him - dragonRef.SetGhost(true) - - ;clear any arrows that may have been stuck in dragon - dragonRef.clearExtraArrows() - - -;; - - if AbsorbActor == Game.GetPlayer() ;***DLC2 - wait(4) - else - wait(3) - endif - - ;Stop fx shader on player showing power absorb. - DragonPowerAbsorbFXS.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - ; End sound of dragon carcass bursting into flames. - StopInstance(soundInstanceFireID) - - ; add lingering smoke and glow to dragon carcass. - DragonHolesSmokeFXS.Play(dragonRef) - - ; Start sound for smoldering dragon - int soundInstanceSmolderID = NPCDragonDeathSequenceSmolderLPM.play(dragonRef) - - - if AbsorbActor == Game.GetPlayer() ;***DLC2 - wait(4) - endif - - ;*** CHANGED FOR DLC2-------------------------------------------------------- - - if AbsorbActor == GetPlayer() - ; increment dragon count - DragonsAbsorbed.value = DragonsAbsorbed.value + 1 - - ; add dragonsoul point to player - AbsorbActor.modActorValue("dragonsouls", VoicePointsReward) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - ; do this right now for MQ104 dragon: - if !MQ104.GetStageDone(90) && MQ104.IsRunning() -; ; debug.trace(self + " setting MQ104 stage 90") - MQ104.SetStage(90) - endif - - elseif game.getPlayer().isInLocation(DLC2ApocryphaLocation) - DLC2BossBattleScript = DLC2MQ06MiraakAlias as DLC2MQ06MiraakBossBattle - DLC2BossBattleScript.MiraakStealsSoul() - else - ;MIRAAK STOLE THE SOUL!!! - DLC2SoulSteal.FinishStealingSoul() - - endif - - TryMiraakMakeHisIntroduction(DragonRef) - - ;------------------------------------------------------------------------------- - - ; turn off effect shaders for smoldering carcass - DragonHolesSmokeFXS.Stop(dragonRef) - - ; Get rid of art attached to dragon and player showing streaming magic. - DragonAbsorbEffect.Stop(dragonRef) - DragonAbsorbManEffect.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - if AbsorbActor == Game.GetPlayer() ;***DLC2 - wait(4) - endif - - ;Stop smoldering sound - StopInstance(soundInstanceSmolderID) - - ; put dragon in faction so other quests know player has absorbed power - dragonRef.addtoFaction(MQKillDragonFaction) - - ;Stop light emitting magic shader on dragon - DragonHolesLightFXS.Stop(dragonRef) - - ;*** WORLD INTERACTION FUNCTION -- jduvall - WI.PlayerIsDoneAbsorbingPower(dragonRef) - - dragonRef.EquipItem(SkinDragonHider, true) - - bIsAbsorbing = false - -endFunction - -WIFunctionsScript Property WI Auto -{Pointer to WIFunctionsScript on WI quest. Used to call functions so that the dialogue in the scene in WIDragonKill quest is aware of when the player is aborbing and done absorbing the dragon's power.} - -GlobalVariable Property DragonsAbsorbed Auto - -Armor Property DragonUnderskin Auto - -Faction Property MQKillDragonFaction Auto - -int Property VoicePointsReward = 1 Auto -{how many soul points to give player} - - - -VisualEffect Property DragonAbsorbEffect Auto -VisualEffect Property DragonAbsorbManEffect Auto -VisualEffect Property FXDragonDeathLHandBits Auto -VisualEffect Property FXDragonDeathLHandFire Auto -VisualEffect Property FXDragonDeathRHandBits Auto -VisualEffect Property FXDragonDeathRHandFire Auto -;VisualEffect Property DragonDeadswapHide Auto -;VisualEffect Property DragonDeadswap Auto - -EffectShader Property DragonHolesFXS Auto -EffectShader Property DragonHolesBitsFXS Auto -EffectShader Property DragonHolesBitsLiteFXS Auto -EffectShader Property DragonPowerAbsorbFXS Auto -EffectShader Property DragonHolesSmokeFXS Auto -EffectShader Property DragonHolesMagicFXS Auto -EffectShader Property DragonHolesLightFXS Auto - -ImageSpaceModifier Property DragonPowerAbsorbISM Auto - -sound property NPCDragonDeathSequenceFireLPM auto -sound property NPCDragonDeathSequenceWind auto -sound property NPCDragonDeathSequenceExplosion auto -sound property NPCDragonDeathSequenceSmolderLPM auto - -Armor Property DragonBloodHeadFXArmor Auto -Armor Property DragonBloodTailFXArmor Auto -Armor Property DragonBloodWingLFXArmor Auto -Armor Property DragonBloodWingRFXArmor Auto -Armor Property SkinDragonHider Auto - -Explosion Property MAGDragonPowerAbsorbExplosion Auto - -Faction Property NoDragonAbsorb Auto -{no death sequence if in this faction} - -bool Property bIsAbsorbing Auto Conditional -{true while the absorb sequence is running} - -Quest Property MQ104 Auto - - - - -;Added for DLC------------------------------------------- -;Everything below this is a rework for Miraak's soul steal in -;the apocrypha boss fight -DLC2SoulStealScript Property DLC2SoulSteal Auto -Actor Property DLC2MiraakMQ06Ref Auto -Location Property DLC2ApocryphaLocation Auto -Worldspace Property DLC2ApocryphaWorld Auto -ReferenceAlias Property DLC2MQ06MiraakAlias Auto -DLC2MQ06MiraakBossBattle Property DLC2BossBattleScript Auto hidden - - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; ALTERNATE VERSION OF THE DEATH SEQUENCE FOR MQ06 -; This absorbes the soul much faster -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - -function MQ06DeathSequence(Actor dragonRef, Actor AbsorbActor = None, bool MiraakAppears = False) -;ADDED "Actor AbsorbActor = none, bool MiraakAppears = false" FOR DLC2 - - if dragonRef.IsInFaction(NoDragonAbsorb) - return - endif - - ; Add Skeleton to dragon's inventory. - dragonRef.AddItem(DragonUnderskin) - - ; Dragon wings particles bits - - FXDragonDeathLHandBits.Play(dragonRef, 12) - FXDragonDeathRHandBits.Play(dragonRef, 12) - - - ;wait(0.2) - - ;Equip skeleton under skin - dragonRef.EquipItem(DragonUnderskin) - ;wait(0.5) - dragonRef.PlaySubGraphAnimation("UnderSkinFadeOut") - -;************************************************************************** -; This is the bit that plays the absorb stuff, needed to move it up for Miraak - ;display dragon absorb effect art. One part on dragon one part on player. - DragonAbsorbEffect.Play(dragonRef, 8, AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor -;; dragonRef.placeAtME(MAGDragonPowerAbsorbExplosion) - DragonAbsorbManEffect.Play(AbsorbActor, 8, dragonRef) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - ; Sounds for when the wispy particles being to fly at the player. - NPCDragonDeathSequenceWind.play(dragonRef) - NPCDragonDeathSequenceExplosion.play(dragonRef) - - DLC2BossBattleScript = DLC2MQ06MiraakAlias as DLC2MQ06MiraakBossBattle - DLC2BossBattleScript.MiraakStealsSoul() - DLC2SoulSteal.ModDLC2SoulStealCount(1) - ;wait(0.1) - - ; On man power absorb effect shader. - DragonPowerAbsorbFXS.Play(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - ;wait(1) - ; turn off remaining effect bits and magic leak fxshaders - - - ;wait(1) - ; ghost the dragon so you can't hit him - dragonRef.SetGhost(true) - - ;clear any arrows that may have been stuck in dragon - dragonRef.clearExtraArrows() - - -;; - - ;wait(4) - - ;Stop fx shader on player showing power absorb. - DragonPowerAbsorbFXS.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - -;************************************************************************** - ;*** CHANGED FOR DLC2-------------------------------------------------------- - - - - - - ;TryMiraakMakeHisIntroduction(DragonRef) - - ;------------------------------------------------------------------------------- - - ;*** WORLD INTERACTION FUNCTION -- jduvall - ;WI.PlayerIsCurrentlyAbsorbingPower(dragonRef) - bIsAbsorbing = true - - ; Start effect shader decorating holes in the base skin - DragonHolesFXS.Play(dragonRef) - ; Play disintegrating skin. - dragonRef.PlaySubGraphAnimation( "SkinFadeOut" ) -;;; - ; Play imagespace modifier which is timed to match sequence. - DragonPowerAbsorbISM.Apply() - - ; Sound of dragon carcass first bursts into flames until the flames die off. Must be turned off - int soundInstanceFireID = NPCDragonDeathSequenceFireLPM.play(dragonRef) - - wait(1) - - ;Small bits rising from dragon fx shader. - DragonHolesBitsLiteFXS.Play(dragonRef) - - wait(1) - ;Bigger bits rising from dragon fx shader. - DragonHolesBitsFXS.Play(dragonRef) - - wait(2) - - - - wait(1.75) - ;Play blood fade out if it is there - dragonRef.PlaySubGraphAnimation("BloodFade") - - ; Magic particles on wings - FXDragonDeathRHandFire.Play(dragonRef, 12) - FXDragonDeathLHandFire.Play(dragonRef, 12) - - wait(1.0) - ; magic fire fx shader - DragonHolesMagicFXS.Play(dragonRef) - DragonHolesMagicFXS.Stop(dragonRef);;;;;;;;;;;;;;;;;;;;;;;; - - wait(0.25) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - ;StopDragon bits fxs - DragonHolesBitsFXS.Stop(dragonRef) - DragonHolesBitsLiteFXS.Stop(dragonRef) - ;Stop holes fx shader now that main dragon skin is un-worn - DragonHolesFXS.Stop(dragonRef) - - ; Play light emitting magic shader on dragon -;; DragonHolesLightFXS.Play(dragonRef) - - wait(1.8) - ;unequipp invisible art - if dragonRef.IsEquipped(DragonBloodHeadFXArmor) == true - dragonRef.unEquipItem(DragonBloodHeadFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodTailFXArmor) == true - dragonRef.unEquipItem(DragonBloodTailFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodWingLFXArmor) == true - dragonRef.unEquipItem(DragonBloodWingLFXArmor) - endif - if dragonRef.IsEquipped(DragonBloodWingRFXArmor) == true - dragonRef.unEquipItem(DragonBloodWingRFXArmor) - endif - - ; End sound of dragon carcass bursting into flames. - StopInstance(soundInstanceFireID) -;*********************************************************************** - - ; add lingering smoke and glow to dragon carcass. - DragonHolesSmokeFXS.Play(dragonRef) - - ; Start sound for smoldering dragon - int soundInstanceSmolderID = NPCDragonDeathSequenceSmolderLPM.play(dragonRef) - - wait(4) - -;*** -------------------------------------------------------------------------- - - - ; turn off effect shaders for smoldering carcass - DragonHolesSmokeFXS.Stop(dragonRef) - - ; Get rid of art attached to dragon and player showing streaming magic. - DragonAbsorbEffect.Stop(dragonRef) - DragonAbsorbManEffect.Stop(AbsorbActor) ;***DLC2: CHANGED FROM GetPlayer() to AbsorbActor - - wait(4) - - ;Stop smoldering sound - StopInstance(soundInstanceSmolderID) - - ; put dragon in faction so other quests know player has absorbed power - dragonRef.addtoFaction(MQKillDragonFaction) - - ;Stop light emitting magic shader on dragon - DragonHolesLightFXS.Stop(dragonRef) - - ;*** WORLD INTERACTION FUNCTION -- jduvall - WI.PlayerIsDoneAbsorbingPower(dragonRef) - - dragonRef.EquipItem(SkinDragonHider, true) - - bIsAbsorbing = false - -endFunction - -;--------------------------------------------------------- \ No newline at end of file diff --git a/source/scripts/wifunctionsscript.psc b/source/scripts/wifunctionsscript.psc deleted file mode 100644 index 1128c582..00000000 --- a/source/scripts/wifunctionsscript.psc +++ /dev/null @@ -1,496 +0,0 @@ -Scriptname WIFunctionsScript extends Quest Conditional -{A place to hold functions that more than one world interaction quest might need that require properties I don't want to have to set up more than once.} - -;HOW TO USE THIS: Make this Quest a property cast as this quest, in the calling quest, and then you can access it's functions using the properties set up on WI quest. - -MiscObject Property Gold001 Auto - -;These are factions used by the function to make people mourn Kill event victims -faction property pWIMournAuntFaction auto -faction property pWIMournBoyfriendFaction auto -faction property pWIMournBrotherFaction auto -faction property pWIMournCousinFemaleFaction auto -faction property pWIMournCousinMaleFaction auto -faction property pWIMournDaughterFaction auto -faction property pWIMournFatherFaction auto -faction property pWIMournFriendFemaleFaction auto -faction property pWIMournFriendMaleFaction auto -faction property pWIMournGirlfriendFaction auto -faction property pWIMournHusbandFaction auto -faction property pWIMournKinsmanFaction auto -faction property pWIMournKinswomanFaction auto -faction property pWIMournMotherFaction auto -faction property pWIMournNephewFaction auto -faction property pWIMournNieceFaction auto -faction property pWIMournSisterFaction auto -faction property pWIMournSonFaction auto -faction property pWIMournUncleFaction auto -faction property pWIMournWifeFaction auto - -Faction Property WIAssaultedFaction Auto - -faction Property WIPlayerEnemyFaction Auto - -;used for WIDragonKill scene when the player absorbs power - see MQKillDragonScript -Faction Property WIDragonKilledAbsorbedFaction Auto -GlobalVariable Property WINextDragon Auto -GlobalVariable Property WIWaitDragon Auto - -;Note: this is a subset of all the AssociationTypes because this script only cares about these types. -associationType property pAuntUncle auto -associationType property pCourting auto -associationType property pCousins auto -associationType property pParentChild auto -associationType property pSiblings auto -associationType property pSpouse auto - - - -;WIDeadBodyCleanUpScript properties: -GlobalVariable Property GameDaysPassed Auto -faction property WINoBodyCleanupFaction auto -ObjectReference Property WIDeadBodyCleanupCellMarker Auto - -;Keywords -Keyword Property WIGamesTagStart Auto -Keyword Property WIDragonKilledStart Auto - -Keyword Property WIComplexInteractionToggle Auto ;used to control complex interactions, keyword data >= 0 complex interactions like dragon attacks are allowed, < 0 means not allowed to occur at this Location -Keyword Property WIDragonsToggle Auto - -Keyword Property WIDragonAttacked Auto ;used by the DragonActorScript to set keyword data on locations that have been attacked so people can respond to that fact - -Keyword Property WIRentRoomWalkToStart Auto - -;Locations - -Location Property SolitudeLocation Auto -Location Property MarkarthLocation Auto -Location Property WhiterunLocation Auto -Location Property WindhelmLocation Auto -Location Property RiftenLocation Auto - -Location Property BattleBornFarmLocation Auto -Location Property ChillfurrowFarmLocation Auto -Location Property LeftHandMineLocation Auto -Location Property MerryfairFarmLocation Auto -Location Property SalviusFarmLocation Auto -Location Property SnowShodFarmLocation Auto -Location Property PelagiaFarmLocation Auto - - - - -;Quests -Quest property WIGamesTag auto -Quest property MQ305 auto - - -Event OnInit() - -; debug.trace(self + " OnInit() turning off dragon WI events in cities and settlements near them") - - DisallowDragons(SolitudeLocation) - DisallowDragons(MarkarthLocation) - DisallowDragons(WhiterunLocation) - DisallowDragons(WindhelmLocation) - DisallowDragons(RiftenLocation) - - DisallowDragons(BattleBornFarmLocation) - DisallowDragons(ChillfurrowFarmLocation) - DisallowDragons(LeftHandMineLocation) - DisallowDragons(MerryfairFarmLocation) - DisallowDragons(SalviusFarmLocation) - DisallowDragons(SnowShodFarmLocation) - DisallowDragons(PelagiaFarmLocation) - - -EndEvent - - - -function RemoveMournerActorFromFactions(Actor Mourner) - - Mourner.RemoveFromFaction(pWIMournAuntFaction) - Mourner.RemoveFromFaction(pWIMournBoyfriendFaction) - Mourner.RemoveFromFaction(pWIMournBrotherFaction) - Mourner.RemoveFromFaction(pWIMournCousinFemaleFaction) - Mourner.RemoveFromFaction(pWIMournCousinMaleFaction) - Mourner.RemoveFromFaction(pWIMournDaughterFaction) - Mourner.RemoveFromFaction(pWIMournFatherFaction) - Mourner.RemoveFromFaction(pWIMournFriendFemaleFaction) - Mourner.RemoveFromFaction(pWIMournFriendMaleFaction) - Mourner.RemoveFromFaction(pWIMournGirlfriendFaction) - Mourner.RemoveFromFaction(pWIMournHusbandFaction) - Mourner.RemoveFromFaction(pWIMournKinsmanFaction) - Mourner.RemoveFromFaction(pWIMournKinswomanFaction) - Mourner.RemoveFromFaction(pWIMournMotherFaction) - Mourner.RemoveFromFaction(pWIMournNephewFaction) - Mourner.RemoveFromFaction(pWIMournNieceFaction) - Mourner.RemoveFromFaction(pWIMournSisterFaction) - Mourner.RemoveFromFaction(pWIMournSonFaction) - Mourner.RemoveFromFaction(pWIMournUncleFaction) - Mourner.RemoveFromFaction(pWIMournWifeFaction) -endFunction - -function PutMournerAliasInFaction(ReferenceAlias VictimAlias, ReferenceAlias MournerAlias) -{Calls PutMournerActorInFaction passing VictimAlias and MournerAlias as actors. Based on the relationship of the Victim to Mourner, mourer is placed in a faction to get related dialogue.} - - if MournerAlias.GetReference() == None - ;bail out earlu - return - EndIf - - actor VictimActor = VictimAlias.GetReference() as Actor - actor MournerActor = MournerAlias.GetReference() as Actor - - if VictimActor && MournerActor ;double check the cast before passing in as actor - PutMournerActorInFaction(VictimActor, MournerActor) - else -; debug.trace("WIFunctionsScript: PutMournerAliasInFaction expected ReferenceAliases that could be cast as actors, got some other kind of ReferenceAlias. Victim: " + VictimAlias.GetReference() +", Mourner: " + MournerAlias.GetReference() + ".") - endif - -endFunction - -function PutMournerActorInFaction(Actor Victim, Actor Mourner) -{Based on the relationship of the Victim to Mourner, mourer is placed in a faction to get related dialogue.} - string relation = GetRelationshipString(Victim, Mourner) - - if relation == "aunt" - Mourner.AddToFaction(pWIMournAuntFaction) - elseif relation == "boyfriend" - Mourner.AddToFaction(pWIMournBoyfriendFaction) - elseif relation == "brother" - Mourner.AddToFaction(pWIMournBrotherFaction) - elseif relation == "cousin female" - Mourner.AddToFaction(pWIMournCousinFemaleFaction) - elseif relation == "cousin male" - Mourner.AddToFaction(pWIMournCousinMaleFaction) - elseif relation == "daughter" - Mourner.AddToFaction(pWIMournDaughterFaction) - elseif relation == "father" - Mourner.AddToFaction(pWIMournFatherFaction) - elseif relation == "friend female" - Mourner.AddToFaction(pWIMournFriendFemaleFaction) - elseif relation == "friend male" - Mourner.AddToFaction(pWIMournFriendMaleFaction) - elseif relation == "girlfriend" - Mourner.AddToFaction(pWIMournGirlfriendFaction) - elseif relation == "husband" - Mourner.AddToFaction(pWIMournHusbandFaction) - elseif relation == "kinsman" - Mourner.AddToFaction(pWIMournKinsmanFaction) - elseif relation == "kinswoman" - Mourner.AddToFaction(pWIMournKinswomanFaction) - elseif relation == "mother" - Mourner.AddToFaction(pWIMournMotherFaction) - elseif relation == "nephew" - Mourner.AddToFaction(pWIMournNephewFaction) - elseif relation == "niece" - Mourner.AddToFaction(pWIMournNieceFaction) - elseif relation == "sister" - Mourner.AddToFaction(pWIMournSisterFaction) - elseif relation == "son" - Mourner.AddToFaction(pWIMournSonFaction) - elseif relation == "uncle" - Mourner.AddToFaction(pWIMournUncleFaction) - elseif relation == "wife" - Mourner.AddToFaction(pWIMournWifeFaction) - else -; debug.trace("WIFunctionsScript PutMournerInFaction() returned unexpected relation variable: " + relation + " when Actor1 is " + Victim + " and Actor2 is " + Mourner + ".") - - endif - -endFunction - -string function GetRelationshipString(Actor Actor1, Actor Actor2) -{Returns a string based on Actor1's relationship to Actor2 (ie if Actor1 is in Sibling relationship and a male, returns "brother") Note: Not all relationship types are supported by this function. See function comments for details.} - string sex ;"male" | "female" - CASE SENSITIVE description of Actor1 - string position ;"parent" | "child" - CASE SENSITIVE description of Actor1 (ie if Actor1 is niece, then = "child", if Actor1 is aunt then = "parent") - string relation ;"kinsman", "father", "sister", "friend male", "boyfriend", etc. - CASE SENSTIVE description of Actor1 - ;Supported replationships: - ;Friend: - ; "friend male", "friend female" - ;Family: - ; "kinsman", "kinswoman" - ; "husband", "wife" - ; "father", "mother" - ; "son", "daughter" - ; "brother", "sister" - ; "uncle", "aunt" - ; "nephew", "niece" - ; "cousin male", "cousin female" - ;Boyfriend/Girlfriend: - ; "boyfriend", "girlfriend" - - ;sex - if Actor1.getActorBase().getSex() == 0 ;male - sex = "male" - else ;female - sex = "female" - endif - - ;parent/child - if Actor1.hasParentRelationship(Actor2) ;We have set up data, so someone is never both a parent and a child in different relationshps to the same person - position = "parent" - else ;child - position = "child" - endif - - ;friend male/friend female - ;we set the relation to be friend if there's any family relation at all. This will get "overwritten" if we discover a more specific relationship - if Actor1.GetRelationshipRank(Actor2) >= 1 - if sex == "male" - relation = "friend male" - else ;female - relation = "friend female" - endif - endif - - ;kinsman/kinswoman - ;we set the relation to be kinsmen if there's any family relation at all. This will get "overwritten" if we discover a more specific relationship - if Actor1.hasFamilyRelationship(Actor2) - if sex == "male" - relation = "kinsman" - else ;female - relation = "kinswoman" - endif - endif - - ;husband/wife - if Actor1.hasAssociation(pSpouse, Actor2) - if sex == "male" - relation = "husband" - else ;female - relation = "wife" - endif - endif - - ;father/mother - if Actor1.hasAssociation(pParentChild, Actor2) - if position == "parent" - if sex == "male" - relation = "father" - else ;female - relation = "mother" - endif - - else ;child - if sex == "male" - relation = "son" - else ;female - relation = "daughter" - endif - endif - endif - - ;brother/sister - if Actor1.hasAssociation(pSiblings, Actor2) - if sex == "male" - relation = "brother" - else ;female - relation = "sister" - endif - endif - - ;uncle/aunt - if Actor1.hasAssociation(pAuntUncle, Actor2) - if position == "parent" - if sex == "male" - relation = "uncle" - else ;female - relation = "aunt" - endif - - else ;child - if sex == "male" - relation = "nephew" - else ;female - relation = "niece" - endif - endif - endif - - ;cousin male/cousin female - if Actor1.hasAssociation(pCousins, Actor2) - if sex == "male" - relation = "cousin male" - else ;female - relation = "cousin female" - endif - endif - - ;boyfriend/girlfriend - if Actor1.hasAssociation(pCourting, Actor2) - if sex == "male" - relation = "boyfriend" - else ;female - relation = "girlfriend" - endif - endif - - return relation -endFunction - -function StartGameTag(ObjectReference FirstPlayer, ObjectReference SecondPlayer, int SecondsToPlay, form CallingFormSelf) - -; debug.trace("WIFunctions StartGameTag(" + FirstPlayer + ", " + SecondPlayer + ", " + SecondsToPlay + ", " + CallingFormSelf + ")") - - WIGamesTag.Stop() - - int bailOutTime = 30 ;wait at most 30 seconds so you don't hold up whatever script is calling this function - int waitingFor = 0 - - bool timeToBailOut = False - - while WIGamesTag.IsRunning() && timeToBailOut == false - utility.wait(1) - waitingFor += 1 -; debug.trace("WIFunctions StartGameTag() waiting for previous WIGamesTag quest to finish stopping. Have been waiting for " + waitingFor + "seconds.") - - if waitingFor >= bailOutTime - timeToBailOut = True -; debug.trace("WIFunctions StartGameTag() have been waiting to long, bailing out. This means this game of tag will not start.", 1) - - EndIf - - EndWhile - - WIGamesTagStart.SendStoryEvent(akRef1 = FirstPlayer, akRef2 = SecondPlayer, aiValue1 = SecondsToPlay) - - -EndFunction - -function updateWIDragonTimer() - ; update timer for when next WI dragon is allowed to appear - WINextDragon.SetValue(GameDaysPassed.GetValue() + WIWaitDragon.GetValue()) - - if MQ305.IsCompleted() - WINextDragon.SetValue(WINextDragon.GetValue() + 3 ) - endif -endFunction - -function startWIDragonKillQuest(Actor Dragon) -; debug.trace("WIFunctions startWIDragonKillQuest(" + Dragon + ")") - WIDragonKilledStart.SendStoryEvent(akRef1 = Dragon) -EndFunction - -function PlayerIsCurrentlyAbsorbingPower(Actor Dragon) -; debug.trace("WIFunctions PlayerIsCurrentlyAbsorbingPower(" + Dragon + ") calling SetFactionRank(WIDragonKilledAbsorbedFaction, 0)") - Dragon.SetFactionRank(WIDragonKilledAbsorbedFaction, 1) ;means "player is currently absorbing - used to conditionalize scene dialogue in WIDragonKilled quest -EndFunction - -function PlayerIsDoneAbsorbingPower(Actor Dragon) -; debug.trace("WIFunctions PlayerIsDoneAbsorbingPower(" + Dragon + ") calling SetFactionRank(WIDragonKilledAbsorbedFaction, 1)") - Dragon.SetFactionRank(WIDragonKilledAbsorbedFaction, 2) ;means "player is done absorbing - used to conditionalize scene dialogue in WIDragonKilled quest -EndFunction - - -function DisallowComplexInteractions(Location LocationToToggle) -{Decrements the keyword data on WIComplexInteractionToggle} - - if LocationToToggle.HasKeyword(WIComplexInteractionToggle) - Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) - 1 - - LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData) - -; debug.trace("WIFunctions DisallowComplexInteractions(" + LocationToToggle + ") decremented keyword data WIComplexInteractionOffToggle to: " + keywordData) - - - Else -; debug.trace(" WARNING: WIFunctions DisallowComplexInteractions(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2) - - EndIf - -EndFunction - - -function DisallowDragons(Location LocationToToggle) -{Decrements the keyword data on WIComplexInteractionToggle} - - if LocationToToggle.HasKeyword(WIDragonsToggle) - Float keywordData = LocationToToggle.GetKeywordData(WIDragonsToggle) - 1 - - LocationToToggle.SetKeywordData(WIDragonsToggle, keywordData) - -; debug.trace("WIFunctions DisallowDragons(" + LocationToToggle + ") decremented keyword data WIDragonsToggle to: " + keywordData) - - - Else -; debug.trace(" WARNING: WIFunctions DisallowDragons(" + LocationToToggle + ") -- keyword WIDragonsToggle does not exist on location.", 2) - - EndIf - -EndFunction - -function AllowComplexInteractions(Location LocationToToggle) -{Increments the keyword data on WIComplexInteractionToggle} - - if LocationToToggle.HasKeyword(WIComplexInteractionToggle) - Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) + 1 - - LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData) - -; debug.trace("WIFunctions AllowComplexInteractions(" + LocationToToggle + ") incremented keyword data WIComplexInteractionOffToggle to: " + keywordData) - - Else -; debug.trace(" WARNING: WIFunctions AllowComplexInteractions(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2) - - EndIf - -EndFunction - - -function AllowDragons(Location LocationToToggle) -{Increments the keyword data on WIComplexInteractionToggle} - - if LocationToToggle.HasKeyword(WIComplexInteractionToggle) - Float keywordData = LocationToToggle.GetKeywordData(WIComplexInteractionToggle) + 1 - - LocationToToggle.SetKeywordData(WIComplexInteractionToggle, keywordData) - -; debug.trace("WIFunctions AllowDragons(" + LocationToToggle + ") incremented keyword data WIComplexInteractionOffToggle to: " + keywordData) - - Else -; debug.trace(" WARNING: WIFunctions AllowDragons(" + LocationToToggle + ") -- keyword WIComplexInteractionOffToggle does not exist on location.", 2) - - EndIf - -EndFunction - -function ShowPlayerRoom(Actor Innkeeper, ObjectReference Bed) -; debug.trace("WIFunctions ShowPlayerRoom(" + Innkeeper + ")") - - WIRentRoomWalkToStart.SendStoryEvent(akRef1 = Innkeeper, akRef2 = Bed) - - -EndFunction - - -bool function RegisterDragonAttack(Location LocationOfDragonAttack, Actor Dragon) - - ;CALLED BY: DragonActorScript, DragonPerchScript, quest fragment scripts attached to WIDragonKilled, WIChangeLocation09 - -; debug.trace("WIFunctions RegisterDragonAttack(" + LocationOfDragonAttack + "," + Dragon + ")") - -; debug.MessageBox("WIFunctions RegisterDragonAttack(" + LocationOfDragonAttack + "," + Dragon + ")") - - bool returnVar - - if LocationOfDragonAttack.HasKeyword(WIDragonAttacked) -; debug.trace("WIFunctions RegisterDragonAttack() Location has WIDragonAttacked keyword, setting data.") - - LocationOfDragonAttack.SetKeywordData(WIDragonAttacked, 1) - returnVar = True - - Else -; debug.trace("WIFunctions RegisterDragonAttack() Location does NOT have WIDragonAttacked keyword, so we are NOT setting data.") - - returnVar = False - - EndIf - - return returnVar - -EndFunction -