How would I go about having a chest spawn at a random of 5 different set locations every 3 hours? currently I have this:
command /chestspawn <text>:
usage: /chestspawn 1/2/3/4/5
trigger:
if arg-1 is "1":
set {location.1.chestspawn} to location of player
message "Set chestspawn 1!"
if arg-1 is "2":
set {location.2.chestspawn} to location of player
message "Set chestspawn 2!"
if arg-1 is "3":
set {location.3.chestspawn} to location of player
message "Set chestspawn 3!"
if arg-1 is "4":
set {location.4.chestspawn} to location of player
message "Set chestspawn 4!"
if arg-1 is "5":
set {location.5.chestspawn} to location of player
message "Set chestspawn 5!"
on script load:
every 3 hours set block at {location.1.chestspawn} OR {location.2.chestspawn} OR {location.3.chestspawn} OR {location.4.chestspawn} OR {location.5.chestspawn} to ender chest
The setting of the spawns works fine but I can't get the spawning itself to work
Help would be greatly appreciated! Thank you!
Kind regards, hasanas
command /chestspawn <text>:
usage: /chestspawn 1/2/3/4/5
trigger:
if arg-1 is "1":
set {location.1.chestspawn} to location of player
message "Set chestspawn 1!"
if arg-1 is "2":
set {location.2.chestspawn} to location of player
message "Set chestspawn 2!"
if arg-1 is "3":
set {location.3.chestspawn} to location of player
message "Set chestspawn 3!"
if arg-1 is "4":
set {location.4.chestspawn} to location of player
message "Set chestspawn 4!"
if arg-1 is "5":
set {location.5.chestspawn} to location of player
message "Set chestspawn 5!"
on script load:
every 3 hours set block at {location.1.chestspawn} OR {location.2.chestspawn} OR {location.3.chestspawn} OR {location.4.chestspawn} OR {location.5.chestspawn} to ender chest
The setting of the spawns works fine but I can't get the spawning itself to work
Help would be greatly appreciated! Thank you!
Kind regards, hasanas