Help with looping blocks.

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

  • LOOKING FOR A VERSION OF SKRIPT?

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

Status
Not open for further replies.
Jan 28, 2017
23
1
0
53
Hi,
I've got this code,
code_language.skript:
on place of iron block:
    set {_h} to location of block 5 north of event-block
    set {_h2} to location of block 5 east of {_h}
    set {_xmax} to rounded up x-coordinate of {_h2}
    set {_zmax} to rounded up z-coordinate of {_h2}
    set {_ymax} to 255
    set {_h3} to location at {_xmax}, 255, {_zmax}
    set block at {_h3} to diamond block
    set {_g} to location of block 5 south of event-block
    set {_g2} to location of block 5 west of {_g}
    set {_xmin} to rounded up x-coordinate of {_g2}
    set {_zmin} to rounded up z-coordinate of {_g2}
    set {_ymin} to 0
    set {_h4} to location at {_xmin}, 0, {_zmin}
    set block at {_h4} to diamond block
    loop blocks from {_h3} to {_h4}:
        set {_final} to location of loop-block
        add {_final} to {we.sel.%player%::*}
        add {_final} to {claim.%player%.%{claims.%player%}%::*}
        add {_final} to {claimed.all::*}
        send "%{_final}%"
    send "done"
    add 1 to {claims.%player%}
    set {claim.%player%.%{claims.%player%}%.name} to player
The problem with this skript is that it doesn't loop through the blocks, any ideas to make this work?
 
Status
Not open for further replies.