Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname AutosorterPelt extends ObjectReference
- FormList Property AutoSorterPeltList Auto
- ObjectReference Property AutosorterPeltChest Auto
- Event OnActivate(ObjectReference akActionref)
- PlayGamebryoAnimation("open")
- PlayAnimation("open")
- MoveListItemsToChest(akActionref)
- EndEvent
- Function MoveListItemsToChest(ObjectReference akActionRef)
- Actor Player = Game.GetPlayer()
- Int FormToFind = 0
- Int MaxSize = AutoSorterPeltList.GetSize()
- Int ItemToMoveCount = Player.GetItemCount(AutoSorterPeltList.GetAt(0))
- Form ItemToMove = AutoSorterPeltList.GetAt(0)
- While 0<= MaxSize
- If ItemToMoveCount >= 1
- AutosorterPeltChest.Additem(AutoSorterPeltList, ItemToMoveCount)
- Player.RemoveItem(AutoSorterPeltList, ItemToMoveCount)
- Debug.Notification("Removed "+ItemToMoveCount+ItemToMove+" from the player")
- FormToFind + 1
- ElseIf ItemToMoveCount == 0
- FormToFind + 1
- Debug.Notification("No pelt was found")
- EndIf
- EndWhile
- EndFunction
Advertisement