Oldaccountblocked

autosorter script

Jun 13th, 2024
41
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | Gaming | 0 0
  1. Scriptname AutosorterPelt extends ObjectReference
  2.  
  3. FormList Property AutoSorterPeltList Auto
  4. ObjectReference Property AutosorterPeltChest Auto
  5.  
  6. Event OnActivate(ObjectReference akActionref)
  7. PlayGamebryoAnimation("open")
  8. PlayAnimation("open")
  9. MoveListItemsToChest(akActionref)
  10. EndEvent
  11.  
  12. Function MoveListItemsToChest(ObjectReference akActionRef)
  13.  
  14. Actor Player = Game.GetPlayer()
  15. Int FormToFind = 0
  16. Int MaxSize = AutoSorterPeltList.GetSize()
  17. Int ItemToMoveCount = Player.GetItemCount(AutoSorterPeltList.GetAt(0))
  18. Form ItemToMove = AutoSorterPeltList.GetAt(0)
  19.  
  20. While 0<= MaxSize
  21. If ItemToMoveCount >= 1
  22. AutosorterPeltChest.Additem(AutoSorterPeltList, ItemToMoveCount)
  23. Player.RemoveItem(AutoSorterPeltList, ItemToMoveCount)
  24. Debug.Notification("Removed "+ItemToMoveCount+ItemToMove+" from the player")
  25. FormToFind + 1
  26. ElseIf ItemToMoveCount == 0
  27. FormToFind + 1
  28. Debug.Notification("No pelt was found")
  29. EndIf
  30. EndWhile
  31.  
  32. EndFunction
Advertisement
Comments
Add Comment
Please, Sign In to add comment