Advertisement
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(FormToFind))
- Form ItemToMove = AutoSorterPeltList.GetAt(FormToFind)
- While FormToFind<= MaxSize
- If ItemToMoveCount >= 1
- AutosorterPeltChest.Additem(ItemToMove, ItemToMoveCount)
- Player.RemoveItem(ItemToMove, 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
Comments
-
- 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(FormToFind))
- Form ItemToMove = AutoSorterPeltList.GetAt(FormToFind)
- While FormToFind <= MaxSize
- If ItemToMoveCount >= 1
- AutosorterPeltChest.Additem(ItemToMove, ItemToMoveCount)
- Player.RemoveItem(ItemToMove, 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
Add Comment
Please, Sign In to add comment
Advertisement