Ok dzięki. Poszukam
options:
# Zasięg koordynatu X:
min-x: -2500
max-x: 2500
# Zasięg koordynatu Z:
min-z: -2500
max-z: 2500
grupowe-tp-zasieg: 4
grupowe-tp-block: note block
grupowe-tp-wiadomosc: &aZostales przeteleportowany na koordynaty&7: &6%x-loc of loop-player%&e, &6%y-loc of loop-player%&e, &6%z-loc of loop-player%
grupowe-tp-min-graczy: 2
niedozwolone-bloki: water or lava
all-tp-przycisk: stone button
function getRandomTPLocation(p: player) :: location:
set {_loc} to location at (random integer between {@min-x} and {@max-x}), 256, (random integer between {@min-z} and {@max-z}) in {_p}'s world
while block under block at {_loc} is air:
remove 1 from y-loc of {_loc}
if block under {_loc} is {@niedozwolone-bloki}:
set {_loc} to location at (random integer between {@min-x} and {@max-x}), 256, (random integer between {@min-z} and {@max-z}) in {_p}'s world
if y-loc of block under block at {_loc} is less than 1:
set {_loc} to location at (random integer between {@min-x} and {@max-x}), 256, (random integer between {@min-z} and {@max-z}) in {_p}'s world
return {_loc}
on right click:
if "%target block%" doesn't contain "{@all-tp-przycisk}":
send "0"
stop
if block west or south or east or north target block is {@grupowe-tp-block}:
send "1"
if size of (players in radius {@grupowe-tp-zasieg} around block behind target block) is equal 2:
stop
set {_loc} to getRandomTPLocation(player)
loop players in radius {@grupowe-tp-zasieg} around block behind target block:
teleport loop-player to {_loc}
send "{@grupowe-tp-wiadomosc}" to loop-player
Ten jest ok tylko wywala błąd w 19 linijce.