VxaN3vBx
Język: Skript
|
Autor: Anonimowy
options: # Limit: arrowsLimit: 16 # Messages: noArrowsLeftMessage: &cNie posiadasz już strzał w schowku! hasTooManyMessage: &cJuż masz 16 strzał w ekwipunku! noSpaceMessage: &cNie posiadasz już miejsca w ekwipunku! doesNotHaveArrowsMessage: &cNie posiadasz żadnych strzał w ekwipunku! command /schowek: trigger: set {cubbyArrows::%player%} to 0 if {cubbyArrows::%player%} is not set open chest inventory with 3 rows named "&a&lSchowek" to player set slot (integers between 0 and 8) of player's current inventory to gray stained glass pane named " " set slot (0 and 8) of player's current inventory to white stained glass pane named " " set slot 5 of player's current inventory to arrow named "&aTwoje strzaly: &6%{cubbyArrows::%player%}%" with lore "&7Kliknij LPM, aby &aodebrac&7!" and "&7Kliknij PPM, aby &awplacic&7!" on inventory click: name of player's current inventory is "&a&lSchowek" clicked inventory is not player's inventory cancel event clicked slot is 5 if click type is left mouse button: if {cubbyArrows::%player%} is 0: send "{@noArrowsLeftMessage}" to player stop if player has 16 arrows: send "{@hasTooManyMessage}" to player stop if player has enough space for 1 arrow: give player 1 arrow else: send "{@noSpaceMessage}" to player remove 1 from {cubbyArrows::%player%} set slot 5 of player's current inventory to arrow named "&aTwoje strzaly: &6%{cubbyArrows::%player%}%" with lore "&7Kliknij LPM, aby &aodebrac&7!" and "&7Kliknij PPM, aby &awplacic&7!" else if click type is right mouse button: if player doesn't have 1 arrow: send "{@doesNotHaveArrowsMessage}" to player stop add 1 to {cubbyArrows::%player%} set slot 5 of player's current inventory to arrow named "&aTwoje strzaly: &6%{cubbyArrows::%player%}%" with lore "&7Kliknij LPM, aby &aodebrac&7!" and "&7Kliknij PPM, aby &awplacic&7!" on pickup of arrow: player has {@arrowsLimit} of arrows wait 1 tick add (amount of arrows in player's inventory - {@arrowsLimit}) to {cubbyArrows::%player%} remove (amount of arrows in player's inventory - {@arrowsLimit}) of arrows from player's inventory on inventory close: player has ({@arrowsLimit} + 1) of arrows add (amount of arrows in player's inventory - {@arrowsLimit}) to {cubbyArrows::%player%} remove (amount of arrows in player's inventory - {@arrowsLimit}) of arrows from player's inventory