Advertisement
Matthiaswagg

For Tobias (Simple)

May 2nd, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Function EndSwap()
  2.  
  3. int ListSize = BearFormList.GetSize()
  4. int CurrentPelts = 0
  5. int PeltsLeft = 10
  6.  
  7. while CurrentPelts < ListSize && PeltsLeft > 0
  8. Form CurrentItem = BearFormList.GetAt(CurrentPelts)
  9. int PeltCount = PlayerREF.GetItemCount(CurrentItem)
  10. if PeltCount >= PeltsLeft
  11. PeltsLeft = 0
  12. else
  13. PeltsLeft -= PeltCount
  14. endif
  15.  
  16. PlayerREF.RemoveItem(CurrentItem,PeltCount)
  17. CurrentPelts += 1
  18. endwhile
  19.  
  20. endFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement