Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfunction convert2text(string: text, len: number) :: text:
- set {_chars} to "PETOHMNILDCKAGYS"
- set {_charset::*} to {_chars} split at ""
- set {_hex::*} to {_string} split at ""
- set {_text} to ""
- set {_i} to 0
- loop {_hex::*}:
- set {_num} to convert hexa "%loop-value%" to num
- set {_char} to {_charset::%{_num}%}
- set {_text} to "%{_text}%%{_char}%"
- add 1 to {_i}
- {_i} >= {_len}:
- stop loop
- return {_text}
- function getNums(string: text) :: text:
- set {_hex::*} to {_string} split at ""
- set {_i} to 0
- set {_nums} to ""
- loop {_hex::*}:
- if {_i} is between 27 and 30:
- set {_num} to convert hexa "%loop-value%" to num
- if {_num} >= 10:
- subtract 10 from {_num}
- set {_nums} to "%{_nums}%%{_num}%"
- else if {_i} > 31:
- stop loop
- add 1 to {_i}
- #broadcast "%{_nums}%"
- return {_nums}
- on piston extend:
- set {_loc} to location of block under block under event-block
- if block at {_loc} is a dropper:
- set {_item} to slot 0 of inventory of block at {_loc}
- #broadcast "%{hash.%{_loc}%}%"
- set {_colors::*} to {hash.%{_loc}%} split at ""
- set {_text} to ""
- loop {_colors::*}:
- set {_text} to "%{_text}%ยง%loop-value%."
- #broadcast "%{hash.%{_loc}%}%."
- if {hash.%{_loc}%} is set:
- set {_hex} to {hash.%{_loc}%}
- set {_part1} to convert2text({_hex}, 4)
- set {_part2} to getNums({_hex})
- set {_text} to "%{_part1}%%{_part2}%"
- if {_item} is gold nugget:
- drop 1 prismarine crystal with lore "%{_text}%" at block under event-block
- subtract 1 of {_item} from slot 0 of inventory of block at {_loc}
- if {_item} is iron nugget:
- drop 1 prismarine shard with lore "%{_text}%" at block under event-block
- subtract 1 of {_item} from slot 0 of inventory of block at {_loc}
- if {_item} is rabbit foot:
- drop 1 magma cream with lore "%{_text}%" at block under event-block
- subtract 1 of {_item} from slot 0 of inventory of block at {_loc}
- if {_item} is rabbit hide:
- drop 1 glistering melon with lore "%{_text}%" at block under event-block
- subtract 1 of {_item} from slot 0 of inventory of block at {_loc}
- on right click on dropper:
- player is holding white banner or orange banner or black banner or magenta banner or yellow banner or lime banner or light blue banner or pink banner or gray banner or light gray banner or cyan banner or purple banner or blue banner or brown banner or green banner or red banner:
- broadcast "vitun apen koodi saatana"
- cancel event
- {hash.%location of clicked block%} is not set
- set {_nbt} to "%nbt of tool of player%"
- set {_hash} to hashed "%{_nbt}%" using "MD5"
- set {hash.%location of clicked block%} to {_hash}
- set {nbt.%location of clicked block%} to tool of player
- subtract 1 banner from tool of player
- on break of dropper:
- delete {hash.%location of event-block%}
- set {_item} to {nbt.%location of event-block%}
- drop 1 of {_item} at event-block
- #give player 1 of {_item}
- delete {nbt.%location of event-block%}
- on death of rabbit:
- remove all rabbit hide from drops
- remove all rabbit foot from drops
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement