Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {cooldown.%player%} = 0
- on rightclick on witch:
- if {cooldown.%player%} is 0:
- set {cooldown.%player%} to 5
- uncolored name of entity is "自動両替"
- set {_1nc} to slime named "1NC"
- set 1st line of lore of {_1nc} to "このサーバーの通貨"
- set {_10nc} to slime_block named "10NC"
- set {_100nc} to emerald_ore named "100NC"
- set {_1000nc} to emerald named "1000NC"
- set {_value} to 0
- set {_true} to true
- while {_true} is set:
- set {_count} to 0
- loop all items of player:
- if loop-item is {_1nc}:
- add 1 to {_value}
- add 1 to {_count}
- remove {_1nc} from player
- if loop-item is {_10nc}:
- add 10 to {_value}
- add 1 to {_count}
- remove {_10nc} from player
- if loop-item is {_100nc}:
- add 100 to {_value}
- add 1 to {_count}
- remove {_100nc} from player
- if loop-item is {_1000nc}:
- add 1000 to {_value}
- add 1 to {_count}
- remove {_1000nc} from player
- if {_count} is 0:
- exit 2 sections
- while {_value} is greater than or equal to 1000:
- add {_1000nc} to player
- remove 1000 from {_value}
- while {_value} is greater than or equal to 100:
- add {_100nc} to player
- remove 100 from {_value}
- while {_value} is greater than or equal to 10:
- add {_10nc} to player
- remove 10 from {_value}
- while {_value} is greater than or equal to 1:
- add {_1nc} to player
- remove 1 from {_value}
- every second:
- loop all players:
- if {cooldown.%loop-player%} is greater than 0:
- remove 1 from {cooldown.%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement