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 Command Request System [TP]

Discussion in 'Requests' started by Selvati, Nov 25, 2017.

  1. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    I would like someone to roughly recreate the essentials tpa system including /tpa [player] and requiring the target to accept to complete the teleportation, not very detailed but this should do, thank you so much in advance! ♥ Happy holidays.

     
  2. Best Answer:
    Post #4 by ChisleLP, Dec 24, 2017
  3. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
  4. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
  5. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    just add

    Code (Skript):
    1. send "don't move!"
    2. set {_Timer::%player%} to 5 #5 seconds
    3. set {_loc::%player%} to location of player
    4. while {_Time::%player%} is not 0:
    5.   subtract 1 from {_timer::%player%}
    6.   if {_loc::%player%} is not location of player:
    7.     send "you moved. Canceld."
    8.     stop
    9.   wait a seconds
    10. teleport player to arg-1
     
  6. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    Could you please use tabs the right way? I can't figure out how to arrange the tabs..
     
  7. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    this is right tab
    you can use 1 space, 2 space, or 4 space (tab). so i used 2 space...
     
  8. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    Code (Skript):
    1. command /xSpawn89:
    2.     trigger:
    3.         send "don't move!"
    4.         set {_Timer::%player%} to 5 #5 seconds
    5.         set {_loc::%player%} to location of player
    6.         while {_Time::%player%} is not 0:
    7.             subtract 1 from {_timer::%player%}
    8.             if {_loc::%player%} is not location of player:
    9.                 send "you moved. Canceld."
    10.                 stop
    11.             wait a seconds
    12.         teleport player to spawn
    When I use this there is no 5 second delay, it instantly teleports
     
  9. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    Sorry, a mistake
    Code (Skript):
    1.  set {_Timer::%player%} to 5 #5 seconds
    2. while {_Time::%player%} is not 0:
    see the reason? Forgett the "r"
     
  10. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    Alright, thank you so much man! Merry Christmas! ♥
    --- Double Post Merged, Dec 25, 2017, Original Post Date: Dec 25, 2017 ---
    How can I add timed message like when the timer is 4 send “stuff”
     
  11. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    Code (Skript):
    1. while {_timer::%player%} is not 0:
    2.     send "You have to wait %{_Timer::%player%}% seconds"
     
  12. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    10
    I want to be able to send specific messages at certain times like when its 4 seconds "msg1" and 3 seconds "msg2" ?
     
  13. ChisleLP

    ChisleLP Well-Known Member

    Joined:
    Jan 26, 2017
    Messages:
    789
    Likes Received:
    60
    Code (Skript):
    1. while...
    2. if {_timer::%player%} is 4:
    3.  
    4. else if {_timer::%player%} is 3:
    Its very simple (Skript basis...)
     

Share This Page

Loading...