scriptname MQ04Script
short playerFoundSecretRoom
short startAttack
short spokeToEronor ; set to 1 if player spoke to Eronor at start of ambush
short convCount
ref target
ref speaker
; target/speaker:
; 1 = Martin
; 2 = Jauffre
; 3 = Cyrus
float convTimer
float fQuestDelayTime ; for quest script timing
begin gamemode
; count down timer
if convTimer > 0
set convTimer to convTimer - getSecondsPassed
elseif speaker > 0
if target == 0
set convTimer to speaker.Say MQ04Conv
else
set convTimer to speaker.SayTo target MQ04Conv
; target.look speaker
endif
endif
; Martin at Cloud Ruler gates
if getstage MQ04 == 30
if MartinRef.getdistance CloudRulerMainGates < 1000 && JauffreRef.getdistance CloudRulerMainGates < 1250
setstage MQ04 35
endif
endif
; player leaves scene in the middle -- move things along to waiting state
if (getstage MQ04 >=35 && getstage MQ04 <= 41)
if player.getincell CloudRulerTemple == 0
setstage MQ04 45
endif
endif
; finished with Cloud Ruler gate speech
if getstage MQ04 >= 35 && getstage MQ04 <= 36 && convTimer <= 0 && speaker == 0
setstage MQ04 40
endif
; Martin finished with Cloud Ruler steps speech
if getstage MQ04 == 44 && convTimer <= 0
setstage MQ04 45
endif
end
|