Solved How to make console run a command in a specific world

  • 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 community!

    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.
code_language.skript:
make console execute command "/yourcommand"
 
Thanks for your help but I know how to do this, I asked how to do it in a world.
Uhm, what?
specifiy world? ... Can you maybe explain us, what do you wanna really? you need code then other ways like this

code_language.skript:
loop all players in world "Other-World":
    make console execute command "/Give %loop-player% diamond"
 
Just choose a random player in the world and make them execute the command
 
@Random_watermelon You could also set a command block in the world, and activate it via a redstone block.

code_language.skript:
command /cblock:
    trigger:
        set {_loc} to location(0, 64, 0, world of player, 0, 90) # bensku fork's built-in function
        set block at {_loc} to command block
        add "{Command:""/summon Pig ~ ~1 ~""}" to nbt of block at {_loc} # SkStuff
        set x-coordinate of {_loc} to (x-coordinate of {_loc} - 1)
        set block at {_loc} to redstone block
 
  • Like
Reactions: YoshYz
Status
Not open for further replies.