YbDGRYx7
Język: Skript
|
Autor: Anonimowy
function getRandomLoc(xmin: integer=-1000, xmax: integer=1000, zmin: integer=-1000, zmax: integer=1000, world: text="world") :: location: while {_return} is not set: set {_x} to random integer between {_xmin} and {_xmax} set {_z} to random integer between {_zmin} and {_zmax} set {_loc} to highest block at location at {_x}, 0, {_z} in world ({_world} parsed as world) if block at {_loc} != lava or water: add 1 to y-loc of {_loc} if (block at {_loc}) and (block above block at {_loc}) != lava: set {_return} to {_loc} return {_return} on right click on any button: if facing of clicked block is above: set {_t} to true if block at block 1 below clicked block is loom else if facing of clicked block is below: set {_t} to true if block at block 1 above clicked block is loom else if facing of clicked block is west: set {_t} to true if block at block 1 east clicked block is loom else if facing of clicked block is east: set {_t} to true if block at block 1 west clicked block is loom else if facing of clicked block is north: set {_t} to true if block at block 1 south clicked block is loom else if facing of clicked block is south: set {_t} to true if block at block 1 north clicked block is loom {_t} is true teleport player to getRandomLoc()