Solved Help to create a dome around who uses a certain item

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

SrShiroh

New Member
Aug 28, 2023
5
0
1
20
Hello, I have looked for plugins to duplicate or do what is mentioned below, but I have not found anything.

Category: Help to create a script that when clicking a certain item "iron door", creates a glass dome around the player.

Skript Version: 2.9.1
What I want:
I need help to create a script similar to the "//hsphere" command of world edit, but that does not replace the blocks under the player, but the empty ones around the one I execute it and that after a certain time the blocks disappear and return to place the blocks that were previously there before using this item, I have tried to do it several times, but I have not been able to create something similar.

When I'd like it by:
I need it in 1 week, I've already spent a lot of time trying to do it
 
Hello, I have looked for plugins to duplicate or do what is mentioned below, but I have not found anything.

Category: Help to create a script that when clicking a certain item "iron door", creates a glass dome around the player.

Skript Version: 2.9.1
What I want:
I need help to create a script similar to the "//hsphere" command of world edit, but that does not replace the blocks under the player, but the empty ones around the one I execute it and that after a certain time the blocks disappear and return to place the blocks that were previously there before using this item, I have tried to do it several times, but I have not been able to create something similar.

When I'd like it by:
I need it in 1 week, I've already spent a lot of time trying to do it

Code:
on right click:
   player is holding iron door named "Test"
   loop all blocks in radius 4 around player's location:
      if distance between location and loop-block's location is between 3.5 and 4.5:
         loop-block is air
         set loop-block to bedrock
Try this! You can change the radius to whichever radius you'd like and if needed, can change it into a command. Also, feel free to adjust the number 3.5 and 4.5 in the distance line if you wish to modify the sphere that appears a bit more.
 
Code:
on right click:
   player is holding iron door named "Test"
   loop all blocks in radius 4 around player's location:
      if distance between location and loop-block's location is between 3.5 and 4.5:
         loop-block is air
         set loop-block to bedrock
Try this! You can change the radius to whichever radius you'd like and if needed, can change it into a command. Also, feel free to adjust the number 3.5 and 4.5 in the distance line if you wish to modify the sphere that appears a bit more.
When you click on the item nothing happens
 
Code:
on right click holding iron door:
    if name of player's tool is "&x&0&8&4&C&F&BT&x&3&F&8&4&F&Ce&x&7&6&B&B&F&Cs&x&A&D&F&3&F&Dt":
        set {_center} to player's location
        delete {_blocks::*}
        loop all blocks in radius 4 around {_center}:
            set {_distance} to distance between {_center} and loop-block
            if {_distance} is between 3.5 and 4.5:
                if loop-block is air:
                    add location of loop-block to {_blocks::*}
                    set loop-block to glass
        send "&aHas creado un anillo de vidrio a tu alrededor. Desaparecerá en 8 segundos." to player
        wait 8 seconds
        loop {_blocks::*}:
            set block at loop-value to air
        send "&cEl anillo de vidrio ha desaparecido." to player

I have created a script based on the one you gave me, but doing so leaves me with some openings in the dome
 
Code:
on right click holding iron door:
    if name of player's tool is "&x&0&8&4&C&F&BT&x&3&F&8&4&F&Ce&x&7&6&B&B&F&Cs&x&A&D&F&3&F&Dt":
        set {_center} to player's location
        delete {_blocks::*}
        loop all blocks in radius 4 around {_center}:
            set {_distance} to distance between {_center} and loop-block
            if {_distance} is between 3.5 and 4.5:
                if loop-block is air:
                    add location of loop-block to {_blocks::*}
                    set loop-block to glass
        send "&aHas creado un anillo de vidrio a tu alrededor. Desaparecerá en 8 segundos." to player
        wait 8 seconds
        loop {_blocks::*}:
            set block at loop-value to air
        send "&cEl anillo de vidrio ha desaparecido." to player

I have created a script based on the one you gave me, but doing so leaves me with some openings in the dome
Try to change the distance to whole numbers. Like 3 and 5 instead of 3.5 and 4.5