Code:
command /test:
trigger:
loop blocks in radius whatever around player:
if loop-block is air:
if block above loop-block is air:
add loop-block's location to {_locs::*}
set {_loc} to random element of {_locs::*}
spawn a zombie at {_loc}
I found this in the forums, but it is not efficient.
If you set "whatever" to something more than 4, it crashes the server badly.
I just want to find a free spot near the player to spawn a player-like npc with skript-npc