Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on inventory click:
- set {_slot} to item
- if name of {_slot} is "&cPowrot do &4MENU":
- cancel event
- function "chesterOtchlan" {player}:
- clear inventory of block at {chesterotchlan::skrzynia1}
- clear inventory of block at {chesterotchlan::skrzynia2}
- clear inventory of block at {chesterotchlan::skrzynia3}
- clear inventory of block at {chesterotchlan::skrzynia4}
- clear inventory of block at {chesterotchlan::skrzynia5}
- clear inventory of block at {chesterotchlan::skrzynia6}
- set slot 53 of block at {chesterotchlan::skrzynia1} to redstone block named "&cPowrot do &4MENU"
- set slot 53 of block at {chesterotchlan::skrzynia2} to redstone block named "&cPowrot do &4MENU"
- set slot 53 of block at {chesterotchlan::skrzynia3} to redstone block named "&cPowrot do &4MENU"
- set slot 53 of block at {chesterotchlan::skrzynia4} to redstone block named "&cPowrot do &4MENU"
- set slot 53 of block at {chesterotchlan::skrzynia5} to redstone block named "&cPowrot do &4MENU"
- set slot 53 of block at {chesterotchlan::skrzynia6} to redstone block named "&cPowrot do &4MENU"
- loop entities:
- if loop-entity is a dropped item:
- if items within loop-entity is any helmet or any chestplate or any leggings or any boots or any sword or any bow or any spade or any pickaxe or any axe or any hoe:
- set {_x} to slot 52 of block at {chesterotchlan::skrzynia1}
- if {_x} is empty:
- add items within loop-entity to block at {chesterotchlan::skrzynia1}
- delete loop-entity
- else:
- add items within loop-entity to block at {chesterotchlan::skrzynia2}
- delete loop-entity
- else:
- set {_x1} to slot 52 of block at {chesterotchlan::skrzynia3}
- if {_x1} is empty:
- add items within loop-entity to block at {chesterotchlan::skrzynia3}
- delete loop-entity
- else:
- set {_x2} to slot 52 of block at {chesterotchlan::skrzynia4}
- if {_x2} is empty:
- add items within loop-entity to block at {chesterotchlan::skrzynia4}
- delete loop-entity
- else:
- set {_x3} to slot 52 of block at {chesterotchlan::skrzynia5}
- if {_x3} is empty:
- add items within loop-entity to block at {chesterotchlan::skrzynia5}
- delete loop-entity
- else:
- set {_x4} to slot 52 of block at {chesterotchlan::skrzynia6}
- if {_x4} is empty:
- add items within loop-entity to block at {chesterotchlan::skrzynia6}
- delete loop-entity
- command /chesterotchlan [<text>] [<text>]:
- trigger:
- if arg 1 is not set:
- send "&7[&fchesterOtchlan&7] &3Komendy:"
- send " &3/chesterotchlan ustaw eq1-2/inne1-6 &7- &eUstawia skrzynie."
- send " &3/chesterotchlan usun &7- &eUsuwasz przedmioty."
- if arg 1 is "ustaw":
- if arg 2 is "eq1":
- set {chesterotchlan::skrzynia1} to location of target block
- send "&7Ustawiles otchlan z &feq1"
- if arg 2 is "eq2":
- set {chesterotchlan::skrzynia2} to location of target block
- send "&7Ustawiles otchlan z &feq2"
- if arg 2 is "inne1":
- set {chesterotchlan::skrzynia3} to location of target block
- send "&7Ustawiles otchlan z &finne1"
- if arg 2 is "inne2":
- set {chesterotchlan::skrzynia4} to location of target block
- send "&7Ustawiles otchlan z &finne2"
- if arg 2 is "inne3":
- set {chesterotchlan::skrzynia5} to location of target block
- send "&7Ustawiles otchlan z &finne3"
- if arg 2 is "inne4":
- set {chesterotchlan::skrzynia6} to location of target block
- send "&7Ustawiles otchlan z &finne4"
- if arg 1 is "usun":
- function "chesterOtchlan" {player}
- send "&cUsuwasz itemy przez otchlan!"
- if arg 1 is "pies":
- drop all items at player
- command /otchlan:
- trigger:
- set {_1} to size of all items in inventory of block at {chesterotchlan::skrzynia1}
- set {_2} to size of all items in inventory of block at {chesterotchlan::skrzynia2}
- set {_3} to size of all items in inventory of block at {chesterotchlan::skrzynia3}
- set {_4} to size of all items in inventory of block at {chesterotchlan::skrzynia4}
- set {_5} to size of all items in inventory of block at {chesterotchlan::skrzynia5}
- set {_6} to size of all items in inventory of block at {chesterotchlan::skrzynia6}
- open chest with 1 rows named "&9Otchlan MENU" to player
- wait 2 tick
- format slot 0 of player with 1 of ender chest named "&a&nPrzedmioty&f &7[&21&7]" with lore "&eZajete sloty &7[&a%{_1}-1%&2/&a52&7]" to close then run "otchlan::gui przedmioty1 %player%"
- format slot 1 of player with 2 of ender chest named "&a&nPrzedmioty&f &7[&22&7]" with lore "&eZajete sloty &7[&a%{_2}-1%&2/&a52&7]" to close then run "otchlan::gui przedmioty2 %player%"
- format slot 3 of player with 1 of chest named "&a&nInne&f &7[&21&7]" with lore "&eZajete sloty &7[&a%{_3}-1%&2/&a52&7]" to close then run "otchlan::gui inne1 %player%"
- format slot 4 of player with 2 of chest named "&a&nInne&f &7[&22&7]" with lore "&eZajete sloty &7[&a%{_4}-1%&2/&a52&7]" to close then run "otchlan::gui inne2 %player%"
- format slot 5 of player with 3 of chest named "&a&nInne&f &7[&23&7]" with lore "&eZajete sloty &7[&a%{_5}-1%&2/&a52&7]" to close then run "otchlan::gui inne3 %player%"
- format slot 6 of player with 4 of chest named "&a&nInne&f &7[&24&7]" with lore "&eZajete sloty &7[&a%{_6}-1%&2/&a52&7]" to close then run "otchlan::gui inne4 %player%"
- format slot 8 of player with 1 of redstone block named "&cZamknij" to close
- command /otchlan::gui [<text>] [<player>]:
- trigger:
- if sender is console:
- wait 2 tick
- if arg 1 is "przedmioty1":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia1} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- if arg 1 is "przedmioty2":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia2} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- if arg 1 is "inne1":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia3} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- if arg 1 is "inne2":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia4} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- if arg 1 is "inne3":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia5} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- if arg 1 is "inne4":
- if arg 2 has 8 diamond:
- open the inventory of the block at {chesterotchlan::skrzynia5} to arg 2
- remove 8 diamond from arg 2's inventory
- else:
- send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
- #open the inventory of the block at {chesterotchlan::skrzynia1} to the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement