2021-10-05 22:15:58 +00:00
|
|
|
Scriptname _00E_FS_NQR_SQ_01_Functions extends Quest
|
|
|
|
|
|
|
|
;=====================================================================================
|
2024-01-29 04:52:32 +00:00
|
|
|
; FUNCTIONS
|
2021-10-05 22:15:58 +00:00
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Function SetUp()
|
|
|
|
|
|
|
|
FS_NQR_SQ_01_ScionGustavREF.Enable()
|
|
|
|
|
|
|
|
if !FS_NQR_SQ_01_Scene_01.IsPlaying()
|
|
|
|
FS_NQR_SQ_01_Scene_01.ForceStart()
|
|
|
|
endif
|
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
Function OpenGiftmenu()
|
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
FS_NQR05_SQ_01_FakeREF.RemoveAllItems()
|
|
|
|
FS_NQR05_SQ_01_FakeREF.ShowGiftMenu(True, _00E_FS_PyreanMiscItems, True, False)
|
|
|
|
Utility.Wait(0.2)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
GiveRewardNEW()
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
EndFunction
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
Function GiveRewardNEW()
|
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
Int NumItems = FS_NQR05_SQ_01_FakeREF.GetNumItems()
|
|
|
|
|
|
|
|
if NumItems <= 0
|
|
|
|
return
|
|
|
|
endif
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
int iTotalReward
|
|
|
|
Int i = 0
|
|
|
|
While (i < NumItems)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
Form Entry = FS_NQR05_SQ_01_FakeREF.GetNthForm(i)
|
|
|
|
int iGoldValue = Entry.GetGoldValue()
|
|
|
|
|
|
|
|
if iGoldValue > 0
|
|
|
|
float fValue = (iGoldValue + iGoldValue * 0.33) * FS_NQR05_SQ_01_FakeREF.GetItemCount(Entry)
|
|
|
|
iTotalReward = iTotalReward + fValue as Int
|
|
|
|
endif
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
i += 1
|
2021-10-05 22:15:58 +00:00
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
EndWhile
|
|
|
|
|
|
|
|
FS_NQR05_SQ_01_FakeREF.RemoveAllItems()
|
|
|
|
PlayerREF.AddItem(Gold001, iTotalReward)
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
EndFunction
|
|
|
|
|
|
|
|
;=====================================================================================
|
2024-01-29 04:52:32 +00:00
|
|
|
; PROPERTIES
|
2021-10-05 22:15:58 +00:00
|
|
|
;=====================================================================================
|
|
|
|
|
|
|
|
Actor Property FS_NQR_SQ_01_ScionGustavREF Auto
|
|
|
|
Actor Property PlayerREF Auto
|
|
|
|
Actor Property FS_NQR05_SQ_01_FakeREF Auto
|
|
|
|
|
|
|
|
Scene Property FS_NQR_SQ_01_Scene_01 Auto
|
|
|
|
|
2024-01-29 04:52:32 +00:00
|
|
|
Formlist Property _00E_FS_PyreanMiscItems Auto
|
2021-10-05 22:15:58 +00:00
|
|
|
|
|
|
|
MiscObject Property Gold001 Auto
|