The other day got help with a skript that lets me activate and deactivate a item spawner with a command, but I want to take that even further, rather then just being able to activate and deactivate the spawner, I could set its intervial in the command. I want it so that the first argument would be the on/off, the second would be the number, and the third would be the time type (ticks, seconds, minutes, hours). the second and third arguments would be optional incase I just wanted to activate and deactivate the skript. so for example to turn it on I would do /berries on 3 t, and that would spawn a dirt every 3 ticks, or just /berries off. to turn it off, if possible can someone please edit the skript and send it back so it can do this.
[doublepost=1671917313,1671917228][/doublepost]can someone please reply soon?
Code:
command /berries:
permission: berries.spawn
trigger:
if {berries.enabled} is true:
set {berries.enabled} to false
send "&cBerry spawner disabled" to player
else:
set {berries.enabled} to true
send "&2Berry spawner enabled" to player
every minute:
{berries.enabled} is true
drop 1 sweet berries at location(4352.5,97,4137.5, world "world") without velocity
drop 1 sweet berries at location(4352.5,97,4131.5, world "world") without velocity
drop 1 sweet berries at location(4357.5,97,4131.5, world "world") without velocity
drop 1 sweet berries at location(4357.5,97,4137.5, world "world") without velocity
drop 1 sweet berries at location(4347.5,97,4131.5, world "world") without velocity
drop 1 sweet berries at location(4342.5,97,4131.5, world "world") without velocity
drop 1 sweet berries at location(4342.5,97,4137.5, world "world") without velocity
drop 1 sweet berries at location(4347.5,97,4137.5, world "world") without velocity