2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_NQ_G_06_Functions extends Quest Conditional
|
|
|
|
|
2024-02-29 22:28:19 +00:00
|
|
|
int function _GetScriptVersion() Global
|
|
|
|
return 1
|
|
|
|
endFunction
|
|
|
|
|
2021-10-05 22:15:58 +00:00
|
|
|
;=====================================================================================
|
|
|
|
; FUNCTIONS
|
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function StartMessengerTimer()
|
|
|
|
|
|
|
|
RegisterForSingleUpdateGameTime(24)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function PlaceMessenger()
|
|
|
|
|
2024-01-10 14:08:24 +00:00
|
|
|
If !bMessengerSpawned && (MQ12b.IsCompleted() || MQ12b.GetCurrentStageID() < 5) && MQ14.GetCurrentStageID() <= 15
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
If (PlayerREF.GetCurrentLocation() == CapitalCityLocation) || (PlayerREF.GetCurrentLocation() == _00E_SuntempleLocation)
|
|
|
|
|
|
|
|
bMessengerSpawned = True
|
|
|
|
|
|
|
|
objSpawnMarker = PlayerREF.PlaceAtMe(XMarkerHeading, 1)
|
|
|
|
objSpawnMarker.MoveTo(PlayerRef, -250.0 * Math.Sin(PlayerRef.GetAngleZ()), -250.0 * Math.Cos(PlayerRef.GetAngleZ()), PlayerRef.GetHeight())
|
|
|
|
If _00E_NQ_G_05_MessengerREF.IsDead()
|
|
|
|
_00E_NQ_G_05_MessengerREF.Resurrect()
|
|
|
|
EndIf
|
|
|
|
_00E_NQ_G_05_MessengerREF.Enable()
|
|
|
|
_00E_NQ_G_05_MessengerREF.MoveTo(objSpawnMarker)
|
|
|
|
UnregisterForUpdateGameTime()
|
|
|
|
|
|
|
|
StartSC01()
|
|
|
|
Else
|
|
|
|
RegisterForSingleUpdateGameTime(0.2)
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function DespawnMessenger()
|
|
|
|
|
|
|
|
_00E_NQ_G_05_MessengerREF.Disable()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function GiveLetter()
|
|
|
|
|
|
|
|
If (PlayerREF.GetItemCount(_00E_NQ_G_06_LetterFromDijaam_M) == 0) && (PlayerREF.GetItemCount(_00E_NQ_G_06_LetterFromDijaam_F) == 0)
|
|
|
|
|
|
|
|
if PlayerREF.GetActorBase().GetSex() == 0
|
|
|
|
PlayerREF.AddItem(_00E_NQ_G_06_LetterFromDijaam_M, 1)
|
|
|
|
Else
|
|
|
|
PlayerREF.AddItem(_00E_NQ_G_06_LetterFromDijaam_F, 1)
|
|
|
|
Endif
|
|
|
|
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function DespawnGuard()
|
|
|
|
|
|
|
|
_00E_NQ_G_06_GuardREF.Disable()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SideWithDijaam()
|
|
|
|
|
|
|
|
_00E_NQ_G_SidedDijaam.SetValue(1)
|
|
|
|
_00E_NQ_G_SidedMael.SetValue(0)
|
2024-01-10 00:46:13 +00:00
|
|
|
Steam.UnlockAchievement("END_SIDED_DIJAAM_01")
|
2021-10-05 22:15:58 +00:00
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SideWithMael()
|
|
|
|
|
|
|
|
_00E_NQ_G_SidedMael.SetValue(1)
|
|
|
|
_00E_NQ_G_SidedDijaam.SetValue(0)
|
|
|
|
|
2024-01-10 00:46:13 +00:00
|
|
|
Steam.UnlockAchievement("END_SIDED_MAEL_01")
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SpawnKileans()
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.Enable(abFadeIn = false)
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.Enable(abFadeIn = false)
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.MoveTo(_00E_NQ_G_06_KileanWarriorStandMarker)
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.MoveTo(_00E_NQ_G_06_KileanMageStandMarker)
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_WarriorREF.disable()
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.disable()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartFightKilean()
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.StartCombat(PlayerREF)
|
2023-12-08 02:45:53 +00:00
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.SetActorValue("Aggression", 4)
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.StartCombat(PlayerREF)
|
2023-12-08 02:45:53 +00:00
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.SetActorValue("Aggression", 4)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SpawnEnderaleans()
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_WarriorREF.Enable(abFadeIn = false)
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.Enable(abFadeIn = false)
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_WarriorREF.MoveTo(_00E_NQ_G_06_WarriorKneelMarker)
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.MoveTo(_00E_NQ_G_06_EnderaleanMageStandMarker)
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.disable()
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_WarriorREF.disable()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartFightEnderalean()
|
|
|
|
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_WarriorREF.StartCombat(PlayerREF)
|
2023-12-08 02:45:53 +00:00
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_WarriorREF.SetActorValue("Aggression", 4)
|
2021-10-05 22:15:58 +00:00
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.StartCombat(PlayerREF)
|
2023-12-08 02:45:53 +00:00
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.SetActorValue("Aggression", 4)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StopFight()
|
|
|
|
|
|
|
|
if !_00E_NQ_G_06_MercenaryKilean_MageREF.IsDisabled()
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.StopCombat()
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.SetGhost(True)
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(_00E_NQ_G_06_MercenaryKilean_MageREF, _00E_NPCDumpMarker)
|
2021-10-05 22:15:58 +00:00
|
|
|
ElseIf !_00E_NQ_G_06_MercenaryEnderalean_MageREF.IsDisabled()
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.StopCombat()
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.SetGhost(True)
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_PlayerFunctions.GetTeleportControl().TeleportNPC(_00E_NQ_G_06_MercenaryEnderalean_MageREF, _00E_NPCDumpMarker)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function DespawnMages()
|
|
|
|
|
|
|
|
if !_00E_NQ_G_06_MercenaryKilean_MageREF.IsDisabled()
|
|
|
|
_00E_NQ_G_06_MercenaryKilean_MageREF.Disable()
|
|
|
|
if PlayerREF.GetItemCount(_00E_NQ_G_06_Contract) > 0
|
2024-01-10 14:08:24 +00:00
|
|
|
SetCurrentStageID(45)
|
2021-10-05 22:15:58 +00:00
|
|
|
Else
|
2024-01-10 14:08:24 +00:00
|
|
|
SetCurrentStageID(40)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
ElseIf !_00E_NQ_G_06_MercenaryEnderalean_MageREF.IsDisabled()
|
|
|
|
_00E_NQ_G_06_MercenaryEnderalean_MageREF.Disable()
|
2024-01-10 14:08:24 +00:00
|
|
|
SetCurrentStageID(35)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SetUpStage25()
|
|
|
|
|
|
|
|
if bBlackmailed == true
|
|
|
|
SetupSC04()
|
|
|
|
StartSC04()
|
|
|
|
ElseIf bBlackmailed == false
|
|
|
|
SetupSC03()
|
|
|
|
StartSC03()
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SetupSC02()
|
|
|
|
|
|
|
|
_00E_SC_DijaamOnelys.Enable()
|
|
|
|
_00E_SC_DijaamOnelys.MoveTo(_00E_NQ_G_06_DijaamSitMarker)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SetupSC03()
|
|
|
|
|
|
|
|
_00E_SC_Mael.MoveTo(_00E_NQ_G_06_MaelStandMarker)
|
|
|
|
_00E_NQ_G_06_GuardREF.Enable()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SetupSC04()
|
|
|
|
|
|
|
|
_00E_NQ_G_04_DoorGuardREF.MoveTo(_00E_NQ_G_06_ProtektorStandMarker)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function SetupSC05()
|
|
|
|
|
|
|
|
if _00E_NQ_G_SidedDijaam.GetValue() == 1
|
|
|
|
SpawnEnderaleans()
|
|
|
|
_00E_NQ_G_06_ChestREF.AddItem(_00E_NQ_G_06_SickleNote)
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
if _00E_NQ_G_SidedMael.GetValue() == 1
|
|
|
|
_00E_NQ_G_06_ChestREF.AddItem(_00E_NQ_G_06_Contract)
|
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartSC01()
|
|
|
|
|
|
|
|
NQ_G_06_SC01_MessengerForceGreet.ForceStart()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartSC02()
|
|
|
|
|
|
|
|
NQ_G_06_SC02_DijaamTalkAtTavern.ForceStart()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartSC03()
|
|
|
|
|
|
|
|
NQ_G_06_SC03_MaelTalk.ForceStart()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartSC04()
|
|
|
|
|
|
|
|
NQ_G_06_SC04_ProtektorKickPlayerOut.ForceStart()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function StartSC05()
|
|
|
|
|
|
|
|
NQ_G_06_SC05_EncounterInCave.ForceStart()
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function RewardMoney()
|
|
|
|
|
|
|
|
PlayerREF.AddItem(Gold001, __Config_RewardMoney)
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function FinishQuest()
|
|
|
|
|
2024-01-09 22:00:18 +00:00
|
|
|
_00E_EPHandler.GiveEP(__Config_RewardEXP)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
if _00E_NQ_G_SidedMael.GetValueInt() == 1
|
2024-01-10 14:08:24 +00:00
|
|
|
NQ_G_07Mael.SetCurrentStageID(5)
|
2021-10-05 22:15:58 +00:00
|
|
|
Else
|
2024-01-10 14:08:24 +00:00
|
|
|
NQ_G_07Dijaam.SetCurrentStageID(5)
|
2021-10-05 22:15:58 +00:00
|
|
|
EndIf
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
|
|
|
; EVENTS
|
|
|
|
;=====================================================================================
|
|
|
|
Event OnUpdateGameTime()
|
|
|
|
|
|
|
|
NQG06_ReadyToSpawn.SetValueInt(1)
|
|
|
|
|
|
|
|
PlaceMessenger()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
;=====================================================================================
|
|
|
|
; PROPERTIES
|
|
|
|
;=====================================================================================
|
|
|
|
ObjectReference objSpawnMarker ;for moving Messenger
|
|
|
|
|
|
|
|
bool Property bBlackmailed Auto Conditional
|
|
|
|
bool bMessengerSpawned
|
|
|
|
|
|
|
|
Quest Property MQ12b Auto
|
|
|
|
Quest Property MQ14 Auto
|
|
|
|
|
|
|
|
;rewards
|
|
|
|
int Property __Config_RewardEXP Auto
|
|
|
|
int Property __Config_RewardMoney Auto
|
|
|
|
MiscObject Property Gold001 Auto
|
|
|
|
|
|
|
|
;items
|
|
|
|
Book Property _00E_NQ_G_06_LetterFromDijaam_M Auto
|
|
|
|
Book Property _00E_NQ_G_06_LetterFromDijaam_F Auto
|
|
|
|
Book Property _00E_NQ_G_06_Contract Auto
|
|
|
|
Book Property _00E_NQ_G_06_SickleNote Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_ChestREF Auto
|
|
|
|
|
|
|
|
;actors
|
|
|
|
Actor Property _00E_NQ_G_05_MessengerREF Auto
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Actor Property _00E_NQ_G_04_DoorGuardREF Auto
|
|
|
|
Actor Property _00E_SC_Mael Auto
|
|
|
|
Actor Property _00E_SC_DijaamOnelys Auto
|
|
|
|
Actor Property _00E_NQ_G_06_GuardREF Auto
|
|
|
|
Actor Property _00E_NQ_G_06_MercenaryEnderalean_WarriorREF Auto
|
|
|
|
Actor Property _00E_NQ_G_06_MercenaryEnderalean_MageREF Auto
|
|
|
|
Actor Property _00E_NQ_G_06_MercenaryKilean_WarriorREF Auto
|
|
|
|
Actor Property _00E_NQ_G_06_MercenaryKilean_MageREF Auto
|
|
|
|
|
|
|
|
Location Property CapitalCityLocation Auto
|
|
|
|
Location Property _00E_SuntempleLocation Auto
|
|
|
|
|
|
|
|
;scenes
|
|
|
|
Scene Property NQ_G_06_SC01_MessengerForceGreet Auto
|
|
|
|
Scene Property NQ_G_06_SC02_DijaamTalkAtTavern Auto
|
|
|
|
Scene Property NQ_G_06_SC03_MaelTalk Auto
|
|
|
|
Scene Property NQ_G_06_SC04_ProtektorKickPlayerOut Auto
|
|
|
|
Scene Property NQ_G_06_SC05_EncounterInCave Auto
|
|
|
|
|
|
|
|
;for spawning Marker to move Messenger to
|
|
|
|
Static Property XMarkerHeading Auto
|
|
|
|
|
|
|
|
;globals
|
|
|
|
GlobalVariable Property _00E_NQ_G_SidedDijaam Auto
|
|
|
|
GlobalVariable Property _00E_NQ_G_SidedMael Auto
|
|
|
|
GlobalVariable Property NQG06_ReadyToSpawn Auto
|
|
|
|
|
|
|
|
;marker
|
|
|
|
ObjectReference Property _00E_NQ_G_06_ProtektorStandMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_DijaamSitMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_MaelStandMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_WarriorKneelMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_EnderaleanMageStandMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_KileanWarriorStandMarker Auto
|
|
|
|
ObjectReference Property _00E_NQ_G_06_KileanMageStandMarker Auto
|
|
|
|
ObjectReference Property _00E_NPCDumpMarker Auto
|
|
|
|
|
|
|
|
;next quest
|
|
|
|
_00E_NQ_G_07_Functions Property NQ_G_07Mael Auto
|
|
|
|
_00E_NQ_G_07_Functions Property NQ_G_07Dijaam Auto
|