Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {mana::%player%} = 0
- {level::%player%} = 0
- every tick:
- loop all players:
- set action bar of loop-player to "&8"
- options:
- coal: 2 # Prices
- stone: 1 # Prices
- command /convert:
- permission: convert.use
- permission message: &e(!) Purchase a rank to use the command
- trigger:
- if amount of light gray dye in player's inventory is less than 1:
- if amount of gray dye in player's inventory is less than 1:
- send "&9Convert> &7Obtain some crystals to sell" to player
- stop
- set {_stone} to number of light gray dye in player's inventory
- set {_coal} to number of gray dye in player's inventory
- set {_value1} to {@stone} * {_stone}
- set {_value2} to {@coal} * {_coal}
- set {_money1} to {_stone}
- set {_money2} to {_coal}
- set {blocks} to {_value2} + {_value1}
- set {_money} to {_money2} + {_money1}
- remove all gray dye and light gray dye from player's inventory
- add {_money} to player's balance
- send player title "&9&lConvert" with subtitle "&7Sold &f%{_money}%x &7crystals for &f$%{blocks}%" for 3 seconds
- stop
- command /consoleconvert <player>:
- executable by: console
- trigger:
- if amount of light gray dye in arg 1's inventory is less than 1:
- if amount of gray dye in arg 1's inventory is less than 1:
- send "&9Convert> &7Obtain some crystals to sell" to arg 1
- stop
- set {_stone} to number of light gray dye in arg 1's inventory
- set {_coal} to number of gray dye in arg 1's inventory
- set {_value1} to {@stone} * {_stone}
- set {_value2} to {@coal} * {_coal}
- set {_money1} to {_stone}
- set {_money2} to {_coal}
- set {blocks} to {_value2} + {_value1}
- set {_money} to {_money2} + {_money1}
- remove all gray dye and light gray dye from arg 1's inventory
- add {_money} to arg 1's balance
- send arg 1 title "&9&lConvert" with subtitle "&7Sold &f%{_money}%x &7crystals for &f$%{blocks}%" for 3 seconds
- stop
- command /bypass:
- permission: bypass.use
- trigger:
- if {bypass::%player%} is not set:
- set {bypass::%player%} to "True"
- send "&9Bypass> &7Bypass mode activated"
- stop
- if {bypass::%player%} is "True":
- delete {bypass::%player%}
- send "&9Bypass> &7Bypass mode deactivated"
- stop
- on break:
- if {bypass::%player%} is "True":
- stop
- if event-block is any ore or cobble:
- stop
- else:
- cancel event
- send "&9Mining> &7You cannot mine this block"
- on break of cobble:
- if {bypass::%player%} is "True":
- stop
- if player is not holding a pickaxe:
- cancel event
- send "&9Mining> &7You must be holding a pickaxe"
- stop
- else:
- cancel drops
- give player 1 light gray dye named "&7Stone Crystal"
- set event-block to bedrock
- wait 4 seconds
- set event-block to cobble
- stop
- on break of coal ore:
- if {bypass::%player%} is "True":
- stop
- if player is holding a wooden pickaxe:
- cancel event
- send "&9Mining> &7You cannot mine this block with this pickaxe"
- stop
- else:
- cancel drops
- give player 1 gray dye named "&fCoal Crystal"
- set event-block to bedrock
- wait 4 seconds
- set event-block to coal ore
- stop
- on rightclick on dispenser:
- if {bypass::%player%} is "True":
- stop
- cancel event
- make console execute command "/consoleconvert %player%"
Advertisement
Add Comment
Please, Sign In to add comment