Advertisement
Guest User

Untitled

a guest
Nov 7th, 2015
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.06 KB | None | 0 0
  1.  
  2. on inventory click:
  3. set {_slot} to item
  4. if name of {_slot} is "&cPowrot do &4MENU":
  5. cancel event
  6.  
  7. function "chesterOtchlan" {player}:
  8. clear inventory of block at {chesterotchlan::skrzynia1}
  9. clear inventory of block at {chesterotchlan::skrzynia2}
  10. clear inventory of block at {chesterotchlan::skrzynia3}
  11. clear inventory of block at {chesterotchlan::skrzynia4}
  12. clear inventory of block at {chesterotchlan::skrzynia5}
  13. clear inventory of block at {chesterotchlan::skrzynia6}
  14. set slot 53 of block at {chesterotchlan::skrzynia1} to redstone block named "&cPowrot do &4MENU"
  15. set slot 53 of block at {chesterotchlan::skrzynia2} to redstone block named "&cPowrot do &4MENU"
  16. set slot 53 of block at {chesterotchlan::skrzynia3} to redstone block named "&cPowrot do &4MENU"
  17. set slot 53 of block at {chesterotchlan::skrzynia4} to redstone block named "&cPowrot do &4MENU"
  18. set slot 53 of block at {chesterotchlan::skrzynia5} to redstone block named "&cPowrot do &4MENU"
  19. set slot 53 of block at {chesterotchlan::skrzynia6} to redstone block named "&cPowrot do &4MENU"
  20. loop entities:
  21. if loop-entity is a dropped item:
  22. 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:
  23. set {_x} to slot 52 of block at {chesterotchlan::skrzynia1}
  24. if {_x} is empty:
  25. add items within loop-entity to block at {chesterotchlan::skrzynia1}
  26. delete loop-entity
  27. else:
  28. add items within loop-entity to block at {chesterotchlan::skrzynia2}
  29. delete loop-entity
  30. else:
  31. set {_x1} to slot 52 of block at {chesterotchlan::skrzynia3}
  32. if {_x1} is empty:
  33. add items within loop-entity to block at {chesterotchlan::skrzynia3}
  34. delete loop-entity
  35. else:
  36. set {_x2} to slot 52 of block at {chesterotchlan::skrzynia4}
  37. if {_x2} is empty:
  38. add items within loop-entity to block at {chesterotchlan::skrzynia4}
  39. delete loop-entity
  40. else:
  41. set {_x3} to slot 52 of block at {chesterotchlan::skrzynia5}
  42. if {_x3} is empty:
  43. add items within loop-entity to block at {chesterotchlan::skrzynia5}
  44. delete loop-entity
  45. else:
  46. set {_x4} to slot 52 of block at {chesterotchlan::skrzynia6}
  47. if {_x4} is empty:
  48. add items within loop-entity to block at {chesterotchlan::skrzynia6}
  49. delete loop-entity
  50.  
  51. command /chesterotchlan [<text>] [<text>]:
  52. trigger:
  53. if arg 1 is not set:
  54. send "&7[&fchesterOtchlan&7] &3Komendy:"
  55. send " &3/chesterotchlan ustaw eq1-2/inne1-6 &7- &eUstawia skrzynie."
  56. send " &3/chesterotchlan usun &7- &eUsuwasz przedmioty."
  57. if arg 1 is "ustaw":
  58. if arg 2 is "eq1":
  59. set {chesterotchlan::skrzynia1} to location of target block
  60. send "&7Ustawiles otchlan z &feq1"
  61. if arg 2 is "eq2":
  62. set {chesterotchlan::skrzynia2} to location of target block
  63. send "&7Ustawiles otchlan z &feq2"
  64. if arg 2 is "inne1":
  65. set {chesterotchlan::skrzynia3} to location of target block
  66. send "&7Ustawiles otchlan z &finne1"
  67. if arg 2 is "inne2":
  68. set {chesterotchlan::skrzynia4} to location of target block
  69. send "&7Ustawiles otchlan z &finne2"
  70. if arg 2 is "inne3":
  71. set {chesterotchlan::skrzynia5} to location of target block
  72. send "&7Ustawiles otchlan z &finne3"
  73. if arg 2 is "inne4":
  74. set {chesterotchlan::skrzynia6} to location of target block
  75. send "&7Ustawiles otchlan z &finne4"
  76. if arg 1 is "usun":
  77. function "chesterOtchlan" {player}
  78. send "&cUsuwasz itemy przez otchlan!"
  79. if arg 1 is "pies":
  80. drop all items at player
  81.  
  82.  
  83.  
  84. command /otchlan:
  85. trigger:
  86. set {_1} to size of all items in inventory of block at {chesterotchlan::skrzynia1}
  87. set {_2} to size of all items in inventory of block at {chesterotchlan::skrzynia2}
  88. set {_3} to size of all items in inventory of block at {chesterotchlan::skrzynia3}
  89. set {_4} to size of all items in inventory of block at {chesterotchlan::skrzynia4}
  90. set {_5} to size of all items in inventory of block at {chesterotchlan::skrzynia5}
  91. set {_6} to size of all items in inventory of block at {chesterotchlan::skrzynia6}
  92. open chest with 1 rows named "&9Otchlan MENU" to player
  93. wait 2 tick
  94. 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%"
  95. 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%"
  96. 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%"
  97. 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%"
  98. 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%"
  99. 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%"
  100. format slot 8 of player with 1 of redstone block named "&cZamknij" to close
  101.  
  102. command /otchlan::gui [<text>] [<player>]:
  103. trigger:
  104. if sender is console:
  105. wait 2 tick
  106. if arg 1 is "przedmioty1":
  107. if arg 2 has 8 diamond:
  108. open the inventory of the block at {chesterotchlan::skrzynia1} to arg 2
  109. remove 8 diamond from arg 2's inventory
  110. else:
  111. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  112. if arg 1 is "przedmioty2":
  113. if arg 2 has 8 diamond:
  114. open the inventory of the block at {chesterotchlan::skrzynia2} to arg 2
  115. remove 8 diamond from arg 2's inventory
  116. else:
  117. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  118. if arg 1 is "inne1":
  119. if arg 2 has 8 diamond:
  120. open the inventory of the block at {chesterotchlan::skrzynia3} to arg 2
  121. remove 8 diamond from arg 2's inventory
  122. else:
  123. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  124. if arg 1 is "inne2":
  125. if arg 2 has 8 diamond:
  126. open the inventory of the block at {chesterotchlan::skrzynia4} to arg 2
  127. remove 8 diamond from arg 2's inventory
  128. else:
  129. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  130. if arg 1 is "inne3":
  131. if arg 2 has 8 diamond:
  132. open the inventory of the block at {chesterotchlan::skrzynia5} to arg 2
  133. remove 8 diamond from arg 2's inventory
  134. else:
  135. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  136. if arg 1 is "inne4":
  137. if arg 2 has 8 diamond:
  138. open the inventory of the block at {chesterotchlan::skrzynia5} to arg 2
  139. remove 8 diamond from arg 2's inventory
  140. else:
  141. send "&cNie posiadasz &48xdiamentow &czeby otworzyc otchlan!" to arg 2
  142. #open the inventory of the block at {chesterotchlan::skrzynia1} to the player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement