enderalse/scripts/source/_00e_mq07caliafollowentrigger.psc

90 lines
2.7 KiB
Plaintext

Scriptname _00E_MQ07CaliaFollowEntrigger extends ObjectReference
Event OnTriggerEnter(ObjectReference akActionRef)
if (akActionRef == Game.GetPlayer())
if ( MQ07b_DeusExMachina.GetStage() >= 35 ) && ( MQ07b_DeusExMachina.GetStage() <= 60 )
myAlias = CaliaRef as Actor
if (Counter.GetValue() == 0)
if CompanionIsTalking.GetValueInt() == 0
CompanionIsTalking.SetValueInt(1)
myAlias.Say(MQ07b_DeusExMachinaAgain)
endif
if _00E_MQ07b_ShowFollow.GetValue() == 0
int iMessage = _00E_CaliaEntriggerFollowDetail.Show()
if iMessage == 1
_00E_MQ07b_ShowFollow.SetValue(1)
endif
Else
_00E_CaliaEntriggerFollowNotif.Show()
Endif
EndIf
if !IsActivated
Counter.SetValue((Counter.GetValue()+1))
EndIf
IsActivated = True
myAlias.EvaluatePackage()
endif
endif
EndEvent
Event OnTriggerLeave(ObjectReference akActionRef)
int MQ07b_stage = MQ07b_DeusExMachina.GetStage()
if (MQ07b_stage < 35) || (MQ07b_stage > 60)
return
endif
if (akActionRef == Game.GetPlayer())
Counter.SetValue((Counter.GetValue() - 1))
IsActivated = False
myAlias.EvaluatePackage()
endif
if Game.GetPlayer().IsInLocation(_00E_AltDothulgrad) == 1
if Counter.GetValue() == 0
Counter.SetValue(Counter.GetValue()+1)
myAlias.EvaluatePackage()
EndIf
EndIf
if (Counter.GetValue() == 0) && (akActionRef == Game.GetPlayer() )
if CompanionIsTalking.GetValueInt() == 0
CompanionIsTalking.SetValueInt(1)
myAlias.Say(MQ07b_DeusExMachinaStop)
endif
if _00E_MQ07b_ShowFollow.GetValue() == 0
int iMessage = _00E_CaliaEntriggerStopDetail.Show()
if iMessage == 1
_00E_MQ07b_ShowFollow.SetValue(1)
endif
else
_00E_CaliaEntriggerStopNotif.Show()
endif
EndIf
EndEvent
Bool IsActivated = false
GlobalVariable Property Counter Auto
GlobalVariable Property _00E_MQ07b_ShowFollow Auto
GlobalVariable Property CompanionIsTalking Auto
ObjectReference Property CaliaRef Auto
Quest Property MQ07b_DeusExMachina Auto
actor myAlias
Topic Property MQ07b_DeusExMachinaStop Auto
Topic Property MQ07b_DeusExMachinaAgain Auto
Location Property _00E_AltDothulgrad Auto
Message Property _00E_CaliaEntriggerFollowDetail Auto
Message Property _00E_CaliaEntriggerStopDetail Auto
Message Property _00E_CaliaEntriggerFollowNotif Auto
Message Property _00E_CaliaEntriggerStopNotif Auto