Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # DIAMOND TREE
- #
- #
- #TREE GIVE COMMAND
- #
- command /tree give [<player>] [<text>]:
- permission: tree.give
- permission message: &cNo permission!
- trigger:
- if arg-2 is "0":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 0)" with lore "&7(Place To Use)"
- else if arg-2 is "1":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 1)" with lore "&7(Place To Use)"
- else if arg-2 is "2":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 2)" with lore "&7(Place To Use)"
- else if arg-2 is "3":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 3)" with lore "&7(Place To Use)"
- else if arg-2 is "4":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 4)" with lore "&7(Place To Use)"
- else if arg-2 is "5":
- give arg-1 1 oak sapling named "&b&lDiamond Tree &b&o(Level 5)" with lore "&7(Place To Use)"
- #
- # LEVEL 0 TREE
- #
- on place of a oak sapling:
- if name of player's held item contains "&b&lDiamond Tree &B&o(Level 0)":
- set {_loc} to location of event-block
- set {twait.%{_loc}%} to 15
- set {tset.%{_loc}%} to 1
- set event-block to diamond block
- set block above event-block to diamond block
- set block 3 above event-block to prismarine brick
- set block 2 above event-block to diamond block
- set block 2 above north event-block to prismarine block
- set block 2 above south event-block to prismarine block
- set block 2 above east event-block to prismarine block
- set block 2 above west event-block to prismarine block
- set block 1 above north event-block to oak wall sign
- loop blocks in radius 3 around event-block:
- if loop-block is oak wall sign:
- set line 1 of loop-block to "&b&lDiamond Tree"
- set line 2 of loop-block to "&b&o(Level 0)"
- set line 3 of loop-block to "&7Right-Click"
- set line 4 of loop-block to "&7For Info!"
- if loop-block is prismarine brick:
- while {tset.%{_loc}%} = 1:
- drop 1 diamond at loop-block
- wait "%{twait.%{_loc}%}% seconds" parsed as timespan
- on right click on oak wall sign:
- line 2 of the clicked block is "&b&o(Level 0)":
- play sound "block.note_block.pling" with volume 3 to the player
- open virtual chest inventory with size 3 named "&b&lTree &f» Panel" to player
- 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:
- if player's balance >= 1000000:
- play sound "entity.experience_orb.pickup" with volume 3 to the player
- send "&b&lTree &b» &fYou have upgraded your tree for $1,000,000!"
- remove 1000000 from player's balance
- set line 2 of event-block to "&b&o(Level 1)"
- close player's inventory
- else:
- play sound "entity.villager.no" with volume 3 to the player
- send "&b&lTree &b» &fYou do not have enough money to upgrade your tree!"
- make gui slot 26 of player with barrier named "&bCollect Tree" with lore "&fMoves Tree to your inventory!" to run:
- set {tset.%{_loc}%} to 0
- send "&b&lTree &B» &fYou collected your tree!"
- close player's inventory
- set {_loc} to air
- set block above {_loc} to air
- set block 3 {_loc} to air
- set block 2 above {_loc} to air
- set block 2 above north {_loc} to air
- set block 2 above south {_loc} to air
- set block 2 above east {_loc} to air
- set block 2 above west {_loc} to air
- set block 1 above 1 north {_loc} to air
- #
- # LEVEL 1 TREE
- #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement