Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {diamonds.%player%}=0
- {rand}=0
- {count}=0
- {balance}=false
- command /balance:
- description:Enables Balance
- permission:skript.op
- trigger:
- broadcast "<orange>Balance has been enabled"
- set {balance} to true
- loop all players:
- set {diamonds.%loop-player%} to 0
- command /unbalance:
- description:Disable Balance
- permission:skript.op
- trigger:
- broadcast "<orange>Balance has been disabled"
- set {balance} to false
- loop all players:
- set {diamonds.%loop-player%} to 0
- on mine of diamond ore:
- if {balance} is true:
- if {diamonds.%player%} is greater than 4:
- set {count} to ({diamonds.%player%}-3)
- set {rand} to a random integer between 1 and {count}
- if {rand} is not 1:
- cancel event
- delete block
- if {rand} is 1:
- add 1 to {diamonds.%player%}
- add 1 to {count}
- send "<orange>Diamonds now have a 1/%{count}% chance to drop!" to player
- if {diamonds.%player%} is less than 5:
- add 1 to {diamonds.%player%}
- if {diamonds.%player%} is 5:
- send "<orange>Uh oh! Diamonds might disappear when mined now!" to player
Advertisement
Add Comment
Please, Sign In to add comment