#setting blocks in area command

1 messages · Page 1 of 1 (latest)

prisma loom
#

send the code here

#

try this

    permission: op
    trigger:
        loop blocks within arg-1 and arg-2:
            chance arg-3%:
                set loop-block to arg-4
#

replace it with that skript

#

and try it

#

u are trying to select a random selection of blocks into a specific type of block, right?

#
    permission: op
    usage: /randomset <location1> <location2> <number> <text>
    trigger:
        loop blocks between arg-1 and arg-2:
            loop-number times:
                set loop-block to arg-4
#

can u try this

#

try it

#

change all of them to like that

#

like this

#
    permission: op
    trigger:
        loop blocks within arg-1 and arg-2:
            chance of arg-3:
                set loop-block to arg-4
#

maybe u are not writing the location propery

#

are u writing it like this

#

x y z

#

?

#

like 10 5 20

#

/randomset 10 5 20 15 7 25 100 "stone"

#

like this

#

so i'm saying

#

when u select ur location

#

select it like this

#

/randomset 10 5 20

#

when u reload the skript, is that the issue?

#

hmm

#

u can try this

#
    permission: op
    trigger:
        loop blocks within arg-1:
            chance of arg-2%:
                set loop-block to arg-3
#

when selecting ur location do it like this

#

/randomset 10,5,20 to 20,10,30 50 "stone"

#

try this

    permission: op
    trigger:
        set {_loc1} to arg-1
        set {_loc2} to arg-2
        set {_chance} to arg-3
        set {_block} to arg-4
        repeat with {_x} from {_loc1's x} to {_loc2's x}:
            repeat with {_y} from {_loc1's y} to {_loc2's y}:
                repeat with {_z} from {_loc1's z} to {_loc2's z}:
                    chance of {_chance}%:
                        set block at {_x}, {_y}, {_z} to {_block}
graceful shale
#

Ye

#

Location isnt a valid argument type

#

You can have 3 number/int args

#

And make a loc using them as x y z

#
  trigger:
    set {_loc} to location(arg-1, arg-2, arg-3)
    send "That's a %type of block at {_loc}%!"```
graceful shale
#

You can though

#

Do what i did twice to get 2 locations