Oblivion Game Data

Select game:

Search:

Select a record type:

CGGlenroyScript (0x00032ae2)

  • Record Type: SCPT
  • Editor ID: CGGlenroyScript
  • Form ID: 0x00032ae2
  • Source File: Oblivion.noSI.esm.mod
  • Patch Status: FormID has not been modified.
Parameter Value
SCTX
scn CGGlenroyScript

short target
short dieNextHit
short temp
short warncount

begin gamemode

; talk when it is time
if CharacterGen.speaker == 3 && CharacterGen.convTimer <= 0
	set target to CharacterGen.target

	if target == 0
		set CharacterGen.convTimer to Say CharGenMain 1
	elseif target == 1
		set CharacterGen.convTimer to SayTo BaurusRef, CharGenMain 1
	elseif target == 2
		set CharacterGen.convTimer to SayTo RenoteRef, CharGenMain 1
	elseif target == 3
		set CharacterGen.convTimer to SayTo GlenroyRef, CharGenMain 1
	elseif target == 4
		set CharacterGen.convTimer to SayTo UrielSeptimRef, CharGenMain 1
	elseif target == 5
		set CharacterGen.convTimer to SayTo player, CharGenMain 1
	endif	

endif

; special cases

; Glenroy waiting for player to get away from the cell door
if getstage charactergen == 13
	if charactergen.convTimer <= 0
		; Glenroy warns player if he doesn't get back
		SayTo player CharGenVoice 1
		set charactergen.convTimer to 7
	endif
endif

end

begin OnPackageDone CGGlenroyToMarkerB
	setstage CharacterGen 15
end

begin OnPackageDone CGGlenroyToMarkerD
	setstage CharacterGen 30
end

begin OnPackageDone CGGlenroyToMarkerE
	setstage CharacterGen 34
end

begin OnPackageDone CGGlenroyEscortEmperorToF
	setstage CharacterGen 52
end

begin OnPackageDone CGGlenroyEscortEmperorToG
	setstage CharacterGen 56
end

begin OnPackageDone CGGlenroyToMarkerH
	setstage CharacterGen 60
end

begin OnPackageDone CGGlenroyToMarkerI
	setstage CharacterGen 64
end

begin OnStartCombat
	if getcombattarget != player
		set warncount to 0
	endif

	if getcombattarget != player && baurusref.isincombat == 0 && getstage charactergen > 40
		Say Attack
	endif
end

begin OnHit
	if dieNextHit == 1
		kill
	elseif getstage charactergen < 70
		; Glenroy can't die until the end of charactergen
		set temp to GetBaseActorValue health
		forceav health, temp 
	endif
end

begin OnHit player
	if getdead == 0
		if warncount <= 3
			stopcombat
			player.scaonActor
		endif
		SayTo player CharGenGlenroy 1
		set warnCount to warnCount + 1
		; make sure disposition of anybody never goes below 30
		; Baurus
		set temp to BaurusRef.getdisposition player
		if temp < 30
			set temp to 30 - temp
			BaurusRef.moddisposition player temp
		endif
		; Renote
		set temp to RenoteRef.getdisposition player
		if temp < 30
			set temp to 30 - temp
			RenoteRef.moddisposition player temp
		endif

		; Emperor
		set temp to UrielSeptimRef.getdisposition player
		if temp < 30
			set temp to 30 - temp
			UrielSeptimRef.moddisposition player temp
		endif

		; Glenroy
		set temp to GlenroyRef.getdisposition player
		if temp < 30
			set temp to 30 - temp
			GlenroyRef.moddisposition player temp
		endif

	endif
end

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