Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /nkit [<text>] [<text>] [<text>]:
- trigger:
- if arg 1 is "create":
- if arg 2 is set:
- if {kits::%arg-2%} is not set:
- if arg 3 is set:
- set {_count} to 0
- loop 36 times:
- set {kit.%arg-2%.%{_count}%} to slot {_count} of player's inventory
- add 1 to {_count}
- set {kit.%arg-2%.helmet} to player's helmet
- set {kit.%arg-2%.chest} to player's chestplate
- set {kit.%arg-2%.legs} to player's leggings
- set {kit.%arg-2%.feet} to player's boots
- clear player's inventory
- message "&7You created &c&l%arg-2%" to player
- set {kit::%arg-2%} to "%arg-3%"
- else if arg 3 is not set:
- message "&7add an icon" to player
- else if {kit::%arg-2%} is set:
- message "&c&l%arg-2%&7 is already created" to player
- else if arg 2 is not set:
- message "&7You need to add a kit name" to player
- else if arg 1 is not "create":
- if arg 1 is set:
- if {kit::%arg-1%} is set:
- set {_count} to 0
- loop 36 times:
- set slot {_count} of player's inventory to {kit.%arg-1%.%{_count}%}
- add 1 to {_count}
- set the helmet of player to {kit.%arg-1%.helmet}
- set the chestplate of player to {kit.%arg-1%.chest}
- set the leggings of player to {kit.%arg-1%.legs}
- set the boots of player to {kit.%arg-1%.feet}
- message "&7You got &c&l%arg-1% &7kit" to player
- else if {kit::%arg-1%} is not set:
- message "&7there is no such kit" to player
- else if arg 1 is not set:
- open chest with 3 rows named "kit selector" to player
- wait 1 ticks
- set {_slot} to 0
- loop {kit::*}:
- loop {kit.kit::*}:
- format slot {_slot} of player with {kit::%loop-value-1%} named "{kit.kit::%loop-value-2%}%" to close the run [make player execute command "/nkit %loop-value-2%"]
- add 1 to {_slot}
Advertisement
Add Comment
Please, Sign In to add comment