Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- every 2 second:
- set {_it::*} to "322:0", "322:1" and "368"
- loop all players:
- set {_p} to loop-player
- loop {_it::*}:
- set {_amount} to amount of ("%loop-value-2%" parsed as item) in {_p}'s inventory
- if {_amount} is larger than 5:
- set {_amounts} to "%{_amount}-5% %loop-value-2%" parsed as item
- remove {_amounts} from {_p}
- remove 5 from {_amount}
- if {_p}'s enderchest have enough space for ("%loop-value-2%" parsed as item):
- if {_p}'s enderchest have enough space for {_amounts}:
- add {_amounts} to {_p}'s enderchest
- send "%{_amount}% %type of {_amounts}% zostalo przeniesione do twojego enderchestu." to {_p}
- else:
- loop {_amount} times:
- set {_can} to {_amount}-(loop-number)
- if {_p}'s enderchest have enough space for ("%{_can}% %loop-value-2%" parsed as item):
- send "%{_can}% %type of {_amounts}% zostalo przeniesione do twojego enderchestu." to {_p}
- add "%{_can}% %type of {_amounts}%" parsed as item to {_p}'s enderchest
- exit loop
- if {_can} is not 0:
- set {_drop} to {_amount} - {_can}
- drop ("%{_drop}% %loop-value-2%" parsed as item) 1 above {_p}
- send "%{_drop}% %type of {_amounts}% zostalo wyrzucone na ziemie." to {_p}
- else:
- drop {_amounts} 1 above {_p}
- send "%{_amount}% %type of {_amounts}% zostalo wyrzucone na ziemie." to {_p}
- on pickup: #of 322:1:
- if event-item is 322:0 or 322:1 or 368:
- set {_amount} to amount of (type of event-item) in player's inventory
- if {_amount} is larger than or equal to 5:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment