Advertisement
CREAMPAN0408

Untitled

Feb 23rd, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.38 KB | None | 0 0
  1. on rightclick holding chest:
  2. name of tool of player is "&7Cosmetics"
  3. command "/opencosmetics %player%"
  4.  
  5. command /opencosmetics <player>:
  6. executable by: console
  7. trigger:
  8. open chest with 1 row named "&7Cosmetics" to arg-1
  9. wait 1 tick
  10. set slot 3 of arg-1's current inventory to a compass named "&7Gadgets"
  11. set slot 5 of arg-1's current inventory to a chicken spawn egg named "&7Pets"
  12.  
  13. on inventory click:
  14. if inventory name of player's current inventory is "&7Cosmetics":
  15. cancel the event
  16. if clicked item is a compass:
  17. close player's inventory
  18. wait 1 tick
  19. open chest with 3 rows named "&7Gadgets" to player
  20. wait 1 tick
  21. set slot 10 of player's current inventory to a oak sapling with nbt "{Variable:tree}" named "&eTree Growth Serum" with lore "&eREPLACE&7 owned||&7Middle click to buy &e(500 coins per)"
  22. set slot 11 of player's current inventory to a glass block with nbt "{Variable:carpets}" named "&eMagical Carpet" with lore "&eREPLACE&7 owned||&7Middle click to buy &e(1000 coins per)"
  23. set slot 12 of player's current inventory to a slimeball with nbt "{Variable:hulk}" named "&eHulk Smash" with lore "&eREPLACE&7 owned||&7Middle click to buy &e(250 coins per)"
  24. set slot 13 of player's current inventory to a ink sack with nbt "{Variable:smoke}" named "&eSmoke Grenade" with lore "&eREPLACE&7 owned||&7Middle click to buy &e(150 coins per)"
  25. set slot 14 of player's current inventory to a gold horse armor with nbt "{Variable:paintball}" named "&ePaintball Gun" with lore "&eREPLACE&7 owned||&7Middle click to buy &e(50 coins per)"
  26. set slot 15 of player's current inventory to a player head named "&eclay we need atleast 3 more so this looks normal" with lore "&ethink of stuff"
  27. set slot 16 of player's current inventory to a player head named "&eclay we need atleast 3 more so this looks normal" with lore "&ethink of stuff"
  28. set slot 26 of player's current inventory to a arrow named "&7Back"
  29. loop integers between 9 and 17:
  30. set {_slot%loop-number%} to slot loop-number - 1 of player's current inventory
  31. {_slot%loop-number%} is not air
  32. lore of {_slot%loop-number%} contains "REPLACE"
  33. set {_tag%loop-number%} to tag "Variable" of nbt of {_slot%loop-number%}
  34. set {_type%loop-number%} to value of sql var "gadgets::%{_tag%loop-number%}%::%player%" parsed as integer
  35. set {_typef%loop-number%} to {_type%loop-number%}
  36. if "%{_type%loop-number%}%" is "0" or "<none>" or "-1":
  37. set {_type%loop-number%} to 0
  38. if "%{_typef%loop-number%}%" is "0" or "<none>" or "-1":
  39. set {_typef%loop-number%} to 1
  40. replace all "REPLACE" with "%{_type%loop-number%}%" in lore of {_slot%loop-number%}
  41. set slot loop-number - 1 of player's current inventory to {_typef%loop-number%} of {_slot%loop-number%}
  42. while inventory name of player's current inventory is "&7Gadgets":
  43. set data value of slot 11 of player's current inventory to a random integer between 0 and 15
  44. wait 15 ticks
  45. else if clicked item is a chicken spawn egg:
  46. close player's inventory
  47. wait 1 tick
  48. open chest with 4 rows named "&7Pets" to player
  49. wait 1 tick
  50. set slot 10 of player's current inventory to a chicken spawn egg named "&eChicken Pet"
  51. set slot 11 of player's current inventory to a pig spawn egg named "&ePig Pet"
  52. set slot 12 of player's current inventory to a sheep spawn egg named "&eSheep Pet"
  53. set slot 13 of player's current inventory to a cow spawn egg named "&eCow Pet"
  54. set slot 14 of player's current inventory to a wolf spawn egg named "&eWolf Pet"
  55. set slot 15 of player's current inventory to a mooshroom spawn egg named "&eMooshroom Pet"
  56. set slot 16 of player's current inventory to a horse spawn egg named "&eHorse Pet"
  57. set slot 19 of player's current inventory to a silverfish spawn egg named "&eSilverfish Pet"
  58. set slot 20 of player's current inventory to a endermite spawn egg named "&eEndermite Pet"
  59. set slot 21 of player's current inventory to a zombie spawn egg named "&eZombie Pet"
  60. set slot 22 of player's current inventory to a zombie pigman spawn egg named "&ePigman Pet"
  61. if sql var "pets::Bunny::%player%" exists is true:
  62. set slot 23 of player's current inventory to a rabbit spawn egg named "&eBunny Pet" with lore "&7Click to equip"
  63. else:
  64. set slot 23 of player's current inventory to a rabbit spawn egg named "&eBunny Pet" with lore "&7Buy on &eshop.minealot.net ($2.99)"
  65. if sql var "pets::Villager::%player%" exists is true:
  66. set slot 24 of player's current inventory to a villager spawn egg named "&eVillager Pet" with lore "&7Click to equip"
  67. else:
  68. set slot 24 of player's current inventory to a villager spawn egg named "&eVillager Pet" with lore "&7Buy on &eshop.minealot.net ($4.99)"
  69. set slot 25 of player's current inventory to a barrier named "&eUnequip Pet"
  70. set slot 35 of player's current inventory to a arrow named "&7Back"
  71. loop integers between 9 and 25:
  72. set {_slot} to slot loop-number - 1 of player's current inventory
  73. {_slot} is not air, villager spawn egg or rabbit spawn egg
  74. name of {_slot} contains "pet"
  75. add 1250 to {_cost}
  76. set {_name} to uncolored name of {_slot}
  77. replace all " pet" with "" in {_name}
  78. set {_type} to sql var "pets::%{_name}%::%player%" exists
  79. if {_type} is true:
  80. set {_lore} to "&7Click to equip"
  81. else:
  82. set {_lore} to "&7Click to buy &e(%{_cost}% coins)"
  83. set lore of slot loop-number - 1 of player's current inventory to {_lore}
  84. else if inventory name of player's current inventory is "&7Pets":
  85. cancel the event
  86. clicked item is not air
  87. if clicked item is a barrier:
  88. send "&7Your pet has been unequipped"
  89. command "/setpet %player% none"
  90. close player's inventory
  91. else if clicked item is a arrow:
  92. close player's inventory
  93. wait 1 tick
  94. command "/opencosmetics %player%"
  95. else if lore of clicked item contains "buy":
  96. if lore of clicked item contains "shop.":
  97. send "&7Buy &7the %name of clicked item%&7 on &eshop.minealot.net"
  98. close player's inventory
  99. else:
  100. set {_price} to get digits of uncolored lore of clicked item parsed as integer
  101. if getCoins(player) is less than {_price}:
  102. send "&7You do not have enough coins to buy &7the %name of clicked item%"
  103. else:
  104. send "&7You have bought &7the %name of clicked item%"
  105. set lore of clicked item to "&eClick to equip"
  106. remCoins(player, {_price})
  107. set {_name} to uncolored name of clicked item
  108. replace all " pet" with "" in {_name}
  109. set sql var "pets::%{_name}%::%player%" to "true"
  110. else:
  111. set {_pet} to value of sql var "pets::equipped::%player%"
  112. set {_name} to uncolored name of clicked item
  113. replace all " pet" with "" in {_name}
  114. if {_pet} is {_name}:
  115. send "&7You already have &7the %name of clicked item%&7 equipped!"
  116. else:
  117. send "&7You have equipped &7the %name of clicked item%"
  118. command "/setpet %player% %{_name}%"
  119. set sql var "pets::equipped::%player%" to "%{_name}%"
  120. close player's inventory
  121. else if inventory name of player's current inventory is "&7Gadgets":
  122. cancel the event
  123. if line 1 of lore of clicked item contains "owned":
  124. if "%click type%" is "middle":
  125. set {_price} to get digits of uncolored line 2 of lore of clicked item parsed as integer
  126. if getCoins(player) is less than {_price}:
  127. send "&7You do not have enough coins to buy a %name of clicked item%"
  128. else:
  129. send "&7You have bought a %name of clicked item%&7 for &e%{_price}% coins"
  130. set {_owned} to get digits of uncolored line 1 of lore of clicked item parsed as integer + 1
  131. set line 1 of lore of clicked item to "&e%{_owned}%&7 owned"
  132. set clicked item to {_owned} of clicked item
  133. if id of slot 4 of player is id of clicked item:
  134. set slot 4 of player to {_owned} of slot 4 of player
  135. remCoins(player, {_price})
  136. set {_type} to tag "Variable" of nbt of clicked item
  137. set sql var "gadgets::%{_type}%::%player%" to "%{_owned}%"
  138. else:
  139. set {_owned} to get digits of uncolored line 1 of lore of clicked item parsed as integer
  140. if {_owned} is 0:
  141. send "&7You do not own any %name of clicked item%s&7!"
  142. else:
  143. send "&7You have equipped %name of clicked item%"
  144. set slot 4 of player to {_owned} of type of clicked item named "%name of clicked item%"
  145. else if clicked item is a arrow:
  146. close player's inventory
  147. wait 1 tick
  148. command "/opencosmetics %player%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement