Oblivion Game Data

Select game:

Search:

Select a record type:

ND00SCRIPT (0xKN000db2)

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

; this script is always running, so it can be used for any general ND stuff that need to be checked periodically

short UseLightArmor		; set to 1 if we give light, set to 0 if we give heavy version

; **** Armor infamy check *********
short infamyCheck	; 1 means player had infamy last time we checked, 0 means he didn't
							; this is to prevent having to try to unequip items every 5 seconds forever

short giveMessage	; temp variable used to decide whether to give message when unequipping items
short gaveWarning	; set to 1 when player has been warned about infamy

short BootsEquipped			; set to 1 when equipped
short HelmetEquipped		; set to 1 when equipped
short GauntletsEquipped	; set to 1 when equipped
short GreavesEquipped		; set to 1 when equipped
short CuirassEquipped		; set to 1 when equipped
short ShieldEquipped			; set to 1 when equipped
short SwordEquipped			; set to 1 when equipped
short MaceEquipped			; set to 1 when equipped
Short PCNotArmored			; set to 0 if all armor is equipped, otherwise set to 1


short BootsCarried		; set to 1 when player has in inventory
short HelmetCarried		
short GauntletsCarried
short GreavesCarried	
short CuirassCarried	
short ShieldCarried
short SwordCarried
short MaceCarried	

; **** Knights of the Nine faction******
short knightCount		; the number of knights that have joined your faction
short nordsDone		; the Nord brothers have been enabled
short woodElfDone	; the wood elf has been enabled

; **** Chapel desecration variables ******
short AnvilChapelDesecrated			; set to 1 when desecrated (used by package conditions)
short BravilChapelDesecrated			; ditto

; **** Has the player visited Underpall Cave? ******
short visitUnderpall						; set to 1 when player enters cave prior to ND07

; **** Is the player blessed? ******
short	BlessingActive

; ***** Knight follow behavior *****
short Following					; set to 1 when knight is following player
ref FollowerRef					; tracks who is following player

short Knight1Var
short Knight2Var
short Knight3Var
short Knight4Var
short Knight5Var
short Knight6Var
short Knight7Var
short Knight8Var
short FollowerClear

begin gamemode
; **** Armor infamy check *********

	; give warning at 1 infamy, remove the armor at 2 or more
	if getpcinfamy == 1 && gaveWarning == 0
		set gaveWarning to 1
		; if player has gained any part of the armor, give message
		if getStage ND01 >= 50
			messageBox "Beware! The gods have taken note of your crimes! Do not continue down this path or you will be unfit to wield the Crusader's Relics."
		endif		
	endif

	if getpcinfamy > 1 && infamyCheck == 0
		set infamyCheck to 1
		; if player has anything equipped, give him message
		set giveMessage to 0		
		if SwordEquipped == 1 || MaceEquipped == 1
 			set giveMessage to 1
		endif
		if BootsEquipped == 1 || HelmetEquipped == 1 || GauntletsEquipped == 1 || GreavesEquipped == 1 || CuirassEquipped == 1 || ShieldEquipped == 1
			set giveMessage to 1
		endif

		if giveMessage == 1
			messageBox "Your crimes have made you unfit to wield the Crusader's Relics. Walk the Pilgrim's Way to repent of your sins and once again seek the favor of the gods."
			; unequip all his holy gear
			player.unequipitem NDWeaponMace2 1
			player.unequipitem NDWeaponMace3 1
			player.unequipitem NDWeaponMace4 1
			player.unequipitem NDWeaponMace5 1
			player.unequipitem NDWeaponMace6 1
			player.unequipitem NDWeaponMace7 1
			player.unequipitem NDWeaponMace8 1
			player.unequipitem NDWeaponSword2 1
			player.unequipitem NDWeaponSword3 1
			player.unequipitem NDWeaponSword4 1
			player.unequipitem NDWeaponSword5 1
			player.unequipitem NDWeaponSword6 1
			player.unequipitem NDWeaponSword7 1
			player.unequipitem NDWeaponSword8 1
			; heavy armor
			player.unequipitem NDArmorHeavyBoots1 1
			player.unequipitem NDArmorHeavyBoots2 1
			player.unequipitem NDArmorHeavyBoots3 1
			player.unequipitem NDArmorHeavyBoots4 1
			player.unequipitem NDArmorHeavyBoots5 1
			player.unequipitem NDArmorHeavyCuirass1 1
			player.unequipitem NDArmorHeavyCuirass2 1
			player.unequipitem NDArmorHeavyCuirass3 1
			player.unequipitem NDArmorHeavyCuirass4 1
			player.unequipitem NDArmorHeavyCuirass5 1
			player.unequipitem NDArmorHeavyGreaves1 1
			player.unequipitem NDArmorHeavyGreaves2 1
			player.unequipitem NDArmorHeavyGreaves3 1
			player.unequipitem NDArmorHeavyGreaves4 1
			player.unequipitem NDArmorHeavyGreaves5 1
			player.unequipitem NDArmorHeavyGauntlets1 1
			player.unequipitem NDArmorHeavyGauntlets2 1
			player.unequipitem NDArmorHeavyGauntlets3 1
			player.unequipitem NDArmorHeavyGauntlets4 1
			player.unequipitem NDArmorHeavyGauntlets5 1
			player.unequipitem NDArmorHeavyHelmet1 1
			player.unequipitem NDArmorHeavyHelmet2 1
			player.unequipitem NDArmorHeavyHelmet3 1
			player.unequipitem NDArmorHeavyHelmet4 1
			player.unequipitem NDArmorHeavyHelmet5 1
			player.unequipitem NDArmorHeavyShield1 1
			player.unequipitem NDArmorHeavyShield2 1
			player.unequipitem NDArmorHeavyShield3 1
			player.unequipitem NDArmorHeavyShield4 1
			player.unequipitem NDArmorHeavyShield5 1
			; Light armor
			player.unequipitem NDArmorLightBoots1 1
			player.unequipitem NDArmorLightBoots2 1
			player.unequipitem NDArmorLightBoots3 1
			player.unequipitem NDArmorLightBoots4 1
			player.unequipitem NDArmorLightBoots5 1
			player.unequipitem NDArmorLightCuirass1 1
			player.unequipitem NDArmorLightCuirass2 1
			player.unequipitem NDArmorLightCuirass3 1
			player.unequipitem NDArmorLightCuirass4 1
			player.unequipitem NDArmorLightCuirass5 1
			player.unequipitem NDArmorLightGreaves1 1
			player.unequipitem NDArmorLightGreaves2 1
			player.unequipitem NDArmorLightGreaves3 1
			player.unequipitem NDArmorLightGreaves4 1
			player.unequipitem NDArmorLightGreaves5 1
			player.unequipitem NDArmorLightGauntlets1 1
			player.unequipitem NDArmorLightGauntlets2 1
			player.unequipitem NDArmorLightGauntlets3 1
			player.unequipitem NDArmorLightGauntlets4 1
			player.unequipitem NDArmorLightGauntlets5 1
			player.unequipitem NDArmorLightHelmet1 1
			player.unequipitem NDArmorLightHelmet2 1
			player.unequipitem NDArmorLightHelmet3 1
			player.unequipitem NDArmorLightHelmet4 1
			player.unequipitem NDArmorLightHelmet5 1
			player.unequipitem NDArmorLightShield1 1
			player.unequipitem NDArmorLightShield2 1
			player.unequipitem NDArmorLightShield3 1
			player.unequipitem NDArmorLightShield4 1
			player.unequipitem NDArmorLightShield5 1
		endif

	endif

	if getPCInfamy == 0 && ( infamyCheck == 1 || gaveWarning == 1 )
		; infamy is back to 1 or less
		set infamyCheck to 0
		set giveMessage to 0	
		set gaveWarning to 0	
	endif


; *** Start ND questline ******
	if getstage NDPilgrim == 0
		if player.getInCell Anvil == 0 && player.getInCell ImperialDungeon == 0
			setstage NDPilgrim 5
		endif
	endif

; *** Enable knights ******
	if nordsDone == 0 && KnightCount > 0
		set nordsDone to 1
		; enable Gregor and Geimund
		NDGeimundREF.enable
		NDGukimirREF.enable
	endif

; *** Monitor player visiting Underpall Cave ****
	if visitUnderpall == 0
		if player.getinCell UnderpallCave == 1
			set visitUnderpall to 1
		endif
	endif

;***Disable Minion Lists in ND04***
	if ( GetStageDone ND04 120 == 1 )
		if ( Player.GetInCell LeyawiinChapelOfZenithar == 1 )
			ND04Minion1Parent.disable
			ND04Minion2Parent.disable
			ND04Minion3Parent.disable
			ND04Minion4Parent.disable
			ND04Minion5Parent.disable
		endif
	endif

; *** Monitor death of knights ***
	if getStage ND10 >= 200
		if NDKnight7GenericREF.getDisabled == 1
			if NDLathonREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight7GenericREF.enable
				endif
			endif
		endif

		if NDKnight5GenericREF.getDisabled == 1
			if NDGeimundREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight5GenericREF.enable
				endif
			endif
		endif

		if NDKnight6GenericREF.getDisabled == 1
			if NDGukimirREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight6GenericREF.enable
				endif
			endif
		endif

		if NDKnight4GenericREF.getDisabled == 1
			if NDCarodusOholinREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight4GenericREF.enable
				endif
			endif
		endif

		if NDKnight8GenericREF.getDisabled == 1
			if NDBrellinREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight8GenericREF.enable
				endif
			endif
		endif

		if NDKnight1GenericREF.getDisabled == 1
			if NDAvitaVesniaREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight1GenericREF.enable
				endif
			endif
		endif

		if NDKnight3GenericREF.getDisabled == 1
			if NDSirThedretREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight3GenericREF.enable
				endif
			endif
		endif

		if NDKnight2GenericREF.getDisabled == 1
			if NDAreldurREF.getdead == 1
				if player.getincell NDPrioryoftheNineBasement == 0
					NDKnight2GenericREF.enable
				endif
			endif
		endif


	endif

;***Handle clearing of follower variables***

	if ( GetStage ND10 < 200 )
		return
	elseif ( FollowerClear == 1 )
		set Knight1Var to 0
		set Knight2Var to 0
		set Knight3Var to 0
		set Knight4Var to 0
		set Knight5Var to 0
		set Knight6Var to 0
		set Knight7Var to 0
		set Knight8Var to 0
		set Following to 0
		set FollowerClear to 0
	endif


end

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