Solved Lag machine remover

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Eli83592

Member
Oct 28, 2022
12
1
3
Code:
command /lagmachine [<text>] [<text>]:
    permission: Admin.Lagremove
    trigger:
        loop all blocks within a radius of %arg-2% at %arg-1%:
            if loop-block is redstone_wire, repeater, observer, piston, or sticky piston:
                set block at loop-block to air
                # arg 1 is coords, arg 2 is radius

I cannot figure out how to loop a radius around a point,



Sorry if this is really obvious i am newer to skript.
 
Code:
loop all block in radius %number% around %location%:
But you have 2 text arguments in command, for first you need convert this to number (radius) and location (center)
 
Alright i will try this, thank you!
[doublepost=1686334076,1686332488][/doublepost]
Code:
command /lagmachine [<text>] [<text>]:
    permission: Admin.Lagremove
    trigger:
        set {_location} to arg-2
        set {_number} to arg-1 parsed as number
        loop blocks in radius {_number} around {_location}:
            send "%loop-block%" to player
            if loop-block is redstone_wire or repeater or observer or piston or sticky_piston:
                set block at loop-block to air

Idk why its not working, im getting no errors
 
Alright i will try this, thank you!
[doublepost=1686334076,1686332488][/doublepost]
Code:
command /lagmachine [<text>] [<text>]:
    permission: Admin.Lagremove
    trigger:
        set {_location} to arg-2
        set {_number} to arg-1 parsed as number
        loop blocks in radius {_number} around {_location}:
            send "%loop-block%" to player
            if loop-block is redstone_wire or repeater or observer or piston or sticky_piston:
                set block at loop-block to air

Idk why its not working, im getting no errors
Code:
set {_location} to arg-2
you set variable {_location} to text from arg-2.
text is not location.
 
How do i set it to a location?
for example like this:
Code:
command /locationcmd <number> <number> <number> <text>:
  trigger:
    set {_world} to arg-4 parsed as world
    {_world} is set
    set {_loc} to location arg-1, arg-2, arg-3 in {_world}
 
Last edited:
Ok thank you.
[doublepost=1686421887,1686421345][/doublepost]Im sorry for bothering.
I did get it to work after using your command and combining it with my code