HSIbrahim

Untitled

Jan 6th, 2023
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.38 KB | None | 0 0
  1. function compress(p: player, oldamount: integer, old: item, new: item):
  2. if {_p} has {_old}:
  3. loop {_p}'s inventory:
  4. if loop-value's type = {_old}'s type:
  5. if name of loop-value is not set:
  6. if amount of loop-value in {_p}'s inventory >= {_oldamount}:
  7. broadcast {_oldamount}
  8. broadcast amount of loop-value in {_p}'s inventory to {_p}
  9. send "1" to {_p}
  10. remove {_oldamount} of loop-value from {_p}'s inventory
  11. send "2" to {_p}
  12. drop dropped {_new} to {_p}
  13. send {_new} to {_p}
  14. send "3" to {_p}
  15.  
  16.  
  17. command compress:
  18. permission: compress.use
  19. trigger:
  20. if {compress::%player's uuid%} is not set:
  21. set {compress::%player's uuid%} to true
  22. send "&aEnabled compressing!"
  23. else:
  24. delete {compress::%player's uuid%}
  25. send "&cDisabled compressing!"
  26.  
  27.  
  28. on break:
  29. if {compress::%player's uuid%} is set:
  30. compress(player, 64, coal ore, coal of mending 1 named "&8Enchanted Coal" with enchants flag hidden) # Works
  31. compress(player, 64, iron ore, raw Iron of mending 1 named "&fEnchanted Iron" with enchants flag hidden) # Works
  32. compress(player, 64, Gold ore, raw Gold of mending 1 named "&6Enchanted Gold" with enchants flag hidden) # Works
  33. compress(player, 64, Diamond ore, Diamond of mending 1 named "&bEnchanted Diamond" with enchants flag hidden) # Works
  34. compress(player, 64, Emerald ore, Emerald of mending 1 named "&aEnchanted Emerald" with enchants flag hidden) # Works
  35. compress(player, 64, Redstone ore, Redstone of mending 1 named "&4Enchanted Redstone" with enchants flag hidden) # Work
  36. compress(player, 64, Oak Log, Oak log of mending 1 named "&7Enchanted Oak Wood" with enchants flag hidden)
  37. compress(player, 64, Blue Concrete, Blue concrete of mending 1 named "&9Enchanted Blue Concrete" with enchants flag hidden)
  38. compress(player, 64, Red Concrete, Red concrete of mending 1 named "&4Enchanted Red Concrete" with enchants flag hidden)
  39. compress(player, 64, Slime Block, slimeball of mending 1 named "&2Enchanted Slime" with enchants flag hidden)
  40. #Over World Done ------------------------
  41. compress(player, 64, Nether Quartz ore, Nether Quartz ore of mending 1 named "&fNether Quartz Ore" with enchants flag hidden)
  42. compress(player, 64, Obsidian, Obsidian of mending 1 named "&8Obsidian" with enchants flag hidden)
  43. compress(player, 64, Gilded Blackstone, Gilded Blackstone of mending 1 named "&7Gilded Blackstone" with enchants flag hidden)
  44. compress(player, 64, Blackstone, Blackstone of mending 1 named "&7Blackstone" with enchants flag hidden)
  45. compress(player, 64, Crying Obsidian, Crying Obsidian of mending 1 named "&dCrying Obsidian" with enchants flag hidden)
  46. compress(player, 64, Polished Blackstone, Polished Blackstone of mending 1 named "&7Polished Blackstone" with enchants flag hidden)
  47. compress(player, 64, Stripped Crimson Hyphae, Stripped Crimson Hyphae of mending 1 named "&cStripped Crimson Hyphae" with enchants flag hidden)
  48. compress(player, 64, Stripped Warped Hyphae, Stripped Warped Hyphae of mending 1 named "&bStripped Warped Hyphae" with enchants flag hidden)
  49. #Nether Done ------------------------
  50. #For End World compress(player, 64, End Stone, End Stone of mending 1 named "&eEnd Stone" with enchants flag hidden)
  51. #For End World compress(player, 16, Beacon, Beacon of mending 1 named "&bBeacon" with enchants flag hidden)
  52. #For End World compress(player, 8, Ender Pearl, Ender Pearl of mending 1 named "&bEnder Pearl" with enchants flag hidden)
  53. #For End World compress(player, 2, Dragon Egg, Dragon Egg of mending 1 named "&5Dragon Egg" with enchants flag hidden)
  54. #For End World compress(player, 3, Dragon Head, Dragon Head of mending 1 named "&bPhantom" with enchants flag hidden)
  55. #For End World compress(player, 64, Dark Prismarine, Dark Prismarine of mending 1 named "&2Dark Prismarine" with enchants flag hidden)
  56. #For End World compress(player, 64, Prismarine Bricks, Prismarine Bricks of mending 1 named "&bPrismarine Bricks" with enchants flag hidden)
  57. #For End World compress(player, 64, Blue Ice, Blue Ice of mending 1 named "&bBlue Ice" with enchants flag hidden)
  58. #For End World compress(player, 64, Prismarine, Prismarine of mending 1 named "&bPrismarine" with enchants flag hidden)
  59. #For End World compress(player, 24, prismarine named "&bPrismarine", Prismarine shard of mending 1 named "&bPrismarine Shard" with enchants flag hidden)
Advertisement
Add Comment
Please, Sign In to add comment