Teleporting random players

Discussion in 'Skript' started by SirFazey, May 30, 2018.

  1. Hello,

    I'm currently making a Sumo script for all of you there that don't want to spend lots of time making it.
    But every coder comes to a moment where he needs to ask people for help, well that's me :)
    I'd like to make it when the time has expired it teleports the players to the variables {pos1::*} and {pos2::*}.
    When they got teleported I'd like to make it that they have to wait 3 seconds before moving and attacking the opponent.

    Code (Text):
    command /start:
        permission: sumo.rank
        permission message: &cYou do not have permission to this command!
        trigger:
            if {sumo} is true:
                send "{@Prefix} &6%player% is already hosting an event."
                stop
            else:
            broadcast "&6&m---------------------------------------"
            broadcast ""
            broadcast "      &6%player% is hosting a sumo event."
            broadcast "      &6Join with &6&o/join&6."  
            broadcast ""
            broadcast "&6&m---------------------------------------"
            set {sumo} to true
            wait 5 seconds
            broadcast "{@Prefix} &660 seconds before start."
            wait 30 seconds
            broadcast "{@Prefix} &630 seconds before start."
            wait 20 seconds
            broadcast "{@Prefix} &610 seconds before start."
            wait 5 seconds
            broadcast "{@Prefix} &65 seconds before start."
            wait 1 second
            broadcast "{@Prefix} &64 seconds before start."
            wait 1 second
            broadcast "{@Prefix} &63 seconds before start."
            wait 1 second
            broadcast "{@Prefix} &62 seconds before start."
            wait 1 second
            broadcast "{@Prefix} &61 seconds before start."
            set {sumo} to true
    Thanks in advance,
    Mat
     
  2. I dont know if i get this but if i didnt just tell me

    Here is a simple way to do it but not the best (It will still work).

    Code:
    Code (Text):
    command /teleport:
        trigger:
            teleport player to {pos1}
            set {cooldownfight} to true
            wait 3 seconds
            delete {cooldownfigt} to false
            message "You can now fight!"
           
    on any move:
        if {cooldownfight} is true:
            cancel event
            message "You have to wait 3 seconds before you can move"
           
           
           
           
           
           
     
  3. This would indeed work, but I'd like to have a random teleportation. This looks like you'll have to /teleport.
     
  4. Two

    Two

    Hey, I might have missed something, but where are you storing the players which you want to be teleported?
     
  5. That's a good question, I'll make a variable when someone's does /sumo I'll add the player name to the variable.