Oblivion Game Data

Select game:

Search:

Select a record type:

ND03QuestScript (0xKN000da4)

  • Record Type: SCPT
  • Editor ID: ND03QuestScript
  • Form ID: 0xKN000da4
  • Source File: Knights.esp.mod
  • Patch Status: FormID has not been modified.
Parameter Value
SCTX
ScriptName ND03QuestScript

;handles all quest variables and scripting for ND03

Ref ActiveBearRef


short BearActive
short Clear
short TalkedtoAvita		;flag set in dialogue so she doesn't repeat herself
short DayFinished			

short TestFailed			;set when player fails the test or walks away
short TestActive			;set when test becomes active, even after failing
short Stage20Reset		;set for journal update if player fails and restarts

short TestHour				;set to game hour when test starts; used for failure state in case of waiting

Begin GameMode

;Update quest stage the first time the player arrives at the grove (so he knows he's in the right place and he needs to stay put)

	if ( GetStage ND03 == 20 )
		if ( Player.GetDistance ND03GroveMarker < 400 )
			SetStage ND03 21
			return
		endif
	endif

;When player arrives at grove, enable bear 
;Treat each occurence as if the player has already been there, to account for both scenarios



	if ( GetStage ND03 >= 21 )
		if ( TestActive == 1 )
			if ( BearActive == 1 )
				if ( Player.GetDistance ND03GroveMarker < 900 )
	
					;Resurrect Bear to reset his health
	
					ND03BearRef.Resurrect
					
					;Move Bear to marker in case he was disabled elsewhere
	
					ND03BearRef.moveto ND03BearMarker
	
					;Enable and update
					ND03BearRef.Enable
					set TestHour to GameHour
					set BearActive to 2	
					ND03BearMarker.PlaySound AMBBearDistant2D
				endif
			elseif ( BearActive == 2 )
			endif
		endif
	endif

	if ( TestHour < 23 )
		if ( TestHour + 1 < GameHour )
			if ( GetStage ND05 < 50 )
				if ( BearActive >= 2 )
					if ( ND03BearRef.IsInCombat == 0 )
						ND03BearRef.StartCombat Player
					endif
				endif
			endif
		endif		
	else
		if ( GameHour < 23 )
			if ( GetStage ND05 < 50 )
				if ( BearActive >= 2 )
					if ( ND03BearRef.IsInCombat == 0 )
						ND03BearRef.StartCombat Player
					endif
				endif
			endif
		endif
	endif


;Check for player's location once stage hits 20
;If player has wandered away from test area, remove CreatureFaction from him
	if ( TestActive == 1 )
		if ( GetStage ND03 >= 20 )
			if ( GetStage ND03 < 50 )
				if ( Player.GetFactionRank CreatureFaction == 0 )
					if ( Player.GetDistance ND03FactionCheckMarker > 10000 )
						Player.SetFactionRank CreatureFaction -1
						SetStage ND03 31
					endif
				endif
			endif
		endif
	endif

End

Database last updated 11/02/2011
SCPT records last updated 10/31/2011