enderalse/source/scripts/_00e_nq06_portyrintosc.psc

29 lines
958 B
Plaintext

Scriptname _00E_NQ06_PortYrintoSC extends ObjectReference
; Script on a triggerbox (_00E_NQ06DebugTriggerbox in cell (-5, -2))
; that moves Yrinto to his fishing spot in case he is too far away.
; This is a failsave against an old NQ06 bug where Yrinto is stuck
; somewhere in a different worldspace
; ( http://forum.sureai.net//tracker.php?p=8&t=10365 ).
Event OnTrigger(ObjectReference akActionRef)
if akActionRef == PlayerREF && NQ06.GetStage() >= 15
float gh = gamehour.GetValue()
if (gh > 22.6) || (gh < 3)
if Yrinto.GetDistance(NQ06_YrintoMeditateREF) > 5000
Yrinto.MoveTo(NQ06_YrintoMeditateREF)
endif
endif
if NQ06.GetStage() > 20
Delete()
endif
endif
EndEvent
Quest Property NQ06 Auto
GlobalVariable Property gamehour Auto
ObjectReference Property Yrinto Auto
ObjectReference Property NQ06_YrintoMeditateREF Auto
Actor Property PlayerREF Auto