Date: 2023/09/25 11:44:40 UTC-07:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
on player right clicks block with:job_hammer_5|job_hammer_10:
- if <placeholder[superior_island_location_is_member]> matches yes:
- determine passively cancelled
- animate <player> animation:SWING_MAIN_HAND
- debugblock clear
- define mode <player.item_in_hand.flag[mode]>
- define direction <player.location.yaw.simple>
#Define the building mode with shift right clicks
- if <player.is_sneaking>:
- determine passively cancelled
- if <player.item_in_hand.has_flag[mode]>:
#Display in actionBar the mode
- if <[mode]> == ligne:
- playsound <player.location> sound:entity_experience_orb_pickup
- inventory flag slot:HAND mode:colonne
- actionbar "<&gradient[from=0,255,239;to=22,124,186;style=rgb]>Marteau mode: <&r><&b><&l>colonne"
- if <[mode]> == colonne:
- playsound <player.location> sound:entity_experience_orb_pickup
- inventory flag slot:HAND mode:sol
- actionbar "<&gradient[from=0,255,239;to=22,124,186;style=rgb]>Marteau mode: <&r><&b><&l>sol"
- if <[mode]> == sol:
- playsound <player.location> sound:entity_experience_orb_pickup
- inventory flag slot:HAND mode:mur
- actionbar "<&gradient[from=0,255,239;to=22,124,186;style=rgb]>Marteau mode: <&r><&b><&l>mur"
- if <[mode]> == mur:
- playsound <player.location> sound:entity_experience_orb_pickup
- inventory flag slot:HAND mode:ligne
- actionbar "<&gradient[from=0,255,239;to=22,124,186;style=rgb]>Marteau mode: <&r><&b><&l>ligne"
- else:
- playsound <player.location> sound:entity_experience_orb_pickup
- inventory flag slot:HAND mode:ligne
- actionbar "<&gradient[from=0,255,239;to=22,124,186;style=rgb]>Marteau mode: <&r><&b><&l>Ligne"
- else:
#Blocking some type of blocks
- if <context.location.material.advanced_matches[air|hopper|chest|piston|sticky_piston|observer|note_block]>:
- determine cancelled
- else:
#Check the builder wand mode
- if <[mode]> == ligne:
#Check the direction
- if <[direction]> == east:
#Check if is the display shape clicks or the confirm clicks (case display here)
- if <context.location.has_flag[holobuild_originn].not>:
- foreach <server.flag[holobuild<player.uuid>]> as:old_holobuild:
- flag server holobuild<player.uuid>:<-:<[old_holobuild]>
- playsound <player.location> sound:ui_cartography_table_take_result
- flag <context.location> holobuild_originn expire:3s
- flag <player> holobuild_origin:<context.location> expire:3s
#Show the shappe with debugblock
- foreach <player.cursor_on.to_cuboid[<player.cursor_on.add[7,0,0]>].blocks> as:holobuild:
- debugblock <[holobuild]> d:2s color:lime color:lime color:lime
- flag server holobuild<player.uuid>:->:<[holobuild]> expire:3s
#Check if is the display shape clicks or the confirm clicks (case confirm here)
- else:
- if <[mode]> == ligne:
- if <[direction]> == east:
#Define the block for build material
- define block <player.cursor_on.material.name>
- if <player.inventory.contains_item[<[block]>].quantity[7]>:
- flag <player.flag[holobuild_origin]> holobuild_originn:!
- flag <player> holobuild_origin:!
#Build the shape
- foreach <server.flag[holobuild<player.uuid>].filter[advanced_matches[air|water|lava]]> as:holobuild_build:
#Check if the build location is inside the island cuboid
- if <player.flag[island_cubo].contains[<[holobuild_build]>]>:
- playeffect effect:white_ash quantity:10 at:<[holobuild_build]> offset:1 visibility:10
- wait 10t
- modifyblock <[holobuild_build]> <[block]> delayed
- playsound <player.location> sound:block_wood_place
- take item:<[block]> from:<player.inventory>
- else:
- actionbar "<&8>[<&c><&l>!<&8>] <&c>Vous n'avez pas suffisament de ressources !"
#Repeat foreach builder wand mode + location :/