knugi

Untitled

Mar 20th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. every 2 second:
  2. set {_it::*} to "322:0", "322:1" and "368"
  3. loop all players:
  4. set {_p} to loop-player
  5. loop {_it::*}:
  6. set {_amount} to amount of ("%loop-value-2%" parsed as item) in {_p}'s inventory
  7. if {_amount} is larger than 5:
  8. set {_amounts} to "%{_amount}-5% %loop-value-2%" parsed as item
  9. remove {_amounts} from {_p}
  10. remove 5 from {_amount}
  11. if {_p}'s enderchest have enough space for ("%loop-value-2%" parsed as item):
  12. if {_p}'s enderchest have enough space for {_amounts}:
  13. add {_amounts} to {_p}'s enderchest
  14. send "%{_amount}% %type of {_amounts}% zostalo przeniesione do twojego enderchestu." to {_p}
  15. else:
  16. loop {_amount} times:
  17. set {_can} to {_amount}-(loop-number)
  18. if {_p}'s enderchest have enough space for ("%{_can}% %loop-value-2%" parsed as item):
  19. send "%{_can}% %type of {_amounts}% zostalo przeniesione do twojego enderchestu." to {_p}
  20. add "%{_can}% %type of {_amounts}%" parsed as item to {_p}'s enderchest
  21. exit loop
  22. if {_can} is not 0:
  23. set {_drop} to {_amount} - {_can}
  24. drop ("%{_drop}% %loop-value-2%" parsed as item) 1 above {_p}
  25. send "%{_drop}% %type of {_amounts}% zostalo wyrzucone na ziemie." to {_p}
  26. else:
  27. drop {_amounts} 1 above {_p}
  28. send "%{_amount}% %type of {_amounts}% zostalo wyrzucone na ziemie." to {_p}
  29. on pickup: #of 322:1:
  30. if event-item is 322:0 or 322:1 or 368:
  31. set {_amount} to amount of (type of event-item) in player's inventory
  32. if {_amount} is larger than or equal to 5:
  33. cancel event
Advertisement
Add Comment
Please, Sign In to add comment