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})
- set {_loc2} to addDir({_world}, {_d}, {_xa}, {_ya}, {_loc2})
- send "Loc1: %{_loc1}%" to console
- send "Loc2: %{_loc2}%" to console
- 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 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(w: string, final: direction, rem: number, yrem: number, l: location) :: location:
- #add {_l} to {_list::*}
- #set {_loc} to {_list::1}
- #set {_type} to {_list::2}
- #set {_loc::*} to {_loc} split at ","
- #set {_x} to {_loc::1}
- #set {_y} to {_loc::2}
- #set {_z} to {_loc::3}
- #replace "x: " in {_x} with ""
- #replace " y: " in {_y} with ""
- #replace " z: " in {_z} with ""
- send "Running..." to console
- #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
- send "Running..." to console
- loop split "%{_l}%" by ",":
- if loop-value contains "x:":
- set {_x} to loop-value parsed as a number
- replace "x:" in {_x} with ""
- if loop-value contains "y:":
- set {_y} to loop-value parsed as a number
- replace " y:" in {_y} with ""
- if loop-value contains "z:":
- set {_z} to loop-value parsed as a number
- replace " z:" in {_z} with ""
- #send "%loop-value%" to console
- send "%{_final}%" to console
- if {_final} is north:
- send "Before: %{_z}%" to console
- send "%{_rem}%" to console
- add {_rem} to {_z}
- send "After: %{_z}%" to console
- if {_final} is east:
- send "Before: %{_x}%" to console
- send "%{_rem}%" to console
- add {_rem} to {_x}
- send "After: %{_x}%" to console
- if {_final} is south:
- send "Before: %{_z}%" to console
- send "%{_rem}%" to console
- add {_rem} to {_z}
- send "After: %{_z}%" to console
- if {_final} is west:
- send "Before: %{_x}%" to console
- send "%{_rem}%" to console
- remove {_rem} from {_x}
- send "After: %{_x}%" to console
- send "Running..." to console
- add {_yrem} to {_y}
- set {_loc} to location ({_x} parsed as a number), ({_y} parsed as a number), ({_z} parsed as a number) in world "%{_w}%"
- return {_loc}
Add Comment
Please, Sign In to add comment