Oblivion Game Data

Select game:

Search:

Select a record type:

SE03GrommokScript (0x00018ffc)

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

short RoomOne							;A DoOnce variable
short RoomTwo							;A DoOnce variable
short RoomThree							;A DoOnce variable
short GrommokDied						;A DoOnce variable
short GrommokCrazy						;A DoOnce variable
short GnarlGo								;A flag that tells the Gnarl when to begin its movement
short GrommokGo							;A flag that is used to tell Grommok when to begin executing his AI packages
short RoomTwoTrap						;A DoOnce for the RoomTwoTrap being triggered
short BlastNPC								;A cascading DoOnce variable for use with the fire trap in room two
short RoomTwoPostDem				;A DoOnce variable that tells when the second room is completed
short RoomTwoMania					;A flag that is set if the second room was set for mania
short RoomTwoManiaMove				;A flag that is set if the second room was set for mania and executes the adventurer's AI packages
short Keyfalls								;A flag that is set when all of the keys are dropped in room two
short GoKey								;A DoOnce that is set when the key block is exectued
short RoomTwoDone						;A DoOnce variable that tells when the second room is completed
short GoGhosts							;A Flag that is set when the ghosts in room three are set to go
short GnarlChat							;A flag that is set to begin the conversation the adventurers have about the Gnarl
short Vox									;A flag that is set to begin the conversation the adventurers have about room one
short BiteMe								;A DoOnce that is used in chamber one
short DoOnce								;A DoOnce variable
short DoOnce1								;A DoOnce variable
short DoOnce2								;A DoOnce variable
short DoOnce6								;A DoOnce variable
short SayOnce								;A DoOnce variable used for the adventurers conversations
short ZombiesGo							;A flag that is set to get the zombies to attack the orc in room three
short RoomOneTalk						;A cascading flag that is set to move along the conversation in room one
short RoomOneTalkB						;A cascading flag that is set to move along the conversation in room one
short RoomOneTalkC						;A cascading flag that is set to move along the conversation in room one
short RoomOneTalkD						;A cascading flag that is set to move along the conversation in room one
short RoomTwoTalk						;A cascading flag that is set to move along the conversation in room two
short RoomTwoTalkB						;A cascading flag that is set to move along the conversation in room two
short RoomTwoTalkC						;A cascading flag that is set to move along the conversation in room two
short RoomTwoTalkD						;A cascading flag that is set to move along the conversation in room two
short RoomThreeTalk						;A cascading flag that is set to move along the conversation in room three
short GrommokInsane					;A flag that is set when mania is chosen for chamber three to note orc insanity
short IdleOne								;A flag that is set when adventurers are in position to kick off their idle chatter - room one
short IdleTwo								;A flag that is set when adventurers are in position to kick off their idle chatter - room two
short IdleThree								;A flag that is set when adventurers are in position to kick off their idle chatter - room three
short GrommokCrazyTalk				;A flag that is set to help set off Syndel's insanity chatter loop

float RoomOneTalkLength				;Float variable used to measure the length of spoken lines for the say command in room one
float RoomOneTalkLengthB				;Float variable used to measure the length of spoken lines for the say command in room one
float RoomOneTalkLengthC				;Float variable used to measure the length of spoken lines for the say command in room one
float RoomOneTalkLengthD				;Float variable used to measure the length of spoken lines for the say command in room one
float RoomTwoTalkLength				;Float variable used to measure the length of spoken lines for the say command in room two
float RoomTwoTalkLengthB				;Float variable used to measure the length of spoken lines for the say command in room two
float RoomTwoTalkLengthC				;Float variable used to measure the length of spoken lines for the say command in room two
float RoomTwoTalkLengthD				;Float variable used to measure the length of spoken lines for the say command in room two
float RoomThreeTalkLength				;Float variable used to measure the length of spoken lines for the say command in room three
float RoomOneIdleLength				;Float variable used to measure the length of spoken lines for the say command in room one for idles
float RoomTwoIdleLength				;Float variable used to measure the length of spoken lines for the say command in room one for idles
float RoomThreeIdleLength				;Float variable used to measure the length of spoken lines for the say command in room one for idles
float BlastNPCTimer						;Float variable used for the fire trap for a time delay measurement
float RevivalTimer							;Float variable used for the aftermath of the fire trap for a time delay measurement
float GhostTimer							;Float variable used for the ghost effect appearance for a time delay measurement
float GromEndTimer						;Float variable used to seperate the final effects of the insanity in time delay measurement
float GromEndTimer2						;Float variable used to seperate the final effects of the insanity in time delay measurement
float GrommokChatterTalkLength		;A float that is used for measuring line length in Syndel's insanity chatter loop

;This handles when Grommok dies (chamber three)

begin OnDeath

	If ( GetStage SE03A >= 45 )
		SetStage SE03A 50
	endif

end

begin gamemode

;This handles if Grommok goes insane

	if ( GrommokInsane == 0 )
		if ( SE03A.GrommokMan == 3 )
			Evp
			Set GrommokInsane to 1
		endif
	endif

;This handles Grommok's Insanity Chatter loop

	if ( Player.GetDistance SE03XedilianTriggerC3 < 700 )
		if ( GrommokInsane == 1 )
			if ( GrommokCrazyTalk == 1 ) && ( GrommokChatterTalkLength <= -5 )
				Set GrommokChatterTalkLength to SEGrommokRef.Say SE03GrommokCrazyChatter
				SEGrommokRef.Say SE03GrommokCrazyChatter 1
				Set GrommokCrazyTalk to 2
			elseif ( GrommokCrazyTalk == 2 ) && ( GrommokChatterTalkLength <= -5 )
				Set GrommokCrazyTalk to 1
			endif
		endif
	endif

	if ( GrommokCrazyTalk > 0 ) && ( GrommokCrazyTalk < 3 )
		Set GrommokChatterTalkLength to GrommokChatterTalkLength - GetSecondsPassed
	endif

;This handles Journal Update when Adventurers are in position Chamber One

	if ( GetStage SE03A == 10 )
		if ( RoomOne == 1 )
			if ( SELewinRef.RoomOne == 1 ) && ( SESyndelRef.RoomOne == 1 )
				SetStage SE03A 12
			endif
		endif
	endif

;This handles Room One's Idle Chatter

	if ( SE03A.SwitchOne == 0 )
		if ( IdleOne == 1 ) && ( RoomOneIdleLength <= -5 )
			Set RoomOneIdleLength to SEGrommokRef.Say SE03GrommokC1Idle01
			SEGrommokRef.Say SE03GrommokC1Idle01 1
			Set IdleOne to 2
		elseif ( IdleOne == 2 ) && ( RoomOneIdleLength <= -5 )
			Set RoomOneIdleLength to SELewinRef.Say SE03LewinC1Idle01
			SELewinRef.Say SE03LewinC1Idle01 1
			Set IdleOne to 3
		elseif ( IdleOne == 3 ) && ( RoomOneIdleLength <= -5 )
			Set RoomOneIdleLength to SESyndelRef.Say SE03SyndelC1Idle01
			SESyndelRef.Say SE03SyndelC1Idle01 1
			Set IdleOne to 4
		elseif ( IdleOne == 4 ) && ( RoomOneIdleLength <= -5 )
			Set IdleOne to 1
		endif
	endif

	if ( IdleOne > 0 ) && ( IdleOne < 5 )
		Set RoomOneIdleLength to RoomOneIdleLength - GetSecondsPassed
	endIf
		
;This handles Room One's Dementia Conversation

	if ( RoomOneTalk == 1 ) && ( RoomOneTalkLength == 0 )
		Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow01
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow01 1
		Set RoomOneTalk to 2
	elseif ( RoomOneTalk == 2 ) && ( RoomOneTalkLength <= 0 )
		Set RoomOneTalkLength to SELewinRef.Say SE03LewinChamberOneGnarl01
		SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGnarl01 1
		Set RoomOneTalk to 3
	elseif ( RoomOneTalk == 3 ) && ( RoomOneTalkLength <= 0 )
		Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow02
		SEGrommokRef.Sayto SELewinRef SE03GrommokChamberOneGrow02 1
		Set RoomOneTalk to 4
	elseif ( RoomOneTalk == 4 ) && ( RoomOneTalkLength <= 0 )
		Set RoomOneTalkLength to SESyndelRef.Say SE03SyndelChamberOneGrow01
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGrow01 1
		Set RoomOneTalk to 5
	elseif ( RoomOneTalk == 5 ) && ( RoomOneTalkLength <= 0 )
		Set RoomOneTalkLength to SEGrommokRef.Say SE03GrommokChamberOneGrow04
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow04 1
		SetAlert 1
		SESyndelRef.SetAlert 1
		SELewinRef.SetAlert 1
		SELewinRef.StartCombat SE03ParentGnarl
		SESyndelRef.StartCombat SE03ParentGnarl02
		SEGrommokRef.StartCombat SE03ParentGnarl03
		Set RoomOneTalk to 6
	endif

	if ( RoomOneTalk > 0 ) && ( RoomOneTalk < 6 )
		Set RoomOneTalkLength to RoomOneTalkLength - GetSecondsPassed
	endIf

;This kicks of the NPC leaving Chamber One, Dementia

	if ( SE03A.GnarlCount >= 11 )
		if ( RoomOneTalkB == 0 ) && ( RoomOneTalkLengthB == 0 )
			SEGrommokRef.SetAlert 0
			SESyndelRef.SetAlert 0
			Set RoomOneTalkLengthB to SEGrommokRef.Say SE03GrommokChamberOneGrow03
			SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow03 1
			Set RoomOneTalkB to 2
		elseif ( RoomOneTalkB == 2 ) && ( RoomOneTalkLengthB <= 0 )
			Set RoomOneTalkLengthB to SESyndelRef.Say SE03SyndelChamberOneGrow02
			SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGrow02 1
			Set RoomOneTalkB to 3
		elseif ( RoomOneTalkB == 3 ) && ( RoomOneTalkLengthB <= 0 )
			Set SE03A.OrcRoom1 to 1
			Set RoomOneTalkB to 4
		endif
	endif

	if ( RoomOneTalkB > 0 ) && ( RoomOneTalkB < 4 )
		Set RoomOneTalkLengthB to RoomOneTalkLengthB - GetSecondsPassed
	endIf

;This handles Room One's Mania Conversation

	if ( SE03A.ChamberOne == 2 )
		if ( RoomOneTalkC == 1 ) && ( RoomOneTalkLengthC == 0 )
			Set RoomOneTalkLengthC to SEGrommokRef.Say SE03GrommokChamberOneGnarl01
			SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGnarl01 1
			Set RoomOneTalkC to 2
		elseif ( RoomOneTalkC == 2 ) && ( RoomOneTalkLengthC <= 0 )
			Set RoomOneTalkLengthC to SELewinRef.Say SE03LewinChamberOneGnarl01
			SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGnarl01 1
			SE03GasCloudRef.Playgroup Forward 1
			Set RoomOneTalkC to 3
		elseif ( RoomOneTalkC == 3 ) && ( RoomOneTalkLengthC <= 0 )
			Set RoomOneTalkLengthC to SESyndelRef.Say SE03SyndelChamberOneGnarl
			SESyndelRef.Sayto SELewinRef SE03SyndelChamberOneGnarl 1
			Set RoomOneTalkC to 4
		elseif ( RoomOneTalkC == 4 ) && ( RoomOneTalkLengthC <= 0 )
			Set RoomOneTalkLengthC to SEGrommokRef.Say SE03GrommokChamberOneGrow02
			SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGrow02 1
			Set RoomOneTalkC to 5
		elseif ( RoomOneTalkC == 5 ) && ( RoomOneTalkLengthC <= 0 )
			Set RoomOneTalkLengthC to SESyndelRef.Say SE03SyndelChamberOneGnarl01
			SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl01 1
			SetAlert 1
			SESyndelRef.SetAlert 1
			SELewinRef.SetAlert 1
			Set SE03ManiaGnarl.StartMeUp to 3
			Set RoomOneTalkC to 6
		endif
	endif

	if ( RoomOneTalkC > 0 ) && ( RoomOneTalkC < 6 )
		Set RoomOneTalkLengthC to RoomOneTalkLengthC - GetSecondsPassed
	endIf
	
;This kicks off the NPC leaving Chamber One, Mania

	if ( SE03ManiaGnarl.StartMeUp == 8 )
		if ( RoomOneTalkD == 0 ) && ( RoomOneTalkLengthD == 0 )
			SEGrommokRef.SetAlert 0
			SESyndelRef.SetAlert 0
			Set RoomOneTalkLengthD to SESyndelRef.Say SE03SyndelChamberOneGnarl03
			SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl03 1
			Set RoomOneTalkD to 2
		elseif ( RoomOneTalkD == 2 ) && ( RoomOneTalkLengthD <= 0 )
			Set RoomOneTalkLengthD to SEGrommokRef.Say SE03GrommokChamberOneGnarl03
			SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneGnarl03 1
			Set RoomOneTalkD to 3
		elseif ( RoomOneTalkD == 3 ) && ( RoomOneTalkLengthD <= 0 )
			Set RoomOneTalkLengthD to SELewinRef.Say SE03LewinChamberOneGrow02
			SELewinRef.Sayto SEGrommokRef SE03LewinChamberOneGrow02 1
			Set RoomOneTalkD to 4
		elseif ( RoomOneTalkD == 4 ) && ( RoomOneTalkLengthD <= 0 )
			Set RoomOneTalkLengthD to SESyndelRef.Say SE03SyndelChamberOneGnarl04
			SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberOneGnarl04 1
			Set RoomOneTalkD to 5
		elseif ( RoomOneTalkD == 5 ) && ( RoomOneTalkLengthD <= 0 )
			Set RoomOneTalkLengthD to SEGrommokRef.Say SE03GrommokChamberOneDone02
			SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberOneDone02 1
			Set RoomOneTalkD to 6
		elseif ( RoomOneTalkD == 6 ) && ( RoomOneTalkLengthD <= 0 )
			Set SE03A.OrcRoom1 to 1
			Set RoomOneTalkD to 7
		endif
	endif

	if ( RoomOneTalkD > 0 ) && ( RoomOneTalkD < 7 )
		Set RoomOneTalkLengthD to RoomOneTalkLengthD - GetSecondsPassed
	endif

;This handles Journal Update when Adventurers are in position Chamber Two

	if ( GetStage SE03A == 15 )
		if ( RoomTwo == 1 )
			if ( SESyndelRef.RoomTwo == 1 )
				SetStage SE03A 18
			endif
		endif
	endif

;This handles Room Two's Idle Chatter

	if ( SE03A.SwitchTwo == 0 )
		if ( IdleTwo == 1 ) && ( RoomTwoIdleLength <= -5 )
			Set RoomTwoIdleLength to SEGrommokRef.Say SE03GrommokC2Idle01
			SEGrommokRef.Say SE03GrommokC2Idle01 1
			Set IdleTwo to 2
		elseif ( IdleTwo == 2 ) && ( RoomTwoIdleLength <= -5 )
			Set RoomTwoIdleLength to SESyndelRef.Say SE03SyndelC2Idle01
			SESyndelRef.Say SE03SyndelC2Idle01 1
			Set IdleTwo to 3
		elseif ( IdleTwo == 3 ) && ( RoomTwoIdleLength <= -5 )
			Set IdleTwo to 1
		endif
	endif

	if ( IdleTwo > 0 ) && ( IdleTwo < 4 )
		Set RoomTwoIdleLength to RoomTwoIdleLength - GetSecondsPassed
	endIf

;This handles Room Two's Dementia Conversation

	if ( RoomTwoTalk == 1 ) && ( RoomTwoTalkLength == 0 )
		Set RoomTwoTalkLength to SEGrommokRef.Say SE03GrommokChamberTwoStart
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoStart 1
		Set RoomTwoTalk to 2
	elseif ( RoomTwoTalk == 2 ) && ( RoomTwoTalkLength <= 0 )
		Set RoomTwoTalkLength to SESyndelRef.Say SE03SyndelChamberTwoStart
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoStart 1
		Set RoomTwoTalk to 3
	elseif ( RoomTwoTalk == 3 ) && ( RoomTwoTalkLength <= 0 )
		Set RoomTwoTalkLength to SEGrommokRef.Say SE03GrommokChamberTwoDem01
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoDem01 1
		Set RoomTwoTalk to 4
	elseif ( RoomTwoTalk == 4 ) && ( RoomTwoTalkLength <= 0 )
		Set RoomTwoTalkLength to SESyndelRef.Say SE03SyndelChamberTwoDem01
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoDem01 1
		Set RoomTwoTalk to 5
	elseif ( RoomTwoTalk == 5 ) && ( RoomTwoTalkLength <= 0 )
		Set RoomTwoTrap to 1
		Set RoomTwoTalk to 6
	endif

	if ( RoomTwoTalk > 0 ) && ( RoomTwoTalk < 6 )
		Set RoomTwoTalkLength to RoomTwoTalkLength - GetSecondsPassed
	endIf

;This kicks off the Dementia Trap (Hunger Statues) in Chamber Two and handles the knockout and revival of the NPCs

	if ( BlastNPC == 0 )
		if ( RoomTwoTrap == 1 )
			SE03DementiaTrapTrigger.Activate Player 1
			SEGrommokRef.ModAv Fatigue -300
			SESyndelRef.ModAv Fatigue -200
			Set BlastNPCTimer to 6
			Set BlastNPC to 1
		endif
	endif

	if ( BlastNPC == 1 )
		if ( BlastNPCTimer > 0 )
			Set BlastNPCTimer to ( BlastNPCTimer - GetSecondsPassed )
		else
			SEGrommokRef.ForceAv Fatigue 300
			SESyndelRef.Kill
			set BlastNPC to 2
		endif
	endif

;This recovers the NPCs after the Blast in Chamber Two, and sends them to the last markers

	if ( BlastNPC == 2 )
		if ( RoomTwoTalkD == 0 ) && ( RoomTwoTalkLengthD == 0 )
			Set RoomTwoTalkLengthD to SEGrommokRef.Say SE03GrommokChamberTwoDone
			SEGrommokRef.Say SE03GrommokChamberTwoDone 1
			Set RoomTwoTalkD to 1
		elseif ( RoomTwoTalkD == 1 ) && ( RoomTwoTalkLengthD <= 0 )
			Set SE03A.OrcRoom2 to 1
			Set BlastNPC to 3
		endif
	endif

	if ( RoomTwoTalkD > 0 ) && ( RoomTwoTalkD < 2 )
		Set RoomTwoTalkLengthD to RoomTwoTalkLengthD - GetSecondsPassed
	endIf


;This handles Room Two's Mania Conversation

	if ( RoomTwoTalkB == 1 ) && ( RoomTwoTalkLengthB == 0 )
		Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoStart
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoStart 1
		Set RoomTwoTalkB to 2
	elseif ( RoomTwoTalkB == 2 ) && ( RoomTwoTalkLengthB <= 0 )
		Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoStart
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoStart 1
		Set RoomTwoTalkB to 3
	elseif ( RoomTwoTalkB == 3 ) && ( RoomTwoTalkLengthB <= 0 )
		Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoMan01
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoMan01 1
		Set RoomTwoTalkB to 4
	elseif ( RoomTwoTalkB == 4 ) && ( RoomTwoTalkLengthB <= 0 )
		Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoMani01
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoMani01 1
		Set RoomTwoTalkB to 5
	elseif ( RoomTwoTalkB == 5 ) && ( RoomTwoTalkLengthB <= 0 )
		Set RoomTwoTalkLengthB to SEGrommokRef.Say SE03GrommokChamberTwoMan02
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoMan02 1
		Set RoomTwoTalkB to 6
	elseif ( RoomTwoTalkB == 6 ) && ( RoomTwoTalkLengthB <= 0 )
		Set RoomTwoTalkLengthB to SESyndelRef.Say SE03SyndelChamberTwoMani02
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoMani02 1
		Set RoomTwoTalkB to 7
	elseif ( RoomTwoTalkB == 7 ) && ( RoomTwoTalkLengthB <= 0 )
		Set Keyfalls to 1
		Set SE03A.Keys to 1
		Evp
		SESyndelRef.Evp
		Set RoomTwoTalkB to 8
	endif

	if ( RoomTwoTalkB > 0 ) && ( RoomTwoTalkB < 8 )
		Set RoomTwoTalkLengthB to RoomTwoTalkLengthB - GetSecondsPassed
	endIf

;This triggers the Keyfall in Chamber Two at the proper time

	if ( GoKey == 0 )
		if ( Keyfalls == 1 )
			SE03ManiaTrapTrigger.Activate Player 1
			Set SE03A.Keys to 1
			Set GoKey to 1
		endif
	endif

;This handles Room Two's Post-Mania Conversation

	if ( RoomTwoTalkC == 1 ) && ( RoomTwoTalkLengthC == 0 )
		Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd01
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoManEnd01 1
		Set RoomTwoTalkC to 2
	elseif ( RoomTwoTalkC == 2 ) && ( RoomTwoTalkLengthC <= 0 )
		Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd01
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd01 1
		Set RoomTwoTalkC to 3
	elseif ( RoomTwoTalkC == 3 ) && ( RoomTwoTalkLengthC <= 0 )
		Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd02
		SESyndelRef.Sayto SESyndelRef SE03SyndelChamberTwoManEnd02 1
		Set RoomTwoTalkC to 4
	elseif ( RoomTwoTalkC == 4 ) && ( RoomTwoTalkLengthC <= 0 )
		Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd02
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd02 1
		Set RoomTwoTalkC to 5
	elseif ( RoomTwoTalkC == 5 ) && ( RoomTwoTalkLengthC <= 0 )
		Set RoomTwoTalkLengthC to SESyndelRef.Say SE03SyndelChamberTwoManEnd03
		SESyndelRef.Sayto SEGrommokRef SE03SyndelChamberTwoManEnd03 1
		Set RoomTwoTalkC to 6
	elseif ( RoomTwoTalkC == 6 ) && ( RoomTwoTalkLengthC <= 0 )
		Set RoomTwoTalkLengthC to SEGrommokRef.Say SE03GrommokChamberTwoManEnd03
		SEGrommokRef.Sayto SESyndelRef SE03GrommokChamberTwoManEnd03 1
		Set RoomTwoTalkC to 7
	elseif ( RoomTwoTalkC == 7 ) && ( RoomTwoTalkLengthC <= 0 )
		Set SE03A.OrcRoom2 to 1
		Evp
		Set RoomTwoTalkC to 8
	endif

	if ( RoomTwoTalkC > 0 ) && ( RoomTwoTalkC < 8 )
		Set RoomTwoTalkLengthC to RoomTwoTalkLengthC - GetSecondsPassed
	endIf

;This handles Room Three's Idle Chatter

	if ( SE03A.SwitchThree == 0 )
		if ( IdleThree == 1 ) && ( RoomThreeIdleLength <= -5 )
			Set RoomThreeIdleLength to SEGrommokRef.Say SE03GrommokC3Idle01
			SEGrommokRef.Say SE03GrommokC3Idle01 1
			Set IdleThree to 2
		elseif ( IdleThree == 2 ) && ( RoomThreeIdleLength <= -5 )
			Set IdleThree to 1
		endif
	endif

	if ( IdleThree > 0 ) && ( IdleThree < 3 )
		Set RoomThreeIdleLength to RoomThreeIdleLength - GetSecondsPassed
	endIf

;This handles Grommok "dying" and his "ghost" appearing at its position for Chamber Three Mania

	if ( GoGhosts == 1 )
		if ( RevivalTimer > 0 )
			Set RevivalTimer to ( RevivalTimer - GetSecondsPassed )
		else
			ModAv Fatigue -800
			pme BABO
			SEGrommokGhostRef.Enable
			Set GhostTimer to 3
			Set GoGhosts to 2
		endif
	endif

;This is a timer to give the ghost NPC a moment to be ready before speech

	if ( GoGhosts == 2 )
		if ( GhostTimer > 0 )
			Set GhostTimer to ( GhostTimer - GetSecondsPassed )
		else
			Set RoomThreeTalk to 1
			Set GoGhosts to 3
		endif
	endif

;This handles Room Three's Post-Mania Conversation

	if ( RoomThreeTalk == 1 ) && ( RoomThreeTalkLength == 0 )
		Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamberThreeMan01
		SEGrommokGhostRef.Say SE03GrommokChamberThreeMan01 1
		Set RoomThreeTalk to 2
	elseif ( RoomThreeTalk == 2 ) && ( RoomThreeTalkLength <= 0 )
		Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamberThreeMan02
		SEGrommokGhostRef.Say SE03GrommokChamberThreeMan02 1
		Set RoomThreeTalk to 3
	elseif ( RoomThreeTalk == 3 ) && ( RoomThreeTalkLength <= 0 )
		Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamThreeMan04
		SEGrommokGhostRef.Say SE03GrommokChamThreeMan04 1
		Set RoomThreeTalk to 4
	elseif ( RoomThreeTalk == 4 ) && ( RoomThreeTalkLength <= 0 )
		Set RoomThreeTalkLength to SEGrommokGhostRef.Say SE03GrommokChamThreeMan05
		SEGrommokGhostRef.Say SE03GrommokChamThreeMan05 1
		Set RoomThreeTalk to 5
	elseif ( RoomThreeTalk == 5 ) && ( RoomThreeTalkLength <= 0 )
		Set GoGhosts to 4
		Set RoomThreeTalk to 6
	endif

	if ( RoomThreeTalk > 0 ) && ( RoomThreeTalk < 6 )
		Set RoomThreeTalkLength to RoomThreeTalkLength - GetSecondsPassed
	endIf

;This is the GhostTimer until they return to normal in Chamber Three Mania

	if ( GoGhosts == 4 )
		SEGrommokGhostRef.Disable
		SEGrommokRef.pme BABO
		SEGrommokRef.ModAv Fatigue 800
		Set GromEndTimer to 1
		Set GoGhosts to 5
	endif

	if ( GoGhosts == 5 )
		if ( GromEndTimer > 0 )
			Set GromEndTimer to ( GromEndTimer - GetSecondsPassed )
		else
			Set SE03A.GrommokMan to 3
			SEGrommokRef.Evp
			Pickidle
			Set GromEndTimer2 to 2
			Set GoGhosts to 6
		endif
	endif

	if ( GoGhosts == 6 )
		if ( GromEndTimer2 > 0 )
			Set GromEndTimer2 to ( GromEndTimer2 - GetSecondsPassed )
		else
			Setstage SE03A 50
			Set GoGhosts to 7
		endif
	endif

end

;This long series of OnPackage End Blocks is designed to help move the orcs through the dungeon

begin OnPackageEnd SE03GrommokChamber1Start

	if ( RoomOne == 0 )
		Set SE03A.PackGromGo to 0
		Set RoomOne to 1
	endif

end

begin OnPackageEnd SE03GrommokChamber1Done

	if ( RoomOneTalkB == 4 ) || ( RoomOneTalkD == 7 )
		Set SE03A.PackGromExit to 0
		Moveto Chamber2GrommokStarts
		Set SE03A.DimentiaTrigger to 0
		Set SE03A.ManiaTrigger to 0
		Set RoomOneTalkB to 5
		Set RoomOneTalkD to 8
		else
			Return
	endif

end

begin OnPackageEnd SE03GrommokActionChamber1Mania01

	if ( DoOnce == 0 )
		Set GrommokGo to 1
		Evp
		Set DoOnce to 1
	endif

end

begin OnPackageEnd SE03GrommokActionChamber1Mania02

	if ( DoOnce1 == 0 )
		Say SE03GrommokChamberOneGnarl02 1
		Set GrommokGo to 2
		Evp
		Set DoOnce1 to 1
	endif

end


begin OnPackageEnd SE03GrommokChamber2Start

	if ( GetDead == 0 ) && ( RoomTwo == 0 )
		Set SE03A.PackGromGo to 0
		Set RoomTwo to 1
		else
			Return
	endif

end

begin OnPackageEnd SE03GrommokActionChamber2Mania

	if ( DoOnce2 == 0 )
		Set RoomTwoTalkC to 1
		Set DoOnce2 to 1
	endif

end

begin OnPackageEnd SE03GrommokChamber2Done

	if ( GetDead == 0 ) && ( RoomTwo == 1 )
		Set SE03A.PackGromExit to 0
		Moveto Chamber3GrommokStarts
		Set SE03A.DimentiaTrigger to 0
		Set SE03A.ManiaTrigger to 0
		Set RoomTwo to 2
	endif

end

begin OnPackageEnd SE03GrommokChamber3Start

	if ( GetDead == 0 ) && ( RoomThree == 0 )
		Set SE03A.PackGromGo to 0
		SetStage SE03A 47
		Set RoomThree to 1
	endif

end

begin OnPackageStart SE03GrommokCrazyDuring

	PickIdle

end

begin OnPackageStart SE03GrommokCrazyPost

	PickIdle

end

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