Scriptname PlayerWerewolfChangeScript extends Quest Conditionalspell property PlayerWerewolfLvl20AndBelowAbility autoidle property WerewolfTransformBack autoglobalvariable property PlayerWerewolfShiftBackTime autoFloat property StandardDurationSeconds autoBool __tryingToShiftBack = falseglobalvariable property TimeScale autospell property PlayerWerewolfLvl45AndBelowAbility autospell property PlayerWerewolfLvl50AndOverAbility autoglobalvariable property DLC1WerewolfMaxPerks autofaction property WerewolfFaction autorace property WerewolfRace autoglobalvariable property DLC1WerewolfTotalPerksEarned autowordofpower property CurrentHowlWord1 autoperk property DLC1GorgingPerk autospell property PlayerWerewolfLvl35AndBelowAbility autoperk property DLC1SavageFeedingPerk autoFloat property DLC1GorgingDurationSeconds autovisualeffect property FeedBloodVFX autoFloat __durationWarningTime = -1.00Bool property Untimed autoidle property SpecialFeeding autosound property NPCWerewolfTransformation autoBool __shuttingDown = falseFloat property DurationWarningTimeSeconds autoperk property PlayerWerewolfFeed autoobjectreference property LycanStash autoQuest property C03Rampage autoBool __shiftingBack = falsewordofpower property CurrentHowlWord2 autospell property BleedingFXSpell autoimagespacemodifier property WerewolfChange autoFloat __gorgeExtensionTime = -1.00wordofpower property CurrentHowlWord3 autoarmor property WolfSkinFXArmor automessage property PlayerWerewolfFeedMessage autoFloat property FeedExtensionTimeSeconds autoFloat __feedExtensionTime = -1.00Bool __trackingStarted = falseQuest property CompanionsTrackingQuest autoimagespacemodifier property WerewolfWarn autoformlist property WerewolfDispelList autorace property WerewolfBeastRace autoshout property CurrentHowl autosound property WerewolfIMODSound autospell property PlayerWerewolfLvl30AndBelowAbility autoformlist property CrimeFactions autospell property FeedBoost autospell property PlayerWerewolfLvl40AndBelowAbility autokeyword property ActorTypeNPC autospell property PlayerWerewolfLvl15AndBelowAbility autospell property PlayerWerewolfLvl10AndBelowAbility autospell property PlayerWerewolfLvl25AndBelowAbility automessage property PlayerWerewolfExpirationWarning autoglobalvariable property GameDaysPassed autoperk property DLC1AnimalVigor autofaction property PlayerWerewolfFaction autoFunction Shutdown() if (__shuttingDown) return endif __shuttingDown = true game.GetPlayer().GetActorBase().SetInvulnerable(false) game.GetPlayer().SetGhost(false) game.SetBeastForm(false) game.EnableFastTravel(true) game.SetInCharGen(false, false, false) Stop()EndFunctionFunction ShiftBack() __tryingToShiftBack = true while (game.GetPlayer().GetAnimationVariableBool("bIsSynced")) utility.Wait(0.1) endwhile __shiftingBack = false ActuallyShiftBackIfNecessary()EndFunctionFunction OnUpdate() if Untimed return endif debug.Trace("WEREWOLF: NumWerewolfPerks = " + game.QueryStat("NumWerewolfPerks"), 0) game.QueryStat("NumWerewolfPerks") if game.QueryStat("NumWerewolfPerks") >= DLC1WerewolfMaxPerks.value debug.Trace("WEREWOLF: achievement granted", 0) game.AddAchievement(57) endif Float currentTime = GameDaysPassed.GetValue() Float regressTime = PlayerWerewolfShiftBackTime.GetValue() if ( (currentTime >= regressTime) && (!Game.GetPlayer().IsInKillMove()) && !__tryingToShiftBack ) UnregisterForUpdate() SetStage(100) return endif if (currentTime >= regressTime - __durationWarningTime) if (GetStage() == 10) SetStage(20) return endif endif EndFunctionFunction StartTracking() if (__trackingStarted) return endif __trackingStarted = true actor player = game.GetPlayer() player.UnequipAll() player.EquipItem(WolfSkinFXArmor, false, true) player.SetAttackActorOnSight(true) game.SendWereWolfTransformation() player.AddToFaction(PlayerWerewolfFaction) player.AddToFaction(WerewolfFaction) int cfIndex = 0 while cfIndex < CrimeFactions.GetSize() (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(true) cfIndex += 1 endWhile game.SetPlayerReportCrime(false) __durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds) __feedExtensionTime = RealTimeSecondsToGameTimeDays(FeedExtensionTimeSeconds) __gorgeExtensionTime = RealTimeSecondsToGameTimeDays(DLC1GorgingDurationSeconds) spell left = player.GetEquippedSpell(0) spell right = player.GetEquippedSpell(1) spell power = player.GetEquippedSpell(2) shout voice = player.GetEquippedShout() if (left != None) player.UnequipSpell(left, 0) endif if (right != None) player.UnequipSpell(right, 1) endif if (power != None) player.UnequipSpell(power, 2) endif if (voice != None) player.UnequipShout(voice) endif CurrentHowlWord1 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord1 CurrentHowlWord2 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord2 CurrentHowlWord3 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord3 CurrentHowl = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowl game.UnlockWord(CurrentHowlWord1) game.UnlockWord(CurrentHowlWord2) game.UnlockWord(CurrentHowlWord3) player.AddShout(CurrentHowl) player.EquipShout(CurrentHowl) Int playerLevel = player.GetLevel() if (playerLevel <= 10) player.AddSpell(PlayerWerewolfLvl10AndBelowAbility, false) elseif (playerLevel <= 15) player.AddSpell(PlayerWerewolfLvl15AndBelowAbility, false) elseif (playerLevel <= 20) player.AddSpell(PlayerWerewolfLvl20AndBelowAbility, false) elseif (playerLevel <= 25) player.AddSpell(PlayerWerewolfLvl25AndBelowAbility, false) elseif (playerLevel <= 30) player.AddSpell(PlayerWerewolfLvl30AndBelowAbility, false) elseif (playerLevel <= 35) player.AddSpell(PlayerWerewolfLvl35AndBelowAbility, false) elseif (playerLevel <= 40) player.AddSpell(PlayerWerewolfLvl40AndBelowAbility, false) elseif (playerLevel <= 45) player.AddSpell(PlayerWerewolfLvl45AndBelowAbility, false) else player.AddSpell(PlayerWerewolfLvl50AndOverAbility, false) endif Float currentTime = GameDaysPassed.GetValue() Float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds) PlayerWerewolfShiftBackTime.SetValue(regressTime) game.IncrementStat("Werewolf Transformations", 1) RegisterForUpdate(5) SetStage(10)EndFunctionFunction OnAnimationEvent(objectreference akSource, String asEventName) if (asEventName == "TransformToHuman") ActuallyShiftBackIfNecessary() endifEndFunctionFunction WarnPlayer() WerewolfWarn.Apply(1.00)EndFunctionFunction ActuallyShiftBackIfNecessary() if (__shiftingBack) return endif __shiftingBack = true game.SetInCharGen(true, true, false) actor player = game.GetPlayer() UnRegisterForAnimationEvent(player, "TransformToHuman") UnregisterForUpdate() if (player.IsDead()) return endif WerewolfChange.Apply(1.00) WerewolfIMODSound.Play(player) int count = 0 while (count < WerewolfDispelList.GetSize()) spell gone = WerewolfDispelList.GetAt(count) as spell if (gone != None) player.DispelSpell(gone) endif count += 1 endwhile player.removeItem(WolfSkinFXArmor, 1, true, None) player.SetGhost(true) Float currHealth = player.GetAV("health") if (currHealth <= 101) player.RestoreAV("health", 101-currHealth) endif player.SetRace((CompanionsTrackingQuest as companionshousekeepingscript).PlayerOriginalRace) game.EnablePlayerControls(false, false, true, false, false, false, false, false, 1) game.ShowFirstPersonGeometry(true) player.UnequipShout(CurrentHowl) player.RemoveShout(CurrentHowl) player.RemoveSpell(PlayerWerewolfLvl10AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl15AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl20AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl25AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl30AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl35AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl40AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl45AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl50AndOverAbility) player.SetAttackActorOnSight(false) player.RemoveFromFaction(PlayerWerewolfFaction) player.RemoveFromFaction(WerewolfFaction) int cfIndex = 0 while (cfIndex < CrimeFactions.GetSize()) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(false) cfIndex += 1 endwhile game.SetPlayerReportCrime(true) game.SendWereWolfTransformation() utility.Wait(5.0) Shutdown()EndFunctionFloat FUNCTION GameTimeDaysToRealTimeSeconds(Float gametime) Float gameSeconds = gametime * 24 * 60 * 60 return gameSeconds / TimeScale.valueEndFunctionFunction InitialShift() WerewolfWarn.Apply(1.00) if (game.GetPlayer().IsDead()) return endif game.GetPlayer().SetRace(WerewolfBeastRace)EndFunctionFunction PrepShift() actor player = game.GetPlayer() Game.SetBeastForm(True) Game.EnableFastTravel(False) WerewolfChange.Apply(1.0) WerewolfIMODSound.Play(player) int count = 0 while count < WerewolfDispelList.GetSize() spell gone = WerewolfDispelList.GetAt(count) as spell if (gone != None) player.DispelSpell(gone) endif count += 1 endWhile Game.DisablePlayerControls(false, false, true, false, false, false, false, false, 1) Game.ForceThirdPerson() Game.ShowFirstPersonGeometry(false) EndFunctionFunction Feed(actor victim) debug.Trace("WEREWOLF: start newShiftTime = " + GameTimeDaysToRealTimeSeconds(PlayerWerewolfShiftBackTime.GetValue()) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime)) float newShiftTime = PlayerWerewolfShiftBackTime.GetValue() + (__feedExtensionTime / 2.0) if (victim.HasKeyWord(ActorTypeNPC)) newShiftTime += __feedExtensionTime / 2.0 debug.Trace("WEREWOLF: victim is NPC", 0) endif debug.Trace("WEREWOLF: default newShiftTime = " + GameTimeDaysToRealTimeSeconds(newShiftTime) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime), 0) actor player = game.GetPlayer() if (player.HasPerk(DLC1GorgingPerk)) newShiftTime += __gorgeExtensionTime / 2.0 if (victim.HasKeyWord(ActorTypeNPC)) newShiftTime += __gorgeExtensionTime / 2.0 endif endif player.PlayIdle(SpecialFeeding) BleedingFXSpell.Cast(victim, victim) if (!C03Rampage.IsRunning()) PlayerWerewolfShiftBackTime.SetValue(newShiftTime) PlayerWerewolfFeedMessage.Show() FeedBoost.Cast(player, None) endif SetStage(10)EndFunctionFloat Function RealTimeSecondsToGameTimeDays(Float realtime) Float scaledSeconds = TimeScale.value * realtime return scaledSeconds / (60 * 60 * 24)EndFunctionFunction SetUntimed(Bool untimedValue) Untimed = untimedValue if (Untimed) UnregisterForUpdate() endifEndFunction
Scriptname PlayerVampireQuestScript extends Quest Conditionalmessage Property VampireStageProgressionMessage Autospell Property TrapDiseaseRockjoint Autorace Property OrcRaceVampire Autospell Property DiseaseRattles Autospell Property TrapDiseasePorphyricHemophelia Autorace Property BretonRaceVampire Autospell Property VampireStrength02 Autospell Property VampireDrain01 Autospell Property VampireDrain04 Autorace Property WoodElfRace Automessage Property VampireFeedMessage AutoQuest Property VC01 Autospell Property AbVampire04 Autorace Property DarkElfRace Autostatic Property XMarker Autoglobalvariable Property GameDaysPassed Autorace Property ImperialRace Autospell Property ABVampireSkills Autospell Property VampireHuntersSight Autorace Property RedguardRace Autospell Property AbVampire01 Autospell Property VampireSunDamage01 Autospell Property AbVampire02b Autospell Property DiseaseWitbane Autospell Property VampireCharm Autorace Property NordRace Autospell Property VampireCureDisease Autorace Property KhajiitRaceVampire Autospell Property VampireSunDamage02 Autospell Property VampireStrength01 Autospell Property DiseaseAtaxia Autospell Property AbVampire03b Autoformlist Property CrimeFactions Autospell Property VampireDrain02 Autoidle Property VampireFeedingBedRight Autospell Property DiseaseBrainRot Autospell Property VampireSunDamage04 Autorace Property OrcRace Autoidle Property VampireFeedingBedrollRight Autorace Property ImperialRaceVampire Autospell Property TrapDiseaseBoneBreakFever Autospell Property VampireDrain03 Autorace Property CureRace Automagiceffect Property DLC1VampireChangeFXEffect Autorace Property ArgonianRace Automagiceffect Property DLC1VampireChangeEffect Autospell Property TrapDiseaseWitbane Autospell Property DiseasePorphyricHemophelia Autorace Property DarkElfRaceVampire Autoimagespacemodifier Property VampireTransformDecreaseISMD Autospell Property TrapDiseaseBrainRot Autospell Property DLC1VampireChange Automessage Property VampireStage4Message Autospell Property TrapDiseaseRattles Autorace Property WoodElfRaceVampire Autospell Property TrapDiseaseAtaxia Autospell Property DiseaseRockjoint Autospell Property VampireStrength03 Autorace Property ArgonianRaceVampire Autospell Property DiseaseBoneBreakFever Autoformlist Property DLC1CrimeFactions AutoInt Property VampireStatus Autospell Property VampireInvisibilityPC Autoimagespacemodifier Property VampireTransformIncreaseISMD Autospell Property AbVampire01b Autosound Property MagVampireTransform01 Autospell Property ABVampireSkills02 Autospell Property VampireStrength04 Autorace Property HighElfRace AutoFloat Property FeedTimer Autospell Property AbVampire03 Autorace Property RedguardRaceVampire Autorace Property BretonRace Autoeffectshader Property VampireChangeFX Autospell Property AbVampire02 Autospell Property AbVampire04b Autospell Property VampireRaiseThrall04 Autofaction Property VampirePCFaction Autospell Property VampireSunDamage03 Autorace Property HighElfRaceVampire Autorace Property KhajiitRace Autoglobalvariable Property VampireFeedReady AutoFloat Property LastFeedTime Autospell Property VampireRaiseThrall01 Autospell Property VampireRaiseThrall02 Autospell Property VampireRaiseThrall03 Autorace Property NordRaceVampire Autoglobalvariable Property PlayerIsVampire Autospell Property VampireCloak AutoFunction VampireFeedBed()game.GetPlayer().PlayIdle(VampireFeedingBedRight)EndFunctionFunction VampireChange(actor Target)objectreference myXmarkergame.DisablePlayerControls(true, true, false, false, false, true, true, false, 0)VampireChangeFX.play(Target, -1.00)VampireTransformIncreaseISMD.applyCrossFade(2.00)myXmarker = Target.PlaceAtMe(XMarker, 1, false, false)MagVampireTransform01.play(myXmarker)myXmarker.Disable(false)utility.wait(2.00)imagespacemodifier.removeCrossFade(1.00)VampireChangeFX.stop(Target)if (Target.GetActorBase().GetRace() == ArgonianRace) CureRace = ArgonianRace Target.SetRace(ArgonianRaceVampire)elseif (Target.GetActorBase().GetRace() == BretonRace) CureRace = BretonRace Target.SetRace(BretonRaceVampire)elseif (Target.GetActorBase().GetRace() == DarkElfRace) CureRace = DarkElfRace Target.SetRace(DarkElfRaceVampire)elseif (Target.GetActorBase().GetRace() == HighElfRace) CureRace = HighElfRace Target.SetRace(HighElfRaceVampire)elseif (Target.GetActorBase().GetRace() == ImperialRace) CureRace = ImperialRace Target.SetRace(ImperialRaceVampire)elseif (Target.GetActorBase().GetRace() == KhajiitRace) CureRace = KhajiitRace Target.SetRace(KhajiitRaceVampire)elseif (Target.GetActorBase().GetRace() == NordRace) CureRace = NordRace Target.SetRace(NordRaceVampire)elseif (Target.GetActorBase().GetRace() == OrcRace) CureRace = OrcRace Target.SetRace(OrcRaceVampire)elseif (Target.GetActorBase().GetRace() == RedguardRace) CureRace = RedguardRace Target.SetRace(RedguardRaceVampire)elseif (Target.GetActorBase().GetRace() == WoodElfRace) CureRace = WoodElfRace Target.SetRace(WoodElfRaceVampire)endifTarget.RemoveSpell(DiseaseBoneBreakFever)Target.RemoveSpell(DiseaseBrainRot)Target.RemoveSpell(DiseaseRattles)Target.RemoveSpell(DiseaseRockjoint)Target.RemoveSpell(DiseaseWitbane)Target.RemoveSpell(DiseasePorphyricHemophelia)Target.RemoveSpell(DiseaseAtaxia)Target.RemoveSpell(TrapDiseaseBoneBreakFever)Target.RemoveSpell(TrapDiseaseBrainRot)Target.RemoveSpell(TrapDiseaseRattles)Target.RemoveSpell(TrapDiseaseRockjoint)Target.RemoveSpell(TrapDiseaseWitbane)Target.RemoveSpell(TrapDiseasePorphyricHemophelia)Target.RemoveSpell(TrapDiseaseAtaxia)VampireStatus = 1VampireProgression(game.GetPlayer(), 1)RegisterForUpdateGameTime(12)LastFeedTime = GameDaysPassed.valuePlayerIsVampire.SetValue(1)utility.wait(1)game.EnablePlayerControls(true, true, true, true, true, true, true, true, 0) if (VC01.GetStageDone(200)) VC01.SetStage(25)endifEndFunctionFunction OnUpdateGameTime()actor playerFeedTimer = GameDaysPassed.value - LastFeedTimeplayer = game.GetPlayer()If (Game.IsMovementControlsEnabled() && Game.IsFightingControlsEnabled() && (player.GetCombatState() == 0) && !player.HasMagicEffect(DLC1VampireChangeEffect) && !player.HasMagicEffect(DLC1VampireChangeFXEffect)) If (FeedTimer >= 3) && (VampireStatus == 3) VampireFeedReady.SetValue(3) VampireStage4Message.Show() VampireStatus = 4 VampireProgression(player, 4) UnregisterforUpdateGameTime() ElseIf FeedTimer >= 2 && (VampireStatus == 2) VampireFeedReady.SetValue(2) VampireStageProgressionMessage.Show() VampireStatus = 3 VampireProgression(player, 3) ElseIf FeedTimer >= 1 && (VampireStatus == 1) ;add Stage 2 Vampire buffs and spells VampireFeedReady.SetValue(1) VampireStageProgressionMessage.Show() VampireStatus = 2 VampireProgression(player, 2) EndIfEndIfEndFunctionFunction VampireCure(actor player)game.IncrementStat("Vampirism Cures", 1)UnregisterforUpdateGameTime()VampireStatus = 0player.RemoveFromFaction(VampirePCFaction)player.SetAttackActorOnSight(false)player.RemoveSpell(DLC1VampireChange)player.RemoveSpell(ABVampireSkills)player.RemoveSpell(ABVampireSkills02)player.RemoveSpell(AbVampire01)player.RemoveSpell(AbVampire02)player.RemoveSpell(AbVampire03)player.RemoveSpell(AbVampire04)player.RemoveSpell(AbVampire01b)player.RemoveSpell(AbVampire02b)player.RemoveSpell(AbVampire03b)player.RemoveSpell(AbVampire04b)player.RemoveSpell(VampireDrain01)player.RemoveSpell(VampireDrain02)player.RemoveSpell(VampireDrain03)player.RemoveSpell(VampireDrain04)player.RemoveSpell(VampireRaiseThrall01)player.RemoveSpell(VampireRaiseThrall02)player.RemoveSpell(VampireRaiseThrall03)player.RemoveSpell(VampireRaiseThrall04)player.RemoveSpell(VampireSunDamage01)player.RemoveSpell(VampireSunDamage02)player.RemoveSpell(VampireSunDamage03)player.RemoveSpell(VampireSunDamage04)player.RemoveSpell(VampireCharm)player.RemoveSpell(VampireInvisibilityPC)if (player.GetRace() == ArgonianRaceVampire) player.SetRace(ArgonianRace)elseif (player.GetRace() == BretonRaceVampire) player.SetRace(BretonRace)elseif (player.GetRace() == DarkElfRaceVampire) player.SetRace(DarkElfRace)elseif (player.GetRace() == HighElfRaceVampire) player.SetRace(HighElfRace)elseif (player.GetRace() == ImperialRaceVampire) player.SetRace(ImperialRace)elseif (player.GetRace() == KhajiitRaceVampire) player.SetRace(KhajiitRace)elseif (player.GetRace() == NordRaceVampire) player.SetRace(NordRace)elseif (player.GetRace() == OrcRaceVampire) player.SetRace(OrcRace)elseif (player.GetRace() == RedguardRaceVampire) player.SetRace(RedguardRace)elseif (player.GetRace() == WoodElfRaceVampire) player.SetRace(WoodElfRace)endifPlayerIsVampire.SetValue(0)player.RemoveSpell(VampireHuntersSight)EndFunctionFunction VampireProgression(actor player, Int VampireStage)if (VampireStage == 2) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire01b) player.AddSpell(AbVampire02b, false) player.AddSpell(AbVampire02, false) player.RemoveSpell(VampireSunDamage01) player.AddSpell(VampireSunDamage02, false) player.AddSpell(VampireDrain02, false) if (player.GetEquippedSpell(0) == VampireDrain01) player.EquipSpell(VampireDrain02, 0) EndIf if (player.GetEquippedSpell(1) == VampireDrain01) player.EquipSpell(VampireDrain02, 1) EndIf player.RemoveSpell(VampireDrain01) player.AddSpell(VampireRaiseThrall02, false) player.RemoveSpell(VampireRaiseThrall01) player.AddSpell(VampireCharm, true)ElseIf (VampireStage == 3) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire01b) player.RemoveSpell(AbVampire02b) player.AddSpell(AbVampire03b, false) player.AddSpell(AbVampire03, false) player.AddSpell(VampireDrain03, false) If Player.GetEquippedSpell(0) == VampireDrain02 || Player.GetEquippedSpell(0) == VampireDrain01 Player.EquipSpell(VampireDrain03, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain02 || Player.GetEquippedSpell(1) == VampireDrain01 Player.EquipSpell(VampireDrain03, 1) EndIf Player.RemoveSpell(VampireDrain01) Player.RemoveSpell(VampireDrain02) player.RemoveSpell(VampireRaiseThrall01) player.RemoveSpell(VampireRaiseThrall02) player.AddSpell(VampireRaiseThrall03, false) player.RemoveSpell(VampireSunDamage01) player.RemoveSpell(VampireSunDamage02) player.AddSpell(VampireSunDamage03, false) ElseIf (VampireStage == 4) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire03) player.RemoveSpell(AbVampire01b) player.RemoveSpell(AbVampire02b) player.RemoveSpell(AbVampire03b) player.AddSpell(AbVampire04, false) player.AddSpell(AbVampire04b, false) player.AddSpell(VampireDrain04, false) If Player.GetEquippedSpell(0) == VampireDrain03 || Player.GetEquippedSpell(0) == VampireDrain02 || Player.GetEquippedSpell(0) == VampireDrain01 Player.EquipSpell(VampireDrain04, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain03 || Player.GetEquippedSpell(1) == VampireDrain02 || Player.GetEquippedSpell(1) == VampireDrain01 Player.EquipSpell(VampireDrain04, 1) EndIf Player.RemoveSpell(VampireDrain01) Player.RemoveSpell(VampireDrain02) Player.RemoveSpell(VampireDrain03) player.RemoveSpell(VampireRaiseThrall01) player.RemoveSpell(VampireRaiseThrall02) player.RemoveSpell(VampireRaiseThrall03) player.AddSpell(VampireRaiseThrall04, false) player.RemoveSpell(VampireSunDamage01) player.RemoveSpell(VampireSunDamage02) player.RemoveSpell(VampireSunDamage03) player.AddSpell(VampireSunDamage04, false) player.AddSpell(VampireInvisibilityPC, true)ElseIf (VampireStage == 1) player.AddSpell(ABVampireSkills, false) player.AddSpell(ABVampireSkills02, false) player.RemoveSpell(AbVampire04) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire03) player.RemoveSpell(AbVampire04b) player.RemoveSpell(AbVampire02b) player.RemoveSpell(AbVampire03b) player.AddSpell(AbVampire01, false) player.AddSpell(AbVampire01b, false) player.AddSpell(VampireDrain01, false) If Player.GetEquippedSpell(0) == VampireDrain03 || Player.GetEquippedSpell(0) == VampireDrain04 || Player.GetEquippedSpell(0) == VampireDrain02 Player.EquipSpell(VampireDrain01, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain03 || Player.GetEquippedSpell(1) == VampireDrain04 || Player.GetEquippedSpell(1) == VampireDrain02 Player.EquipSpell(VampireDrain01, 1) EndIf Player.RemoveSpell(VampireDrain04) Player.RemoveSpell(VampireDrain02) Player.RemoveSpell(VampireDrain03) player.RemoveSpell(VampireRaiseThrall04) player.RemoveSpell(VampireRaiseThrall02) player.RemoveSpell(VampireRaiseThrall03) player.AddSpell(VampireRaiseThrall01, false) player.RemoveSpell(VampireSunDamage04) player.RemoveSpell(VampireSunDamage02) player.RemoveSpell(VampireSunDamage03) player.AddSpell(VampireSunDamage01, false) player.RemoveSpell(VampireCharm) player.RemoveSpell(VampireInvisibilityPC)EndIfEndFunctionFunction VampireFeed()VampireTransformDecreaseISMD.applyCrossFade(2.00)utility.wait(2.00)imagespacemodifier.removeCrossFade(1.00)game.IncrementStat("Necks Bitten", 1)VampireFeedMessage.Show()VampireFeedReady.SetValue(0)LastFeedTime = GameDaysPassed.valueVampireStatus = 1actor player = game.GetPlayer()VampireProgression(player, 1)player.RemoveFromFaction(VampirePCFaction)player.SetAttackActorOnSight(false)Int cfIndex = 0debug.Trace("VAMPIRE feed: DLC1CrimeFactions = " + DLC1CrimeFactions, 0)debug.Trace("VAMPIRE feed: CrimeFactions before = " + CrimeFactions, 0)CrimeFactions = DLC1CrimeFactionsdebug.Trace("VAMPIRE feed: CrimeFactions after = " + CrimeFactions, 0) while ( cfIndex < CrimeFactions.GetSize() ) debug.Trace("VAMPIRE: Removing enemy flag from " + CrimeFactions.GetAt(cfIndex), 0) (CrimeFactions.GetAt(cfIndex) as Faction).SetPlayerEnemy(false) cfIndex+=1endWhileUnregisterforUpdateGameTime()RegisterForUpdateGameTime(12)EndFunctionFunction VampireFeedBedRoll()game.GetPlayer().PlayIdle(VampireFeedingBedrollRight)EndFunction
Scriptname PlayerWerewolfChangeScript extends Quest Conditionalspell property PlayerWerewolfLvl20AndBelowAbility autoidle property WerewolfTransformBack autoglobalvariable property PlayerWerewolfShiftBackTime autoFloat property StandardDurationSeconds autoBool __tryingToShiftBack = falseglobalvariable property TimeScale autospell property PlayerWerewolfLvl45AndBelowAbility autospell property PlayerWerewolfLvl50AndOverAbility autoglobalvariable property DLC1WerewolfMaxPerks autofaction property WerewolfFaction autorace property WerewolfRace autoglobalvariable property DLC1WerewolfTotalPerksEarned autowordofpower property CurrentHowlWord1 autoperk property DLC1GorgingPerk autospell property PlayerWerewolfLvl35AndBelowAbility autoperk property DLC1SavageFeedingPerk autoFloat property DLC1GorgingDurationSeconds autovisualeffect property FeedBloodVFX autoFloat __durationWarningTime = -1.00Bool property Untimed autoidle property SpecialFeeding autosound property NPCWerewolfTransformation autoBool __shuttingDown = falseFloat property DurationWarningTimeSeconds autoperk property PlayerWerewolfFeed autoobjectreference property LycanStash autoQuest property C03Rampage autoBool __shiftingBack = falsewordofpower property CurrentHowlWord2 autospell property BleedingFXSpell autoimagespacemodifier property WerewolfChange autoFloat __gorgeExtensionTime = -1.00wordofpower property CurrentHowlWord3 autoarmor property WolfSkinFXArmor automessage property PlayerWerewolfFeedMessage autoFloat property FeedExtensionTimeSeconds autoFloat __feedExtensionTime = -1.00Bool __trackingStarted = falseQuest property CompanionsTrackingQuest autoimagespacemodifier property WerewolfWarn autoformlist property WerewolfDispelList autorace property WerewolfBeastRace autoshout property CurrentHowl autosound property WerewolfIMODSound autospell property PlayerWerewolfLvl30AndBelowAbility autoformlist property CrimeFactions autospell property FeedBoost autospell property PlayerWerewolfLvl40AndBelowAbility autokeyword property ActorTypeNPC autospell property PlayerWerewolfLvl15AndBelowAbility autospell property PlayerWerewolfLvl10AndBelowAbility autospell property PlayerWerewolfLvl25AndBelowAbility automessage property PlayerWerewolfExpirationWarning autoglobalvariable property GameDaysPassed autoperk property DLC1AnimalVigor autofaction property PlayerWerewolfFaction autoFunction Shutdown() if (__shuttingDown) return endif __shuttingDown = true game.GetPlayer().GetActorBase().SetInvulnerable(false) game.GetPlayer().SetGhost(false) game.SetBeastForm(false) game.EnableFastTravel(true) game.SetInCharGen(false, false, false) Stop()EndFunctionFunction ShiftBack() __tryingToShiftBack = true while (game.GetPlayer().GetAnimationVariableBool("bIsSynced")) utility.Wait(0.1) endwhile __shiftingBack = false ActuallyShiftBackIfNecessary()EndFunctionFunction OnUpdate() if Untimed return endif debug.Trace("WEREWOLF: NumWerewolfPerks = " + game.QueryStat("NumWerewolfPerks"), 0) game.QueryStat("NumWerewolfPerks") if game.QueryStat("NumWerewolfPerks") >= DLC1WerewolfMaxPerks.value debug.Trace("WEREWOLF: achievement granted", 0) game.AddAchievement(57) endif Float currentTime = GameDaysPassed.GetValue() Float regressTime = PlayerWerewolfShiftBackTime.GetValue() if ( (currentTime >= regressTime) && (!Game.GetPlayer().IsInKillMove()) && !__tryingToShiftBack ) UnregisterForUpdate() SetStage(100) return endif if (currentTime >= regressTime - __durationWarningTime) if (GetStage() == 10) SetStage(20) return endif endifEndFunctionFunction StartTracking() if (__trackingStarted) return endif __trackingStarted = true actor player = game.GetPlayer() player.UnequipAll() player.EquipItem(WolfSkinFXArmor, false, true) player.SetAttackActorOnSight(true) game.SendWereWolfTransformation() player.AddToFaction(PlayerWerewolfFaction) player.AddToFaction(WerewolfFaction) int cfIndex = 0 while cfIndex < CrimeFactions.GetSize() (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(true) cfIndex += 1 endWhile game.SetPlayerReportCrime(false) __durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds) __feedExtensionTime = RealTimeSecondsToGameTimeDays(FeedExtensionTimeSeconds) __gorgeExtensionTime = RealTimeSecondsToGameTimeDays(DLC1GorgingDurationSeconds) spell left = player.GetEquippedSpell(0) spell right = player.GetEquippedSpell(1) spell power = player.GetEquippedSpell(2) shout voice = player.GetEquippedShout() if (left != None) player.UnequipSpell(left, 0) endif if (right != None) player.UnequipSpell(right, 1) endif if (power != None) player.UnequipSpell(power, 2) endif if (voice != None) player.UnequipShout(voice) endif CurrentHowlWord1 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord1 CurrentHowlWord2 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord2 CurrentHowlWord3 = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowlWord3 CurrentHowl = (CompanionsTrackingQuest as companionshousekeepingscript).CurrentHowl game.UnlockWord(CurrentHowlWord1) game.UnlockWord(CurrentHowlWord2) game.UnlockWord(CurrentHowlWord3) player.AddShout(CurrentHowl) player.EquipShout(CurrentHowl) Int playerLevel = player.GetLevel() if (playerLevel <= 10) player.AddSpell(PlayerWerewolfLvl10AndBelowAbility, false) elseif (playerLevel <= 15) player.AddSpell(PlayerWerewolfLvl15AndBelowAbility, false) elseif (playerLevel <= 20) player.AddSpell(PlayerWerewolfLvl20AndBelowAbility, false) elseif (playerLevel <= 25) player.AddSpell(PlayerWerewolfLvl25AndBelowAbility, false) elseif (playerLevel <= 30) player.AddSpell(PlayerWerewolfLvl30AndBelowAbility, false) elseif (playerLevel <= 35) player.AddSpell(PlayerWerewolfLvl35AndBelowAbility, false) elseif (playerLevel <= 40) player.AddSpell(PlayerWerewolfLvl40AndBelowAbility, false) elseif (playerLevel <= 45) player.AddSpell(PlayerWerewolfLvl45AndBelowAbility, false) else player.AddSpell(PlayerWerewolfLvl50AndOverAbility, false) endif Float currentTime = GameDaysPassed.GetValue() Float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds) PlayerWerewolfShiftBackTime.SetValue(regressTime) game.IncrementStat("Werewolf Transformations", 1) RegisterForUpdate(5) SetStage(10)EndFunctionFunction OnAnimationEvent(objectreference akSource, String asEventName) if (asEventName == "TransformToHuman") ActuallyShiftBackIfNecessary() endifEndFunctionFunction WarnPlayer() WerewolfWarn.Apply(1.00)EndFunctionFunction ActuallyShiftBackIfNecessary() if (__shiftingBack) return endif __shiftingBack = true game.SetInCharGen(true, true, false) actor player = game.GetPlayer() UnRegisterForAnimationEvent(player, "TransformToHuman") UnregisterForUpdate() if (player.IsDead()) return endif WerewolfChange.Apply(1.00) WerewolfIMODSound.Play(player) int count = 0 while (count < WerewolfDispelList.GetSize()) spell gone = WerewolfDispelList.GetAt(count) as spell if (gone != None) player.DispelSpell(gone) endif count += 1 endwhile player.removeItem(WolfSkinFXArmor, 1, true, None) player.SetGhost(true) Float currHealth = player.GetAV("health") if (currHealth <= 101) player.RestoreAV("health", 101-currHealth) endif player.SetRace((CompanionsTrackingQuest as companionshousekeepingscript).PlayerOriginalRace) game.EnablePlayerControls(false, false, true, false, false, false, false, false, 1) game.ShowFirstPersonGeometry(true) player.UnequipShout(CurrentHowl) player.RemoveShout(CurrentHowl) player.RemoveSpell(PlayerWerewolfLvl10AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl15AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl20AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl25AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl30AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl35AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl40AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl45AndBelowAbility) player.RemoveSpell(PlayerWerewolfLvl50AndOverAbility) player.SetAttackActorOnSight(false) player.RemoveFromFaction(PlayerWerewolfFaction) player.RemoveFromFaction(WerewolfFaction) int cfIndex = 0 while (cfIndex < CrimeFactions.GetSize()) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(false) cfIndex += 1 endwhile game.SetPlayerReportCrime(true) game.SendWereWolfTransformation() utility.Wait(5.0) Shutdown()EndFunctionFloat FUNCTION GameTimeDaysToRealTimeSeconds(Float gametime) Float gameSeconds = gametime * 24 * 60 * 60 return gameSeconds / TimeScale.valueEndFunctionFunction InitialShift() WerewolfWarn.Apply(1.00) if (game.GetPlayer().IsDead()) return endif game.GetPlayer().SetRace(WerewolfBeastRace)EndFunctionFunction PrepShift() actor player = game.GetPlayer() Game.SetBeastForm(True) Game.EnableFastTravel(False) WerewolfChange.Apply(1.0) WerewolfIMODSound.Play(player) int count = 0 while count < WerewolfDispelList.GetSize() spell gone = WerewolfDispelList.GetAt(count) as spell if (gone != None) player.DispelSpell(gone) endif count += 1 endWhile Game.DisablePlayerControls(false, false, true, false, false, false, false, false, 1) Game.ForceThirdPerson() Game.ShowFirstPersonGeometry(false)EndFunctionFunction Feed(actor victim) debug.Trace("WEREWOLF: start newShiftTime = " + GameTimeDaysToRealTimeSeconds(PlayerWerewolfShiftBackTime.GetValue()) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime)) float newShiftTime = PlayerWerewolfShiftBackTime.GetValue() + (__feedExtensionTime / 2.0) if (victim.HasKeyWord(ActorTypeNPC)) newShiftTime += __feedExtensionTime / 2.0 debug.Trace("WEREWOLF: victim is NPC", 0) endif debug.Trace("WEREWOLF: default newShiftTime = " + GameTimeDaysToRealTimeSeconds(newShiftTime) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime), 0) actor player = game.GetPlayer() if (player.HasPerk(DLC1GorgingPerk)) newShiftTime += __gorgeExtensionTime / 2.0 if (victim.HasKeyWord(ActorTypeNPC)) newShiftTime += __gorgeExtensionTime / 2.0 endif endif player.PlayIdle(SpecialFeeding) BleedingFXSpell.Cast(victim, victim) if (!C03Rampage.IsRunning()) PlayerWerewolfShiftBackTime.SetValue(newShiftTime) PlayerWerewolfFeedMessage.Show() FeedBoost.Cast(player, None) endif SetStage(10)EndFunctionFloat Function RealTimeSecondsToGameTimeDays(Float realtime) Float scaledSeconds = TimeScale.value * realtime return scaledSeconds / (60 * 60 * 24)EndFunctionFunction SetUntimed(Bool untimedValue) Untimed = untimedValue if (Untimed) UnregisterForUpdate() endifEndFunction
Scriptname PlayerVampireQuestScript extends Quest Conditionalmessage Property VampireStageProgressionMessage Autospell Property TrapDiseaseRockjoint Autorace Property OrcRaceVampire Autospell Property DiseaseRattles Autospell Property TrapDiseasePorphyricHemophelia Autorace Property BretonRaceVampire Autospell Property VampireStrength02 Autospell Property VampireDrain01 Autospell Property VampireDrain04 Autorace Property WoodElfRace Automessage Property VampireFeedMessage AutoQuest Property VC01 Autospell Property AbVampire04 Autorace Property DarkElfRace Autostatic Property XMarker Autoglobalvariable Property GameDaysPassed Autorace Property ImperialRace Autospell Property ABVampireSkills Autospell Property VampireHuntersSight Autorace Property RedguardRace Autospell Property AbVampire01 Autospell Property VampireSunDamage01 Autospell Property AbVampire02b Autospell Property DiseaseWitbane Autospell Property VampireCharm Autorace Property NordRace Autospell Property VampireCureDisease Autorace Property KhajiitRaceVampire Autospell Property VampireSunDamage02 Autospell Property VampireStrength01 Autospell Property DiseaseAtaxia Autospell Property AbVampire03b Autoformlist Property CrimeFactions Autospell Property VampireDrain02 Autoidle Property VampireFeedingBedRight Autospell Property DiseaseBrainRot Autospell Property VampireSunDamage04 Autorace Property OrcRace Autoidle Property VampireFeedingBedrollRight Autorace Property ImperialRaceVampire Autospell Property TrapDiseaseBoneBreakFever Autospell Property VampireDrain03 Autorace Property CureRace Automagiceffect Property DLC1VampireChangeFXEffect Autorace Property ArgonianRace Automagiceffect Property DLC1VampireChangeEffect Autospell Property TrapDiseaseWitbane Autospell Property DiseasePorphyricHemophelia Autorace Property DarkElfRaceVampire Autoimagespacemodifier Property VampireTransformDecreaseISMD Autospell Property TrapDiseaseBrainRot Autospell Property DLC1VampireChange Automessage Property VampireStage4Message Autospell Property TrapDiseaseRattles Autorace Property WoodElfRaceVampire Autospell Property TrapDiseaseAtaxia Autospell Property DiseaseRockjoint Autospell Property VampireStrength03 Autorace Property ArgonianRaceVampire Autospell Property DiseaseBoneBreakFever Autoformlist Property DLC1CrimeFactions AutoInt Property VampireStatus Autospell Property VampireInvisibilityPC Autoimagespacemodifier Property VampireTransformIncreaseISMD Autospell Property AbVampire01b Autosound Property MagVampireTransform01 Autospell Property ABVampireSkills02 Autospell Property VampireStrength04 Autorace Property HighElfRace AutoFloat Property FeedTimer Autospell Property AbVampire03 Autorace Property RedguardRaceVampire Autorace Property BretonRace Autoeffectshader Property VampireChangeFX Autospell Property AbVampire02 Autospell Property AbVampire04b Autospell Property VampireRaiseThrall04 Autofaction Property VampirePCFaction Autospell Property VampireSunDamage03 Autorace Property HighElfRaceVampire Autorace Property KhajiitRace Autoglobalvariable Property VampireFeedReady AutoFloat Property LastFeedTime Autospell Property VampireRaiseThrall01 Autospell Property VampireRaiseThrall02 Autospell Property VampireRaiseThrall03 Autorace Property NordRaceVampire Autoglobalvariable Property PlayerIsVampire Autospell Property VampireCloak AutoFunction VampireFeedBed()game.GetPlayer().PlayIdle(VampireFeedingBedRight)EndFunctionFunction VampireChange(actor Target)objectreference myXmarkergame.DisablePlayerControls(true, true, false, false, false, true, true, false, 0)VampireChangeFX.play(Target, -1.00)VampireTransformIncreaseISMD.applyCrossFade(2.00)myXmarker = Target.PlaceAtMe(XMarker, 1, false, false)MagVampireTransform01.play(myXmarker)myXmarker.Disable(false)utility.wait(2.00)imagespacemodifier.removeCrossFade(1.00)VampireChangeFX.stop(Target)if (Target.GetActorBase().GetRace() == ArgonianRace) CureRace = ArgonianRace Target.SetRace(ArgonianRaceVampire)elseif (Target.GetActorBase().GetRace() == BretonRace) CureRace = BretonRace Target.SetRace(BretonRaceVampire)elseif (Target.GetActorBase().GetRace() == DarkElfRace) CureRace = DarkElfRace Target.SetRace(DarkElfRaceVampire)elseif (Target.GetActorBase().GetRace() == HighElfRace) CureRace = HighElfRace Target.SetRace(HighElfRaceVampire)elseif (Target.GetActorBase().GetRace() == ImperialRace) CureRace = ImperialRace Target.SetRace(ImperialRaceVampire)elseif (Target.GetActorBase().GetRace() == KhajiitRace) CureRace = KhajiitRace Target.SetRace(KhajiitRaceVampire)elseif (Target.GetActorBase().GetRace() == NordRace) CureRace = NordRace Target.SetRace(NordRaceVampire)elseif (Target.GetActorBase().GetRace() == OrcRace) CureRace = OrcRace Target.SetRace(OrcRaceVampire)elseif (Target.GetActorBase().GetRace() == RedguardRace) CureRace = RedguardRace Target.SetRace(RedguardRaceVampire)elseif (Target.GetActorBase().GetRace() == WoodElfRace) CureRace = WoodElfRace Target.SetRace(WoodElfRaceVampire)endifTarget.RemoveSpell(DiseaseBoneBreakFever)Target.RemoveSpell(DiseaseBrainRot)Target.RemoveSpell(DiseaseRattles)Target.RemoveSpell(DiseaseRockjoint)Target.RemoveSpell(DiseaseWitbane)Target.RemoveSpell(DiseasePorphyricHemophelia)Target.RemoveSpell(DiseaseAtaxia)Target.RemoveSpell(TrapDiseaseBoneBreakFever)Target.RemoveSpell(TrapDiseaseBrainRot)Target.RemoveSpell(TrapDiseaseRattles)Target.RemoveSpell(TrapDiseaseRockjoint)Target.RemoveSpell(TrapDiseaseWitbane)Target.RemoveSpell(TrapDiseasePorphyricHemophelia)Target.RemoveSpell(TrapDiseaseAtaxia)VampireStatus = 1VampireProgression(game.GetPlayer(), 1)RegisterForUpdateGameTime(12)LastFeedTime = GameDaysPassed.valuePlayerIsVampire.SetValue(1)utility.wait(1)game.EnablePlayerControls(true, true, true, true, true, true, true, true, 0) if (VC01.GetStageDone(200)) VC01.SetStage(25)endifEndFunctionFunction OnUpdateGameTime()actor playerFeedTimer = GameDaysPassed.value - LastFeedTimeplayer = game.GetPlayer()If (Game.IsMovementControlsEnabled() && Game.IsFightingControlsEnabled() && (player.GetCombatState() == 0) && !player.HasMagicEffect(DLC1VampireChangeEffect) && !player.HasMagicEffect(DLC1VampireChangeFXEffect)) If (FeedTimer >= 3) && (VampireStatus == 3) VampireFeedReady.SetValue(3) VampireStage4Message.Show() VampireStatus = 4 VampireProgression(player, 4) UnregisterforUpdateGameTime() ElseIf FeedTimer >= 2 && (VampireStatus == 2) VampireFeedReady.SetValue(2) VampireStageProgressionMessage.Show() VampireStatus = 3 VampireProgression(player, 3) ElseIf FeedTimer >= 1 && (VampireStatus == 1) ;add Stage 2 Vampire buffs and spells VampireFeedReady.SetValue(1) VampireStageProgressionMessage.Show() VampireStatus = 2 VampireProgression(player, 2) EndIfEndIfEndFunctionFunction VampireCure(actor player)game.IncrementStat("Vampirism Cures", 1)UnregisterforUpdateGameTime()VampireStatus = 0player.RemoveFromFaction(VampirePCFaction)player.SetAttackActorOnSight(false)player.RemoveSpell(DLC1VampireChange)player.RemoveSpell(ABVampireSkills)player.RemoveSpell(ABVampireSkills02)player.RemoveSpell(AbVampire01)player.RemoveSpell(AbVampire02)player.RemoveSpell(AbVampire03)player.RemoveSpell(AbVampire04)player.RemoveSpell(AbVampire01b)player.RemoveSpell(AbVampire02b)player.RemoveSpell(AbVampire03b)player.RemoveSpell(AbVampire04b)player.RemoveSpell(VampireDrain01)player.RemoveSpell(VampireDrain02)player.RemoveSpell(VampireDrain03)player.RemoveSpell(VampireDrain04)player.RemoveSpell(VampireRaiseThrall01)player.RemoveSpell(VampireRaiseThrall02)player.RemoveSpell(VampireRaiseThrall03)player.RemoveSpell(VampireRaiseThrall04)player.RemoveSpell(VampireSunDamage01)player.RemoveSpell(VampireSunDamage02)player.RemoveSpell(VampireSunDamage03)player.RemoveSpell(VampireSunDamage04)player.RemoveSpell(VampireCharm)player.RemoveSpell(VampireInvisibilityPC)if (player.GetRace() == ArgonianRaceVampire) player.SetRace(ArgonianRace)elseif (player.GetRace() == BretonRaceVampire) player.SetRace(BretonRace)elseif (player.GetRace() == DarkElfRaceVampire) player.SetRace(DarkElfRace)elseif (player.GetRace() == HighElfRaceVampire) player.SetRace(HighElfRace)elseif (player.GetRace() == ImperialRaceVampire) player.SetRace(ImperialRace)elseif (player.GetRace() == KhajiitRaceVampire) player.SetRace(KhajiitRace)elseif (player.GetRace() == NordRaceVampire) player.SetRace(NordRace)elseif (player.GetRace() == OrcRaceVampire) player.SetRace(OrcRace)elseif (player.GetRace() == RedguardRaceVampire) player.SetRace(RedguardRace)elseif (player.GetRace() == WoodElfRaceVampire) player.SetRace(WoodElfRace)endifPlayerIsVampire.SetValue(0)player.RemoveSpell(VampireHuntersSight)EndFunctionFunction VampireProgression(actor player, Int VampireStage)if (VampireStage == 2) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire01b) player.AddSpell(AbVampire02b, false) player.AddSpell(AbVampire02, false) player.RemoveSpell(VampireSunDamage01) player.AddSpell(VampireSunDamage02, false) player.AddSpell(VampireDrain02, false) if (player.GetEquippedSpell(0) == VampireDrain01) player.EquipSpell(VampireDrain02, 0) EndIf if (player.GetEquippedSpell(1) == VampireDrain01) player.EquipSpell(VampireDrain02, 1) EndIf player.RemoveSpell(VampireDrain01) player.AddSpell(VampireRaiseThrall02, false) player.RemoveSpell(VampireRaiseThrall01) player.AddSpell(VampireCharm, true)ElseIf (VampireStage == 3) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire01b) player.RemoveSpell(AbVampire02b) player.AddSpell(AbVampire03b, false) player.AddSpell(AbVampire03, false) player.AddSpell(VampireDrain03, false) If Player.GetEquippedSpell(0) == VampireDrain02 || Player.GetEquippedSpell(0) == VampireDrain01 Player.EquipSpell(VampireDrain03, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain02 || Player.GetEquippedSpell(1) == VampireDrain01 Player.EquipSpell(VampireDrain03, 1) EndIf Player.RemoveSpell(VampireDrain01) Player.RemoveSpell(VampireDrain02) player.RemoveSpell(VampireRaiseThrall01) player.RemoveSpell(VampireRaiseThrall02) player.AddSpell(VampireRaiseThrall03, false) player.RemoveSpell(VampireSunDamage01) player.RemoveSpell(VampireSunDamage02) player.AddSpell(VampireSunDamage03, false)ElseIf (VampireStage == 4) VampireTransformIncreaseISMD.applyCrossFade(2.00) utility.wait(2.00) imagespacemodifier.removeCrossFade(1.00) player.RemoveSpell(AbVampire01) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire03) player.RemoveSpell(AbVampire01b) player.RemoveSpell(AbVampire02b) player.RemoveSpell(AbVampire03b) player.AddSpell(AbVampire04, false) player.AddSpell(AbVampire04b, false) player.AddSpell(VampireDrain04, false) If Player.GetEquippedSpell(0) == VampireDrain03 || Player.GetEquippedSpell(0) == VampireDrain02 || Player.GetEquippedSpell(0) == VampireDrain01 Player.EquipSpell(VampireDrain04, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain03 || Player.GetEquippedSpell(1) == VampireDrain02 || Player.GetEquippedSpell(1) == VampireDrain01 Player.EquipSpell(VampireDrain04, 1) EndIf Player.RemoveSpell(VampireDrain01) Player.RemoveSpell(VampireDrain02) Player.RemoveSpell(VampireDrain03) player.RemoveSpell(VampireRaiseThrall01) player.RemoveSpell(VampireRaiseThrall02) player.RemoveSpell(VampireRaiseThrall03) player.AddSpell(VampireRaiseThrall04, false) player.RemoveSpell(VampireSunDamage01) player.RemoveSpell(VampireSunDamage02) player.RemoveSpell(VampireSunDamage03) player.AddSpell(VampireSunDamage04, false) player.AddSpell(VampireInvisibilityPC, true)ElseIf (VampireStage == 1) player.AddSpell(ABVampireSkills, false) player.AddSpell(ABVampireSkills02, false) player.RemoveSpell(AbVampire04) player.RemoveSpell(AbVampire02) player.RemoveSpell(AbVampire03) player.RemoveSpell(AbVampire04b) player.RemoveSpell(AbVampire02b) player.RemoveSpell(AbVampire03b) player.AddSpell(AbVampire01, false) player.AddSpell(AbVampire01b, false) player.AddSpell(VampireDrain01, false) If Player.GetEquippedSpell(0) == VampireDrain03 || Player.GetEquippedSpell(0) == VampireDrain04 || Player.GetEquippedSpell(0) == VampireDrain02 Player.EquipSpell(VampireDrain01, 0) EndIf If Player.GetEquippedSpell(1) == VampireDrain03 || Player.GetEquippedSpell(1) == VampireDrain04 || Player.GetEquippedSpell(1) == VampireDrain02 Player.EquipSpell(VampireDrain01, 1) EndIf Player.RemoveSpell(VampireDrain04) Player.RemoveSpell(VampireDrain02) Player.RemoveSpell(VampireDrain03) player.RemoveSpell(VampireRaiseThrall04) player.RemoveSpell(VampireRaiseThrall02) player.RemoveSpell(VampireRaiseThrall03) player.AddSpell(VampireRaiseThrall01, false) player.RemoveSpell(VampireSunDamage04) player.RemoveSpell(VampireSunDamage02) player.RemoveSpell(VampireSunDamage03) player.AddSpell(VampireSunDamage01, false) player.RemoveSpell(VampireCharm) player.RemoveSpell(VampireInvisibilityPC)EndIfEndFunctionFunction VampireFeed()VampireTransformDecreaseISMD.applyCrossFade(2.00)utility.wait(2.00)imagespacemodifier.removeCrossFade(1.00)game.IncrementStat("Necks Bitten", 1)VampireFeedMessage.Show()VampireFeedReady.SetValue(0)LastFeedTime = GameDaysPassed.valueVampireStatus = 1actor player = game.GetPlayer()VampireProgression(player, 1)player.RemoveFromFaction(VampirePCFaction)player.SetAttackActorOnSight(false)Int cfIndex = 0debug.Trace("VAMPIRE feed: DLC1CrimeFactions = " + DLC1CrimeFactions, 0)debug.Trace("VAMPIRE feed: CrimeFactions before = " + CrimeFactions, 0)CrimeFactions = DLC1CrimeFactionsdebug.Trace("VAMPIRE feed: CrimeFactions after = " + CrimeFactions, 0) while ( cfIndex < CrimeFactions.GetSize() ) debug.Trace("VAMPIRE: Removing enemy flag from " + CrimeFactions.GetAt(cfIndex), 0) (CrimeFactions.GetAt(cfIndex) as Faction).SetPlayerEnemy(false) cfIndex+=1endWhileUnregisterforUpdateGameTime()RegisterForUpdateGameTime(12)EndFunctionFunction VampireFeedBedRoll()game.GetPlayer().PlayIdle(VampireFeedingBedrollRight)EndFunction
callmethod AddSpell, PlayerActor, ::temp14, ::DLC1AbVampireFloatBodyFX_var, falsetranslates to
VARS Bool ::temp47 Bool ::temp49 ENDVARS callmethod HasPerk, PlayerActor, ::temp49, ::DLC1VampireBite_varcast ::temp47, 1cmp_eq ::temp47, ::temp49, ::temp47jmpf ::temp47, 3callmethod RestoreActorValue, PlayerActor, ::NoneVar, "Health", ::DLC1BiteHealthRecover_varjmp 1
callmethod AddSpell, PlayerActor, ::temp14, ::DLC1AbVampireFloatBodyFX_var, falsetranslates to
VARS Bool ::temp47 Bool ::temp49 ENDVARS callmethod HasPerk, PlayerActor, ::temp49, ::DLC1VampireBite_varcast ::temp47, 1cmp_eq ::temp47, ::temp49, ::temp47jmpf ::temp47, 3callmethod RestoreActorValue, PlayerActor, ::NoneVar, "Health", ::DLC1BiteHealthRecover_varjmp 1
Scriptname DLC1VampireTrackingQuest extends Quest conditionalrace property playerRace auto
ScriptName VampireQuestScript extends Quest ConditionalSpell Property LastPower auto;Variable to track if the player is a vampire;0 = Not a Vampire;1 = Vampire;2 = Vampire Mid-Point;3 = Full VampireInt Property VampireStatus Auto ConditionalSpell Property LastLeftHandSpell auto
Scriptname DLC1PlayerVampireChangeScript extends Quest Conditionalimagespacemodifier property VampireChange autoFloat property UnearthlyWillExtensionTimeSeconds auto{How long (in real seconds) that feeding extends vampire time}spell property VampireRaiseThrall03 autospell property DLC1PlayerVampireLvl45AndBelowAbility autoBool property Untimed autospell property DLC1SupernaturalReflexes autoperk property DLC1GargoylePerk autoBool __tryingToShiftBack = falsespell property DLC1VampireDrain09 autoBool property DLC1HasLightfoot autospell property DLC1CorpseCurse autosound property NPCVampireTransformation automagiceffect property DLC1RevertEffect autovisualeffect property FeedBloodVFX auto{Visual Effect on Wolf for Feeding Blood}spell property DLC1VampireRaiseDeadLeftHand03 autospell property DLC1PlayerVampireLvl20AndBelowAbility autospell property AbVampire01 autospell property DLC1PlayerVampireLvl15AndBelowAbility autospell property VampireDrain04 autoglobalvariable property DLC1VampirePerkPoints autoglobalvariable property DLC1BloodMagic autoeffectshader property DLC1VampireChangeBackFXS autoarmor property eruditeRing autoString Ground = "GroundStart"formlist property CrimeFactions autospell property LeveledDrainSpell autospell property VampireHuntersSight autoidle property SpecialFeeding autospell property DLC1VampireDetectLife autospell property VampireDrain03 autoglobalvariable property pDLC1nVampireRingBeast autoQuest property VampireTrackingQuest autospell property AbVampire01b autospell property DLC1VampireMistform autospell property DLC1VampireChange autoString LandStart = "LandStart"armor property gargNecklace autoglobalvariable property DLC1VampireBloodPoints autoarmor property DLC1VampireLordArmor autoperk property DLC1UnearthlyWill autoglobalvariable property DLC1VampireTotalPerksEarned autoperk property DLC1CorpseCursePerk automessage property PlayerVampireFeedMessage autoFloat property StandardDurationSeconds auto{How long (in real seconds) the transformation lasts}spell property VampireDrain01 autospell property DLC1VampireBats autoeffectshader property DLC1VampireChangeBack02FXS autospell property AbVampire04 autospell property VampireInvisibilityPC autoQuest property DialogueGenericVampire autospell property DLC1PlayerVampireLvl25AndBelowAbility autoperk property DLC1MistFormPerk autoglobalvariable property pDLC1nVampireNecklaceGargoyle autospell property DLC1VampireDrain05 autospell property VampireSunDamage03 autoperk property DLC1VampiricGrip autoglobalvariable property PlayerVampireShiftBackTime autoarmor property batNecklace autoglobalvariable property pDLC1nVampireRingErudite autoglobalvariable property GameDaysPassed automessage property PlayerVampireExpirationWarning autospell property LeveledRaiseDeadSpell autospell property DLC1VampireLordSunDamage autoperk property DLC1NightCloakPerk autoglobalvariable property DLC1NightPower autoBool __trackingStarted = falseperk property DLC1VampireBite autorace property VampireLordRace autospell property DLC1VampireRaiseDeadLeftHand01 autoglobalvariable property DCL1VampireLevitateStateGlobal auto{This Global tracks what state the Vampire Lord is in: 0 = Not a Vampire Lord, 1 = Walking, 2 = Levitating}spell property VampireSunDamage04 autoperk property LightFoot autospell property DLC1VampireDrain06 autospell property DLC1Revert automessage property DLC1VampirePerkEarned autospell property DLC1PlayerVampireLvl50AndOverAbility autospell property DLC1AbVampireFloatBodyFX auto{Spell FX Art holder for Levitation Glow.}spell property VampireCharm autospell property DLC1VampireDrain08 autoString Levitate = "LevitateStart"spell property CurrentEquippedLeftSpell autospell property VampireDrain02 autoString BiteStart = "BiteStart"String LiftoffStart = "LiftoffStart"Bool __shiftingBack = falsespell property AbVampire03 autoglobalvariable property DLC1VampireNextPerk autoBool __prepped = falseString TransformToHuman = "TransformToHuman"Bool __shuttingDown = falsespell property DLC1PlayerVampireLvl30AndBelowAbility autospell property DLC1VampireRaiseDeadLeftHand02 autospell property AbVampire04b autoformlist property VampireDispelList autospell property LeveledAbility autoFloat property DLC1BiteHealthRecover autofaction property PlayerVampireFaction autospell property VampireRaiseThrall01 autospell property BleedingFXSpell auto{This Spell is for making the target of feeding bleed.}spell property DLC1VampireDrain07 autoarmor property beastRing autoglobalvariable property VampireFeedReady autospell property DLC1VampireRaiseDeadLeftHand05 autoFloat __durationWarningTime = -1.00globalvariable property TimeScale autospell property DLC1ConjureGargoyleLeftHand autoFloat __UnearthlyWillExtensionTime = -1.00spell property VampireSunDamage01 autoglobalvariable property pDLC1nVampireNecklaceBats autoperk property DLC1VampireActivationBlocker autospell property DLC1PlayerVampireLvl10AndBelowAbility autospell property AbVampire02b autospell property AbVampire03b autoperk property DLC1SupernaturalReflexesPerk autofaction property HunterFaction automessage property DLC1BloodPointsMsg autospell property VampireSunDamage02 autosound property VampireIMODSound autospell property DLC1NightCloak autospell property DLC1VampireRaiseDeadLeftHand04 autospell property AbVampire02 autospell property DLC1VampiresGrip autoimagespacemodifier property VampireWarn autospell property VampireRaiseThrall02 autofaction property DLC1PlayerVampireLordFaction autoFloat property DurationWarningTimeSeconds auto{How long (in real seconds) before turning back we should warn the player}spell property DLC1PlayerVampireLvl40AndBelowAbility autoglobalvariable property DLC1VampireMaxPerks autoPlayerVampireQuestScript property PlayerVampireQuest autoperk property DLC1DetectLifePerk autospell property DLC1PlayerVampireLvl35AndBelowAbility autospell property VampireRaiseThrall04 autospell property FeedBoost autoFunction StartTracking()actor PlayerActor = game.GetPlayer()if (__trackingStarted) returnendif__trackingStarted = trueif (PlayerActor.isEquipped(beastRing)) pDLC1nVampireRingBeast.setValue(1)endifif (PlayerActor.isEquipped(eruditeRing)) pDLC1nVampireRingErudite.setValue(1)endifif (PlayerActor.isEquipped(batNecklace)) pDLC1nVampireNecklaceBats.setValue(1)endifif (PlayerActor.isEquipped(gargNecklace)) pDLC1nVampireNecklaceGargoyle.setValue(1)endifRegisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Race swap done; starting tracking and effects.", 0)PlayerActor.UnequipAll()PlayerActor.EquipItem(DLC1VampireLordArmor, false, true)PlayerActor.SetAttackActorOnSight(true)game.SendWereWolfTransformation()PlayerActor.AddToFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) debug.Trace("VAMPIRE: Setting enemy flag on " + CrimeFactions.GetAt(cfIndex), 0) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(true) cfIndex += 1endwhileHunterFaction.SetPlayerEnemy(true)game.SetPlayerReportCrime(false)__durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds)__UnearthlyWillExtensionTime = RealTimeSecondsToGameTimeDays(UnearthlyWillExtensionTimeSeconds)PlayerActor.RemoveSpell(VampireSunDamage01)PlayerActor.RemoveSpell(VampireSunDamage02)PlayerActor.RemoveSpell(VampireSunDamage03)PlayerActor.RemoveSpell(VampireSunDamage04)PlayerActor.AddSpell(DLC1VampireLordSunDamage, false)PlayerActor.AddSpell(LeveledAbility, false)PlayerActor.AddSpell(VampireHuntersSight, false)PlayerActor.AddSpell(DLC1Revert, false)PlayerActor.AddSpell(DLC1VampireBats, false)PlayerActor.EquipSpell((DialogueGenericVampire as vampirequestscript).LastPower, 2)CheckPerkSpells()if (PlayerActor.HasPerk(LightFoot)) DLC1HasLightfoot = trueelse DLC1HasLightfoot = false PlayerActor.AddPerk(LightFoot)endifFloat currentTime = GameDaysPassed.GetValue()Float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds)if (PlayerActor.HasPerk(DLC1UnearthlyWill)) regressTime += __UnearthlyWillExtensionTimeendifPlayerVampireShiftBackTime.setValue(regressTime)debug.Trace("VAMPIRE: Current day -- " + currentTime, 0)debug.Trace("VAMPIRE: Player will turn back at day " + regressTime, 0)PlayerActor.DispelSpell(DLC1VampireChange)RegisterForUpdate(3.0)SetStage(10)EndFunctionFunction SetUntimed(Bool untimedValue)Untimed = untimedValueif Untimed UnregisterForUpdate()endifEndFunctionFunction UnloadSpells()LeveledDrainSpell.Unload()LeveledRaiseDeadSpell.Unload()DLC1VampiresGrip.Unload()DLC1ConjureGargoyleLeftHand.Unload()DLC1CorpseCurse.Unload()EndFunctionFunction PrepShift()actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Prepping shift...", 0)VampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)game.SetInCharGen(true, true, false)PlayerActor.AddPerk(DLC1VampireActivationBlocker)game.SetBeastForm(true)game.EnableFastTravel(false)PlayerActor.SetActorValue("GrabActorOffset", 70)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhilegame.DisablePlayerControls(false, false, true, false, false, false, false, false, 1)game.ForceThirdPerson()game.ShowFirstPersonGeometry(false)EstablishLeveledSpells()PreloadSpells()__prepped = trueEndFunctionFunction Revert()int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifUnregisterForUpdate()SetStage(100)EndFunctionFunction Shutdown()if __shuttingDown returnendif__shuttingDown = trueactor PlayerActor = game.GetPlayer()DCL1VampireLevitateStateGlobal.setValue(0)PlayerActor.GetActorBase().SetInvulnerable(false)PlayerActor.SetGhost(false)game.SetBeastForm(false)game.EnableFastTravel(true)game.SetInCharGen(false, false, false)debug.Trace("VAMPIRE: Transform to human done - remove activation blocking perk and allow recast of Vampire Change spell", 0)PlayerActor.RemovePerk(DLC1VampireActivationBlocker)PlayerActor.RemoveSpell(VampireHuntersSight)UnloadSpells()game.EnablePlayerControls(false, false, true, true, true, false, false, false, 1)stop()EndFunctionFunction PreloadSpells()LeveledDrainSpell.Preload()LeveledRaiseDeadSpell.Preload()DLC1VampiresGrip.Preload()DLC1ConjureGargoyleLeftHand.Preload()DLC1CorpseCurse.Preload()EndFunctionFunction ShiftBack()__tryingToShiftBack = trueactor PlayerActor = game.GetPlayer()while (PlayerActor.GetAnimationVariableBool("bIsSynced")) utility.Wait(0.1)endwhile__shiftingBack = falseActuallyShiftBackIfNecessary()EndFunctionFunction RegisterForEvents()debug.Trace("Registering for Animation Events", 0)actor PlayerActor = game.GetPlayer()RegisterForAnimationEvent(PlayerActor, Ground)RegisterForAnimationEvent(PlayerActor, Levitate)RegisterForAnimationEvent(PlayerActor, BiteStart)RegisterForAnimationEvent(PlayerActor, LiftoffStart)RegisterForAnimationEvent(PlayerActor, LandStart)RegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction ActuallyShiftBackIfNecessary()actor PlayerActor = game.GetPlayer()if __shiftingBack returnendif__shiftingBack = truePlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)if !DLC1HasLightfoot PlayerActor.RemovePerk(LightFoot)endifUnregisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Player returning to normal.", 0)game.SetInCharGen(true, true, false)UnregisterForUpdate()if PlayerActor.IsDead() debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifVampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)DLC1VampireChangeBackFXS.Play(PlayerActor, 12.00)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhileCurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0)(DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = CurrentEquippedLeftSpellif (PlayerActor.GetEquippedSpell(2) == DLC1Revert) (DialogueGenericVampire as vampirequestscript).LastPower = DLC1VampireBatselse (DialogueGenericVampire as vampirequestscript).LastPower = PlayerActor.GetEquippedSpell(2)endifPlayerActor.RemoveSpell(LeveledDrainSpell)PlayerActor.RemoveSpell(LeveledAbility)PlayerActor.RemoveSpell(LeveledRaiseDeadSpell)PlayerActor.RemoveSpell(DLC1VampiresGrip)PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand)PlayerActor.RemoveSpell(DLC1CorpseCurse)PlayerActor.RemoveSpell(DLC1VampireDetectLife)PlayerActor.RemoveSpell(DLC1VampireMistform)PlayerActor.RemoveSpell(DLC1VampireBats)PlayerActor.RemoveSpell(DLC1SupernaturalReflexes)PlayerActor.RemoveSpell(DLC1NightCloak)PlayerActor.RemoveSpell(DLC1Revert)PlayerActor.RemoveSpell(DLC1VampireLordSunDamage)PlayerActor.DispelSpell(DLC1VampireDetectLife)PlayerActor.DispelSpell(DLC1VampireMistform)PlayerActor.DispelSpell(DLC1SupernaturalReflexes)PlayerActor.DispelSpell(DLC1Revert)PlayerActor.DispelSpell(VampireHuntersSight)PlayerActor.RemoveSpell(DLC1AbVampireFloatBodyFX)pDLC1nVampireNecklaceBats.setValue(0)pDLC1nVampireNecklaceGargoyle.setValue(0)pDLC1nVampireRingBeast.setValue(0)pDLC1nVampireRingErudite.setValue(0)PlayerVampireQuest.VampireProgression(PlayerActor, PlayerVampireQuest.VampireStatus)Float currHealth = PlayerActor.GetAV("Health")if (currHealth <= 70) debug.Trace("VAMPIRE: Player's health is only " + currHealth + "; restoring.", 0) PlayerActor.RestoreAV("Health", 70 - currHealth)endifdebug.Trace("VAMPIRE: Setting race " + (VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace + " on " + PlayerActor, 0)PlayerActor.RemoveItem(DLC1VampireLordArmor, 2, true, None)(VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRacePlayerActor.SetRace((VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace)DLC1VampireChangeBackFXS.stop(PlayerActor)DLC1VampireChangeBack02FXS.Play(PlayerActor, 0.1)game.ShowFirstPersonGeometry(true)PlayerActor.SetAttackActorOnSight(false)HunterFaction.SetPlayerEnemy(false)PlayerActor.RemoveFromFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(false) cfIndex += 1endWhilegame.SetPlayerReportCrime(true)utility.Wait(5)debug.Trace("OnRaceSwitchComplete event took more than 5 seconds, shutting down ourselves.", 0)EndFunctionFunction CheckPerkSpells()actor PlayerActor = game.GetPlayer()if (PlayerActor.HasPerk(DLC1MistFormPerk) && !PlayerActor.HasSpell(DLC1VampireMistform)) PlayerActor.AddSpell(DLC1VampireMistform, false)endifif (PlayerActor.HasPerk(DLC1DetectLifePerk) && !PlayerActor.HasSpell(DLC1VampireDetectLife)) PlayerActor.AddSpell(DLC1VampireDetectLife, false)endifif (PlayerActor.HasPerk(DLC1SupernaturalReflexesPerk) && !PlayerActor.HasSpell(DLC1SupernaturalReflexes)) PlayerActor.AddSpell(DLC1SupernaturalReflexes, false)endifif (PlayerActor.HasPerk(DLC1VampiricGrip) && !PlayerActor.HasSpell(DLC1VampiresGrip)) PlayerActor.AddSpell(DLC1VampiresGrip, false)endifif (PlayerActor.HasPerk(DLC1CorpseCursePerk) && !PlayerActor.HasSpell(DLC1CorpseCurse)) PlayerActor.AddSpell(DLC1CorpseCurse, false)endif if (PlayerActor.HasPerk(DLC1GargoylePerk) && !PlayerActor.HasSpell(DLC1ConjureGargoyleLeftHand)) PlayerActor.AddSpell(DLC1ConjureGargoyleLeftHand, false)endif if (PlayerActor.HasPerk(DLC1NightCloakPerk) && !PlayerActor.HasSpell(DLC1NightCloak)) PlayerActor.AddSpell(DLC1NightCloak, false)endif EndFunctionFloat Function GameTimeDaysToRealTimeSeconds(Float gametime)Float gameSeconds = gametime * 60 * 60 * 24return gameSeconds / (TimeScale.value as Float)EndFunctionFunction Feed(actor victim)EndFunctionFunction WarnPlayer()VampireWarn.Apply(1.00)EndFunctionFunction HandlePlayerLoadGame()if (__prepped) PreloadSpells()endifEndFunctionFunction EstablishLeveledSpells()actor PlayerActor = game.GetPlayer()int playerLevel = PlayerActor.GetLevel()if playerLevel <= 10 LeveledDrainSpell = DLC1VampireDrain05 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand01elseif playerLevel <= 20 LeveledDrainSpell = DLC1VampireDrain06 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand02elseif playerLevel <= 30 LeveledDrainSpell = DLC1VampireDrain07 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand03elseif playerLevel <= 40 LeveledDrainSpell = DLC1VampireDrain08 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand04else LeveledDrainSpell = DLC1VampireDrain09 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand05endifif playerLevel <= 10 LeveledAbility = DLC1PlayerVampireLvl10AndBelowAbilityelseif playerLevel <= 15 LeveledAbility = DLC1PlayerVampireLvl15AndBelowAbilityelseif playerLevel <= 20 LeveledAbility = DLC1PlayerVampireLvl20AndBelowAbilityelseif playerLevel <= 25 LeveledAbility = DLC1PlayerVampireLvl25AndBelowAbilityelseif playerLevel <= 30 LeveledAbility = DLC1PlayerVampireLvl30AndBelowAbilityelseif playerLevel <= 35 LeveledAbility = DLC1PlayerVampireLvl35AndBelowAbilityelseif playerLevel <= 40 LeveledAbility = DLC1PlayerVampireLvl40AndBelowAbilityelseif playerLevel <= 45 LeveledAbility = DLC1PlayerVampireLvl45AndBelowAbilityelse LeveledAbility = DLC1PlayerVampireLvl50AndOverAbilityendifEndFunctionFunction OnAnimationEventUnregistered(objectreference akSource, String asEventName)debug.Trace("Animation Event Unregistered for " + akSource + ": " + asEventName, 0)EndFunctionFunction OnAnimationEvent(objectreference akActor, String akEventName)actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Animation Event! " + akActor + " " + akEventName, 0)if (akActor == PlayerActor) if (akEventName == TransformToHuman) ActuallyShiftBackIfNecessary() endif if (akEventName == BiteStart) debug.Trace("VAMPIRE: Handle BiteStart", 0) DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1400993-dawnguard-psc-files-merged/DLC1VampireBloodPoints.value + 1 if DLC1VampireTotalPerksEarned.value < DLC1VampireMaxPerks.value DLC1BloodPointsMsg.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) debug.Trace("VAMPIRE: Bite kill move, Blood " + DLC1VampireBloodPoints.value, 0) if DLC1VampireBloodPoints.value >= DLC1VampireNextPerk.value DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1400993-dawnguard-psc-files-merged/DLC1VampireBloodPoints.value - DLC1VampireNextPerk.value DLC1VampirePerkPoints.value = DLC1VampirePerkPoints.value + 1 DLC1VampireTotalPerksEarned.value = DLC1VampireTotalPerksEarned.value + 1 DLC1VampireNextPerk.value = DLC1VampireNextPerk.value + 2 DLC1VampirePerkEarned.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) endif if PlayerActor.HasPerk(DLC1VampireBite) PlayerActor.RestoreActorValue("Health", DLC1BiteHealthRecover) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) game.IncrementStat("Necks Bitten", 1) endif if (akEventName == LandStart) debug.Trace("VAMPIRE: Handle LandStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) endif if (akEventName == Ground) debug.Trace("VAMPIRE: Handle GroundStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) CurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0) debug.Trace("VAMPIRE: saving equipped left spell " + CurrentEquippedLeftSpell, 0) if (CurrentEquippedLeftSpell != None) PlayerActor.UnequipSpell(CurrentEquippedLeftSpell, 0) endif PlayerActor.UnequipSpell(LeveledDrainSpell, 1) PlayerActor.RemoveSpell(LeveledRaiseDeadSpell) PlayerActor.RemoveSpell(DLC1CorpseCurse) PlayerActor.RemoveSpell(DLC1VampiresGrip) PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand) endif if (akEventName == LiftoffStart) debug.Trace("VAMPIRE: Handle LiftoffStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) endif if (akEventName == Levitate) debug.Trace("VAMPIRE: Handle LevitateStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) PlayerActor.EquipSpell(LeveledDrainSpell, 1) if ((DialogueGenericVampire as vampirequestscript).LastLeftHandSpell == None) (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = DLC1VampireRaiseDeadLeftHand01 endif if (CurrentEquippedLeftSpell == None) CurrentEquippedLeftSpell = (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell debug.Trace("VAMPIRE: Spell from last session set as current last spell = " + CurrentEquippedLeftSpell, 0) endif CheckPerkSpells() PlayerActor.AddSpell(LeveledRaiseDeadSpell, false) PlayerActor.EquipSpell(CurrentEquippedLeftSpell, 0) debug.Trace("VAMPIRE: Last spell left eqiupped = " + CurrentEquippedLeftSpell, 0) PlayerActor.EquipSpell(LeveledDrainSpell, 1) debug.Trace("VAMPIRE: Last spell right eqiupped = " + LeveledDrainSpell, 0) endifendifEndFunctionFunction UnregisterForEvents()debug.Trace("Unregistering for Animation Events", 0)actor PlayerActor = game.GetPlayer()UnRegisterForAnimationEvent(PlayerActor, Ground)UnRegisterForAnimationEvent(PlayerActor, Levitate)UnRegisterForAnimationEvent(PlayerActor, BiteStart)UnRegisterForAnimationEvent(PlayerActor, LiftoffStart)UnRegisterForAnimationEvent(PlayerActor, LandStart)UnRegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction OnUpdate()actor PlayerActor = game.GetPlayer()game.SetInCharGen(false, false, false)int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifif Untimed returnendifif PlayerActor.HasMagicEffect(DLC1RevertEffect) && !PlayerActor.IsInKillMove() && !__tryingToShiftBack debug.Trace("VAMPIRE: Revert effect detected", 0) Revert()endifgame.ForceThirdPerson()EndFunctionFunction InitialShift()debug.Trace("VAMPIRE: Player beginning transformation.", 0)actor PlayerActor = game.GetPlayer()VampireWarn.Apply(1.00)if (PlayerActor.IsDead()) debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifPlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)PlayerActor.SetRace(VampireLordRace)PlayerActor.AddSpell(DLC1AbVampireFloatBodyFX, false)EndFunctionFloat Function RealTimeSecondsToGameTimeDays(Float realtime)Float scaledSeconds = realtime * TimeScale.valuereturn scaledSeconds / (60 * 60 * 24)EndFunction
Scriptname DLC1VampireTrackingQuest extends Quest conditionalrace property playerRace auto
ScriptName VampireQuestScript extends Quest ConditionalSpell Property LastPower auto;Variable to track if the player is a vampire;0 = Not a Vampire;1 = Vampire;2 = Vampire Mid-Point;3 = Full VampireInt Property VampireStatus Auto ConditionalSpell Property LastLeftHandSpell auto
Scriptname DLC1PlayerVampireChangeScript extends Quest Conditionalimagespacemodifier property VampireChange autoFloat property UnearthlyWillExtensionTimeSeconds auto{How long (in real seconds) that feeding extends vampire time}spell property VampireRaiseThrall03 autospell property DLC1PlayerVampireLvl45AndBelowAbility autoBool property Untimed autospell property DLC1SupernaturalReflexes autoperk property DLC1GargoylePerk autoBool __tryingToShiftBack = falsespell property DLC1VampireDrain09 autoBool property DLC1HasLightfoot autospell property DLC1CorpseCurse autosound property NPCVampireTransformation automagiceffect property DLC1RevertEffect autovisualeffect property FeedBloodVFX auto{Visual Effect on Wolf for Feeding Blood}spell property DLC1VampireRaiseDeadLeftHand03 autospell property DLC1PlayerVampireLvl20AndBelowAbility autospell property AbVampire01 autospell property DLC1PlayerVampireLvl15AndBelowAbility autospell property VampireDrain04 autoglobalvariable property DLC1VampirePerkPoints autoglobalvariable property DLC1BloodMagic autoeffectshader property DLC1VampireChangeBackFXS autoarmor property eruditeRing autoString Ground = "GroundStart"formlist property CrimeFactions autospell property LeveledDrainSpell autospell property VampireHuntersSight autoidle property SpecialFeeding autospell property DLC1VampireDetectLife autospell property VampireDrain03 autoglobalvariable property pDLC1nVampireRingBeast autoQuest property VampireTrackingQuest autospell property AbVampire01b autospell property DLC1VampireMistform autospell property DLC1VampireChange autoString LandStart = "LandStart"armor property gargNecklace autoglobalvariable property DLC1VampireBloodPoints autoarmor property DLC1VampireLordArmor autoperk property DLC1UnearthlyWill autoglobalvariable property DLC1VampireTotalPerksEarned autoperk property DLC1CorpseCursePerk automessage property PlayerVampireFeedMessage autoFloat property StandardDurationSeconds auto{How long (in real seconds) the transformation lasts}spell property VampireDrain01 autospell property DLC1VampireBats autoeffectshader property DLC1VampireChangeBack02FXS autospell property AbVampire04 autospell property VampireInvisibilityPC autoQuest property DialogueGenericVampire autospell property DLC1PlayerVampireLvl25AndBelowAbility autoperk property DLC1MistFormPerk autoglobalvariable property pDLC1nVampireNecklaceGargoyle autospell property DLC1VampireDrain05 autospell property VampireSunDamage03 autoperk property DLC1VampiricGrip autoglobalvariable property PlayerVampireShiftBackTime autoarmor property batNecklace autoglobalvariable property pDLC1nVampireRingErudite autoglobalvariable property GameDaysPassed automessage property PlayerVampireExpirationWarning autospell property LeveledRaiseDeadSpell autospell property DLC1VampireLordSunDamage autoperk property DLC1NightCloakPerk autoglobalvariable property DLC1NightPower autoBool __trackingStarted = falseperk property DLC1VampireBite autorace property VampireLordRace autospell property DLC1VampireRaiseDeadLeftHand01 autoglobalvariable property DCL1VampireLevitateStateGlobal auto{This Global tracks what state the Vampire Lord is in: 0 = Not a Vampire Lord, 1 = Walking, 2 = Levitating}spell property VampireSunDamage04 autoperk property LightFoot autospell property DLC1VampireDrain06 autospell property DLC1Revert automessage property DLC1VampirePerkEarned autospell property DLC1PlayerVampireLvl50AndOverAbility autospell property DLC1AbVampireFloatBodyFX auto{Spell FX Art holder for Levitation Glow.}spell property VampireCharm autospell property DLC1VampireDrain08 autoString Levitate = "LevitateStart"spell property CurrentEquippedLeftSpell autospell property VampireDrain02 autoString BiteStart = "BiteStart"String LiftoffStart = "LiftoffStart"Bool __shiftingBack = falsespell property AbVampire03 autoglobalvariable property DLC1VampireNextPerk autoBool __prepped = falseString TransformToHuman = "TransformToHuman"Bool __shuttingDown = falsespell property DLC1PlayerVampireLvl30AndBelowAbility autospell property DLC1VampireRaiseDeadLeftHand02 autospell property AbVampire04b autoformlist property VampireDispelList autospell property LeveledAbility autoFloat property DLC1BiteHealthRecover autofaction property PlayerVampireFaction autospell property VampireRaiseThrall01 autospell property BleedingFXSpell auto{This Spell is for making the target of feeding bleed.}spell property DLC1VampireDrain07 autoarmor property beastRing autoglobalvariable property VampireFeedReady autospell property DLC1VampireRaiseDeadLeftHand05 autoFloat __durationWarningTime = -1.00globalvariable property TimeScale autospell property DLC1ConjureGargoyleLeftHand autoFloat __UnearthlyWillExtensionTime = -1.00spell property VampireSunDamage01 autoglobalvariable property pDLC1nVampireNecklaceBats autoperk property DLC1VampireActivationBlocker autospell property DLC1PlayerVampireLvl10AndBelowAbility autospell property AbVampire02b autospell property AbVampire03b autoperk property DLC1SupernaturalReflexesPerk autofaction property HunterFaction automessage property DLC1BloodPointsMsg autospell property VampireSunDamage02 autosound property VampireIMODSound autospell property DLC1NightCloak autospell property DLC1VampireRaiseDeadLeftHand04 autospell property AbVampire02 autospell property DLC1VampiresGrip autoimagespacemodifier property VampireWarn autospell property VampireRaiseThrall02 autofaction property DLC1PlayerVampireLordFaction autoFloat property DurationWarningTimeSeconds auto{How long (in real seconds) before turning back we should warn the player}spell property DLC1PlayerVampireLvl40AndBelowAbility autoglobalvariable property DLC1VampireMaxPerks autoPlayerVampireQuestScript property PlayerVampireQuest autoperk property DLC1DetectLifePerk autospell property DLC1PlayerVampireLvl35AndBelowAbility autospell property VampireRaiseThrall04 autospell property FeedBoost autoFunction StartTracking()actor PlayerActor = game.GetPlayer()if (__trackingStarted) returnendif__trackingStarted = trueif (PlayerActor.isEquipped(beastRing)) pDLC1nVampireRingBeast.setValue(1)endifif (PlayerActor.isEquipped(eruditeRing)) pDLC1nVampireRingErudite.setValue(1)endifif (PlayerActor.isEquipped(batNecklace)) pDLC1nVampireNecklaceBats.setValue(1)endifif (PlayerActor.isEquipped(gargNecklace)) pDLC1nVampireNecklaceGargoyle.setValue(1)endifRegisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Race swap done; starting tracking and effects.", 0)PlayerActor.UnequipAll()PlayerActor.EquipItem(DLC1VampireLordArmor, false, true)PlayerActor.SetAttackActorOnSight(true)game.SendWereWolfTransformation()PlayerActor.AddToFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) debug.Trace("VAMPIRE: Setting enemy flag on " + CrimeFactions.GetAt(cfIndex), 0) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(true) cfIndex += 1endwhileHunterFaction.SetPlayerEnemy(true)game.SetPlayerReportCrime(false)__durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds)__UnearthlyWillExtensionTime = RealTimeSecondsToGameTimeDays(UnearthlyWillExtensionTimeSeconds)PlayerActor.RemoveSpell(VampireSunDamage01)PlayerActor.RemoveSpell(VampireSunDamage02)PlayerActor.RemoveSpell(VampireSunDamage03)PlayerActor.RemoveSpell(VampireSunDamage04)PlayerActor.AddSpell(DLC1VampireLordSunDamage, false)PlayerActor.AddSpell(LeveledAbility, false)PlayerActor.AddSpell(VampireHuntersSight, false)PlayerActor.AddSpell(DLC1Revert, false)PlayerActor.AddSpell(DLC1VampireBats, false)PlayerActor.EquipSpell((DialogueGenericVampire as vampirequestscript).LastPower, 2)CheckPerkSpells()if (PlayerActor.HasPerk(LightFoot)) DLC1HasLightfoot = trueelse DLC1HasLightfoot = false PlayerActor.AddPerk(LightFoot)endifFloat currentTime = GameDaysPassed.GetValue()Float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds)if (PlayerActor.HasPerk(DLC1UnearthlyWill)) regressTime += __UnearthlyWillExtensionTimeendifPlayerVampireShiftBackTime.setValue(regressTime)debug.Trace("VAMPIRE: Current day -- " + currentTime, 0)debug.Trace("VAMPIRE: Player will turn back at day " + regressTime, 0)PlayerActor.DispelSpell(DLC1VampireChange)RegisterForUpdate(3.0)SetStage(10)EndFunctionFunction SetUntimed(Bool untimedValue)Untimed = untimedValueif Untimed UnregisterForUpdate()endifEndFunctionFunction UnloadSpells()LeveledDrainSpell.Unload()LeveledRaiseDeadSpell.Unload()DLC1VampiresGrip.Unload()DLC1ConjureGargoyleLeftHand.Unload()DLC1CorpseCurse.Unload()EndFunctionFunction PrepShift()actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Prepping shift...", 0)VampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)game.SetInCharGen(true, true, false)PlayerActor.AddPerk(DLC1VampireActivationBlocker)game.SetBeastForm(true)game.EnableFastTravel(false)PlayerActor.SetActorValue("GrabActorOffset", 70)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhilegame.DisablePlayerControls(false, false, true, false, false, false, false, false, 1)game.ForceThirdPerson()game.ShowFirstPersonGeometry(false)EstablishLeveledSpells()PreloadSpells()__prepped = trueEndFunctionFunction Revert()int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifUnregisterForUpdate()SetStage(100)EndFunctionFunction Shutdown()if __shuttingDown returnendif__shuttingDown = trueactor PlayerActor = game.GetPlayer()DCL1VampireLevitateStateGlobal.setValue(0)PlayerActor.GetActorBase().SetInvulnerable(false)PlayerActor.SetGhost(false)game.SetBeastForm(false)game.EnableFastTravel(true)game.SetInCharGen(false, false, false)debug.Trace("VAMPIRE: Transform to human done - remove activation blocking perk and allow recast of Vampire Change spell", 0)PlayerActor.RemovePerk(DLC1VampireActivationBlocker)PlayerActor.RemoveSpell(VampireHuntersSight)UnloadSpells()game.EnablePlayerControls(false, false, true, true, true, false, false, false, 1)stop()EndFunctionFunction PreloadSpells()LeveledDrainSpell.Preload()LeveledRaiseDeadSpell.Preload()DLC1VampiresGrip.Preload()DLC1ConjureGargoyleLeftHand.Preload()DLC1CorpseCurse.Preload()EndFunctionFunction ShiftBack()__tryingToShiftBack = trueactor PlayerActor = game.GetPlayer()while (PlayerActor.GetAnimationVariableBool("bIsSynced")) utility.Wait(0.1)endwhile__shiftingBack = falseActuallyShiftBackIfNecessary()EndFunctionFunction RegisterForEvents()debug.Trace("Registering for Animation Events", 0)actor PlayerActor = game.GetPlayer()RegisterForAnimationEvent(PlayerActor, Ground)RegisterForAnimationEvent(PlayerActor, Levitate)RegisterForAnimationEvent(PlayerActor, BiteStart)RegisterForAnimationEvent(PlayerActor, LiftoffStart)RegisterForAnimationEvent(PlayerActor, LandStart)RegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction ActuallyShiftBackIfNecessary()actor PlayerActor = game.GetPlayer()if __shiftingBack returnendif__shiftingBack = truePlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)if !DLC1HasLightfoot PlayerActor.RemovePerk(LightFoot)endifUnregisterForEvents()DCL1VampireLevitateStateGlobal.setValue(1)debug.Trace("VAMPIRE: Player returning to normal.", 0)game.SetInCharGen(true, true, false)UnregisterForUpdate()if PlayerActor.IsDead() debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifVampireChange.Apply(1.00)VampireIMODSound.Play(PlayerActor)DLC1VampireChangeBackFXS.Play(PlayerActor, 12.00)int count = 0while (count < VampireDispelList.GetSize()) spell gone = VampireDispelList.GetAt(count) as spell if (gone != None) PlayerActor.DispelSpell(gone) endif count += 1endwhileCurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0)(DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = CurrentEquippedLeftSpellif (PlayerActor.GetEquippedSpell(2) == DLC1Revert) (DialogueGenericVampire as vampirequestscript).LastPower = DLC1VampireBatselse (DialogueGenericVampire as vampirequestscript).LastPower = PlayerActor.GetEquippedSpell(2)endifPlayerActor.RemoveSpell(LeveledDrainSpell)PlayerActor.RemoveSpell(LeveledAbility)PlayerActor.RemoveSpell(LeveledRaiseDeadSpell)PlayerActor.RemoveSpell(DLC1VampiresGrip)PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand)PlayerActor.RemoveSpell(DLC1CorpseCurse)PlayerActor.RemoveSpell(DLC1VampireDetectLife)PlayerActor.RemoveSpell(DLC1VampireMistform)PlayerActor.RemoveSpell(DLC1VampireBats)PlayerActor.RemoveSpell(DLC1SupernaturalReflexes)PlayerActor.RemoveSpell(DLC1NightCloak)PlayerActor.RemoveSpell(DLC1Revert)PlayerActor.RemoveSpell(DLC1VampireLordSunDamage)PlayerActor.DispelSpell(DLC1VampireDetectLife)PlayerActor.DispelSpell(DLC1VampireMistform)PlayerActor.DispelSpell(DLC1SupernaturalReflexes)PlayerActor.DispelSpell(DLC1Revert)PlayerActor.DispelSpell(VampireHuntersSight)PlayerActor.RemoveSpell(DLC1AbVampireFloatBodyFX)pDLC1nVampireNecklaceBats.setValue(0)pDLC1nVampireNecklaceGargoyle.setValue(0)pDLC1nVampireRingBeast.setValue(0)pDLC1nVampireRingErudite.setValue(0)PlayerVampireQuest.VampireProgression(PlayerActor, PlayerVampireQuest.VampireStatus)Float currHealth = PlayerActor.GetAV("Health")if (currHealth <= 70) debug.Trace("VAMPIRE: Player's health is only " + currHealth + "; restoring.", 0) PlayerActor.RestoreAV("Health", 70 - currHealth)endifdebug.Trace("VAMPIRE: Setting race " + (VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace + " on " + PlayerActor, 0)PlayerActor.RemoveItem(DLC1VampireLordArmor, 2, true, None)(VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRacePlayerActor.SetRace((VampireTrackingQuest as dlc1vampiretrackingquest).PlayerRace)DLC1VampireChangeBackFXS.stop(PlayerActor)DLC1VampireChangeBack02FXS.Play(PlayerActor, 0.1)game.ShowFirstPersonGeometry(true)PlayerActor.SetAttackActorOnSight(false)HunterFaction.SetPlayerEnemy(false)PlayerActor.RemoveFromFaction(PlayerVampireFaction)int cfIndex = 0while (cfIndex < CrimeFactions.GetSize()) (CrimeFactions.GetAt(cfIndex) as faction).SetPlayerEnemy(false) cfIndex += 1endWhilegame.SetPlayerReportCrime(true)utility.Wait(5)debug.Trace("OnRaceSwitchComplete event took more than 5 seconds, shutting down ourselves.", 0)EndFunctionFunction CheckPerkSpells()actor PlayerActor = game.GetPlayer()if (PlayerActor.HasPerk(DLC1MistFormPerk) && !PlayerActor.HasSpell(DLC1VampireMistform)) PlayerActor.AddSpell(DLC1VampireMistform, false)endifif (PlayerActor.HasPerk(DLC1DetectLifePerk) && !PlayerActor.HasSpell(DLC1VampireDetectLife)) PlayerActor.AddSpell(DLC1VampireDetectLife, false)endifif (PlayerActor.HasPerk(DLC1SupernaturalReflexesPerk) && !PlayerActor.HasSpell(DLC1SupernaturalReflexes)) PlayerActor.AddSpell(DLC1SupernaturalReflexes, false)endifif (PlayerActor.HasPerk(DLC1VampiricGrip) && !PlayerActor.HasSpell(DLC1VampiresGrip)) PlayerActor.AddSpell(DLC1VampiresGrip, false)endifif (PlayerActor.HasPerk(DLC1CorpseCursePerk) && !PlayerActor.HasSpell(DLC1CorpseCurse)) PlayerActor.AddSpell(DLC1CorpseCurse, false)endifif (PlayerActor.HasPerk(DLC1GargoylePerk) && !PlayerActor.HasSpell(DLC1ConjureGargoyleLeftHand)) PlayerActor.AddSpell(DLC1ConjureGargoyleLeftHand, false)endifif (PlayerActor.HasPerk(DLC1NightCloakPerk) && !PlayerActor.HasSpell(DLC1NightCloak)) PlayerActor.AddSpell(DLC1NightCloak, false)endifEndFunctionFloat Function GameTimeDaysToRealTimeSeconds(Float gametime)Float gameSeconds = gametime * 60 * 60 * 24return gameSeconds / (TimeScale.value as Float)EndFunctionFunction Feed(actor victim)EndFunctionFunction WarnPlayer()VampireWarn.Apply(1.00)EndFunctionFunction HandlePlayerLoadGame()if (__prepped) PreloadSpells()endifEndFunctionFunction EstablishLeveledSpells()actor PlayerActor = game.GetPlayer()int playerLevel = PlayerActor.GetLevel()if playerLevel <= 10 LeveledDrainSpell = DLC1VampireDrain05 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand01elseif playerLevel <= 20 LeveledDrainSpell = DLC1VampireDrain06 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand02elseif playerLevel <= 30 LeveledDrainSpell = DLC1VampireDrain07 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand03elseif playerLevel <= 40 LeveledDrainSpell = DLC1VampireDrain08 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand04else LeveledDrainSpell = DLC1VampireDrain09 LeveledRaiseDeadSpell = DLC1VampireRaiseDeadLeftHand05endifif playerLevel <= 10 LeveledAbility = DLC1PlayerVampireLvl10AndBelowAbilityelseif playerLevel <= 15 LeveledAbility = DLC1PlayerVampireLvl15AndBelowAbilityelseif playerLevel <= 20 LeveledAbility = DLC1PlayerVampireLvl20AndBelowAbilityelseif playerLevel <= 25 LeveledAbility = DLC1PlayerVampireLvl25AndBelowAbilityelseif playerLevel <= 30 LeveledAbility = DLC1PlayerVampireLvl30AndBelowAbilityelseif playerLevel <= 35 LeveledAbility = DLC1PlayerVampireLvl35AndBelowAbilityelseif playerLevel <= 40 LeveledAbility = DLC1PlayerVampireLvl40AndBelowAbilityelseif playerLevel <= 45 LeveledAbility = DLC1PlayerVampireLvl45AndBelowAbilityelse LeveledAbility = DLC1PlayerVampireLvl50AndOverAbilityendifEndFunctionFunction OnAnimationEventUnregistered(objectreference akSource, String asEventName)debug.Trace("Animation Event Unregistered for " + akSource + ": " + asEventName, 0)EndFunctionFunction OnAnimationEvent(objectreference akActor, String akEventName)actor PlayerActor = game.GetPlayer()debug.Trace("VAMPIRE: Animation Event! " + akActor + " " + akEventName, 0)if (akActor == PlayerActor) if (akEventName == TransformToHuman) ActuallyShiftBackIfNecessary() endif if (akEventName == BiteStart) debug.Trace("VAMPIRE: Handle BiteStart", 0) DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1400993-dawnguard-psc-files-merged/DLC1VampireBloodPoints.value + 1 if DLC1VampireTotalPerksEarned.value < DLC1VampireMaxPerks.value DLC1BloodPointsMsg.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) debug.Trace("VAMPIRE: Bite kill move, Blood " + DLC1VampireBloodPoints.value, 0) if DLC1VampireBloodPoints.value >= DLC1VampireNextPerk.value DLC1VampireBloodPoints.value = http://forums.bethsoft.com/topic/1400993-dawnguard-psc-files-merged/DLC1VampireBloodPoints.value - DLC1VampireNextPerk.value DLC1VampirePerkPoints.value = DLC1VampirePerkPoints.value + 1 DLC1VampireTotalPerksEarned.value = DLC1VampireTotalPerksEarned.value + 1 DLC1VampireNextPerk.value = DLC1VampireNextPerk.value + 2 DLC1VampirePerkEarned.Show(0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) endif if PlayerActor.HasPerk(DLC1VampireBite) PlayerActor.RestoreActorValue("Health", DLC1BiteHealthRecover) endif PlayerActor.SetActorValue("VampirePerks", (DLC1VampireBloodPoints.value / (DLC1VampireNextPerk.value as float)) * 100) game.IncrementStat("Necks Bitten", 1) endif if (akEventName == LandStart) debug.Trace("VAMPIRE: Handle LandStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) endif if (akEventName == Ground) debug.Trace("VAMPIRE: Handle GroundStart", 0) DCL1VampireLevitateStateGlobal.setValue(1) CurrentEquippedLeftSpell = PlayerActor.GetEquippedSpell(0) debug.Trace("VAMPIRE: saving equipped left spell " + CurrentEquippedLeftSpell, 0) if (CurrentEquippedLeftSpell != None) PlayerActor.UnequipSpell(CurrentEquippedLeftSpell, 0) endif PlayerActor.UnequipSpell(LeveledDrainSpell, 1) PlayerActor.RemoveSpell(LeveledRaiseDeadSpell) PlayerActor.RemoveSpell(DLC1CorpseCurse) PlayerActor.RemoveSpell(DLC1VampiresGrip) PlayerActor.RemoveSpell(DLC1ConjureGargoyleLeftHand) endif if (akEventName == LiftoffStart) debug.Trace("VAMPIRE: Handle LiftoffStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) endif if (akEventName == Levitate) debug.Trace("VAMPIRE: Handle LevitateStart", 0) DCL1VampireLevitateStateGlobal.setValue(2) PlayerActor.EquipSpell(LeveledDrainSpell, 1) if ((DialogueGenericVampire as vampirequestscript).LastLeftHandSpell == None) (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell = DLC1VampireRaiseDeadLeftHand01 endif if (CurrentEquippedLeftSpell == None) CurrentEquippedLeftSpell = (DialogueGenericVampire as vampirequestscript).LastLeftHandSpell debug.Trace("VAMPIRE: Spell from last session set as current last spell = " + CurrentEquippedLeftSpell, 0) endif CheckPerkSpells() PlayerActor.AddSpell(LeveledRaiseDeadSpell, false) PlayerActor.EquipSpell(CurrentEquippedLeftSpell, 0) debug.Trace("VAMPIRE: Last spell left eqiupped = " + CurrentEquippedLeftSpell, 0) PlayerActor.EquipSpell(LeveledDrainSpell, 1) debug.Trace("VAMPIRE: Last spell right eqiupped = " + LeveledDrainSpell, 0) endifendifEndFunctionFunction UnregisterForEvents()debug.Trace("Unregistering for Animation Events", 0)actor PlayerActor = game.GetPlayer()UnRegisterForAnimationEvent(PlayerActor, Ground)UnRegisterForAnimationEvent(PlayerActor, Levitate)UnRegisterForAnimationEvent(PlayerActor, BiteStart)UnRegisterForAnimationEvent(PlayerActor, LiftoffStart)UnRegisterForAnimationEvent(PlayerActor, LandStart)UnRegisterForAnimationEvent(PlayerActor, TransformToHuman)EndFunctionFunction OnUpdate()actor PlayerActor = game.GetPlayer()game.SetInCharGen(false, false, false)int numPerks = game.QueryStat("NumVampirePerks")debug.Trace("VAMPIRE: Perks stat = " + numPerks, 0)if numPerks >= DLC1VampireMaxPerks.value game.AddAchievement(58)endifif Untimed returnendifif PlayerActor.HasMagicEffect(DLC1RevertEffect) && !PlayerActor.IsInKillMove() && !__tryingToShiftBack debug.Trace("VAMPIRE: Revert effect detected", 0) Revert()endifgame.ForceThirdPerson()EndFunctionFunction InitialShift()debug.Trace("VAMPIRE: Player beginning transformation.", 0)actor PlayerActor = game.GetPlayer()VampireWarn.Apply(1.00)if (PlayerActor.IsDead()) debug.Trace("VAMPIRE: Player is dead; bailing out.", 0) returnendifPlayerActor.GetActorBase().SetInvulnerable(true)PlayerActor.SetGhost(true)PlayerActor.SetRace(VampireLordRace)PlayerActor.AddSpell(DLC1AbVampireFloatBodyFX, false)EndFunctionFloat Function RealTimeSecondsToGameTimeDays(Float realtime)Float scaledSeconds = realtime * TimeScale.valuereturn scaledSeconds / (60 * 60 * 24)EndFunction
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 29Scriptname QF_DA04_0002D512 extends Quest Conditional hidden;BEGIN ALIAS PROPERTY Alias_HermaeusMora;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_HermaeusMora Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_Urag;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_Urag Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_ElderScroll;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_ElderScroll Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_AlftandZCellIntDoor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_AlftandZCellIntDoor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_SeptimusEssential;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_SeptimusEssential Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_LexiconCubeBlank;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_LexiconCubeBlank Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_OghmaInfinium;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_OghmaInfinium Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_ExtractorQuestItem;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_ExtractorQuestItem Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_LexiconStand;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_LexiconStand Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_RuminationsBook;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_RuminationsBook Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_AtunementSphere;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_AtunementSphere Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_Extractor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_Extractor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_TowerOfMzarkDoor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_TowerOfMzarkDoor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_ActualBlackreachDoor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_ActualBlackreachDoor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_AlftandSecondCellDoor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_AlftandSecondCellDoor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_TamrielToAlftand;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_TamrielToAlftand Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_AlftandWorldDoor;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_AlftandWorldDoor Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_BlackreachLock;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_BlackreachLock Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_LexiconCubeInscribed;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_LexiconCubeInscribed Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_RuminationsQuestItem;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_RuminationsQuestItem Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_Septimus;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_Septimus Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_HermaeusMoraRename;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_HermaeusMoraRename Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_CubeStorageChest;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_CubeStorageChest Auto;END ALIAS PROPERTY;BEGIN ALIAS PROPERTY Alias_UragEssential;ALIAS PROPERTY TYPE referencealiasreferencealias Property Alias_UragEssential Auto;END ALIAS PROPERTY;BEGIN FRAGMENT Fragment_21Function Fragment_21();BEGIN CODESetObjectiveDisplayed(5, true, false);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_24Function Fragment_24();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODEkmyQuest.EnableHM(false)Alias_ExtractorQuestItem.Clear()Alias_OghmaInfinium.GetRef().BlockActivation(false)Alias_LexiconCubeBlank.Clear()Alias_LexiconCubeInscribed.Clear();END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_12Function Fragment_12();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODESetObjectiveDisplayed(50, true, false)game.GetPlayer().RemovePerk(BloodHarvest);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_26Function Fragment_26();BEGIN CODESetObjectiveCompleted(30, true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_14Function Fragment_14();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODESetObjectiveCompleted(55, true)AchievementsQuest.IncDaedricArtifacts()kmyQuest.MoveHM()kmyQuest.EnableHM(true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_18Function Fragment_18();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODEkmyQuest.ReadCrazyBook = trueSetStage(5);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_6Function Fragment_6();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODESetObjectiveCompleted(30, true)SetObjectiveCompleted(35, true)SetObjectiveDisplayed(41, true, false)SetObjectiveDisplayed(42, true, false)SetObjectiveDisplayed(43, true, false)SetObjectiveDisplayed(44, true, false)SetObjectiveDisplayed(45, true, false)game.GetPlayer().AddItem(Alias_Extractor.GetReference() as Form, 1, false)game.GetPlayer().AddPerk(BloodHarvest)kmyQuest.EnableHM(true);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_16Function Fragment_16();BEGIN CODEAchievementsQuest.IncDaedricQuests()SetStage(200);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_25Function Fragment_25();BEGIN CODESetObjectiveCompleted(50, true)SetObjectiveDisplayed(55, true, false)Alias_OghmaInfinium.GetReference().BlockActivation(false);END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_0Function Fragment_0();BEGIN CODESetObjectiveCompleted(5, true)SetObjectiveDisplayed(10, true, false)Alias_UragEssential.Clear()if MQ205.IsRunning()MQ205.SetStage(60)endifif pDLC1VQElderHandler.IsRunning()pDLC1VQElderHandler.SetStage(200)endif;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_2Function Fragment_2();BEGIN AUTOCAST TYPE da04questscriptQuest __temp = selfda04questscript kmyQuest = __temp as da04questscript;END AUTOCAST;BEGIN CODESetObjectiveCompleted(10, true)SetObjectiveDisplayed(20, true, false)game.GetPlayer().Additem(Alias_AtunementSphere.GetRef() as form, 1, false)game.GetPlayer().Additem(Alias_LexiconCubeBlank.GetRef() as form, 1, false)AlftandMapMarker.AddToMap(false)if (MQ205.IsRunning())MQ205.SetStage(80)endifif pDLC1VQElderHandler.IsRunning()pDLC1VQElderHandler.SetStage(200)endif;END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_4Function Fragment_4();BEGIN CODESetObjectiveCompleted(20, true)SetObjectiveDisplayed(30, true, false)MzarkMapMarker.enable(false)Alias_SeptimusEssential.Clear();END CODEEndFunction;END FRAGMENT;BEGIN FRAGMENT Fragment_23Function Fragment_23();BEGIN CODEFailAllObjectives()SetStage(200);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin commentQuest property MQ205 automiscobject property Harvester autoobjectreference property AlftandMapMarker automiscobject property Lexicon autoQuest property pDLC1VQElderHandler autoobjectreference property MzarkMapMarker automiscobject property Sphere autoachievementsscript property AchievementsQuest autoobjectreference property HMEndMarker autoperk property BloodHarvest auto