Advertisement
Builder4Life

no errors but item does not show up

Oct 28th, 2022
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. variables:
  2. {orange} = orange stained glass pane
  3. {red} = red stained glass pane
  4.  
  5. options:
  6. mainguiname: <##ff4d00>&lᴇᴍᴘʏʀᴇᴀɴ <##ff6800>| <##ff8330>ᴇɴᴄʜᴀɴᴛᴇʀ
  7. guiname: <##ff4d00>&lᴇɴᴄʜᴀɴᴛᴇʀ <##ff6800>| <##ff8330>%{_itemname}%
  8.  
  9. on right click:
  10. if clicked block is lodestone:
  11. if player's held item is air:
  12. set {_enchanting} to a new chest inventory with 6 rows with name "{@mainguiname}"
  13. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  14. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  15. set slot 22 of {_enchanting} to anvil named "&e&l[!] &eThere is no item selected" with lore "", "&f&oHold the item", "&f&oyou want to upgrade!"
  16. open {_enchanting} to player
  17. #! Pickaxe
  18. if player is holding any pickaxe:
  19. set {_item} to player's held item
  20. set {_itemname} to name of player's held item
  21. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  22. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  23. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  24. set slot 22 of player's current inventory to {_item} named {_itemname}
  25. open {_enchanting} to player
  26. #! Sword
  27. if player is holding any sword:
  28. set {_item} to player's held item
  29. set {_itemname} to name of player's held item
  30. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  31. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  32. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  33. set slot 22 of player's current inventory to {_item} named {_itemname}
  34. open {_enchanting} to player
  35. #! Axe
  36. if player is holding any axe:
  37. set {_item} to player's held item
  38. set {_itemname} to name of player's held item
  39. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  40. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  41. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  42. set slot 22 of player's current inventory to {_item} named {_itemname}
  43. open {_enchanting} to player
  44. #! Helmet
  45. if player is holding any helmet:
  46. set {_item} to player's held item
  47. set {_itemname} to name of player's held item
  48. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  49. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  50. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  51. set slot 22 of player's current inventory to {_item} named {_itemname}
  52. open {_enchanting} to player
  53. #! Chestplate
  54. if player is holding any chestplate:
  55. set {_item} to player's held item
  56. set {_itemname} to name of player's held item
  57. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  58. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  59. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  60. set slot 22 of player's current inventory to {_item} named {_itemname}
  61. open {_enchanting} to player
  62. #! Leggings
  63. if player is holding any leggings:
  64. set {_item} to player's held item
  65. set {_itemname} to name of player's held item
  66. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  67. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  68. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  69. set slot 22 of player's current inventory to {_item} named {_itemname}
  70. open {_enchanting} to player
  71. #! Boots
  72. if player is holding any boots:
  73. set {_item} to player's held item
  74. set {_itemname} to name of player's held item
  75. set {_enchanting} to a new chest inventory with 6 rows with name "{@guiname}"
  76. set slot 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 and 53 of {_enchanting} to {orange} named "&6"
  77. set slot 40 of {_enchanting} to barrier named "<##ff6800>ᴄᴀɴᴄᴇʟ"
  78. set slot 22 of player's current inventory to {_item} named {_itemname}
  79. open {_enchanting} to player
  80.  
  81. on inventory click:
  82. if name of event-inventory is "{@guiname}":
  83. if index of event-slot = 0, 1, 2, 3, 4, 5, 6 ,7, 8, 45, 46, 47, 48, 49, 50, 51, 52 or 53:
  84. cancel event
  85. else:
  86. if name of event-inventory is "{@guiname}":
  87. if index of event-slot = 40:
  88. cancel event
  89. close player's inventory
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement