Oblivion Game Data

Select game:

Search:

Select a record type:

SEMazaddhaSCRIPT (0x00050912)

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

short AtMarker			;flag set when Ma'zaddha arrives at conversation location
short Detected			;flag set when Ma'zaddha can detect player while at conversation; used to alter dialogue
short ConvoCheck		;flag set when Ma'zaddha starts conversation. Used to make sure conversation only happens once per day
short DayCheck
short TalkOnce

Float Timer



float ConvTimer

begin OnDeath
	SETombstoneMazaddhaREF.enable
end

Begin OnPackageStart SEMazaddaFightMon20x2
	AddItem WeapClub 1
	Set SECrime.RooftopFighting to 1
	If SECutterRef.GetIsCurrentPackage SECutterFightMon20x2 == 0
		SECutterRef.AddScriptPackage	SECutterFightMon20x2									; make sure partner gets up at same time
	EndIf
End

Begin OnPackageChange SEMazaddaFightMon20x2
	RemoveItem WeapClub 1
	Set SECrime.RooftopFighting to 0
End

Begin OnPackageStart SEMazaddaFightWed20x2
	AddItem WeapClub 1
	Set SECrime.RooftopFighting to 1
	If SEMuurineRef.GetIsCurrentPackage SEMuurineFightWed20x2 == 0
		SEMuurineRef.AddScriptPackage	SEMuurineFightWed20x2							; make sure partner gets up at same time
	EndIf
End

Begin OnPackageChange SEMazaddaFightWed20x2
	RemoveItem WeapClub 1
	Set SECrime.RooftopFighting to 0
End

Begin OnPackageStart SEMazaddaFightSat20x2
	AddItem WeapClub 1
	Set SECrime.RooftopFighting to 1
	If SECaldanaMonriusRef.GetIsCurrentPackage SECaldanaFightSat20x2 == 0
		SECaldanaMonriusRef.AddScriptPackage SECaldanaFightSat20x2					; make sure partner gets up at same time
	EndIf
End

Begin OnPackageChange SEMazaddaFightSat20x2
	RemoveItem WeapClub 1
	Set SECrime.RooftopFighting to 0
End
	

Begin GameMode



;Check whether Mazaddha can detect the player (used for dialogue to abort conversation)

	if ( AtMarker == 1 )
		if ( GetDetectionLevel Player >= 3 )
			if ( Detected == 0 )
				set Detected to 1
			endif
		elseif ( GetDetectionLevel Player >= 3 )
			if ( Detected == 1 )
				set Detected to 0
			endif
		endif
	endif

;Update Quest Stage when player has overheard the conversation

;	if ( GetCurrentAIPackage != 6 )
;		if ( SENelreneRef.SE05conv == -1 )
;			if ( GetDistance Player < 1000 )
;				SetStage SE05 70
;			else
;				set SENelreneRef.SE05Conv to 0
;			endif
;		endif
;	endif


	if ( GetDistance Player < 1000 )
		if ( GetStage SE05 >= 60 ) && ( GetStage SE05 < 70 )
			if ( AtMarker == 1 )
				if ( SENelreneRef.GetDistance SE05NelreneMarker < 100 )
					set ConvTimer to ( ConvTimer + GetSecondsPassed )
					if ( ConvTimer >= 5 )
						set ConvTimer to 0
						if ( SENelreneRef.SE05Conv == 1 )

							SENelreneRef.StartConversation SEMazaddhaRef SE05Eavesdrop

						elseif ( SENelreneRef.SE05Conv == 3 )

							SENelreneRef.StartConversation SEMazaddhaRef SE05Eavesdrop
						elseif ( SENelreneRef.SE05Conv == 5 )
							if ( TalkOnce == 0 )
								SENelreneRef.StartConversation SEMazaddhaRef SE05EavesDrop
								set TalkOnce to 1
							endif
						endif
					endif
				endif
			endif
		endif
	endif

;After agreeing to help, disable Mazaddha as soon as the player's out of range

	if ( GetStageDone SE05 80 == 1 ) 	
		if ( IsInInterior == 1 )
			if ( GetInSameCell Player == 0 )
				set SE05.MazaddhaClear to 1
				set SE05.DayCheck to GameDaysPassed
				disable
			endif
		endif
	endif

	If GetIsCurrentPackage SEMazaddhaCheer20x2 == 1
		If Timer <=0
			Say SERooftopCheer
			Set Timer to 9.1
			If GetDistance SECheerMazaddhaMarker <= 64
				PickIdle
			EndIf
		EndIf
	Endif

	If GetIsCurrentPackage SEMazaddaFightMon20x2 == 1 || GetIsCurrentPackage SEMazaddaFightWed20x2 == 1 || GetIsCurrentPackage SEMazaddaFightSat20x2 == 1
		If Timer <= 0
			Say Hit
			Set Timer to 4.9
		EndIf
	EndIf

	If Timer > 0
		Set Timer to Timer - GetSecondsPassed
	EndIf
End

Begin OnActivate

	if SEHerdirRef.TargetRef == SEMazaddhaRef
		if IsActionRef Player == 1 
			return
		endif
	else
		Activate
	endif

End

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