SCTX |
scn SE14Script
;this script will handle the post-quest activities
;related object with scripts include SE14Dancer and any creatures and guards that are added during the attacks
;creatures will be given SE14AttackCountScript from their template creatures
;guards are given the SE14Guard script from template
;SE14RezSpell handles the Sheogorath's Protection spell
float fquestdelaytime
short doOnce
;these variables are for the entertainers
short getdancers
short bownow
short dancenow
;these variables are for the settlement attacks
short attacking
short deepwallowattack
short fellmoorattack
short haleattack
short highcrossattack
short splitattack
short gatesattack
short deadcount
short sendguards
short attackstart
short loadinVAR
;these variables are used for the DS/GS escort -- 0==no escort, 1==follow, 2==wait
short DSescortOn
short GSescortOn
Begin GameMode
if ( doOnce == 0 )
set fQuestDelayTime to 0.5
set doOnce to 1
endif
if ( attacking == 1 ) ;this checks that the player has killed all of the creatures attacking the settlement
if ( deadcount >= 5 )
Message "The attacks on this settlement have been quelled."
set attacking to -1
endif
endif
if ( attacking == 1 ) && ( deadcount < 5 ) && ( player.GetInCell SENSCastleSheogorath == 1 )
if ( GameDaysPassed >= ( attackstart + 3 ) )
set attacking to 0
set deadcount to 0
set deepwallowattack to 0
set fellmoorattack to 0
set haleattack to 0
set highcrossattack to 0
set splitattack to 0
set gatesattack to 0
set deadcount to 0
set loadinVAR to 0
endif
endif
;this resets the variable to allow the quest to be done repeatedly
if ( attacking == -1 )
set deepwallowattack to 0
set fellmoorattack to 0
set haleattack to 0
set highcrossattack to 0
set splitattack to 0
set gatesattack to 0
set deadcount to 0
set loadinVAR to 0
endif
;all of the following blocks move creature and guards to the appropriate settlement
if ( deepwallowattack == 1 ) && ( loadinVAR == 1 )
set attackstart to GameDaysPassed
SE14DeepwallowMarker.PlaceAtMe SE14CreatureAttackList 5
set deepwallowattack to -1
set attacking to 1
ShowMap SEDeepwallowMapMarker
if ( sendguards == 1 )
SE14DeepwallowMarker.PlaceAtMe SE14DSFemaleMelee 4
set sendguards to 2
endif
endif
if ( fellmoorattack == 1 ) && ( loadinVAR == 1 )
set attackstart to GameDaysPassed
SE14FellmoorMarker.PlaceAtMe SE14CreatureAttackList 5
set fellmoorattack to -1
set attacking to 1
ShowMap SEFellmoorMapMarker
if ( sendguards == 1 )
SE14FellmoorMarker.PlaceAtMe SE14DSFemaleMelee 4
set sendguards to 2
endif
endif
if ( haleattack == 1 ) && ( loadinVAR == 1 )
set attackstart to GameDaysPassed
SE14HaleMarker.PlaceAtMe SE14CreatureAttackList 5
set haleattack to -1
set attacking to 1
ShowMap SEHaleMapMarker
if ( sendguards == 1 )
SE14HaleMarker.PlaceAtMe SE14GSFemaleMelee 4
set sendguards to 2
endif
endif
if ( highcrossattack == 1 ) && ( loadinVAR == 1 )
set attackstart to GameDaysPassed
SE14HighcrossMarker.PlaceAtMe SE14CreatureAttackList 5
set highcrossattack to -1
set attacking to 1
ShowMap SEHighCrossTownCenter
if ( sendguards == 1 )
SE14HighcrossMarker.PlaceAtMe SE14GSFemaleMelee 4
set sendguards to 2
endif
endif
if ( splitattack == 1 ) && ( loadinVAR == 1 )
set attackstart to GameDaysPassed
SE14SplitMarker.PlaceAtMe SE14CreatureAttackList 5
set splitattack to -1
set attacking to 1
ShowMap SESplitMapMarker
if ( sendguards == 1 )
SE14SplitMarker.PlaceAtMe SE14GSFemaleMelee 4
set sendguards to 2
endif
endif
if ( gatesattack == 1 )
set attackstart to GameDaysPassed
if ( player.GetInWorldSpace SETheFringe == 1 ) ;added to handle odd worldspace issues
SE14PasswallAttackMarkerREF.PlaceAtMe SE14AdventurerAttackList 5
set gatesattack to -1
endif
set attacking to 1
endif
End |