Hello all of you, I'm trying to make a reset region skript. The idea is the following one:
The problem comes in the 10th line. I don't know how to do for looping the arg 1 without puting the region name directly.
If instead of putting "%arg 1%" I put the region name it works:
The first code doesn't work but the second one yes, and I only change de 10th line.
Can someone help me? Thanks.
[doublepost=1570990764,1570975959][/doublepost]Solved.
Code:
command /mreset [<text>]:
trigger:
if arg 1 is not set:
send "You must put a region name" to player
if arg 1 is a region:
make player execute command "//schem load %arg 1%"
make player execute command "//copy"
make player execute command "//paste -o"
wait 4 ticks
loop all blocks in the region "%arg 1%":
if loop-block is stone:
if block 1 meter below, above, east, west, north or south loop-block is air:
if chance of 20%:
set loop-block to lapis lazuli
if chance of 10%:
set loop-block to coal ore
if chance of 5%:
set loop-block to iron ore
The problem comes in the 10th line. I don't know how to do for looping the arg 1 without puting the region name directly.
If instead of putting "%arg 1%" I put the region name it works:
Code:
command /mreset [<text>]:
trigger:
if arg 1 is not set:
send "Debes poner el nombre de lo que quieres resetear" to player
if arg 1 is a region:
make player execute command "//schem load %arg 1%"
make player execute command "//copy"
make player execute command "//paste -o"
wait 4 ticks
loop all blocks in the region "1":
if loop-block is stone:
if block 1 meter below, above, east, west, north or south loop-block is air:
if chance of 20%:
set loop-block to lapis lazuli
if chance of 10%:
set loop-block to coal ore
if chance of 5%:
set loop-block to iron ore
The first code doesn't work but the second one yes, and I only change de 10th line.
Can someone help me? Thanks.
[doublepost=1570990764,1570975959][/doublepost]Solved.
Code:
command /mreset [<region>]:
trigger:
if arg 1 is not set:
send "Debes poner el nombre de lo que quieres resetear" to player
if arg 1 is a region:
make player execute command "//schem load %arg 1%"
make player execute command "//copy"
make player execute command "//paste -o"
wait 4 ticks
loop all blocks in the region arg-1:
if loop-block is stone:
if block 1 meter below, above, east, west, north or south loop-block is air:
if chance of 20%:
set loop-block to lapis lazuli
if chance of 10%:
set loop-block to coal ore
if chance of 5%:
set loop-block to iron ore