Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mort65 authored Aug 6, 2022
1 parent 99de163 commit df49ab2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Data/source/scripts/zzzmoaitemcursescript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ Function LoseOtherItems()
QuestItems.AddForm(kItem)
EndIf
Endwhile
ValuableItemsChest.RemoveAllItems(PlayerRef,True,True)
;ValuableItemsChest.RemoveAllItems(PlayerRef,True,True) Causes the script to halt until opening and closing a menu :/
transferItems(ValuableItemsChest, PlayerRef As ObjectReference)
Utility.Wait(0.2)
EndIf
If ConfigMenu.iLoseInclusion == 2 ;Exclude Equipped Items
Expand Down
5 changes: 4 additions & 1 deletion Data/source/scripts/zzzmoautilscript.psc
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,14 @@ Form Function getFromMergedFormList(FormList akMergedlist,Int aiIndex = 0) Globa
EndFunction


Function transferItems(ObjectReference akInContainer, ObjectReference akOutContainer, Int aiIndex, Int aiCount) Global
Function transferItems(ObjectReference akInContainer, ObjectReference akOutContainer, Int aiIndex = 0, Int aiCount = -1) Global
{transfers items from an object reference to another.}
If aiIndex > akInContainer.GetNumItems() - 1
Return
EndIf
If aiCount == -1
aiCount = akInContainer.GetNumItems()
EndIf
Int aiLast = iMin(akInContainer.GetNumItems() - 1,(aiIndex + aiCount) - 1)
Form kItem
While aiIndex < aiLast + 1
Expand Down

0 comments on commit df49ab2

Please sign in to comment.