1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Skript /spawn

Discussion in 'Requests' started by Evan, Mar 14, 2017.

  1. Evan

    Evan Member

    Joined:
    Mar 13, 2017
    Messages:
    3
    Likes Received:
    0
    Category: Skript

    Suggested name: Spawn

    What I want:
    I am looking for a command /spawn, you would be able to do /setspawn and /spawn would have a cool down of 10 seconds.

    Ideas for commands:
    /spawn - with a 10 second delay until you get teleported to spawn
    /setspawn
    /spawn <player> - used to teleport players to spawn



    Ideas for permissions: evespawn.spawn - for /spawn

    evespawn.admin - for /setspawn & /spawn <player> (used to teleport players to spawn)


    When I'd like it by: A reasonable time


    If anyone could do this, i'd be great.

    Thanks.
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    Would you be able to add a way if people die in the world they get teleported back to spawn?
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    just add,


    Code (Skript):
    1. On Respawn:
    2.     teleport player to {spawn}
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    @Evan
    Code (Skript):
    1. command /setspawn:
    2.     permission: spawn.set
    3.     trigger:
    4.         set yaml value "X-Coord" from file "plugins/Spawn/Spawn.yml" to ("%x-coord of player%" parsed as number)
    5.         set yaml value "Y-Coord" from file "plugins/Spawn/Spawn.yml" to ("%y-coord of player%" parsed as number)
    6.         set yaml value "Z-Coord" from file "plugins/Spawn/Spawn.yml" to ("%z-coord of player%" parsed as number)
    7.         message "&7You have set the spawn."
    8.        
    9. command /spawn:
    10.     permission: spawn.use
    11.     trigger:
    12.         set {_x} to yaml value "X-Coord" from file "plugins/Spawn/Spawn.yml"
    13.         set {_y} to yaml value "Y-Coord" from file "plugins/Spawn/Spawn.yml"
    14.         set {_z} to yaml value "Z-Coord" from file "plugins/Spawn/Spawn.yml"
    15.         teleport player to location at {_x} , {_y} , {_z} in world "world"
    16.  
    17. on respawn:
    18.     make player execute command "/spawn"
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    Thank you!
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    @YoshYz the coordinates expression already return a number, you don't have to parse it to what it's.
     
    • Informative Informative x 1
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    229
    Thanks for the information.
     

Share This Page

Loading...