Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.27 KB | None | 0 0
  1.  
  2. aliases:
  3. piston = minecraft:piston
  4. sticky piston = minecraft:sticky_piston
  5. redstone repeater = minecraft:redstone_repeater
  6.  
  7.  
  8. function playSound(sound: string, player: player):
  9. play sound {_sound} at {_player} for {_player}
  10.  
  11.  
  12. function setShop(slot: integer, player: player, amount: integer, item: item, name: string, lore: strings, sell: number, buy: number):
  13. set {_uuid} to uuid of {_player}
  14. set {_buyMoney} to split("%{_buy} * {_amount}%")
  15. set {_sellAmount} to split("%{_sell}%")
  16. add "&aPrice: " and "&a* &fBuy Price (x%{_amount}%): &a$%{_buyMoney}%" to {_lore::*}
  17. if {_sell} = 0:
  18. add "&a* &fSell Price (ea): &cNot Sellable" and " " to {_lore::*}
  19. if {_sell} >= 1:
  20. add "&a* &fSell Price (ea): &c$%{_sellAmount}%" and " " to {_lore::*}
  21. if {_sell} >= 1:
  22. format gui slot {_slot} of {_player} with {_amount} of {_item} named {_name} with lore {_lore::*} to run with "right" click:
  23. sell({_player}, {_item}, {_sell})
  24. format gui slot {_slot} of {_player} with {_amount} of {_item} named {_name} with lore {_lore::*} to run with "left" click:
  25. set {_money} to {_buy} * {_amount}
  26. if {_player} has enough space for {_amount} of {_item}:
  27. if {balance::%{_uuid}%} >= {_money}:
  28. give {_player} {_amount} of {_item}
  29. remove {_money} from {balance::%{_uuid}%}
  30. set {_show} to split("%{_money}%")
  31. send "&a&lShop &8➟ &7You bought items that costed &a$%{_show}%"
  32. playSound("ENTITY_VILLAGER_YES", player)
  33. else:
  34. send "&a&lShop &8➟ &7You do not have enough money to buy this item" to {_player}
  35. playSound("ENTITY_VILLAGER_NO", player)
  36. else:
  37. send "&a&lShop &8➟ &7You do not have enough space to buy this item" to {_player}
  38. playSound("ENTITY_VILLAGER_NO", player)
  39.  
  40. function setSpawnerShop(slot: integer, player: player, amount: integer, item: item, type: text, name: string, lore: strings, buy: number):
  41. set {_uuid} to uuid of {_player}
  42. set {_buyMoney} to split("%{_buy} * {_amount}%")
  43. add "&aPrice: " and "&a* &fBuy Price (x%{_amount}%): &a$%{_buyMoney}%" to {_lore::*}
  44. add "&a* &fSell Price (ea): &cNot Sellable" and " " to {_lore::*}
  45. format gui slot {_slot} of {_player} with {_amount} of {_item} named {_name} with lore {_lore::*} to run with "left" click:
  46. set {_money} to {_buy} * {_amount}
  47. if {_player} has enough space for {_amount} of {_item}:
  48. if {balance::%{_uuid}%} >= {_money}:
  49. remove {_money} from {balance::%{_uuid}%}
  50. set {_show} to split("%{_money}%")
  51. console command "spawner give %{_player}% %{_type}% %{_amount}%"
  52. send "&a&lShop &8➟ &7You bought items that costed &a$%{_show}%"
  53. playSound("ENTITY_VILLAGER_YES", player)
  54. else:
  55. send "&a&lShop &8➟ &7You do not have enough money to buy this item" to {_player}
  56. playSound("ENTITY_VILLAGER_NO", player)
  57. else:
  58. send "&a&lShop &8➟ &7You do not have enough space to buy this item" to {_player}
  59. playSound("ENTITY_VILLAGER_NO", player)
  60.  
  61.  
  62. command /shop:
  63. trigger:
  64. shop(player)
  65.  
  66.  
  67. function sell(p: player, i: item, n: number):
  68. set {_uuid} to uuid of {_p}
  69. set {_count} to amount of {_i} in {_p}'s inventory
  70. set {_sell} to {_count} * {_n}
  71. remove all {_i} from {_p}'s inventory
  72. set {_beforeBooster} to {_sell}
  73. set {_boosterAmount} to {_sell} * {booster::%{_uuid}%}
  74. add {_boosterAmount} to {_sell}
  75. add {_sell} to {balance::%{_uuid}%}
  76. set {_beforeBooster} to split("%{_beforeBooster}%")
  77. set {_boosterAmount} to split("%{_boosterAmount}%")
  78. if {_sell} = 0:
  79. send "&a&lShop &8➟ &7You have no items to sell" to {_p}
  80. playSound("ENTITY_VILLAGER_NO", {_p})
  81. else:
  82. send " " to {_p}
  83. send "&a&lShop &8➟ &7You earned &a$%{_beforeBooster}%" to {_p}
  84. send "&a&lShop &8 &7Your booster gave you an extra &a$%{_boosterAmount}% &7(&ex%{booster::%{_uuid}%}%&7)" to {_p}
  85. send " " to {_p}
  86.  
  87. function shop(p: player):
  88. set {_n} to 0
  89. set {_n1} to 1
  90. open virtual chest inventory with size 5 named "&7The Shop" to {_p}
  91. loop 100 times:
  92. make gui slot {_n} of {_p} with white stained glass pane named "&7" to do nothing
  93. add 2 to {_n}
  94. make gui slot {_n1} of {_p} with light green stained glass pane named "&7" to do nothing
  95. add 2 to {_n1}
  96. make gui slot 10 of {_p} with grass named "&a&lBlocks Section" lored "||&7(Click To View)" to run:
  97. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  98. make gui slot 1 of {_p} with grass named "&7View in x1" to run:
  99. blocks({_p}, 1)
  100. make gui slot 3 of {_p} with 16 of grass named "&7View in x16" to run:
  101. blocks({_p}, 16)
  102. make gui slot 5 of {_p} with 32 of grass named "&7View in x32" to run:
  103. blocks({_p}, 32)
  104. make gui slot 7 of {_p} with 64 of grass named "&7View in x64" to run:
  105. blocks({_p}, 64)
  106. make gui slot 12 of {_p} with redstone named "&c&lRedstone Section" lored "||&7(Click To View)" to run:
  107. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  108. make gui slot 1 of {_p} with redstone named "&7View in x1" to run:
  109. redstone({_p}, 1)
  110. make gui slot 3 of {_p} with 16 of redstone named "&7View in x16" to run:
  111. redstone({_p}, 16)
  112. make gui slot 5 of {_p} with 32 of redstone named "&7View in x32" to run:
  113. redstone({_p}, 32)
  114. make gui slot 7 of {_p} with 64 of redstone named "&7View in x64" to run:
  115. redstone({_p}, 64)
  116. make gui slot 14 of {_p} with diamond named "&b&lOres Section" lored "||&7(Click To View)" to run:
  117. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  118. make gui slot 1 of {_p} with diamond named "&7View in x1" to run:
  119. ores({_p}, 1)
  120. make gui slot 3 of {_p} with 16 of diamond named "&7View in x16" to run:
  121. ores({_p}, 16)
  122. make gui slot 5 of {_p} with 32 of diamond named "&7View in x32" to run:
  123. ores({_p}, 32)
  124. make gui slot 7 of {_p} with 64 of diamond named "&7View in x64" to run:
  125. ores({_p}, 64)
  126. make gui slot 16 of {_p} with glass block named "&c&lC&6&lo&e&ll&a&lo&b&lr &c&lB&6&ll&e&lo&a&lc&b&lk&d&ls &7&lSection" lored "||&7(Click To View)" to run:
  127. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  128. make gui slot 1 of {_p} with glass block named "&7View in x1" to run:
  129. color({_p}, 1)
  130. make gui slot 3 of {_p} with 16 of glass block named "&7View in x16" to run:
  131. color({_p}, 16)
  132. make gui slot 5 of {_p} with 32 of glass block named "&7View in x32" to run:
  133. color({_p}, 32)
  134. make gui slot 7 of {_p} with 64 of glass block named "&7View in x64" to run:
  135. color({_p}, 64)
  136. make gui slot 29 of {_p} with seeds named "&a&lFarming Section" lored "||&7(Click To View)" to run:
  137. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  138. make gui slot 1 of {_p} with seeds named "&7View in x1" to run:
  139. farming({_p}, 1)
  140. make gui slot 3 of {_p} with 16 of seeds named "&7View in x16" to run:
  141. farming({_p}, 16)
  142. make gui slot 5 of {_p} with 32 of seeds named "&7View in x32" to run:
  143. farming({_p}, 32)
  144. make gui slot 7 of {_p} with 64 of seeds named "&7View in x64" to run:
  145. farming({_p}, 64)
  146. make gui slot 33 of {_p} with mob spawner named "&6&lSpawner Section" lored "||&7(Click To View)" to run:
  147. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  148. make gui slot 1 of {_p} with mob spawner named "&7View in x1" to run:
  149. spawner({_p}, 1)
  150. make gui slot 3 of {_p} with 16 of mob spawner named "&7View in x16" to run:
  151. spawner({_p}, 16)
  152. make gui slot 5 of {_p} with 32 of mob spawner named "&7View in x32" to run:
  153. spawner({_p}, 32)
  154. make gui slot 7 of {_p} with 64 of mob spawner named "&7View in x64" to run:
  155. spawner({_p}, 64)
  156.  
  157. make gui slot 31 of {_p} with gunpowder named "&8&lMob Drops Section" lored "||&7(Click To View)" to run:
  158. open virtual chest inventory with size 1 named "&7View Blocks Amount" to {_p}
  159. make gui slot 1 of {_p} with gunpowder named "&7View in x1" to run:
  160. mobdrops({_p}, 1)
  161. make gui slot 3 of {_p} with 16 of gunpowder named "&7View in x16" to run:
  162. mobdrops({_p}, 16)
  163. make gui slot 5 of {_p} with 32 of gunpowder named "&7View in x32" to run:
  164. mobdrops({_p}, 32)
  165. make gui slot 7 of {_p} with 64 of gunpowder named "&7View in x64" to run:
  166. mobdrops({_p}, 64)
  167.  
  168. function mobdrops(p: player, n: number):
  169. open virtual chest inventory with size 6 named "&7The Shop &8| &fMob Drops" to {_p}
  170. set {_x} to 0
  171. loop 54 times:
  172. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  173. add 1 to {_x}
  174. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  175. shop({_p})
  176. #! setShop(slot, player, amount, item, name, lore, sell price, buy price) !#
  177. setShop(10, {_p}, {_n}, blaze rod, "", "", 10, 100)
  178. setShop(11, {_p}, {_n}, ender pearl, "", "", 10, 100)
  179. setShop(12, {_p}, {_n}, gunpowder, "", "", 10, 100)
  180. setShop(13, {_p}, {_n}, blaze powder, "", "", 10, 100)
  181. setShop(14, {_p}, {_n}, ghast tear, "", "", 10, 100)
  182. setShop(15, {_p}, {_n}, feather, "", "", 10, 100)
  183. setShop(16, {_p}, {_n}, dye, "", "", 10, 100)
  184. setShop(19, {_p}, {_n}, bone, "", "", 10, 100)
  185. setShop(20, {_p}, {_n}, slimeball, "", "", 10, 100)
  186. setShop(21, {_p}, {_n}, spider eye, "", "", 10, 100)
  187. setShop(22, {_p}, {_n}, string, "", "", 10, 100)
  188. setShop(23, {_p}, {_n}, gold nugget, "", "", 10, 100)
  189. setShop(24, {_p}, {_n}, rabbit hide, "", "", 10, 100)
  190. setShop(25, {_p}, {_n}, rabbit foot, "", "", 10, 100)
  191. setShop(28, {_p}, {_n}, arrow, "", "", 10, 100)
  192. setShop(29, {_p}, {_n}, magma cream, "", "", 10, 100)
  193. setShop(30, {_p}, {_n}, rotten flesh, "", "", 10, 100)
  194. setShop(31, {_p}, {_n}, leather, "", "", 10, 100)
  195. setShop(32, {_p}, {_n}, nether star, "", "", 10, 100)
  196. setShop(33, {_p}, {_n}, wither skeleton skull, "", "", 10, 100)
  197.  
  198. function spawner(p: player, n: number):
  199. open virtual chest inventory with size 6 named "&7The Shop &f(Spawners)" to {_p}
  200. set {_x} to 0
  201. loop 54 times:
  202. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  203. add 1 to {_x}
  204. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  205. shop({_p})
  206. setSpawnerShop(10, {_p}, {_n}, mob spawner, "zombie", "&c&lZombie Spawner", "", 25000)
  207. setSpawnerShop(11, {_p}, {_n}, mob spawner, "skeleton", "&c&lSkeleton Spawner", "", 25000)
  208. setSpawnerShop(12, {_p}, {_n}, mob spawner, "spider", "&c&lSpider Spawner", "", 25000)
  209. setSpawnerShop(13, {_p}, {_n}, mob spawner, "endermen", "&c&lSpider Spawner", "", 25000)
  210. setSpawnerShop(14, {_p}, {_n}, mob spawner, "blaze", "&c&lSpider Spawner", "", 25000)
  211. setSpawnerShop(15, {_p}, {_n}, mob spawner, "creeper", "&c&lSpider Spawner", "", 25000)
  212. setSpawnerShop(16, {_p}, {_n}, mob spawner, "rabbit", "&c&lSpider Spawner", "", 25000)
  213. setSpawnerShop(19, {_p}, {_n}, mob spawner, "chicken", "&c&lSpider Spawner", "", 25000)
  214. setSpawnerShop(20, {_p}, {_n}, mob spawner, "cow", "&c&lSpider Spawner", "", 25000)
  215. setSpawnerShop(21, {_p}, {_n}, mob spawner, "ghast", "&c&lGhast Spawner", "", 25000)
  216. setSpawnerShop(22, {_p}, {_n}, mob spawner, "ghast", "&c&lGhast Spawner", "", 25000)
  217. setSpawnerShop(23, {_p}, {_n}, mob spawner, "pigman", "&c&lPigman Spawner", "", 25000)
  218. setSpawnerShop(24, {_p}, {_n}, mob spawner, "magma", "&c&lMagma Cube Spawner", "", 25000)
  219. setSpawnerShop(25, {_p}, {_n}, mob spawner, "slime", "&cSlime Spawner", "", 25000)
  220.  
  221. function farming(p: player, n: number):
  222. open virtual chest inventory with size 6 named "&7The Shop &f(Farming)" to {_p}
  223. set {_x} to 0
  224. loop 54 times:
  225. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  226. add 1 to {_x}
  227. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  228. shop({_p})
  229. setShop(10, {_p}, {_n}, oak sapling, "", "", 15, 450)
  230. setShop(11, {_p}, {_n}, spruce sapling, "", "", 15, 450)
  231. setShop(12, {_p}, {_n}, birch sapling, "", "", 15, 450)
  232. setShop(13, {_p}, {_n}, jungle sapling, "", "", 15, 450)
  233. setShop(14, {_p}, {_n}, acacia sapling, "", "", 15, 450)
  234. setShop(15, {_p}, {_n}, dark oak sapling, "", "", 15, 450)
  235. setShop(16, {_p}, {_n}, seeds, "", "", 2, 35)
  236. setShop(19, {_p}, {_n}, pumpkin seeds, "", (" ", "&7This requires the &6Pumpkin Recipe &7to plant" and " "), 3, 500)
  237. setShop(20, {_p}, {_n}, melon seeds, "", (" ", "&7This requires the &6Melon Recipe &7to plant" and " "), 3, 500)
  238. setShop(21, {_p}, {_n}, pumpkin, "", "", 9, 750)
  239. setShop(22, {_p}, {_n}, sugar cane, "", (" ", "&7This requires the &6Sugarcane Recipe &7to plant" and " "), 12, 1250)
  240. setShop(23, {_p}, {_n}, cocoa beans, "", "", 5, 250)
  241. setShop(24, {_p}, {_n}, cactus, "", "&7This requires the &6Cactus Recipe &7to plant", 3, 750)
  242. setShop(25, {_p}, {_n}, nether wart item, "", (" ", "&7This requires the &6Nether Wart Recipe &7to plant" and " "), 125, 5000)
  243. setShop(28, {_p}, {_n}, vines, "", "", 0, 35)
  244. setShop(29, {_p}, {_n}, brown mushroom, "", "", 0, 50)
  245. setShop(30, {_p}, {_n}, red mushroom, "", "", 0, 50)
  246. setShop(31, {_p}, {_n}, carrot, "", "", 4, 350)
  247. setShop(32, {_p}, {_n}, water bucket, "", "", 0, 125)
  248. setShop(33, {_p}, {_n}, lava bucket, "", "", 0, 8000)
  249. setShop(34, {_p}, {_n}, melon, "", "", 5, 125)
  250.  
  251. function color(p: player, n: number):
  252. open virtual chest inventory with size 6 named "&7The Shop &f(Color)" to {_p}
  253. set {_x} to 0
  254. loop 54 times:
  255. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  256. add 1 to {_x}
  257. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  258. shop({_p})
  259. make gui slot 53 of {_p} with bone named "&7Next Page &a⟶" to run:
  260. color2({_p}, {_n})
  261. set {_i::*} to glass, white glass, orange glass, magenta glass, light blue glass, yellow glass and light green glass
  262. set {_s} to 10
  263. loop {_i::*}:
  264. setShop({_s}, {_p}, {_n}, loop-value, "", "", 0, 35)
  265. add 1 to {_s}
  266. set {_i2::*} to pink glass, gray glass, light gray glass, cyan glass, purple glass, blue glass and brown glass #green glass, red glass and black glass
  267. set {_s2} to 19
  268. loop {_i2::*}:
  269. setShop({_s2}, {_p}, {_n}, loop-value, "", "", 0, 35)
  270. add 1 to {_s2}
  271. set {_i3::*} to green glass, red glass and black glass
  272. set {_s3} to 28
  273. loop {_i3::*}:
  274. setShop({_s3}, {_p}, {_n}, loop-value, "", "", 0, 35)
  275. add 1 to {_s3}
  276.  
  277.  
  278. function color2(p: player, n: number):
  279. open virtual chest inventory with size 6 named "&7The Shop &f(Color)" to {_p}
  280. set {_x} to 0
  281. loop 54 times:
  282. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  283. add 1 to {_x}
  284. make gui slot 49 of {_p} with arrow named "&c⟵ &7Back Page" to run:
  285. color({_p}, {_n})
  286. make gui slot 53 of {_p} with bone named "&7Next Page &a⟶" to run:
  287. color3({_p}, {_n})
  288. set {_i::*} to glass pane, white stained glass pane, orange stained glass pane, magenta stained glass pane, light blue stained glass pane, yellow stained glass pane and light green stained glass pane
  289. set {_s} to 10
  290. loop {_i::*}:
  291. setShop({_s}, {_p}, {_n}, loop-value, "", "", 0, 35)
  292. add 1 to {_s}
  293. set {_i2::*} to pink stained glass pane, gray stained glass pane, light gray stained glass pane, cyan stained glass pane, purple stained glass pane, blue stained glass pane and brown stained glass pane
  294. set {_s2} to 19
  295. loop {_i2::*}:
  296. setShop({_s2}, {_p}, {_n}, loop-value, "", "", 0, 35)
  297. add 1 to {_s2}
  298. set {_i3::*} to green stained glass pane, red stained glass pane and black stained glass pane
  299. set {_s3} to 28
  300. loop {_i3::*}:
  301. setShop({_s3}, {_p}, {_n}, loop-value, "", "", 0, 35)
  302. add 1 to {_s3}
  303.  
  304. function color3(p: player, n: number):
  305. open virtual chest inventory with size 6 named "&7The Shop &f(Color)" to {_p}
  306. set {_x} to 0
  307. loop 54 times:
  308. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  309. add 1 to {_x}
  310. make gui slot 49 of {_p} with arrow named "&c⟵ &7Back Page" to run:
  311. color2({_p}, {_n})
  312. set {_i::*} to white wool, orange wool, magenta wool, light blue wool, yellow wool, light green wool and pink wool
  313. set {_s} to 10
  314. loop {_i::*}:
  315. setShop({_s}, {_p}, {_n}, loop-value, "", "", 0, 35)
  316. add 1 to {_s}
  317. set {_i2::*} to gray wool, light gray wool, cyan wool, purple wool, blue wool, brown wool and green wool
  318. set {_s2} to 19
  319. loop {_i2::*}:
  320. setShop({_s2}, {_p}, {_n}, loop-value, "", "", 0, 35)
  321. add 1 to {_s2}
  322. set {_i3::*} to red wool and black wool
  323. set {_s3} to 28
  324. loop {_i3::*}:
  325. setShop({_s3}, {_p}, {_n}, loop-value, "", "", 0, 35)
  326. add 1 to {_s3}
  327.  
  328. function ores(p: player, n: number):
  329. open virtual chest inventory with size 6 named "&7The Shop &f(Ores)" to {_p}
  330. set {_x} to 0
  331. loop 54 times:
  332. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  333. add 1 to {_x}
  334. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  335. shop({_p})
  336. setShop(10, {_p}, {_n}, iron ingot, "", "", 15, 200)
  337. setShop(11, {_p}, {_n}, gold ingot, "", "", 25, 350)
  338. setShop(12, {_p}, {_n}, emerald, "", "", 250, 1250)
  339. setShop(13, {_p}, {_n}, diamond, "", "", 500, 2500)
  340. setShop(14, {_p}, {_n}, coal, "", "", 0, 25)
  341. setShop(15, {_p}, {_n}, redstone, "", "", 0, 55)
  342. setShop(16, {_p}, {_n}, lapis lazuli, "", "", 0, 50)
  343. setShop(19, {_p}, {_n}, iron block, "", "", 135, 1800)
  344. setShop(20, {_p}, {_n}, gold block, "", "", 225, 3150)
  345. setShop(21, {_p}, {_n}, emerald block, "", "", 2250, 11250)
  346. setShop(22, {_p}, {_n}, diamond block, "", "", 4500, 22500)
  347. setShop(23, {_p}, {_n}, coal block, "", "", 0, 225)
  348. setShop(24, {_p}, {_n}, redstone block, "", "", 0, 375)
  349. setShop(25, {_p}, {_n}, lapis lazuli block, "", "", 0, 450)
  350.  
  351. function redstone(p: player, n: number):
  352. open virtual chest inventory with size 6 named "&7The Shop &f(Redstone)" to {_p}
  353. set {_x} to 0
  354. loop 54 times:
  355. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  356. add 1 to {_x}
  357. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  358. shop({_p})
  359. setShop(10, {_p}, {_n}, dropper, "", "", 0, 125)
  360. setShop(11, {_p}, {_n}, redstone repeater, "", "", 0, 75)
  361. setShop(12, {_p}, {_n}, redstone comparator, "", "", 0, 75)
  362. setShop(13, {_p}, {_n}, piston, "", "", 0, 125)
  363. setShop(14, {_p}, {_n}, sticky piston, "", "", 0, 125)
  364. setShop(15, {_p}, {_n}, lever, "", "", 0, 50)
  365. setShop(16, {_p}, {_n}, redstone torch, "", "", 0, 15)
  366. setShop(19, {_p}, {_n}, dispenser, "", "", 0, 75)
  367. setShop(20, {_p}, {_n}, stone button, "", "", 0, 25)
  368. setShop(21, {_p}, {_n}, wooden button, "", "", 0, 25)
  369. setShop(22, {_p}, {_n}, stone pressure plate, "", "", 0, 75)
  370. setShop(23, {_p}, {_n}, wooden pressure plate, "", "", 0, 50)
  371. setShop(24, {_p}, {_n}, heavy weighted pressure plate, "", "", 0, 75)
  372. setShop(25, {_p}, {_n}, light weighted pressure plate, "", "", 0, 75)
  373. setShop(28, {_p}, {_n}, observer, "", "", 0, 125)
  374. setShop(29, {_p}, {_n}, tripwire hook, "", "", 0, 75)
  375. setShop(30, {_p}, {_n}, redstone lamp, "", "", 0, 100)
  376. setShop(31, {_p}, {_n}, redstone block, "", "", 0, 375)
  377. setShop(32, {_p}, {_n}, wooden trapdoor, "", "", 0, 50)
  378. setShop(33, {_p}, {_n}, redstone, "", "", 0, 55)
  379. setShop(34, {_p}, {_n}, hopper, "", "", 0, 350)
  380.  
  381. function blocks(p: player, n: number):
  382. open virtual chest inventory with size 6 named "&7The Shop &f(Blocks)" to {_p}
  383. set {_x} to 0
  384. loop 54 times:
  385. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  386. add 1 to {_x}
  387. make gui slot 49 of {_p} with arrow named "&7Back Page" to run:
  388. shop({_p})
  389. make gui slot 53 of {_p} with bone named "&7Next Page &a⟶" to run:
  390. blocks2({_p}, {_n})
  391. #! setShop(slot, player, amount, item, name, lore, sell price, buy price) !#
  392. setShop(10, {_p}, {_n}, grass, "", "", 0, 10)
  393. setShop(11, {_p}, {_n}, dirt, "", "", 0, 5)
  394. setShop(12, {_p}, {_n}, cobble, "", "", 1, 10)
  395. setShop(13, {_p}, {_n}, stone, "", "", 2, 15)
  396. setShop(14, {_p}, {_n}, granite, "", "", 0, 15)
  397. setShop(15, {_p}, {_n}, podzol, "", "", 0, 15)
  398. setShop(16, {_p}, {_n}, andesite, "", "", 0, 15)
  399. setShop(19, {_p}, {_n}, oak log, "", "", 0, 25)
  400. setShop(20, {_p}, {_n}, spruce log, "", "", 0, 25)
  401. setShop(21, {_p}, {_n}, birch log, "", "", 0, 25)
  402. setShop(22, {_p}, {_n}, jungle log, "", "", 0, 25)
  403. setShop(23, {_p}, {_n}, sand, "", "", 0, 50)
  404. setShop(24, {_p}, {_n}, red sand, "", "", 0, 35)
  405. setShop(25, {_p}, {_n}, gravel, "", "", 0, 25)
  406. setShop(22, {_p}, {_n}, glowstone, "", "", 0, 50)
  407. setShop(23, {_p}, {_n}, quartz block, "", "", 0, 35)
  408. setShop(24, {_p}, {_n}, chiseled quartz block, "", "", 0, 40)
  409. setShop(25, {_p}, {_n}, clay block, "", "", 0, 25)
  410. setShop(28, {_p}, {_n}, brick block, "", "", 0, 65)
  411. setShop(29, {_p}, {_n}, prismarine block, "", "", 0, 55)
  412. setShop(30, {_p}, {_n}, prismarine brick, "", "", 0, 55)
  413. setShop(31, {_p}, {_n}, trapped chest, "", "", 0, 75)
  414. setShop(32, {_p}, {_n}, ender chest, "", "", 0, 125)
  415. setShop(33, {_p}, {_n}, brewing stand, "", "", 0, 150)
  416. setShop(34, {_p}, {_n}, cauldron, "", "", 0, 75)
  417.  
  418. function blocks2(p: player, n: number):
  419. open virtual chest inventory with size 6 named "&7The Shop &f(Blocks)" to {_p}
  420. set {_x} to 0
  421. loop 54 times:
  422. make gui slot {_x} of {_p} with light green glass pane named "&7" to do nothing
  423. add 1 to {_x}
  424. make gui slot 49 of {_p} with arrow named "&c⟵ &7Back Page" to run:
  425. blocks({_p}, {_n})
  426. setShop(10, {_p}, {_n}, cobweb, "", "", 0, 55)
  427. setShop(11, {_p}, {_n}, lily pad, "", "", 0, 35)
  428. setShop(12, {_p}, {_n}, soul sand, "", "", 0, 55)
  429. setShop(13, {_p}, {_n}, clay block, "", "", 0, 40)
  430. setShop(14, {_p}, {_n}, endstone, "", "", 0, 35)
  431. setShop(15, {_p}, {_n}, sea lantern, "", "", 0, 40)
  432. setShop(16, {_p}, {_n}, snow block, "", "", 0, 30)
  433. setShop(19, {_p}, {_n}, ice block, "", "", 0, 50)
  434. setShop(20, {_p}, {_n}, packed ice, "", "", 0, 75)
  435. setShop(21, {_p}, {_n}, netherrack, "", "", 0, 35)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement