Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Directions etc.
- function fillDir(p: player, block: String, world: String, d: direction, x: String, y: String, z: String, loc2: location, xa: number, ya: number, za: number):
- set {_loc1} to location ({_x} parsed as a number), ({_y} parsed as a number), ({_z} parsed as a number) of world "%{_world}%"
- clear {scematic::block::%{_p}%::types::*}
- #addDir({_d}, {_xa} parsed as a number, {_ya} parsed as a number, {_za} parsed as a number, {_loc2})
- addDir({_d}, {_xa}, {_ya}, {_za}, {_loc2})
- #loop blocks between block at {_loc1} and block at {_loc2}:
- #function fillDir(x: String, y: String, z: String, loc2: location, world: String, block: String, p: player):
- #set {_loc1} to location ({_x} parsed as a number), ({_y} parsed as a number), ({_z} parsed as a number) of world "%{_world}%"
- #if {_block} is "scematic_dirt_machine":
- # clear {scematic::block::%{_p}%::types::*}
- # loop blocks between block at {_loc1} and block at {_loc2}:
- # add "%location of loop-block%$%loop-block%" to {scematic::block::%{_p}%::types::*}
- # if loop-block is air:
- # set block at location of loop-block to green glass block
- # else:
- # set block at location of loop-block to red glass block
- function addDir(dir: direction, xa: number, ya: number, za: number, l: location) :: number:
- loop split "%{_dir}%" by "and":
- if {_dir} is not set:
- set {_dir} to numbersIn(loop-value)
- set {_final} to loop-value
- else if numbersIn(loop-value) > {_dir}:
- set {_dir} to numbersIn(loop-value)
- set {_final} to loop-value
- loop split "%{_l}%" by ",":
- send "%loop-value%" to console
- if {_final} contains "north":
- return 1
- if {_final} contains "east":
- return 2
- if {_final} contains "south":
- return 3
- if {_final} contains "west":
- return 4
Add Comment
Please, Sign In to add comment