Solved Help with custom commands and loop dropping items

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Plav

Member
Dec 18, 2022
14
1
3
25
So I have this server that I work on, that basically has different jobs. One of them is going to be a janitor, which will have an area to work, they will clean up dirt, which will just be a dropped item. I have set the coords I want the drops to spawn at, but I want to be able to activate the skript and deactivate the skript with a command, and it will stop the spawn loop, I only seen commands that would just spawn the dirt at the area once, and not loop. so when I type /dirt, it will make the spawners start, but when I do it again, they stop. I am very new to skript, I hope this makes sense. It is also 1.17.1. I am just wondering if someone has a skript that does this, or if someone can fix mine, and send the fixed one here
Code:
command /dirt:
trigger:
every 2 minutes in "world":
    drop 1 dirt at location(4352.5,97,4137.5, world "world") without velocity
    drop 1 dirt at location(4352.5,97,4131.5, world "world") without velocity
    drop 1 dirt at location(4357.5,97,4131.5, world "world") without velocity
    drop 1 dirt at location(4357.5,97,4137.5, world "world") without velocity
    drop 1 dirt at location(4372.5,97,4137.5, world "world") without velocity
    drop 1 dirt at location(4372.5,97,4131.5, world "world") without velocity
    drop 1 dirt at location(4377.5,97,4131.5, world "world") without velocity
    drop 1 dirt at location(4377.5,97,4137.5, world "world") without velocity
[doublepost=1671581886,1671399189][/doublepost]Can someone please reply?
 

Attachments

  • dust.sk
    657 bytes · Views: 93
Code:
command /dirt:
    permission: op
    trigger:
        if {dirt.enabled} is true:
            set {dirt.enabled} to false
            send "&cDirt spawner disabled" to player
        else:
            set {dirt.enabled} to true
            send "&aDirt spawner enabled" to player

every 2 minutes:
    {dirt.enabled} is true
    # spawn the dirt here
 
Status
Not open for further replies.