diff --git a/_build/Used Skyrim scripts.txt b/_build/Used Skyrim scripts.txt index d6d3d2de..cd38ac4e 100644 --- a/_build/Used Skyrim scripts.txt +++ b/_build/Used Skyrim scripts.txt @@ -12,10 +12,6 @@ boundboweffectscript.* briarheartingredientscript.* carryactorscript.* carryfurniturescript.* -companionshousekeepingscript.* -companionsradiantquest.* -companionsstoryquest.* -cr04questscript.* craftingactivatelinker.* crimeguardsscript.* critterspawn01.* @@ -137,7 +133,6 @@ playerbookshelfcontainerscript.* playerbookshelftriggerscript.* playerpotionrackclicktriggerscript.* playerpotionracktriggerscript.* -playerwerewolfchangescript.* pressureplate.* pressurereleaseplate.* reanimateashpile.* diff --git a/scripts/companionshousekeepingscript.pex b/scripts/companionshousekeepingscript.pex deleted file mode 100644 index 62fe46e0..00000000 Binary files a/scripts/companionshousekeepingscript.pex and /dev/null differ diff --git a/scripts/companionsradiantquest.pex b/scripts/companionsradiantquest.pex deleted file mode 100644 index f361e953..00000000 Binary files a/scripts/companionsradiantquest.pex and /dev/null differ diff --git a/scripts/companionsstoryquest.pex b/scripts/companionsstoryquest.pex deleted file mode 100644 index b03e40b6..00000000 Binary files a/scripts/companionsstoryquest.pex and /dev/null differ diff --git a/scripts/cr04questscript.pex b/scripts/cr04questscript.pex deleted file mode 100644 index 84eb1b3c..00000000 Binary files a/scripts/cr04questscript.pex and /dev/null differ diff --git a/scripts/crimeguardsscript.pex b/scripts/crimeguardsscript.pex index 6b4cfd2b..ba174af6 100644 Binary files a/scripts/crimeguardsscript.pex and b/scripts/crimeguardsscript.pex differ diff --git a/scripts/favordialoguescript.pex b/scripts/favordialoguescript.pex index 099afedf..3cd7b1b4 100644 Binary files a/scripts/favordialoguescript.pex and b/scripts/favordialoguescript.pex differ diff --git a/scripts/playerwerewolfchangescript.pex b/scripts/playerwerewolfchangescript.pex deleted file mode 100644 index 2229f406..00000000 Binary files a/scripts/playerwerewolfchangescript.pex and /dev/null differ diff --git a/scripts/werewolfchangeeffectscript.pex b/scripts/werewolfchangeeffectscript.pex index 3fbfdcbe..d6516126 100644 Binary files a/scripts/werewolfchangeeffectscript.pex and b/scripts/werewolfchangeeffectscript.pex differ diff --git a/scripts/werewolftransformvisual.pex b/scripts/werewolftransformvisual.pex index 18cda70a..f8565922 100644 Binary files a/scripts/werewolftransformvisual.pex and b/scripts/werewolftransformvisual.pex differ diff --git a/source/scripts/companionshousekeepingscript.psc b/source/scripts/companionshousekeepingscript.psc deleted file mode 100644 index ede8f197..00000000 --- a/source/scripts/companionshousekeepingscript.psc +++ /dev/null @@ -1,1231 +0,0 @@ -Scriptname CompanionsHousekeepingScript extends Quest Conditional - -Faction property CompanionsFaction auto - -MiscObject property GoldReward auto -int property GoldRewardMinorAmount auto -int property GoldRewardModerateAmount auto -int property GoldRewardMajorAmount auto - -; for introductory loop -bool property PlayerWalkedAwayDuringKVScene auto conditional -bool property PlayerWalkedAwayDuringSAScene auto conditional -bool property PlayerIgnoredVilkasOutside auto conditional -bool property PlayerMetKodlak auto conditional -bool property PlayerMetVilkas auto conditional -bool property PlayerMetEorlund auto conditional -bool property PlayerMetAela auto conditional -bool property PlayerMetSkjor auto conditional -bool property PlayerMetFarkas auto conditional -bool property FarkasLastSceneStarted auto conditional -bool property AelaShouldForceGreet auto conditional -bool property EorlundShouldForceGreet auto conditional -bool property FarkasSceneGo auto conditional -Quest property TrainingQuest auto -ReferenceAlias property VilkasSword auto -ReferenceAlias property VilkasQuestSword auto -bool property VilkasHasHisSwordBack auto conditional -bool Property PlayerMetCompanionsAtGiant auto conditional -bool Property PlayerHelpedCompanionsAtGiant auto conditional - -; got reward for full joining -bool Property GotWeaponReward auto conditional -bool Property EorlundToldAboutSkyforge auto conditional - -; the person following you (mostly for dialogue conditions) -ReferenceAlias Property CurrentFollower auto - -; so we can wrangle your followers -DialogueFollowerScript Property FollowerScript auto -GlobalVariable Property PlayerFollowerCount auto -DarkBrotherhood Property DBScript auto -Actor Property CiceroFollower auto -Actor Property DBInitiateFollower1 auto -Actor Property DBInitiateFollower2 auto - -; the circle (tm) + kodlak (collect all five) -ReferenceAlias property Skjor auto -ReferenceAlias property Aela auto -ReferenceAlias property Farkas auto -ReferenceAlias property Vilkas auto -ReferenceAlias property Kodlak auto - -; other jerks -ReferenceAlias Property Athis auto -ReferenceAlias Property Njada auto -ReferenceAlias Property Ria auto -ReferenceAlias Property Torvar auto - -; not technically a companion, but he's still cool -ReferenceAlias Property Eorlund auto - -; the faction for trainers to get put into when the player joins -Faction Property TrainerFaction auto - -; that guy (or gal) who follows you -ReferenceAlias property TrialObserver auto - -; the weapon that we'll give to Vilkas -Weapon property VilkasWeapon auto - -; setting up Eorlund to sell you Companions gear -LeveledItem Property CompanionsArmor auto -LeveledItem Property SkyforgeSteelWeapons auto -ObjectReference Property EorlundVendorChest auto -GlobalVariable Property GearChance auto - -; naughty naughty -bool property PlayerThievingAndNotPaying auto conditional -int property PlayerThievingThreshold auto conditional - -; to shut them up when there are more important things going on -ReferenceAlias Property GenericDialogueSuppressor1 auto -ReferenceAlias Property GenericDialogueSuppressor2 auto -ReferenceAlias Property GenericDialogueSuppressor3 auto -ReferenceAlias Property GenericDialogueSuppressor4 auto - -; track whether the player currently has werewolf ability -bool Property PlayerHasBeastBlood = false auto conditional -GlobalVariable Property PlayerIsWerewolf auto - ; gets set true when you join (so we can still debug the werewolf transform) - bool Property PlayerIsWerewolfVirgin = false auto conditional - -; so Skjor can let you in to the Underforge before you're a werewolf -bool Property TempUnderforgeAccess = false auto conditional - -Quest Property WerewolfChangeTrackingQuest auto -Spell Property WerewolfImmunity auto -Spell Property BeastForm auto -; FIX FOR 81462 -Spell Property HircinesRingPower auto -; END FIX FOR 81462 - -Race Property PlayerOriginalRace auto - -Race Property ArgonianRace auto -Race Property ArgonianRaceVampire auto -Race Property BretonRace auto -Race Property BretonRaceVampire auto -Race Property DarkElfRace auto -Race Property DarkElfRaceVampire auto -Race Property HighElfRace auto -Race Property HighElfRaceVampire auto -Race Property ImperialRace auto -Race Property ImperialRaceVampire auto -Race Property KhajiitRace auto -Race Property KhajiitRaceVampire auto -Race Property NordRace auto -Race Property NordRaceVampire auto -Race Property OrcRace auto -Race Property OrcRaceVampire auto -Race Property RedguardRace auto -Race Property RedguardRaceVampire auto -Race Property WoodElfRace auto -Race Property WoodElfRaceVampire auto - -Shout Property CurrentHowl auto -WordOfPower Property CurrentHowlWord1 auto -WordOfPower Property CurrentHowlWord2 auto -WordOfPower Property CurrentHowlWord3 auto - -;;; quest tracking from here down ;;; -int property RadiantQuestsDone auto conditional -int property RadiantQuestsDoneInCurrentSegment auto conditional -ReferenceAlias property RadiantQuestgiver auto -Faction Property CurrentFollowerFaction auto - -int Property C04MinLevel auto ; because there are Hagravens involved - -CompanionsRadiantQuest Property AelaCurrentQuest auto -CompanionsRadiantQuest Property VilkasCurrentQuest auto -CompanionsRadiantQuest Property FarkasCurrentQuest auto -CompanionsRadiantQuest Property SkjorCurrentQuest auto - -CompanionsRadiantQuest Property AelaNextQuest auto -CompanionsRadiantQuest Property VilkasNextQuest auto -CompanionsRadiantQuest Property FarkasNextQuest auto -CompanionsRadiantQuest Property SkjorNextQuest auto - -Keyword property AelaRadiantKeyword auto -Keyword property SkjorRadiantKeyword auto -Keyword property VilkasRadiantKeyword auto -Keyword property FarkasRadiantKeyword auto -Keyword property ReconRadiantKeyword auto - -bool property RadiantAelaBlock auto conditional -bool property RadiantSkjorBlock auto conditional -bool property RadiantFarkasBlock auto conditional -bool property RadiantVilkasBlock auto conditional - -Quest Property RadiantMiscObjQuest auto -bool property StoryQuestIsRunning auto conditional -bool property RadiantQuestAccepted auto conditional -bool property RadiantQuestFinished auto conditional -bool property IsCurrentSilverHandTarget auto conditional -int property LastRadiantQuestDoneIndex auto conditional - -bool property AelaInReconMode auto conditional -bool property DoneReconQuestForAela auto conditional -ObjectReference property QuestgiverStandMarker auto conditional - -int property RadiantQuestsUntilC01 auto -int property RadiantQuestsUntilC03 auto -int property RadiantQuestsUntilC04 auto - -CompanionsStoryQuest property C01 auto -CompanionsStoryQuest property C02 auto -CompanionsStoryQuest property C03 auto -CompanionsStoryQuest property C04 auto -CompanionsStoryQuest property C05 auto -CompanionsStoryQuest property C06 auto - -; CR12 persistent tracking -int Property TotemsFound auto conditional -bool Property AelaIsConfused auto conditional - -; CR13 persistent tracking -bool Property VilkasHasBeastBlood auto conditional -bool Property FarkasHasBeastBlood auto conditional - -;; Radiant Quests -; grunt work -CompanionsRadiantQuest property CR01 auto ; a beast loose in someone's house -CompanionsRadiantQuest property CR02 auto ; beasts in a den near town harassing people -CompanionsRadiantQuest property CR03 auto ; collect pelts -CompanionsRadiantQuest property CR04 auto ; intimidation missions -CompanionsRadiantQuest property CR05 auto ; clear a dungeon -CompanionsRadiantQuest property CR06 auto ; family heirloom -; "real" quests -CompanionsRadiantQuest property CR07 auto ; capture criminals -CompanionsRadiantQuest property CR08 auto ; rescue people -; silver hand quests with Aela -CompanionsRadiantQuest property CR09 auto ; assasinate lieutenants -CompanionsRadiantQuest property CR10 auto ; steal plans -CompanionsRadiantQuest property CR11 auto ; retrieve pieces of blade -CompanionsRadiantQuest property CR12 auto ; wipe out camps -; leader work -CompanionsRadiantQuest property CR13 auto ; curing vilkas/farkas -CompanionsRadiantQuest property CR14 auto ; let a newbie in - -CompanionsStoryQuest property CurrentStoryQuest auto - -int property FavoriteQuestgiver auto conditional - ; 0 --> None (default behavior defined in quest) - ; 1 --> Aela - ; 3 --> Vilkas - ; 2 --> Farkas - ; 4 --> Skjor -bool Property AelaIsObserver auto conditional -bool Property FarkasIsObserver auto conditional -int property AelaQuests auto -int property FarkasQuests auto -int property VilkasQuests auto -int property SkjorQuests auto - -;; location tracking for reservations -LocationAlias Property DustmansCairn auto -LocationAlias Property GallowsRock auto -LocationAlias Property YsgramorsTomb auto - - -; Quest Designer needs arrays badly. Quest Designer is about to die. -CompanionsRadiantQuest Function GetRadiantQuestFromIndex(int questIndex) - if (questIndex == 1) - return CR01 - elseif (questIndex == 2) - return CR02 - elseif (questIndex == 3) - return CR03 - elseif (questIndex == 4) - return CR04 - elseif (questIndex == 5) - return CR05 - elseif (questIndex == 6) - return CR06 - elseif (questIndex == 7) - return CR07 - elseif (questIndex == 8) - return CR08 - elseif (questIndex == 9) - return CR09 - elseif (questIndex == 10) - return CR10 - elseif (questIndex == 11) - return CR11 - elseif (questIndex == 12) - return CR12 - elseif (questIndex == 13) - return CR13 - elseif (questIndex == 14) - return CR14 - else - return None - endif -EndFunction - -int Function GetIndexFromRadiantQuest(Quest rQuest) - if (rQuest == CR01) - return 1 - elseif (rQuest == CR02) - return 2 - elseif (rQuest == CR03) - return 3 - elseif (rQuest == CR04) - return 4 - elseif (rQuest == CR05) - return 5 - elseif (rQuest == CR06) - return 6 - elseif (rQuest == CR07) - return 7 - elseif (rQuest == CR08) - return 8 - elseif (rQuest == CR09) - return 9 - elseif (rQuest == CR10) - return 10 - elseif (rQuest == CR11) - return 11 - elseif (rQuest == CR12) - return 12 - elseif (rQuest == CR13) - return 13 - elseif (rQuest == CR14) - return 14 - else - return 0 - endif -EndFunction - - -Function OnInit() - ; PlayerJoin() ; for debugging, usually commented out -EndFunction - -Function SetUpCompanions() -; Debug.Trace("C00: Waiting to set up Companions.") - Utility.Wait(60) ; giving other quests the chance to finish their reservations - ; (very conservative time buffer, but chargen takes a while, - ; so let's be safe) - -; Debug.Trace("C00: Setting up Companions...") - - RadiantQuestsDone = 0 - StoryQuestIsRunning = False - RadiantQuestAccepted = False - RadiantQuestFinished = False - - AelaCurrentQuest = None - VilkasCurrentQuest = None - FarkasCurrentQuest = None - SkjorCurrentQuest = None - - AelaNextQuest = None - VilkasNextQuest = None - FarkasNextQuest = None - SkjorNextQuest = None - - RadiantAelaBlock = False - RadiantFarkasBlock = False - RadiantSkjorBlock = False - RadiantVilkasBlock = False - - ; do this twice to queue up two quests - CycleRadiantQuests() - ; while (\ - ; (SkjorCurrentQuest == None || !SkjorCurrentQuest.GetStageDone(1)) \ - ; && (AelaCurrentQuest == None || !AelaCurrentQuest.GetStageDone(1)) \ - ; && (FarkasCurrentQuest == None || !FarkasCurrentQuest.GetStageDone(1)) \ - ; && (VilkasCurrentQuest == None || !VilkasCurrentQuest.GetStageDone(1)) \ - ; ) -; ; Debug.Trace("C00: Waiting on RQ cycle...") - ; Utility.Wait(0.1) - ; endwhile - CycleRadiantQuests() - - CurrentStoryQuest = None - -; Debug.Trace("C00: Setup done; setting stage 1.") - SetStage(1) -EndFunction - -Function PlayerJoin() -; Debug.Trace("C00: Player joined Companions.") - if (Game.GetPlayer().IsInFaction(CompanionsFaction)) - return - endif - - Game.GetPlayer().AddToFaction(CompanionsFaction) - - ; start misc pointer for radiant quests - RadiantMiscObjQuest.Start() - - ; allow trainers - Athis.GetActorReference().AddToFaction(TrainerFaction) - Aela.GetActorReference().AddToFaction(TrainerFaction) - Njada.GetActorReference().AddToFaction(TrainerFaction) - Vilkas.GetActorReference().AddToFaction(TrainerFaction) - Eorlund.GetActorReference().AddToFaction(TrainerFaction) - Farkas.GetActorReference().AddToFaction(TrainerFaction) - - ; set up the spell tracking so the first time you cast it doesn't count - PlayerIsWerewolfVirgin = true - - ; get player's race so we have it permanently for werewolf switch back - PlayerOriginalRace = Game.GetPlayer().GetRace() -; Debug.Trace("CSQ: Storing player's race as " + PlayerOriginalRace) - - if (PlayerOriginalRace == ArgonianRaceVampire) -; Debug.Trace("CSQ: Player was Argonian Vampire; storing as Argonian.") - PlayerOriginalRace = ArgonianRace - elseif (PlayerOriginalRace == BretonRaceVampire) -; Debug.Trace("CSQ: Player was Breton Vampire; storing as Breton.") - PlayerOriginalRace = BretonRace - elseif (PlayerOriginalRace == DarkElfRaceVampire) -; Debug.Trace("CSQ: Player was Dark Elf Vampire; storing as Dark Elf.") - PlayerOriginalRace = DarkElfRace - elseif (PlayerOriginalRace == HighElfRaceVampire) -; Debug.Trace("CSQ: Player was High Elf Vampire; storing as High Elf.") - PlayerOriginalRace = HighElfRace - elseif (PlayerOriginalRace == ImperialRaceVampire) -; Debug.Trace("CSQ: Player was Imperial Vampire; storing as Imperial.") - PlayerOriginalRace = ImperialRace - elseif (PlayerOriginalRace == KhajiitRaceVampire) -; Debug.Trace("CSQ: Player was Khajiit Vampire; storing as Khajiit.") - PlayerOriginalRace = KhajiitRace - elseif (PlayerOriginalRace == NordRaceVampire) -; Debug.Trace("CSQ: Player was Nord Vampire; storing as Nord.") - PlayerOriginalRace = NordRace - elseif (PlayerOriginalRace == OrcRaceVampire) -; Debug.Trace("CSQ: Player was Orc Vampire; storing as Orc.") - PlayerOriginalRace = OrcRace - elseif (PlayerOriginalRace == RedguardRaceVampire) -; Debug.Trace("CSQ: Player was Redguard Vampire; storing as Redguard.") - PlayerOriginalRace = RedguardRace - elseif (PlayerOriginalRace == WoodElfRaceVampire) -; Debug.Trace("CSQ: Player was Wood Elf Vampire; storing as Wood Elf.") - PlayerOriginalRace = WoodElfRace - endif - -; Debug.Trace("CSQ: Storing player's race as " + PlayerOriginalRace) - - ; achievements YAY - Game.AddAchievement(9) -EndFunction - -Function OpenSkyforge() - ; set up Eorlund to sell you stuff - GearChance.SetValueInt(0) - - ; add them right now in case you run up - EorlundVendorChest.AddItem(CompanionsArmor) - EorlundVendorChest.AddItem(SkyforgeSteelWeapons) -EndFunction - -; super specialized -Function GiveVilkasBackHisSword() - ObjectReference vs = VilkasSword.GetReference() - ; make sure it's been cleared as a quest item - VilkasQuestSword.Clear() - VilkasSword.Clear() - - Eorlund.GetReference().RemoveItem(vs) - - Vilkas.GetReference().AddItem(VilkasWeapon) - - VilkasHasHisSwordBack = True -EndFunction - -Function CycleRadiantQuests() -; Debug.Trace("CRQ: Cycling radiant quests...") - ; just in case some idjit (i.e. me) unblocked a dead questgiver - if (Aela.GetActorReference().IsDead()) - if (AelaCurrentQuest != None) - AelaCurrentQuest.Stop() - AelaCurrentQuest = None - endif - if (AelaNextQuest != None) - AelaNextQuest.Stop() - AelaNextQuest = None - endif - RadiantAelaBlock = True - endif - if (Farkas.GetActorReference().IsDead()) - if (FarkasCurrentQuest != None) - FarkasCurrentQuest.Stop() - FarkasCurrentQuest = None - endif - if (FarkasNextQuest != None) - FarkasNextQuest.Stop() - FarkasNextQuest = None - endif - RadiantFarkasBlock = True - endif - if (Vilkas.GetActorReference().IsDead()) - if (VilkasCurrentQuest != None) - VilkasCurrentQuest.Stop() - VilkasCurrentQuest = None - endif - if (VilkasNextQuest != None) - VilkasNextQuest.Stop() - VilkasNextQuest = None - endif - RadiantVilkasBlock = True - endif - if (Skjor.GetActorReference().IsDead()) - if (SkjorCurrentQuest != None) - SkjorCurrentQuest.Stop() - SkjorCurrentQuest = None - endif - if (SkjorNextQuest != None) - SkjorNextQuest.Stop() - SkjorNextQuest = None - endif - RadiantSkjorBlock = True - endif - - ; lord, so much duplicated code here... this grew "organically" and is now hideous. - ; do not look here for examples of good tidy code. - if (!RadiantAelaBlock) - if (AelaCurrentQuest && AelaNextQuest && !AelaCurrentQuest.IsAccepted) - ; current quest not accepted, and we have a good next choice lined up -- swap - AelaCurrentQuest.Stop() - AelaCurrentQuest = AelaNextQuest - AelaNextQuest = None - AelaCurrentQuest.IsActive = True - elseif (AelaCurrentQuest && AelaCurrentQuest.Premature) - ; no better option, but we're trying to cycle out a prematurely ended quest, - ; so make it happen - AelaCurrentQuest.Stop() - AelaCurrentQuest = AelaNextQuest - AelaNextQuest = None - if (AelaCurrentQuest != None) - AelaCurrentQuest.IsActive = True - else - ; hope for the best at the next pick - endif - elseif (!AelaCurrentQuest && AelaNextQuest) - ; no current quest for whatever effed up reason, but got something in the - ; chamber, so fire. - AelaCurrentQuest = AelaNextQuest - AelaNextQuest = None - AelaCurrentQuest.IsActive = True - elseif (AelaNextQuest && AelaNextQuest != AelaCurrentQuest) - ; I don't even know why this is here anymore, but it is. - AelaNextQuest.Stop() - AelaNextQuest = None - elseif (AelaCurrentQuest && AelaCurrentQuest.GetStage() >= 200) - ; in case something got stuck someplace, make sure this eventually - ; gets cycled out - AelaCurrentQuest.Stop() - if (AelaNextQuest != None) - AelaCurrentQuest = AelaNextQuest - AelaNextQuest = None - AelaCurrentQuest.IsActive = True - else - AelaCurrentQuest = None - endif - endif - PickRadiantQuest(Aela.GetActorReference()) - elseif (AelaCurrentQuest && AelaCurrentQuest.GetStage() >= 200) - ; even if there's a block, cycle out done quests - AelaCurrentQuest.Stop() - if (AelaNextQuest != None) - AelaCurrentQuest = AelaNextQuest - AelaNextQuest = None - else - AelaCurrentQuest = None - endif - endif - if (!RadiantFarkasBlock) - if (FarkasCurrentQuest && FarkasNextQuest && !FarkasCurrentQuest.IsAccepted) - ; current quest not accepted, and we have a good next choice lined up -- swap - FarkasCurrentQuest.Stop() - FarkasCurrentQuest = FarkasNextQuest - FarkasNextQuest = None - FarkasCurrentQuest.IsActive = True - elseif (FarkasCurrentQuest && FarkasCurrentQuest.Premature) - ; no better option, but we're trying to cycle out a prematurely ended quest, - ; so make it happen - FarkasCurrentQuest.Stop() - FarkasCurrentQuest = FarkasNextQuest - FarkasNextQuest = None - if (FarkasCurrentQuest != None) - FarkasCurrentQuest.IsActive = True - else - ; hope for the best at the next pick - endif - elseif (!FarkasCurrentQuest && FarkasNextQuest) - ; no current quest for whatever effed up reason, but got something in the - ; chamber, so fire. - FarkasCurrentQuest = FarkasNextQuest - FarkasNextQuest = None - FarkasCurrentQuest.IsActive = True - elseif (FarkasNextQuest && FarkasNextQuest != FarkasCurrentQuest) - ; I don't even know why this is here anymore, but it is. - FarkasNextQuest.Stop() - FarkasNextQuest = None - elseif (FarkasCurrentQuest && FarkasCurrentQuest.GetStage() >= 200) - ; in case something got stuck someplace, make sure this eventually - ; gets cycled out - FarkasCurrentQuest.Stop() - if (FarkasNextQuest != None) - FarkasCurrentQuest = FarkasNextQuest - FarkasNextQuest = None - FarkasCurrentQuest.IsActive = True - else - FarkasCurrentQuest = None - endif - endif - PickRadiantQuest(Farkas.GetActorReference()) - elseif (FarkasCurrentQuest && FarkasCurrentQuest.GetStage() >= 200) - ; even if there's a block, cycle out done quests - FarkasCurrentQuest.Stop() - if (FarkasNextQuest != None) - FarkasCurrentQuest = FarkasNextQuest - FarkasNextQuest = None - else - FarkasCurrentQuest = None - endif - endif - if (!RadiantVilkasBlock) - if (VilkasCurrentQuest && VilkasNextQuest && !VilkasCurrentQuest.IsAccepted) - ; current quest not accepted, and we have a good next choice lined up -- swap - VilkasCurrentQuest.Stop() - VilkasCurrentQuest = VilkasNextQuest - VilkasNextQuest = None - VilkasCurrentQuest.IsActive = True - elseif (VilkasCurrentQuest && VilkasCurrentQuest.Premature) - ; no better option, but we're trying to cycle out a prematurely ended quest, - ; so make it happen - VilkasCurrentQuest.Stop() - VilkasCurrentQuest = VilkasNextQuest - VilkasNextQuest = None - if (VilkasCurrentQuest != None) - VilkasCurrentQuest.IsActive = True - else - ; hope for the best at the next pick - endif - elseif (!VilkasCurrentQuest && VilkasNextQuest) - ; no current quest for whatever effed up reason, but got something in the - ; chamber, so fire. - VilkasCurrentQuest = VilkasNextQuest - VilkasNextQuest = None - VilkasCurrentQuest.IsActive = True - elseif (VilkasNextQuest && VilkasNextQuest != VilkasCurrentQuest) - ; I don't even know why this is here anymore, but it is. - VilkasNextQuest.Stop() - VilkasNextQuest = None - elseif (VilkasCurrentQuest && VilkasCurrentQuest.GetStage() >= 200) - ; in case something got stuck someplace, make sure this eventually - ; gets cycled out - VilkasCurrentQuest.Stop() - if (VilkasNextQuest != None) - VilkasCurrentQuest = VilkasNextQuest - VilkasNextQuest = None - VilkasCurrentQuest.IsActive = True - else - VilkasCurrentQuest = None - endif - endif - PickRadiantQuest(Vilkas.GetActorReference()) - elseif (VilkasCurrentQuest && VilkasCurrentQuest.GetStage() >= 200) - ; even if there's a block, cycle out done quests - VilkasCurrentQuest.Stop() - if (VilkasNextQuest != None) - VilkasCurrentQuest = VilkasNextQuest - VilkasNextQuest = None - else - VilkasCurrentQuest = None - endif - endif - if (!RadiantSkjorBlock) - if (SkjorCurrentQuest && SkjorNextQuest && !SkjorCurrentQuest.IsAccepted) - ; current quest not accepted, and we have a good next choice lined up -- swap - SkjorCurrentQuest.Stop() - SkjorCurrentQuest = SkjorNextQuest - SkjorNextQuest = None - SkjorCurrentQuest.IsActive = True - elseif (SkjorCurrentQuest && SkjorCurrentQuest.Premature) - ; no better option, but we're trying to cycle out a prematurely ended quest, - ; so make it happen - SkjorCurrentQuest.Stop() - SkjorCurrentQuest = SkjorNextQuest - SkjorNextQuest = None - if (SkjorCurrentQuest != None) - SkjorCurrentQuest.IsActive = True - else - ; hope for the best at the next pick - endif - elseif (!SkjorCurrentQuest && SkjorNextQuest) - ; no current quest for whatever effed up reason, but got something in the - ; chamber, so fire. - SkjorCurrentQuest = SkjorNextQuest - SkjorNextQuest = None - SkjorCurrentQuest.IsActive = True - elseif (SkjorNextQuest && SkjorNextQuest != SkjorCurrentQuest) - ; I don't even know why this is here anymore, but it is. - SkjorNextQuest.Stop() - SkjorNextQuest = None - elseif (SkjorCurrentQuest && SkjorCurrentQuest.GetStage() >= 200) - ; in case something got stuck someplace, make sure this eventually - ; gets cycled out - SkjorCurrentQuest.Stop() - if (SkjorNextQuest != None) - SkjorCurrentQuest = SkjorNextQuest - SkjorNextQuest = None - SkjorCurrentQuest.IsActive = True - else - SkjorCurrentQuest = None - endif - endif - PickRadiantQuest(Skjor.GetActorReference()) - elseif (SkjorCurrentQuest && SkjorCurrentQuest.GetStage() >= 200) - ; even if there's a block, cycle out done quests - SkjorCurrentQuest.Stop() - if (SkjorNextQuest != None) - SkjorCurrentQuest = SkjorNextQuest - SkjorNextQuest = None - else - SkjorCurrentQuest = None - endif - endif - - - ; 77298: Fixing situation where next quests were flagged premature - ; and not cleared out before player was able to get at them. - if (AelaNextQuest != None && AelaNextQuest.Premature == True) - AelaNextQuest.Stop() - AelaNextQuest = None - endif - if (FarkasNextQuest != None && FarkasNextQuest.Premature == True) - FarkasNextQuest.Stop() - FarkasNextQuest = None - endif - if (VilkasNextQuest != None && VilkasNextQuest.Premature == True) - VilkasNextQuest.Stop() - VilkasNextQuest = None - endif - if (SkjorNextQuest != None && SkjorNextQuest.Premature == True) - SkjorNextQuest.Stop() - SkjorNextQuest = None - endif - ; END 77298 -EndFunction - -Function PickRadiantQuest(Actor questgiver) -; Debug.Trace("CRQ: Trying to pick radiant quest for " + questgiver) - - if (questgiver.IsDead()) -; Debug.Trace("CRQ: Questgiver " + questgiver + " is dead; skipping radiant selection.") - return - endif - - if (questgiver == Aela.GetActorReference()) - Keyword ark = AelaRadiantKeyword - if ( AelaInReconMode ) - ark = ReconRadiantKeyword - endif - ark.SendStoryEvent() - elseif (questgiver == Skjor.GetActorReference()) - SkjorRadiantKeyword.SendStoryEvent() - elseif (questgiver == Vilkas.GetActorReference()) - VilkasRadiantKeyword.SendStoryEvent() - elseif (questgiver == Farkas.GetActorReference()) - FarkasRadiantKeyword.SendStoryEvent() - endif -EndFunction - -Function RegisterRadiantQuest(CompanionsRadiantQuest newRadiant) - Actor qg = newRadiant.Questgiver.GetActorReference() - if (qg == None || newRadiant.IsRegistered) - return ; we'll register when the story event comes through - endif - -; Debug.Trace("CRQ: Registering radiant quest -- " + newRadiant + " with questgiver -- " + qg) - - if (qg == Aela.GetActorReference()) - if (AelaCurrentQuest == None) - AelaCurrentQuest = newRadiant - AelaCurrentQuest.IsActive = True - elseif (!AelaCurrentQuest.IsActive) - AelaCurrentQuest.Stop() - AelaCurrentQuest = newRadiant - AelaCurrentQuest.IsActive = True - else - if (AelaNextQuest != None) - AelaNextQuest.Stop() - endif - AelaNextQuest = newRadiant - endif - elseif (qg == Skjor.GetActorReference()) - if (SkjorCurrentQuest == None) - SkjorCurrentQuest = newRadiant - SkjorCurrentQuest.IsActive = True - elseif (!SkjorCurrentQuest.IsActive) - SkjorCurrentQuest.Stop() - SkjorCurrentQuest = newRadiant - SkjorCurrentQuest.IsActive = True - else - if (SkjorNextQuest != None) - SkjorNextQuest.Stop() - endif - SkjorNextQuest = newRadiant - endif - elseif (qg == Vilkas.GetActorReference()) - if (VilkasCurrentQuest == None) - VilkasCurrentQuest = newRadiant - VilkasCurrentQuest.IsActive = True - elseif (!VilkasCurrentQuest.IsActive) - VilkasCurrentQuest.Stop() - VilkasCurrentQuest = newRadiant - VilkasCurrentQuest.IsActive = True - else - if (VilkasNextQuest != None) - VilkasNextQuest.Stop() - endif - VilkasNextQuest = newRadiant - endif - elseif (qg == Farkas.GetActorReference()) - if (FarkasCurrentQuest == None) - FarkasCurrentQuest = newRadiant - FarkasCurrentQuest.IsActive = True - elseif (!FarkasCurrentQuest.IsActive) - FarkasCurrentQuest.Stop() - FarkasCurrentQuest = newRadiant - FarkasCurrentQuest.IsActive = True - else - if (FarkasNextQuest != None) - FarkasNextQuest.Stop() - endif - FarkasNextQuest = newRadiant - endif - endif - - newRadiant.IsRegistered = true -EndFunction - -Function AcceptRadiantQuest(Actor questgiver, bool comesAlong) -; Debug.Trace("C00: Accepting radiant quest for " + questgiver + " -- comes along? " + comesAlong) - RadiantQuestAccepted = True - RadiantMiscObjQuest.SetObjectiveDisplayed(10, false) - - bool reg = true - - if (comesAlong) - reg = false - endif - if (questgiver == Aela.GetReference()) - if (AelaInReconMode && !DoneReconQuestForAela) - reg = false - endif - endif - if (questgiver.IsInFaction(CurrentFollowerFaction)) - reg = false - endif - - if (reg) -; Debug.Trace("C00: Registering " + questgiver + " as radiant questgiver.") - RadiantQuestgiver.ForceRefTo(questgiver) - endif - - ShutdownRadiantQuests(questgiver) -EndFunction - -Function ShutdownRadiantQuests(Actor exception = None) -; Debug.Trace("CRQ: Shutting down radiant quests, excepting " + exception) - if (exception != Aela.GetActorReference()) - RadiantAelaBlock = True - if (AelaCurrentQuest != None) - AelaCurrentQuest.IsActive = False - endif - endif - if (exception != Skjor.GetActorReference()) - RadiantSkjorBlock = True - if (SkjorCurrentQuest != None) - SkjorCurrentQuest.IsActive = False - endif - endif - if (exception != Vilkas.GetActorReference()) - RadiantVilkasBlock = True - if (VilkasCurrentQuest != None) - VilkasCurrentQuest.IsActive = False - endif - endif - if (exception != Farkas.GetActorReference()) - RadiantFarkasBlock = True - if (FarkasCurrentQuest != None) - FarkasCurrentQuest.IsActive = False - endif - endif - -; Debug.Trace("CRQ: Ensuring shutdown -- " + RadiantAelaBlock + " " + RadiantSkjorBlock + " " + RadiantVilkasBlock + " " + RadiantFarkasBlock) -EndFunction - -Function ShutdownRadiantQuestsFor(Actor busy) -; Debug.Trace("CRQ: Shutting down radiant quests for " + busy) - if (busy == Aela.GetActorReference()) - RadiantAelaBlock = True - if (AelaCurrentQuest != None) - AelaCurrentQuest.IsActive = False - endif - elseif (busy == Skjor.GetActorReference()) - RadiantSkjorBlock = True - if (SkjorCurrentQuest != None) - SkjorCurrentQuest.IsActive = False - endif - elseif (busy == Vilkas.GetActorReference()) - RadiantVilkasBlock = True - if (VilkasCurrentQuest != None) - VilkasCurrentQuest.IsActive = False - endif - elseif (busy == Farkas.GetActorReference()) - RadiantFarkasBlock = True - if (FarkasCurrentQuest != None) - FarkasCurrentQuest.IsActive = False - endif - endif - -; Debug.Trace("CRQ: Ensuring shutdown -- " + RadiantAelaBlock + " " + RadiantSkjorBlock + " " + RadiantVilkasBlock + " " + RadiantFarkasBlock) -EndFunction - -Function ReOpenAllRadiantQuests() -; Debug.Trace("CRQ: Reopening radiant quests.") - if (!Aela.GetActorReference().IsDead()) - RadiantAelaBlock = False - endif - if (!Skjor.GetActorReference().IsDead()) - RadiantSkjorBlock = False - endif - if (!Vilkas.GetActorReference().IsDead()) - RadiantVilkasBlock = False - endif - if (!Farkas.GetActorReference().IsDead()) - RadiantFarkasBlock = False - endif - - if (AelaCurrentQuest != None) - AelaCurrentQuest.IsActive = True - endif - if (SkjorCurrentQuest != None) - SkjorCurrentQuest.IsActive = True - endif - if (VilkasCurrentQuest != None) - VilkasCurrentQuest.IsActive = True - endif - if (FarkasCurrentQuest != None) - FarkasCurrentQuest.IsActive = True - endif -EndFunction - -bool __reconKicked = false - -; One off to kick Aela's recon radiant quests post C03 -Function KickOffReconQuests() - ; make sure this only gets called once - if (__reconKicked) - return - endif - -; Debug.Trace("CRQ: Starting recon quest sequence.") - - ; make sure some threaded interloper doesn't mess with us - RadiantAelaBlock = true - - ; clear out her existing radiant stuff - if (AelaCurrentQuest) - AelaCurrentQuest.Stop() - AelaCurrentQuest = None - endif - if (AelaNextQuest) - AelaNextQuest.Stop() - AelaNextQuest = None - endif - - AelaInReconMode = true - - bool keepTrying = true - while (keepTrying) -; Debug.Trace("CRQ: Trying to start specific recon quest...") - if (ReconRadiantKeyword.SendStoryEventAndWait()) - keepTrying = false - else -; Debug.Trace("CRQ: Failed to start recon quest; trying again.") - Utility.Wait(0.5) - endif - endwhile - - ReconRadiantKeyword.SendStoryEvent() - - RadiantAelaBlock = false -EndFunction - -int function CompleteRadiantQuest(CompanionsRadiantQuest rq) -; Debug.Trace("CRQ: Completing radiant quest: " + rq) - bool success = rq.Succeeded - - ; store the questgiver for checking later in this function - Actor qg = rq.Questgiver.GetActorReference() - - if (success) - ; increment questgiver count - if (qg == Aela.GetActorReference()) - AelaQuests += 1 - elseif (qg == Skjor.GetActorReference()) - SkjorQuests += 1 - elseif (qg == Vilkas.GetActorReference()) - VilkasQuests += 1 - elseif (qg == Farkas.GetActorReference()) - FarkasQuests += 1 - endif - - ; increment overall radiant quest count - RadiantQuestsDone += 1 - RadiantQuestsDoneInCurrentSegment += 1 - endif - - ; pay the player (even if not successful, there might be a midway reward) - Game.GetPlayer().AddItem(GoldReward, rq.RewardAmount) - - ; Mr. Book: SHUT IT DOWN! - ; rq.Stop() - rq.IsAccepted = False ; so it can get cleared with the cycle - ReOpenAllRadiantQuests() - - if (rq == CR13 || rq == CR14) - if (qg == Farkas.GetReference()) -; Debug.Trace("CRQ CR13|CR14: Blocking Farkas...") - ShutdownRadiantQuestsFor(Farkas.GetActorReference()) - else -; Debug.Trace("CRQ CR13|CR14: Blocking Vilkas...") - ShutdownRadiantQuestsFor(Vilkas.GetActorReference()) - endif - endif - - CycleRadiantQuests() - - ; update favorite questgiver - FavoriteQuestgiver = 0 - int fqgCount = 0 - if (AelaQuests > fqgCount) - FavoriteQuestgiver = 1 - fqgCount = AelaQuests - endif - if (FarkasQuests > fqgCount) - FavoriteQuestgiver = 2 - fqgCount = FarkasQuests - endif - if (VilkasQuests > fqgCount) - FavoriteQuestgiver = 3 - fqgCount = VilkasQuests - endif - if (SkjorQuests > fqgCount) - FavoriteQuestgiver = 4 - fqgCount = SkjorQuests - endif - - ; check to see if it's time to start the next story quest - bool startedStory = False - if (C01.GetStage() < 1) - ; count - if (RadiantQuestsDoneInCurrentSegment >= RadiantQuestsUntilC01) - StartStoryQuest(C01) - startedStory = True - endif - elseif (C03.GetStage() < 1) - ; count - if (RadiantQuestsDoneInCurrentSegment >= RadiantQuestsUntilC03) - StartStoryQuest(C03) - startedStory = True - endif - elseif (C04.GetStage() < 1) - ; count, also min level - if ( (RadiantQuestsDoneInCurrentSegment >= RadiantQuestsUntilC04) && (Game.GetPlayer().GetLevel() >= C04MinLevel) ) - StartStoryQuest(C04) - startedStory = True - endif - endif - - ; reset tracking - if (!startedStory) - RadiantMiscObjQuest.SetObjectiveDisplayed(10, true) - endif - RadiantQuestAccepted = False - RadiantQuestFinished = False - RadiantQuestgiver.Clear() - - ; reset tracking number - if (startedStory) - RadiantQuestsDoneInCurrentSegment = 0 - endif - - ; return total radiant quests done for Companions - return RadiantQuestsDone -endFunction - -Actor function GetFavoriteQuestgiver() - ; Shane wants arrays. - if (FavoriteQuestgiver == 1) - return Aela.GetActorReference() - elseif (FavoriteQuestgiver == 2) - return Farkas.GetActorReference() - elseif (FavoriteQuestgiver == 3) - return Vilkas.GetActorReference() - elseif (FavoriteQuestgiver == 4) - return Skjor.GetActorReference() - endif - - ; We haven't done any radiant quests -- this should only happen when - ; starting a story quest manually for testing purposes. Randomly pick - ; a favorite in that case. - - ; Lazily odded to only return Aela and Farkas - int randomQGIndex = Utility.RandomInt(1, 4) - if (randomQGIndex == 1) - AelaIsObserver = true - return Aela.GetActorReference() - elseif (randomQGIndex == 2) - FarkasIsObserver = true - return Farkas.GetActorReference() - elseif (randomQGIndex == 3) - AelaIsObserver = true - return Aela.GetActorReference() - elseif (randomQGIndex == 4) - FarkasIsObserver = true - return Farkas.GetActorReference() - endif - - ; We absolutely should never get to this point in the function; - ; it's a bug if we do. Still making sure we return *something* - ; just in case, and complaining to the log. -; Debug.Trace("CSQ: ERROR: Somehow got to the bottom of GetFavoriteQuestGiver function (C00).") - return Skjor.GetActorReference() -endFunction - -function StartStoryQuest(CompanionsStoryQuest storyToStart) - CurrentStoryQuest = storyToStart -; Debug.Trace("CSQ: Starting story quest: " + CurrentStoryQuest) - storyToStart.SetStage(1) - StoryQuestIsRunning = True - RadiantMiscObjQuest.SetObjectiveDisplayed(10, false) -endFunction - -function CompleteStoryQuest(CompanionsStoryQuest storyToEnd) -; Debug.Trace("CSQ: Ending " + storyToEnd) - - storyToEnd.Teardown() - storyToEnd.Stop() - while(storyToEnd.IsRunning()) -; Debug.Trace("CSQ: Waiting for quest to end: " + storyToEnd) - Utility.Wait(0.5) - endwhile - - CurrentStoryQuest = None - StoryQuestIsRunning = False - if ( (storyToEnd != C03) && (storyToEnd != C04) && (storyToEnd != C05) ) - RadiantMiscObjQuest.SetObjectiveDisplayed(10, true) - endif - if (storyToEnd == C02) - OpenSkyforge() - endif -endFunction - -Function AddHarbingerPerks() - Aela.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Farkas.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Vilkas.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Athis.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Ria.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Njada.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) - Torvar.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 2) -EndFunction - -Function CurePlayer() -; Debug.Trace("WEREWOLF: Curing the player of lycanthropy.") - - ; turn you back if you're currently a werewolf - if (WerewolfChangeTrackingQuest.IsRunning() && WerewolfChangeTrackingQuest.GetStage() < 100) - WerewolfChangeTrackingQuest.SetStage(100) - endif - - ; take away spell and immunity - Game.GetPlayer().RemoveSpell(BeastForm) - Game.GetPlayer().RemoveSpell(WerewolfImmunity) - - ; FIX FOR 81462 - Game.GetPlayer().RemoveSpell(HircinesRingPower) - ; END FIX FOR 81462 - - ; you can't get into the Underforge anymore, either - TempUnderforgeAccess = false - PlayerHasBeastBlood = false - - ; Let everyone know you are no longer a werewolf - Game.GetPlayer().SendLycanthropyStateChanged(false) -EndFunction - - -Function Shutup(Actor toBeShut) - if (GenericDialogueSuppressor1.GetReference() == None) - GenericDialogueSuppressor1.ForceRefTo(toBeShut) - elseif (GenericDialogueSuppressor2.GetReference() == None) - GenericDialogueSuppressor2.ForceRefTo(toBeShut) - elseif (GenericDialogueSuppressor3.GetReference() == None) - GenericDialogueSuppressor3.ForceRefTo(toBeShut) - elseif (GenericDialogueSuppressor4.GetReference() == None) - GenericDialogueSuppressor4.ForceRefTo(toBeShut) - else -; Debug.Trace("C00: Can't shut anyone else up.") - endif -EndFunction - -Function UnShutup(Actor toBeUnShut) - if (GenericDialogueSuppressor1.GetReference() == toBeUnShut) - GenericDialogueSuppressor1.Clear() - elseif (GenericDialogueSuppressor2.GetReference() == toBeUnShut) - GenericDialogueSuppressor2.Clear() - elseif (GenericDialogueSuppressor3.GetReference() == toBeUnShut) - GenericDialogueSuppressor3.Clear() - elseif (GenericDialogueSuppressor4.GetReference() == toBeUnShut) - GenericDialogueSuppressor4.Clear() - else -; Debug.Trace("C00: " + toBeUnShut + " was never shut up.") - endif -EndFunction - -Function SwapFollowers() -; Debug.Trace("CSQ: Swapping followers.") - ; called when a story quest is assigning you a follower (C01, C03, C05, and C06) - ; so that you don't end up with too big of an entourage. - if (PlayerFollowerCount.GetValue() > 0) - FollowerScript.DismissFollower(2) - - ; Because the Dark Brotherhood does its own jimminess instead of - ; using the normal follower system, we have to dismiss manually. - if (DBScript.CiceroFollower == 1) - CiceroFollower.SetPlayerTeammate(false) - DBScript.CiceroFollower = 0 - DBScript.CiceroState = 1 - CiceroFollower.EvaluatePackage() - endif - - if (DBScript.Initiate1Follower == 1) - DBInitiateFollower1.SetPlayerTeammate(false) - DBScript.Initiate1Follower = 0 - DBScript.Initiate1State = 1 - DBInitiateFollower1.EvaluatePackage() - endif - - if (DBScript.Initiate2Follower == 1) - DBInitiateFollower2.SetPlayerTeammate(false) - DBScript.Initiate2Follower = 0 - DBScript.Initiate2State = 1 - DBInitiateFollower2.EvaluatePackage() - endif - endif - PlayerFollowerCount.SetValue(1) -EndFunction - -Function CleanupFollowerState() - PlayerFollowerCount.SetValue(0) -EndFunction diff --git a/source/scripts/companionsradiantquest.psc b/source/scripts/companionsradiantquest.psc deleted file mode 100644 index c04613c6..00000000 --- a/source/scripts/companionsradiantquest.psc +++ /dev/null @@ -1,82 +0,0 @@ -Scriptname CompanionsRadiantQuest extends Quest Conditional - -Quest Property ParentQuest auto -ReferenceAlias Property Questgiver auto -ReferenceAlias Property MapMarker auto -bool Property IsRegistered = false auto -bool Property QuestgiverComesAlong = false auto conditional -bool Property IsActive = false auto conditional -bool Property IsAccepted = false auto conditional -bool Property WasRejected = false auto conditional -int Property RewardAmount = 100 auto -bool Property Succeeded = false auto -bool Property Premature = false auto - - -; called when quest is first setup, but before player has accepted it -Function Setup() - ; default properties are supposed to handle most of these, but just in case.... - ; IsRegistered = false - ; QuestgiverComesAlong = false - ; IsActive = false - ; IsAccepted = false - ; WasRejected = false - ; Succeeded = false - ; Premature = false - - int level = Game.GetPlayer().GetLevel() - if (level < 10) - RewardAmount = 100 - elseif (level < 20) - RewardAmount = 150 - elseif (level < 20) - RewardAmount = 200 - elseif (level < 20) - RewardAmount = 250 - else - RewardAmount = 300 - endif - - (ParentQuest as CompanionsHousekeepingScript).RegisterRadiantQuest(self) - SetStage(1) -EndFunction - -; called when player accepts quest -Function Accepted() -; Debug.Trace("CRQ: Accepting " + self + ".") - (ParentQuest as CompanionsHousekeepingScript).AcceptRadiantQuest(Questgiver.GetActorReference(), QuestgiverComesAlong) - if ( (MapMarker != None) && (MapMarker.GetReference() != None) ) - MapMarker.GetReference().AddToMap() - endif - IsAccepted = True - SetStage(10) -EndFunction - -; when player turns down the quest -Function Rejected() -; Debug.Trace("CRQ: Rejecting " + self + ".") - WasRejected = True -EndFunction - -; when player has finished quest, but not yet collected reward -Function Finished(bool _succeeded = true, bool _finished = true) -; Debug.Trace("CRQ: Finishing " + self + "; succeeded? " + _succeeded) - Succeeded = _succeeded - (ParentQuest as CompanionsHousekeepingScript).RadiantQuestFinished = _finished -EndFunction - -; when the quest is shutting down -Function Cleanup() - if (!Premature) - (ParentQuest as CompanionsHousekeepingScript).CompleteRadiantQuest(self) - endif -EndFunction - -; for when the player kills someone before they accepted the quest, etc -Function PrematureShutdown() -; Debug.Trace("CRQ: Shutting down " + self + "prematurely...") - IsAccepted = false - Premature = true - (ParentQuest as CompanionsHousekeepingScript).CycleRadiantQuests() - Cleanup() -EndFunction diff --git a/source/scripts/companionsstoryquest.psc b/source/scripts/companionsstoryquest.psc deleted file mode 100644 index e6b432d6..00000000 --- a/source/scripts/companionsstoryquest.psc +++ /dev/null @@ -1,43 +0,0 @@ -Scriptname CompanionsStoryQuest extends Quest - -Quest Property CentralQuest auto -CompanionsStoryQuest Property PreviousQuest auto -CompanionsStoryQuest Property NextQuest auto - -; called when we're testing the quest and want to create its preconditions -; note that stage 1 will be set at the end of it -Function Setup() -; Debug.Trace("CSQ: Calling setup for " + self) - - CompanionsHousekeepingScript chs = (CentralQuest as CompanionsHousekeepingScript) - - if (PreviousQuest != None) - if (PreviousQuest.IsRunning() == false) - if (PreviousQuest.GetStageDone(1) == false) - PreviousQuest.SetStage(0) - endif -; Debug.Trace("CSQ: Setting stage 200 on " + PreviousQuest) - PreviousQuest.SetStage(200) - endif - endif - - ; Game.GetPlayer().AddToFaction(chs.CompanionsFaction) - if (!CentralQuest.GetStageDone(150)) - if (!CentralQuest.GetStageDone(100)) - CentralQuest.SetStage(100) - endif - CentralQuest.SetStage(150) - CentralQuest.CompleteQuest() - endif - chs.StartStoryQuest(self) ; sets stage 1 -EndFunction - -; called at stage 1 to do any real setup -Function Init() -; Debug.Trace("CSQ: Calling init for " + self) -EndFunction - -; called with stage 200 to do any necessary teardown (de-essentializing people, etc.) -Function Teardown() -; Debug.Trace("CSQ: Calling teardown for " + self) -EndFunction diff --git a/source/scripts/cr04questscript.psc b/source/scripts/cr04questscript.psc deleted file mode 100644 index a8475fae..00000000 --- a/source/scripts/cr04questscript.psc +++ /dev/null @@ -1,23 +0,0 @@ -Scriptname CR04QuestScript extends CompanionsRadiantQuest Conditional - -ReferenceAlias Property Brute auto -ReferenceAlias Property BruteActivated auto -ReferenceAlias Property FavorDialogueOpponent_Remote auto ; on DialogueFavorGeneric - -Function Accepted() - FavorDialogueOpponent_Remote.ForceRefTo(Brute.GetRef()) - BruteActivated.ForceRefTo(Brute.GetRef()) - parent.Accepted() -EndFunction - -Function CheckIntimidate(Actor opponent) -; Debug.Trace("CRQ CR04: Opponent: " + opponent + "; Brute: " + BruteActivated.GetReference()) - if (BruteActivated.GetReference() == opponent) - SetStage(20) - endif -EndFunction - -Function Cleanup() - FavorDialogueOpponent_Remote.Clear() - parent.Cleanup() -EndFunction diff --git a/source/scripts/crimeguardsscript.psc b/source/scripts/crimeguardsscript.psc index e4fc3013..1e03790e 100644 --- a/source/scripts/crimeguardsscript.psc +++ b/source/scripts/crimeguardsscript.psc @@ -1,10 +1,5 @@ ScriptName CrimeGuardsScript extends Quest -ObjectReference Property CidhnaMineDoorA Auto -ObjectReference Property CidhnaMineDoorB Auto -ObjectReference Property CidhnaMineDoorLeverA Auto -ObjectReference Property CidhnaMineDoorLeverB Auto -Quest Property CidhnaMineJailEventScene Auto GlobalVariable Property GameDaysPassed Auto GlobalVariable Property pCrimeGuildDisc Auto FavorDialogueScript Property FavorScript Auto @@ -14,15 +9,6 @@ Faction Property pCrimeHaafingar Auto Faction Property pCrimeEastmarch Auto Faction Property pCrimeWhiterun Auto -Function SetupCidhnaMine() - - If CidhnaMineJailEventScene.GetStageDone(10) == 0 -; debug.Trace("Running the Cidhna Mine intro scene") - CidhnaMineJailEventScene.SetStage(10) - EndIf - -EndFunction - Function GuildDiscount(Actor pGuard) if pGuard.GetCrimeFaction() == pCrimeReach diff --git a/source/scripts/favordialoguescript.psc b/source/scripts/favordialoguescript.psc index 66bd99fd..f9c2b1e6 100644 --- a/source/scripts/favordialoguescript.psc +++ b/source/scripts/favordialoguescript.psc @@ -21,12 +21,6 @@ MiscObject Property Gold Auto Keyword Property BrawlKeyword Auto {used for brawl story event} -CompanionsRadiantQuest Property CR04 Auto -{One of the Companions quests cares about intimidating someone specific} - -ReferenceAlias Property MS10Stig Auto -{MS10 needs to be told after intimidating Stig} - float Property SkillUsePersuade Auto Conditional {skill uses for flatter (magnitude for AdvanceSkill)} @@ -110,20 +104,8 @@ Function Intimidate(Actor pTarget) ; intimidate actor pTarget.SetIntimidated() ; give player skill uses. don't if the Brawl quest is running, don't track intimidation stats for Brawl - If DGintimidateQuest.IsRunning() == False - AdvanceSkill("Speechcraft", SkillUseIntimidate) - Game.IncrementStat( "Intimidations" ) - if ( Game.QueryStat( "Persuasions" ) && Game.QueryStat( "Bribes" ) ) - Game.AddAchievement(28) - endif - EndIf + Game.IncrementStat( "Intimidations" ) - if ( CR04.IsRunning() && (10 == CR04.GetStage()) ) - (CR04 as CR04QuestScript).CheckIntimidate(pTarget) - endif - if (pTarget == MS10Stig.GetActorReference()) - (MS10Stig.GetOwningQuest() as MS10QuestScript).GetErDoneWithStig() - endif endFunction ; call this to initiate brawl quest through story manager @@ -145,8 +127,3 @@ Function GiveGift(Actor pTarget) trace("Give Gift: " + favorPointsEarned * SkillUseGiveGiftMult + " skill uses earned") AdvanceSkill("Speechcraft", favorPointsEarned * SkillUseGiveGiftMult) endFunction - - -Quest Property DGIntimidateQuest Auto - - diff --git a/source/scripts/playerwerewolfchangescript.psc b/source/scripts/playerwerewolfchangescript.psc deleted file mode 100644 index ebbbd9a2..00000000 --- a/source/scripts/playerwerewolfchangescript.psc +++ /dev/null @@ -1,478 +0,0 @@ -Scriptname PlayerWerewolfChangeScript extends Quest - -float Property StandardDurationSeconds auto -{How long (in real seconds) the transformation lasts} - -float Property DurationWarningTimeSeconds auto -{How long (in real seconds) before turning back we should warn the player} - -float Property FeedExtensionTimeSeconds auto -{How long (in real seconds) that feeding extends werewolf time} - -VisualEffect property FeedBloodVFX auto -{Visual Effect on Wolf for Feeding Blood} - -Race Property WerewolfBeastRace auto -ObjectReference Property LycanStash auto -Perk Property PlayerWerewolfFeed auto - -Faction Property PlayerWerewolfFaction auto -Faction Property WerewolfFaction auto - -Message Property PlayerWerewolfExpirationWarning auto -Message Property PlayerWerewolfFeedMessage auto -GlobalVariable Property GameDaysPassed auto -GlobalVariable Property TimeScale auto -GlobalVariable Property PlayerWerewolfShiftBackTime auto - -ImageSpaceModifier Property WerewolfWarn auto -ImageSpaceModifier Property WerewolfChange auto - -Race Property WerewolfRace auto -Sound Property NPCWerewolfTransformation auto -Sound Property WerewolfIMODSound auto -Idle Property WerewolfTransformBack auto -Idle Property SpecialFeeding auto - -Quest Property CompanionsTrackingQuest auto -Quest Property C03Rampage auto - -Shout Property CurrentHowl auto -WordOfPower Property CurrentHowlWord1 auto -WordOfPower Property CurrentHowlWord2 auto -WordOfPower Property CurrentHowlWord3 auto - -Spell Property PlayerWerewolfLvl10AndBelowAbility auto -Spell Property PlayerWerewolfLvl15AndBelowAbility auto -Spell Property PlayerWerewolfLvl20AndBelowAbility auto -Spell Property PlayerWerewolfLvl25AndBelowAbility auto -Spell Property PlayerWerewolfLvl30AndBelowAbility auto -Spell Property PlayerWerewolfLvl35AndBelowAbility auto -Spell Property PlayerWerewolfLvl40AndBelowAbility auto -Spell Property PlayerWerewolfLvl45AndBelowAbility auto -Spell Property PlayerWerewolfLvl50AndOverAbility auto - -Spell Property FeedBoost auto -Spell property BleedingFXSpell auto -{This Spell is for making the target of feeding bleed.} - -Armor Property WolfSkinFXArmor auto - -bool Property Untimed auto - -FormList Property CrimeFactions auto -FormList Property WerewolfDispelList auto - -float __durationWarningTime = -1.0 -float __feedExtensionTime = -1.0 -float __gorgeExtensionTime = -1.0 -bool __tryingToShiftBack = false -bool __shiftingBack = false -bool __shuttingDown = false -bool __trackingStarted = false - -float Function RealTimeSecondsToGameTimeDays(float realtime) - float scaledSeconds = realtime * TimeScale.Value - return scaledSeconds / (60 * 60 * 24) -EndFunction - -float Function GameTimeDaysToRealTimeSeconds(float gametime) - float gameSeconds = gametime * (60 * 60 * 24) - return (gameSeconds / TimeScale.Value) -EndFunction - -Function PrepShift() -; Debug.Trace("WEREWOLF: Prepping shift...") - Actor player = Game.GetPlayer() - - ; sets up the UI restrictions - Game.SetBeastForm(True) - Game.EnableFastTravel(False) - - ; set up perks/abilities - ; (don't need to do this anymore since it's on from gamestart) - ; Game.GetPlayer().AddPerk(PlayerWerewolfFeed) - - ; screen effect - WerewolfChange.Apply() - WerewolfIMODSound.Play(Game.GetPlayer()) - - ; get rid of your summons - int count = 0 - while (count < WerewolfDispelList.GetSize()) - Spell gone = WerewolfDispelList.GetAt(count) as Spell - if (gone != None) - Game.GetPlayer().DispelSpell(gone) - endif - count += 1 - endwhile - - - Game.DisablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = true, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1) - Game.ForceThirdPerson() - Game.ShowFirstPersonGeometry(false) -EndFunction - -Function InitialShift() -; Debug.Trace("WEREWOLF: Player beginning transformation.") - - WerewolfWarn.Apply() - - if (Game.GetPlayer().IsDead()) -; Debug.Trace("WEREWOLF: Player is dead; bailing out.") - return - endif - - ; actual switch - Game.GetPlayer().SetRace(WerewolfBeastRace) -EndFunction - -Function StartTracking() - if (__trackingStarted) - return - endif - - __trackingStarted = true - -; Debug.Trace("WEREWOLF: Race swap done; starting tracking and effects.") - - ; take all the player's stuff (since he/she can't use it anyway) - ; Game.GetPlayer().RemoveAllItems(LycanStash) - Game.GetPlayer().UnequipAll() - Game.GetPlayer().EquipItem(WolfSkinFXArmor, False, True) - - ;Add Blood Effects - ;FeedBloodVFX.Play(Game.GetPlayer()) - - ; make everyone hate you - Game.GetPlayer().SetAttackActorOnSight(true) - - ; alert anyone nearby that they should now know the player is a werewolf - Game.SendWereWolfTransformation() - - Game.GetPlayer().AddToFaction(PlayerWerewolfFaction) - Game.GetPlayer().AddToFaction(WerewolfFaction) - int cfIndex = 0 - while (cfIndex < CrimeFactions.GetSize()) -; Debug.Trace("WEREWOLF: Setting enemy flag on " + CrimeFactions.GetAt(cfIndex)) - (CrimeFactions.GetAt(cfIndex) as Faction).SetPlayerEnemy() - cfIndex += 1 - endwhile - - ; but they also don't know that it's you - Game.SetPlayerReportCrime(false) - - ; recalc times - __durationWarningTime = RealTimeSecondsToGameTimeDays(DurationWarningTimeSeconds) - __feedExtensionTime = RealTimeSecondsToGameTimeDays(FeedExtensionTimeSeconds) - __gorgeExtensionTime = RealTimeSecondsToGameTimeDays(DLC1GorgingDurationSeconds) - - ; unequip magic - Spell left = Game.GetPlayer().GetEquippedSpell(0) - Spell right = Game.GetPlayer().GetEquippedSpell(1) - Spell power = Game.GetPlayer().GetEquippedSpell(2) - Shout voice = Game.GetPlayer().GetEquippedShout() - if (left != None) - Game.GetPlayer().UnequipSpell(left, 0) - endif - if (right != None) - Game.GetPlayer().UnequipSpell(right, 1) - endif - if (power != None) - ; some players are overly clever and sneak a power equip between casting - ; beast form and when we rejigger them there. this will teach them. -; Debug.Trace("WEREWOLF: " + power + " was equipped; removing.") - Game.GetPlayer().UnequipSpell(power, 2) - else -; Debug.Trace("WEREWOLF: No power equipped.") - endif - if (voice != None) - ; same deal here, but for shouts -; Debug.Trace("WEREWOLF: " + voice + " was equipped; removing.") - Game.GetPlayer().UnequipShout(voice) - else -; Debug.Trace("WEREWOLF: No shout equipped.") - endif - - ; but make up for it by giving you the sweet howl - 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) - Game.GetPlayer().AddShout(CurrentHowl) - Game.GetPlayer().EquipShout(CurrentHowl) - - ; and some rad claws - int playerLevel = Game.GetPlayer().GetLevel() - if (playerLevel <= 10) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl10AndBelowAbility, false) - elseif (playerLevel <= 15) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl15AndBelowAbility, false) - elseif (playerLevel <= 20) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl20AndBelowAbility, false) - elseif (playerLevel <= 25) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl25AndBelowAbility, false) - elseif (playerLevel <= 30) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl30AndBelowAbility, false) - elseif (playerLevel <= 35) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl35AndBelowAbility, false) - elseif (playerLevel <= 40) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl40AndBelowAbility, false) - elseif (playerLevel <= 45) - Game.GetPlayer().AddSpell(PlayerWerewolfLvl45AndBelowAbility, false) - else - Game.GetPlayer().AddSpell(PlayerWerewolfLvl50AndOverAbility, false) - endif - - ; calculate when the player turns back into a pumpkin - float currentTime = GameDaysPassed.GetValue() - float regressTime = currentTime + RealTimeSecondsToGameTimeDays(StandardDurationSeconds) - PlayerWerewolfShiftBackTime.SetValue(regressTime) -; Debug.Trace("WEREWOLF: Current day -- " + currentTime) -; Debug.Trace("WEREWOLF: Player will turn back at day " + regressTime) - - ; increment stats - Game.IncrementStat("Werewolf Transformations") - - ; set us up to check when we turn back - RegisterForUpdate(5) - - SetStage(10) ; we're done with the transformation handling -EndFunction - - -Event OnUpdate() - if (Untimed) - return - endif -; Debug.Trace("WEREWOLF: NumWerewolfPerks = " + Game.QueryStat("NumWerewolfPerks")) - if Game.QueryStat("NumWerewolfPerks") >= DLC1WerewolfMaxPerks.Value -; debug.trace("WEREWOLF: achievement granted") - Game.AddAchievement(57) - endif - - float currentTime = GameDaysPassed.GetValue() - float regressTime = PlayerWerewolfShiftBackTime.GetValue() - - if ( (currentTime >= regressTime) && (!Game.GetPlayer().IsInKillMove()) && !__tryingToShiftBack ) - UnregisterForUpdate() - SetStage(100) ; time to go, buddy - return - endif - - if (currentTime >= regressTime - __durationWarningTime) - if (GetStage() == 10) - SetStage(20) ; almost there - return - endif - endif - -; Debug.Trace("WEREWOLF: Checking, still have " + GameTimeDaysToRealTimeSeconds(regressTime - currentTime) + " seconds to go.") -EndEvent - -Function SetUntimed(bool untimedValue) - Untimed = untimedValue - if (Untimed) - UnregisterForUpdate() - endif -EndFunction - -; called from stage 11 -Function Feed(Actor victim) -; Debug.Trace("WEREWOLF: start newShiftTime = " + GameTimeDaysToRealTimeSeconds(PlayerWerewolfShiftBackTime.GetValue()) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime)) - float newShiftTime = PlayerWerewolfShiftBackTime.GetValue() + __feedExtensionTime / 2 - if victim.HasKeyword(ActorTypeNPC) - newShiftTime =newShiftTime + __feedExtensionTime / 2 -; Debug.Trace("WEREWOLF: victim is NPC") - endif -; Debug.Trace("WEREWOLF: default newShiftTime = " + GameTimeDaysToRealTimeSeconds(newShiftTime) + ", __feedExtensionTime = " + GameTimeDaysToRealTimeSeconds(__feedExtensionTime)) - if Game.GetPlayer().HasPerk(DLC1GorgingPerk) == 1 - newShiftTime = newShiftTime + __GorgeExtensionTime / 2 - if victim.HasKeyword(ActorTypeNPC) - newShiftTime = newShiftTime + __GorgeExtensionTime / 2 - endif - endif - Game.GetPlayer().PlayIdle(SpecialFeeding) - - ;This is for adding a spell that simulates bleeding - BleedingFXSpell.Cast(victim,victim) - - if (!C03Rampage.IsRunning()) - PlayerWerewolfShiftBackTime.SetValue(newShiftTime) - PlayerWerewolfFeedMessage.Show() - FeedBoost.Cast(Game.GetPlayer()) - ; victim.SetActorValue("Variable08", 100) -; Debug.Trace("WEREWOLF: Player feeding -- new regress day is " + newShiftTime) - endif - SetStage(10) -EndFunction - - -; called from stage 20 -Function WarnPlayer() -; Debug.Trace("WEREWOLF: Player about to transform back.") - WerewolfWarn.Apply() -EndFunction - - -; called from stage 100 -Function ShiftBack() - __tryingToShiftBack = true - - while (Game.GetPlayer().GetAnimationVariableBool("bIsSynced")) -; Debug.Trace("WEREWOLF: Waiting for synced animation to finish...") - Utility.Wait(0.1) - endwhile -; Debug.Trace("WEREWOLF: Sending transform event to turn player back to normal.") - - __shiftingBack = false - ; RegisterForAnimationEvent(Game.GetPlayer(), "TransformToHuman") - ; Game.GetPlayer().PlayIdle(WerewolfTransformBack) - ; Utility.Wait(10) - ActuallyShiftBackIfNecessary() -EndFunction - -Event OnAnimationEvent(ObjectReference akSource, string asEventName) - if (asEventName == "TransformToHuman") - ActuallyShiftBackIfNecessary() - endif -EndEvent - -Function ActuallyShiftBackIfNecessary() - if (__shiftingBack) - return - endif - - __shiftingBack = true - -; Debug.Trace("WEREWOLF: Player returning to normal.") - - Game.SetInCharGen(true, true, false) - - UnRegisterForAnimationEvent(Game.GetPlayer(), "TransformToHuman") - UnRegisterForUpdate() ; just in case - - if (Game.GetPlayer().IsDead()) -; Debug.Trace("WEREWOLF: Player is dead; bailing out.") - return - endif - - ;Remove Blood Effects - ;FeedBloodVFX.Stop(Game.GetPlayer()) - - ; imod - WerewolfChange.Apply() - WerewolfIMODSound.Play(Game.GetPlayer()) - - ; get rid of your summons if you have any - int count = 0 - while (count < WerewolfDispelList.GetSize()) - Spell gone = WerewolfDispelList.GetAt(count) as Spell - if (gone != None) -; Debug.Trace("WEREWOLF: Dispelling " + gone) - Game.GetPlayer().DispelSpell(gone) - endif - count += 1 - endwhile - - ; make sure the transition armor is gone. We RemoveItem here, because the SetRace stored all equipped items - ; at that time, and we equip this armor prior to setting the player to a beast race. When we switch back, - ; if this were still in the player's inventory it would be re-equipped. - Game.GetPlayer().RemoveItem(WolfSkinFXArmor, 1, True) - - ; clear out perks/abilities - ; (don't need to do this anymore since it's on from gamestart) - ; Game.GetPlayer().RemovePerk(PlayerWerewolfFeed) - - ; make sure your health is reasonable before turning you back - ; Game.GetPlayer().GetActorBase().SetInvulnerable(true) - Game.GetPlayer().SetGhost() - float currHealth = Game.GetPlayer().GetAV("health") - if (currHealth <= 101) -; Debug.Trace("WEREWOLF: Player's health is only " + currHealth + "; restoring.") - Game.GetPlayer().RestoreAV("health", 101 - currHealth) - endif - - ; change you back -; Debug.Trace("WEREWOLF: Setting race " + (CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace + " on " + Game.GetPlayer()) - Game.GetPlayer().SetRace((CompanionsTrackingQuest as CompanionsHousekeepingScript).PlayerOriginalRace) - ; release the player controls -; Debug.Trace("WEREWOLF: Restoring camera controls") - Game.EnablePlayerControls(abMovement = false, abFighting = false, abCamSwitch = true, abLooking = false, abSneaking = false, abMenu = false, abActivate = false, abJournalTabs = false, aiDisablePOVType = 1) - Game.ShowFirstPersonGeometry(true) - - ; no more howling for you - Game.GetPlayer().UnequipShout(CurrentHowl) - Game.GetPlayer().RemoveShout(CurrentHowl) - - ; or those claws - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl10AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl15AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl20AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl25AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl30AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl35AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl40AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl45AndBelowAbility) - Game.GetPlayer().RemoveSpell(PlayerWerewolfLvl50AndOverAbility) - - ; gimme back mah stuff - ; LycanStash.RemoveAllItems(Game.GetPlayer()) - - ; people don't hate you no more - Game.GetPlayer().SetAttackActorOnSight(false) - Game.GetPlayer().RemoveFromFaction(PlayerWerewolfFaction) - Game.GetPlayer().RemoveFromFaction(WerewolfFaction) - int cfIndex = 0 - while (cfIndex < CrimeFactions.GetSize()) -; Debug.Trace("WEREWOLF: Removing enemy flag from " + CrimeFactions.GetAt(cfIndex)) - (CrimeFactions.GetAt(cfIndex) as Faction).SetPlayerEnemy(false) - cfIndex += 1 - endwhile - - ; and you're now recognized - Game.SetPlayerReportCrime(true) - - ; alert anyone nearby that they should now know the player is a werewolf - Game.SendWereWolfTransformation() - - ; give the set race event a chance to come back, otherwise shut us down - Utility.Wait(5) - Shutdown() -EndFunction - -Function 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() -EndFunction - -Float Property DLC1GorgingDurationSeconds Auto - -Perk Property DLC1GorgingPerk Auto - -Perk Property DLC1SavageFeedingPerk Auto - -Keyword Property ActorTypeNPC Auto - -Perk Property DLC1AnimalVigor Auto - -GlobalVariable Property DLC1WerewolfTotalPerksEarned Auto - -GlobalVariable Property DLC1WerewolfMaxPerks Auto diff --git a/source/scripts/werewolfchangeeffectscript.psc b/source/scripts/werewolfchangeeffectscript.psc index feac8cfc..cae27eec 100644 --- a/source/scripts/werewolfchangeeffectscript.psc +++ b/source/scripts/werewolfchangeeffectscript.psc @@ -1,41 +1,8 @@ Scriptname WerewolfChangeEffectScript extends ActiveMagicEffect {Scripted effect for the werewolf change} - - -;======================================================================================; -; PROPERTIES / -;=============/ - -Quest Property PlayerWerewolfQuest auto -Quest Property C00 auto - Spell Property VFXSpell auto - -;======================================================================================; -; EVENTS / -;=============/ - Event OnEffectStart(Actor Target, Actor Caster) -; Debug.Trace("WEREWOLF: Casting transformation spell on " + Target) - - ; set up tracking - if (Target == Game.GetPlayer()) -; Debug.Trace("WEREWOLF: Target is player.") - ; if this is the first time, don't actually do anything (transform handled in rampage script) - if ( (C00 as CompanionsHousekeepingScript).PlayerIsWerewolfVirgin ) -; Debug.Trace("WEREWOLF: Player's first time; bailing out.") - (C00 as CompanionsHousekeepingScript).PlayerIsWerewolfVirgin = false - Game.SetBeastForm(False) - return - endif - -; Debug.Trace("WEREWOLF: Starting player tracking.") - - PlayerWerewolfQuest.Start() - endif - VFXSpell.Cast(Target) EndEvent - diff --git a/source/scripts/werewolftransformvisual.psc b/source/scripts/werewolftransformvisual.psc index 48f31fd2..2dd33aed 100644 --- a/source/scripts/werewolftransformvisual.psc +++ b/source/scripts/werewolftransformvisual.psc @@ -9,8 +9,6 @@ Sound Property NPCWerewolfTransformation auto Sound Property NPCWerewolfTransformationB2D auto Sound Property NPCWerewolfTransformationB3D auto -Quest Property PlayerWerewolfQuest auto - Event OnEffectStart(Actor Target, Actor Caster) ; Debug.Trace("WEREWOLF: Starting change anim...") @@ -43,21 +41,12 @@ Function TransformIfNecessary(Actor Target) Race currRace = Target.GetRace() if (currRace != WerewolfRace) ; Debug.Trace("WEREWOLF: VISUAL: Setting race " + WerewolfRace + " on " + Target) - if (Target != Game.GetPlayer()) -; Debug.Trace("WEREWOLF: VISUAL: Target is not player, doing the transition here.") - Target.SetRace(WerewolfRace) ;TEEN WOLF - - ; Remove the transformation effect armor if he/she has it on. - if (Target.GetItemCount(WolfSkinFXArmor) > 0) - (Target.Removeitem(WolfSkinFXArmor, 1, True, none)) - endif - else - CompanionsHousekeepingScript chs = (PlayerWerewolfQuest as PlayerWerewolfChangeScript).CompanionsTrackingQuest as CompanionsHousekeepingScript - if (chs.PlayerOriginalRace == None) - chs.PlayerOriginalRace = currRace - endif - PlayerWerewolfQuest.SetStage(1) - endif + Target.SetRace(WerewolfRace) ;TEEN WOLF + + ; Remove the transformation effect armor if he/she has it on. + if (Target.GetItemCount(WolfSkinFXArmor) > 0) + (Target.Removeitem(WolfSkinFXArmor, 1, True, none)) + endif endif EndFunction