Scriptname MG12Script
;This handles all variables and scripting for quest MG12Gate
short talkedtoTraven
short closegate
short doonce
short fithtalk
short wheredialogue
short whatdialogue
short mariettecombat
float fQuestDelayTime
float timer
begin gamemode
if ( GetStage MG12Gate < 10 )
return
endif
if ( GetStage MG12Gate == 10 )
if ( fQuestDelayTime == 0 )
set fQuestDelayTime to 0.5
endif
endif
;Fithragaer force-greets the player once player's inside Nenyond Twyll
if ( GetStage MG12Gate == 20 )
if ( fithtalk == 0 )
if ( FithragaerRef.GetDistance Player < 600 )
FithragaerRef.StartConversation Player
set fithtalk to 1
endif
endif
endif
;Update Fithragaer's package after he's spoken to the player
if ( fithtalk == 2 )
FithragaerRef.EvaluatePackage
FithragaerRef.setav health 1
set fithtalk to 3
endif
;Kill Fithragaer when he steps on the Floor Smasher and is pushed into the ceiling
if ( FithragaerRef.GetPos z > 320 )
if ( doonce == 0 )
FithragaerRef.kill
set doonce to 1
endif
endif
;....and update Quest Stage once Fithragaer is dead and has hit the ground
if ( fithtalk == 3 )
if ( GetDeadCount Fithragaer > 0 )
if ( NenyondTwyllFloorSmasher.GetPos z < -300 )
SetStage MG12Gate 40
endif
endif
endif
;Mariette Rielle forces conversation with the player when he gets close enough
if ( GetStage MG12Gate >= 30 )
if ( doonce == 1 )
if ( Player.GetDistance MarietteRielleRef < 500 )
MarietteRielleRef.Startconversation Player
set doonce to 2
endif
endif
endif
if ( mariettecombat == 1 )
MarietteRielleRef.startcombat player
set mariettecombat to 2
endif
End |