Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /kit [<text>] [<text>] [<player>]:
- trigger:
- if arg 1 is "save":
- if player has permission "kit.save" or "kit.*":
- if arg 2 is set:
- if {kits::%arg 2%} is set:
- send "&6>> &9Ten kit pod taka nazwa jest juz zapisany"
- stop
- set {kits::%arg 2%} to argument 2
- send "&6>> &9Zapisales &6[&a%arg 2%&6]&9 jako kit."
- clear {kit.%arg 1%::*}
- set {kit.%arg 2%.helmet} to "%helmet of the player%"
- set {kit.%arg 2%.chestplate} to "%chestplate of the player%"
- set {kit.%arg 2%.leggings} to "%leggings of the player%"
- set {kit.%arg 2%.boots} to "%boots of the player%"
- loop items in player's inventory:
- if ID of loop-item is 373:
- set {_id} to ID of loop-item
- set {_data} to data value of loop-item
- add "%{_id}%:%{_data}%" to {kit.%arg 2%::*}
- else:
- add "%loop-item%" to {kit.%arg 2%::*}
- if arg 1 is "load":
- if player has permission "kit.load" or "kit.*":
- if arg 2 is set:
- if {kits::%arg 2%} is not set:
- send "&6>> &9Nie ma takiego kitu"
- stop
- loop {kit.%arg 2%::*}:
- give player (loop-value parsed as item)
- equip player with {kit.%arg 2%.boots} parsed as item
- equip player with {kit.%arg 2%.chestplate} parsed as item
- equip player with {kit.%arg 2%.leggings} parsed as item
- equip player with {kit.%arg 2%.helmet} parsed as item
- send "&6>> &aDostales kit &6[&a%arg 2%&6]"
- if arg 1 is "list":
- if player has permission "kit.list" or "kit.*":
- send "&6>> &9Zapisane kity: &6%{kits::*}%"
- stop
- if arg 1 is "delete":
- if player has permission "kit.delete" or "kit.*":
- if arg 2 is set:
- if {kits::%arg 2%} is not set:
- send "&6>> &9Nie ma takiego kitu"
- stop
- clear {kits::%arg 2%}
- clear {kit.%arg 2%::*}
- clear {kit.%arg 2%.helmet}
- clear {kit.%arg 2%.chestplate}
- clear {kit.%arg 2%.leggings}
- clear {kit.%arg 2%.boots}
- send "&6>> &9Usunales kit &6[&a%arg 2%&6]"
- if arg 1 is not set:
- send "&6<>&7&M-----------------------------------&6<>"
- send "&6/kit save <nazwa> &f- &9Zapisuje kit"
- send "&6/kit load <nazwa> &f- &9Daje kit"
- send "&6/kit delete <nazwa> &f- &9Usuwa kit"
- send "&6/kit list &f- &9Lista kitow"
- send "&6<>&7&M-----------------------------------&6<>"
- stop
- on rightclick on sign:
- if player has permission "kit.sign" or "kit.*":
- if line 1 of the clicked block is "&1[KitDeath]":
- loop {kits::*}:
- line 2 of the clicked block is loop-value
- loop {kit.%line 2 of the clicked block%::*}:
- give player (loop-value-2 parsed as item)
- equip player with {kit.%line 2 of the clicked block%.boots} parsed as item
- equip player with {kit.%line 2 of the clicked block%.chestplate} parsed as item
- equip player with {kit.%line 2 of the clicked block%.leggings} parsed as item
- equip player with {kit.%line 2 of the clicked block%.helmet} parsed as item
- send "&6>> &aDostales kit &6[&a%line 2 of the clicked block%&6]"
- stop
- send "&6>> &cNie znaleziono zestawu zdefiniowanego na tabliczce."
- on sign change:
- if player has permission "kit.*":
- if line 1 is "[k]":
- loop {kits::*}:
- line 2 is loop-value
- set line 1 to "&1[KitDeath]"
- send "&6>> &aStworzono tabliczke &6KIT"
- stop
- cancel event
- send "&6>> &cNie znaleziono zestawu, ktory chcesz przypisac do tej tabliczki"
Advertisement
Add Comment
Please, Sign In to add comment