enderalse/source/scripts/_00e_fs_nqr_sq_01_functions.psc

68 lines
1.6 KiB
Plaintext
Raw Normal View History

Scriptname _00E_FS_NQR_SQ_01_Functions extends Quest
;=====================================================================================
; FUNCTIONS
;=====================================================================================
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()
FS_NQR05_SQ_01_FakeREF.RemoveAllItems()
FS_NQR05_SQ_01_FakeREF.ShowGiftMenu(True, _00E_FS_PyreanMiscItems, True, False)
Utility.Wait(0.2)
GiveRewardNEW()
EndFunction
Function GiveRewardNEW()
Int NumItems = FS_NQR05_SQ_01_FakeREF.GetNumItems()
if NumItems <= 0
return
endif
int iTotalReward
Int i = 0
While (i < NumItems)
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
i += 1
EndWhile
FS_NQR05_SQ_01_FakeREF.RemoveAllItems()
PlayerREF.AddItem(Gold001, iTotalReward)
EndFunction
;=====================================================================================
; PROPERTIES
;=====================================================================================
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
Formlist Property _00E_FS_PyreanMiscItems Auto
MiscObject Property Gold001 Auto