1
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

80 lines
2.0 KiB

Scriptname _00E_P02_CombatTutorialScript extends ObjectReference
MusicType Property _00E_Music_CombatRegular Auto
Actor Property Sirius Auto
Actor Property Sebald Auto
Actor Property Riq Auto
Actor Property PlayerREF Auto
Message Property _00E_MQP02_CombatTutorial_AttackNormal Auto
Message Property _00E_MQP02_CombatTutorial_AttacKPower Auto
Message Property _00E_MQP02_CombatTutorial_Dodge Auto
ReferenceAlias Property FreightRoomDoor Auto
Topic Property MQ_P02_ANewLife_MiscDialogeMatroseTopic Auto
Topic Property MQ_P02_ANewLife_SiriusCombatTutorialTopic Auto
Quest Property MQ_P02_ANewLife Auto
GlobalVariable Property MQP02CombatGlobal Auto
Float RiqHealthMax
int doONce
Event OnInit()
;------------DEBUG-----------------
MQ_P02_ANewLife.Start()
MQ_P02_ANewLife.SetStage(55)
;------------DEBUG-----------------
FreightRoomDoor.GetReference().Lock(True)
PlayerREF.UnequipItem(PlayerREF.GetEquippedWeapon()) ;Remove after gold, only necessary for now
MQ_P02_ANewLife.SetObjectiveDisplayed(5)
Sirius.StartCombat(Sebald)
Utility.Wait(1.5)
Sebald.Say(MQ_P02_ANewLife_MiscDialogeMatroseTopic)
Riq.StartCombat(PlayerREF)
_00E_Music_CombatRegular.Add()
_00E_MQP02_CombatTutorial_AttackNormal.ShowAsHelpMessage("Attack", 5, 15, 1)
RiqHealthMax = Riq.GetActorValue("Health")
RegisterForSingleUpdate(3)
EndEvent
Event OnUpdate()
float RiqHealth = Riq.GetActorValue("Health")
If (RiqHealth <= (RiqHealthMax*0.80))&& doOnce == 0
doOnce = 1
Debug.Notification("Update!")
Sirius.Say(MQ_P02_ANewLife_SiriusCombatTutorialTopic)
_00E_MQP02_CombatTutorial_AttackPower.ShowAsHelpMessage("AttackPower", 5, 15, 1)
RegisterForSingleUpdate(3)
ElseIf (RiqHealth <= (RiqHealthMax*0.50))&& doOnce == 1
doOnce = 2
_00E_MQP02_CombatTutorial_Dodge.ShowAsHelpMessage("Move", 5, 15, 1)
RegisterForSingleUpdate(3)
ElseIf (MQP02CombatGlobal.GetValue() == 1)
Debug.Notification("Completed!")
_00E_Music_CombatRegular.Remove()
MQ_P02_ANewLife.SetObjectiveCompleted(5)
MQ_P02_ANewLife.SetStage(60)
UnregisterForUpdate()
self.Delete()
Else
RegisterForSingleUpdate(3)
EndIf
EndEvent