Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.71 KB | None | 0 0
  1. #
  2. # DIAMOND TREE
  3. #
  4.  
  5. #
  6. #TREE GIVE COMMAND
  7. #
  8.  
  9. command /tree give [<player>] [<text>]:
  10. permission: tree.give
  11. permission message: &cNo permission!
  12. trigger:
  13. if arg-2 is "0":
  14. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 0)" with lore "&7(Place To Use)"
  15. else if arg-2 is "1":
  16. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 1)" with lore "&7(Place To Use)"
  17. else if arg-2 is "2":
  18. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 2)" with lore "&7(Place To Use)"
  19. else if arg-2 is "3":
  20. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 3)" with lore "&7(Place To Use)"
  21. else if arg-2 is "4":
  22. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 4)" with lore "&7(Place To Use)"
  23. else if arg-2 is "5":
  24. give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 5)" with lore "&7(Place To Use)"
  25.  
  26. #
  27. # LEVEL 0 TREE
  28. #
  29.  
  30. on place of a oak sapling:
  31. if name of player's held item contains "&b&lDiamond Tree &B&o(Level 0)":
  32. set {_loc} to location of event-block
  33. set {twait.%{_loc}%} to 15
  34. set {tset.%{_loc}%} to 1
  35. set event-block to diamond block
  36. set block above event-block to diamond block
  37. set block 3 above event-block to prismarine brick
  38. set block 2 above event-block to diamond block
  39. set block 2 above north event-block to prismarine block
  40. set block 2 above south event-block to prismarine block
  41. set block 2 above east event-block to prismarine block
  42. set block 2 above west event-block to prismarine block
  43. set block 1 above north event-block to oak wall sign
  44. loop blocks in radius 3 around event-block:
  45. if loop-block is oak wall sign:
  46. set line 1 of loop-block to "&b&lDiamond Tree"
  47. set line 2 of loop-block to "&b&o(Level 0)"
  48. set line 3 of loop-block to "&7Right-Click"
  49. set line 4 of loop-block to "&7For Info!"
  50. if loop-block is prismarine brick:
  51. while {tset.%{_loc}%} = 1:
  52. drop 1 diamond at loop-block
  53. wait "%{twait.%{_loc}%}% seconds" parsed as timespan
  54.  
  55. on right click on oak wall sign:
  56. line 2 of the clicked block is "&b&o(Level 0)":
  57. play sound "block.note_block.pling" with volume 3 to the player
  58. open virtual chest inventory with size 3 named "&b&lTree &f» Panel" to player
  59. make gui slot 13 of player with diamond named "&b&lUpgrade Tree" with lore "&f", "&bUpgrade For &f$1,000,000", "&f", "&bCurrent: &f0", "&bMax: &f5", "&bRate: &f15s", and "&f" to run:
  60. if player's balance >= 1000000:
  61. play sound "entity.experience_orb.pickup" with volume 3 to the player
  62. send "&b&lTree &b» &fYou have upgraded your tree for $1,000,000!"
  63. remove 1000000 from player's balance
  64. set line 2 of event-block to "&b&o(Level 1)"
  65. close player's inventory
  66. else:
  67. play sound "entity.villager.no" with volume 3 to the player
  68. send "&b&lTree &b» &fYou do not have enough money to upgrade your tree!"
  69.  
  70. make gui slot 26 of player with barrier named "&bCollect Tree" with lore "&fMoves Tree to your inventory!" to run:
  71. set {tset.%{_loc}%} to 0
  72. send "&b&lTree &B» &fYou collected your tree!"
  73. close player's inventory
  74. set {_loc} to air
  75. set block above {_loc} to air
  76. set block 3 {_loc} to air
  77. set block 2 above {_loc} to air
  78. set block 2 above north {_loc} to air
  79. set block 2 above south {_loc} to air
  80. set block 2 above east {_loc} to air
  81. set block 2 above west {_loc} to air
  82. set block 1 above 1 north {_loc} to air
  83.  
  84.  
  85.  
  86.  
  87. #
  88. # LEVEL 1 TREE
  89. #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement