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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

/top command

Discussion in 'Skript' started by KAVKAZIE, Apr 21, 2017.

Thread Status:
Not open for further replies.
  1. KAVKAZIE

    KAVKAZIE Active Member

    Joined:
    Feb 27, 2017
    Messages:
    146
    Likes Received:
    0
    hello how can i do /top command on skript thanks for help
     
  2. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    just look around in resources... there is some top 10 Skript. just change variables.
     
    • Like Like x 1
  3. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    You need TuSKe for this script to work (because of the "is solid" condition).
    Code (Skript):
    1.  
    2. command /top:
    3.   permission: skript.top
    4.   executeable by: player
    5.   description: Teleports the player to the highest block at their XZ location.
    6.   trigger:
    7.     set {_loc} to location at player
    8.     set y-coord of {_loc} to 256
    9.     loop 256 times:
    10.       if y-coord of {_loc} is y-coord of location at player:
    11.         message "&6You are already at the top!"
    12.         stop
    13.       if block at {_loc} is a solid block:
    14.         teleport player to block above {_loc}
    15.         message "&6To the top!"
    16.         stop
    17.       else:
    18.         remove 1 from y-coord of {_loc}
    19.  
     
  4. ShaneBee

    Moderator Resource Staff Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,184
    Likes Received:
    222
    More information would be good..
    --- Double Post Merged, Apr 21, 2017, Original Post Date: Apr 21, 2017 ---
    You can do it without TuSKe
     
Thread Status:
Not open for further replies.

Share This Page

Loading...