Hello! I'm trying to write a skript that finds a random coord on the surface, places a chest there with some customizable loot, strike lightning there, point players compasses toward it, and place a few mobs around the chest to "guard" it.
This is what I have so far, but I'm not sure that it will work
Will this work? What can I do to fix it? Still getting back into skript. Any help appreciated.
This is what I have so far, but I'm not sure that it will work
code_language.skript:
every 2 minutes:
if {dutchman} is true:
chance of 8%:
set {_lootloc} to the location at (random integer between -1250 and 1250), 255, (random integer between -1250 and 1250)
while block below y-coordinate of {_lootloc} is air:
subract 1 from y-coordinate of {_lootloc}
broadcast "&lThe Dutchman has appeared at %{_lootloc}%!"
broadcast "&cWhat is it you most desire? The compass points you there."
loop all players:
set the loop-player's compass target to location of {_lootloc}
Will this work? What can I do to fix it? Still getting back into skript. Any help appreciated.