Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Pattern 1/2
- command /chestrandom1:
- trigger:
- if sender does not have permission "skript.admin":
- send "&cYou do not have permission to do this."
- send "&cPlease contact the server administrators."
- stop
- if amount of {chests1::*} is 0:
- send "&cPlease select the chest."
- stop
- loop {chests1::*}:
- set {_slot} to random integer between 0 and 27
- set {_items} to random integer between 5 and 10
- set {_chest} to loop-value
- loop {_items} count:
- set {_item} to random integer between 1 and 3
- if {_item} is 1:
- set slot {_slot} of {_chest} to 32 arrow
- if {_item} is 2:
- set slot {_slot} of {_chest} to 64 oak wood
- if {_item} is 3:
- set slot {_slot} of {_chest} to 64 stone
- command /chestselect1 [<text>]:
- trigger:
- if player does not have permission "skript.admin":
- send "&cYou don't have permission, or you are not a player."
- stop
- if arg 1 is not set:
- send "&cUsage:/chestselect1 <add|remove|reset|stop>"
- stop
- if arg 1 is "add":
- set {chestmode1.%player%} to "add"
- send "&bBreak the chest."
- stop
- if arg 1 is "remove":
- set {chestmode1.%player%} to "remove"
- send "&bBreak the chest."
- stop
- if arg 1 is "reset":
- clear {chests1::*}
- send "&bAll chests was removed!"
- stop
- if arg 1 is "stop":
- delete {chestmode1.%player%}
- send "&bChest selection mode was stopped."
- stop
- on break:
- if {chestmode1.%player%} is "add":
- cancel event
- if {chests1::*} contains event-block:
- send "&cThis chest already added."
- stop
- if event-block is not chest:
- send "&cThis block is not a chest."
- stop
- add event-block to {chests1::*}
- send "&bAdd the chest successfly."
- stop
- if {chestmode1.%player%} is "remove":
- cancel event
- if {chests1::*} does not contain event-block:
- send "&cThis chest does not contain randomize chest list."
- stop
- if event-block is not chest:
- send "&cThis block is not a chest."
- stop
- remove event-block to {chests1::*}
- send "&bRemove the chest successfly."
- #Pattern 2/2
- command /chestrandom2:
- trigger:
- if sender does not have permission "skript.admin":
- send "&cYou do not have permission to do this."
- send "&cPlease contact the server administrators."
- stop
- if amount of {chests2::*} is 0:
- send "&cPlease select the chest."
- stop
- loop {chests2::*}:
- set {_slot} to random integer between 0 and 27
- set {_items} to random integer between 5 and 20
- set {_chest} to loop-value
- loop {_items} count:
- set {_item} to random integer between 2 and 3
- if {_item} is 1:
- set slot {_slot} of {_chest} to 32 diamond
- if {_item} is 2:
- set slot {_slot} of {_chest} to 64 iron ingot
- if {_item} is 3:
- set slot {_slot} of {_chest} to 64 white wool
- command /chestselect2 [<text>]:
- trigger:
- if player does not have permission "skript.admin":
- send "&cYou don't have permission, or you are not a player."
- stop
- if arg 1 is not set:
- send "&cUsage:/chestselect2 <add|remove|reset|stop>"
- stop
- if arg 1 is "add":
- set {chestmode2.%player%} to "add"
- send "&bBreak the chest."
- stop
- if arg 1 is "remove":
- set {chestmode2.%player%} to "remove"
- send "&bBreak the chest."
- stop
- if arg 1 is "reset":
- clear {chests2::*}
- send "&bAll chests was removed!"
- stop
- if arg 1 is "stop":
- delete {chestmode2.%player%}
- send "&bChest selection mode was stopped."
- stop
- on break:
- if {chestmode2.%player%} is "add":
- cancel event
- if {chests2::*} contains event-block:
- send "&cThis chest already added."
- stop
- if event-block is not chest:
- send "&cThis block is not a chest."
- stop
- add event-block to {chests2::*}
- send "&bAdd the chest successfly."
- stop
- if {chestmode2.%player%} is "remove":
- cancel event
- if {chests2::*} does not contain event-block:
- send "&cThis chest does not contain randomize chest list."
- stop
- if event-block is not chest:
- send "&cThis block is not a chest."
- stop
- remove event-block to {chests2::*}
- send "&bRemove the chest successfly."
Advertisement
Add Comment
Please, Sign In to add comment