Oblivion Game Data

Select game:

Search:

Select a record type:

SE08AllyMainScript (0x000179fb)

  • Record Type: SCPT
  • Editor ID: SE08AllyMainScript
  • Form ID: 0x000179fb
  • Source File: Oblivion.esm.mod
  • Patch Status: FormID has not been modified.
Parameter Value
SCTX
scriptname SE08AllyMainScript
;Main force

short 	TakePosition1	;Set when player places NPCs for the Passwall battle. Chooses bow.
short 	TakePosition2	;Set when player places NPCs for the Passwall battle. Chooses claymore.
short 	TakePosition3	;Set when player places NPCs for the Passwall battle. Chooses sword and shield.
short	MaxHealth		;Holds the NPCs maximum health
short	IsInjured			;Set to 1 if health falls below 50%
short 	DoOnce 			;Internal control variable

BEGIN GameMode

	;Sets the "IsInjured" vaiable when health drops below 50%. Used to control the idle animation.
	if ( getstage SE08 >= 20 ) && ( getstage SE08 <= 25 ) 
		if ( GetActorValue Health <= ( GetBaseAv Health * .5 ) )
			set IsInjured to 1
		else
			set IsInjured to 0
		endif
	endif

	;Sets combat style and weapon choices for the battle in Passwall
	if ( getstage SE08 >=25 )
		;Checks race, removes weapons, and gives bow and arrows.
		if ( TakePosition1 == 1 )
			if ( DoOnce == 0 )
				if ( GetIsRace DarkSeducer == 1 ) && ( GetDisabled == 0 )
					RemoveItem SE08DarkSeducerArrow 100 
					RemoveItem SE08DarkSeducerBow 100
					RemoveItem SE08DarkSeducerLongsword 100
					RemoveItem SE08DarkSeducerMace 100
					RemoveItem SE08DarkSeducerShortsword 100
					RemoveItem SE08DarkSeducerWaraxe	100	
					AddItem SE08DarkSeducerArrow 30
					AddItem SE08DarkSeducerBow 1
					EquipItem SE08DarkSeducerArrow 1
					EquipItem SE08DarkSeducerBow 	
					SetCombatStyle SE08Archer
					Set DoOnce to 1
					setalert 1
					evp

				elseif ( GetIsRace GoldenSaint == 1 ) && ( GetDisabled == 0 )
					RemoveItem SE08GoldenSaintArrow 100 
					RemoveItem SE08GoldenSaintBow 100
					RemoveItem SE08GoldenSaintLongsword 100
					RemoveItem SE08GoldenSaintMace 100
					RemoveItem SE08GoldenSaintShortsword 100
					RemoveItem SE08GoldenSaintWaraxe	100
					AddItem SE08GoldenSaintArrow 30
					AddItem SE08GoldenSaintBow 1
					EquipItem SE08GoldenSaintBow 
					EquipItem SE08GoldenSaintArrow 30
					SetCombatStyle SE08Archer
					Set DoOnce to 1
					setalert 1
					evp
				endif
			endif
		endif

		;Checks race, removes weapons, and gives sword and shield.
		if ( TakePosition2 == 1 )
			if ( DoOnce == 0 )
				if ( GetIsRace DarkSeducer == 1 ) && ( GetDisabled == 0 )
					RemoveItem SE08DarkSeducerArrow 100 
					RemoveItem SE08DarkSeducerBow 100
					RemoveItem SE08DarkSeducerLongsword 100
					RemoveItem SE08DarkSeducerMace 100
					RemoveItem SE08DarkSeducerShortsword 100
					RemoveItem SE08DarkSeducerWaraxe	100	
					AddItem SE08DarkSeducerLongsword 1
					AddItem SE08DarkSeducerShield 1
					EquipItem SE08DarkSeducerLongsword 1
					EquipItem SE08DarkSeducerShield 1	
					SetCombatStyle SE08Flank
					Set DoOnce to 1
					setalert 1
					evp

				elseif ( GetIsRace GoldenSaint == 1 ) && ( GetDisabled == 0 )
					RemoveItem SE08GoldenSaintArrow 100 
					RemoveItem SE08GoldenSaintBow 100
					RemoveItem SE08GoldenSaintLongsword 100
					RemoveItem SE08GoldenSaintMace 100
					RemoveItem SE08GoldenSaintShortsword 100
					RemoveItem SE08GoldenSaintWaraxe	100
					AddItem SE08GoldenSaintLongsword 1
					AddItem SE08GoldenSaintShield 1
					EquipItem SE08GoldenSaintLongsword 1
					EquipItem SE08GoldenSaintShield 1
					SetCombatStyle SE08Flank
					Set DoOnce to 1
					setalert 1
					evp
				endif
			endif
		endif

		;Checks race, removes weapons, and gives battle axe.
		if ( TakePosition3 == 1 )
			if ( DoOnce == 0 )
				if ( GetIsRace DarkSeducer == 1 )	&& ( GetDisabled == 0 )
					RemoveItem SE08DarkSeducerArrow 100 
					RemoveItem SE08DarkSeducerBow 100
					RemoveItem SE08DarkSeducerLongsword 100
					RemoveItem SE08DarkSeducerMace 100
					RemoveItem SE08DarkSeducerShortsword 100
					RemoveItem SE08DarkSeducerWaraxe	100	
					AddItem SE08DarkSeducerWaraxe 1
					EquipItem SE08DarkSeducerWaraxe 1
					SetCombatStyle SE08Heavy
					Set DoOnce to 1
					setalert 1
					evp

				elseif ( GetIsRace GoldenSaint == 1 ) && ( GetDisabled == 0 )
					RemoveItem SE08GoldenSaintArrow 100 
					RemoveItem SE08GoldenSaintBow 100
					RemoveItem SE08GoldenSaintLongsword 100
					RemoveItem SE08GoldenSaintMace 100
					RemoveItem SE08GoldenSaintShortsword 100
					RemoveItem SE08GoldenSaintWaraxe	100
					AddItem SE08GoldenSaintWaraxe 1
					EquipItem SE08GoldenSaintWaraxe 1
					SetCombatStyle SE08Heavy
					Set DoOnce to 1
					setalert 1
					evp
				endif
			endif
		endif
	endif

END

BEGIN OnDeath

	;Ressurects NPC if player has not yet triggered stage 20 of SE08
	if ( GetStageDone SE08 20 == 0 )
		resurrect
	endif

END

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