Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {schowek.koxy.%player%} = 0
- {schowek.refile.%player%} = 0
- {schowek.perly.%player%} = 0
- options:
- namegui:&3&lSCHOWEK
- koxy_text: &7Twoj nadmiar koxow zostal przeniesiony do schowka!
- refile_text: &7Twoj nadmiar refili zostal przeniesiony do schowka!
- perly_text: &7Twoj nadmiar perel zostal przeniesiony do schowka!
- full_inventory: &7Nie miales wolnego miejsca w ekwipunku, itemy zostaly wyrzucone na ziemie!
- koxy: 1
- refile: 12
- perly: 3
- on damage of player:
- set {_koxy} to number of golden apple:1 in the victim's inventory
- set {_refile} to number of golden apple:0 in the victim's inventory
- set {_perly} to number of ender pearl in the victim's inventory
- if {_koxy} is more than {@koxy}:
- set {_a} to {_koxy}-{@koxy}
- remove {_a} of golden apple:1 from victim
- add {_a} to {schowek.koxy.%victim%}
- message "{@koxy_text}" to victim
- if {_refile} is more than {@refile}:
- set {_a} to {_refile}-{@refile}
- remove {_a} of golden apple:0 from victim
- add {_a} to {schowek.refile.%victim%}
- message "{@refile_text}" to victim
- if {_perly} is more than {@perly}:
- set {_a} to {_perly}-{@perly}
- remove {_a} of ender pearl from victim
- add {_a} to {schowek.perly.%victim%}
- message "{@perly_text}" to victim
- command /lipex:schowek [<text>]:
- aliases: /schowek, /depozyt
- trigger:
- open chest with 1 rows named "&3&lSCHOWEK" to player
- set player's current inventory's slot 0 to golden apple:1 named "&f&oKOXY" with lore "&8» &7W schowku: &f%{schowek.koxy.%player%}%&7szt."
- set player's current inventory's slot 1 to golden apple:0 named "&f&oREFILE" with lore "&8» &7W schowku: &f%{schowek.refile.%player%}%&7szt."
- set player's current inventory's slot 2 to ender pearl named "&f&oPERLY" with lore "&8» &7W schowku: &f%{schowek.perly.%player%}%&7szt."
- set player's current inventory's slot 8 to name tag of unbreaking 3 named "&f&oLIMITY" with lore "&8» &7Limit koxow: &f{@koxy}&7szt. ||&8» &7Limit refili: &f{@refile}&7szt. ||&8» &7Limit perel: &f{@perly}&7szt."
- on inventory click:
- if inventory name of player's current inventory is "&3&lSCHOWEK":
- if clicked slot is 0:
- cancel event
- close player's inventory
- set {_a} to {schowek.koxy.%player%}
- loop {_a} times:
- remove 1 from {schowek.koxy.%player%}
- if player can hold 1 golden apple:1:
- add 1 golden apple:1 to player
- else:
- drop 1 golden apple:1 at player
- message "{@full_inventory}"
- if clicked slot is 1:
- cancel event
- close player's inventory
- set {_a} to {schowek.refile.%player%}
- loop {_a} times:
- remove 1 from {schowek.refile.%player%}
- if player can hold 1 golden apple:0:
- add 1 golden apple:0 to player
- else:
- drop 1 golden apple:0 at player
- message "{@full_inventory}"
- if clicked slot is 2:
- cancel event
- close player's inventory
- set {_a} to {schowek.perly.%player%}
- loop {_a} times:
- remove 1 from {schowek.perly.%player%}
- if player can hold 1 ender pearl:
- add 1 ender pearl to player
- else:
- drop 1 ender pearl at player
- message "{@full_inventory}"
- if clicked slot is 8:
- close player's inventory
- else:
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement