Advertisement
Guest User

Untitled

a guest
Aug 10th, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. options:
  2. #Config and Language
  3. inv-name: " &6&l»&e»&7Slots&e«&6&l«"
  4. slot1: &6Slot 1
  5. slot2: &6Slot 2
  6. slot3: &6Slot 3
  7. slot4: &6Slot 4
  8. slot5: &6Slot 5
  9. slot6: &6Slot 6
  10. slot7: &6Slot 7
  11. slot8: &6Slot 8
  12. slot9: &6Slot 9
  13. slot-full: &cThis slot is full!
  14. no-pick: &cYou don't have a pickaxe to move
  15. open-gui-sound: BLOCK_CHEST_OPEN
  16. volume1: 5
  17. pitch1: 1
  18. sel-slot-sound: UI_BUTTON_CLICK
  19. pitch2: 1
  20. volume2: 1
  21. error-sound: BLOCK_ANVIL_LAND
  22. volume3: 1
  23. pitch3: 1
  24.  
  25. command /slotts:
  26. trigger:
  27. open chest with 1 row named {@inv-name} to player
  28. play sound "{@open-gui-sound}" with volume {@volume1} with pitch {@pitch1} at player for player
  29. set slot 0 of player's current inventory to nether star named "{@slot1}"
  30. set slot 1 of player's current inventory to nether star named "{@slot2}"
  31. set slot 2 of player's current inventory to nether star named "{@slot3}"
  32. set slot 3 of player's current inventory to nether star named "{@slot4}"
  33. set slot 4 of player's current inventory to nether star named "{@slot5}"
  34. set slot 5 of player's current inventory to nether star named "{@slot6}"
  35. set slot 6 of player's current inventory to nether star named "{@slot7}"
  36. set slot 7 of player's current inventory to nether star named "{@slot8}"
  37. set slot 8 of player's current inventory to nether star named "{@slot9}"
  38.  
  39. function provaFunzione(p: player , s: numbers , i: item) :: number:
  40. if inventory name of current inventory of {_p} is {@inv-name}:
  41. if name of {_i} is "{@slot1}":
  42. if slot {_s} of {_p} is not air:
  43. if {_p} have diamond pickaxe:
  44. set {_prova} to 0
  45. return {_prova}
  46. function provaFunzionee(p: player , s: numbers , i: item) :: number:
  47. if slot {_s} of {_p} is air:
  48. loop all items in {_p}'s inventory:
  49. if loop-item is diamond pickaxe:
  50. set {_provaa} to 0
  51. return {_provaa}
  52. function provaFunzioneee(p: player , s: numbers , i: item) :: number:
  53. if {_p} doesn't have diamond pickaxe:
  54. set {_provaaa} to 0
  55. return {_provaaa}
  56.  
  57.  
  58. on inventory click:
  59. provaFunzione(player , 0 , event-item)
  60. if {_prova} is 0:
  61. cancel event
  62. send "{@slot-full}" to {_p}
  63. play sound "{@error-sound}" with volume {@volume3} with pitch {@pitch3} at {_p} for {_p}
  64. provaFunzionee(player , 0 , event-item)
  65. if {_provaa} is 0:
  66. set {picck} to {_i}
  67. remove {picck} from {_p}'s inventory
  68. set slot {_s} of {_p} to {picck}
  69. play sound "{@sel-slot-sound}" with volume {@volume2} with pitch {@pitch2} at {_p} for {_p}
  70. cancel event
  71. provaFunzioneee(player , 0 , event-item)
  72. if {_provaaa} is 0:
  73. cancel event
  74. send "{@no-pick}" to {_p}
  75. play sound "{@error-sound}" with volume {@volume3} with pitch {@pitch3} at {_p} for {_p}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement