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.

Teleport GUI

Discussion in 'Skript' started by Instanity, Jul 24, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. Instanity

    Instanity Member

    Joined:
    May 31, 2017
    Messages:
    17
    Likes Received:
    0
    So I tried this code:
    Code (Skript):
    1. on click with a clock:
    2.     name of tool is "&bTeleport":
    3.         open chest with 3 rows named "&cTeleport" to the player
    4.         wait a tick
    5.         set {_s} to 0
    6.         loop all players in player's world:
    7.             if loop-player is not player:
    8.                 format slot {_s} of player with loop-player's skull named "&6%loop-player%" to close then run [make player execute command "/tp %loop-player%"]
    9.                 add 1 to {_s}
    But somehow every skullthat I click on it teleports me to the same player again and again...
     
  2. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    "That's because of a bug with format slot and loops, you should use TuSKe's GUI Manager or set slot + inventory click in this case."

    -Snow-Pyon
     
    Instanity likes this.
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Ok, but I don't know how Tuske works and oh boy I tried
     
  4. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Code (Skript):
    1. on click with a clock:
    2.     name of tool is "&bTeleport":
    3.         open virtual chest inventory with size 5 named "&cTeleport" to player
    4.         set {_s} to 0
    5.         loop all players in player's world:
    6.             if loop-player is not player:
    7.                 create a gui slot {_s} of player with loop-player's skull named "&6%loop-player%" to run player command "/tp loop-player"
    8.                 add 1 to {_s}
     
  5. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    virtual chest inventory with size 5 named "&cTeleport"' is not an entity type (Arena.sk, line 10: open virtual chest inventory with size 5 named "&cTeleport" to player')
    [09:00:45 ERROR]: '"&6%loop-player%" to run player' is not a text (Arena.sk, line 14: create a gui slot {_s} of player with loop-player's skull named "&6%loop-player%" to run player command "/tp %loop-player%"')
     
  6. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    do you have tuske installed?
     
  7. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    [TuSKe] Main commands:
    [09:04:10 INFO]: /tuske reload > Reload config/enchantments.
    [09:04:10 INFO]: /tuske update > Check for latest update.
    [09:04:10 INFO]: /tuske ench > Manage the enchantments.
    --- Double Post Merged, Jul 25, 2017, Original Post Date: Jul 25, 2017 ---
    Is there like special things I need to do after/before installing it?
     
  8. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    I think not, i can't help you contiue, because i don't use Tuske, im using Skelett or SkQuery (Im not sure which addon is this)
     
  9. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    You mean you use SkQuery Gui menu + Skellett "on inventory click " features?
     
  10. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Code (Skript):
    1. # Depend: TuSKe.
    2. # Successfully tested w/out any errors.
    3.  
    4. on right-click with a clock:
    5.     name of tool is "&bTeleport":
    6.         open virtual chest inventory with size 5 named "&cTeleport" to player
    7.         set {_s} to 0
    8.         loop all players in player's world:
    9.             loop-player isn't player:
    10.                 format gui slot {_s} of player with skull of loop-player named "&6%loop-player%" with lore "&7Click to teleport!" to close then run player command "/tp loop-player"
    11.                 add 1 to {_s}
     
  11. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    maybe. :'D I don't know....
     
  12. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    'virtual chest inventory with size 5 named "&cTeleport"' is not an entity type (Arena.sk, line 104: open virtual chest inventory with size 5 named "&cTeleport" to player')
    [09:46:45 ERROR]: '"&7Click to teleport!" to close then run player' is not a text (Arena.sk, line 108: format gui slot {_s} of player with skull of loop-player named "&6%loop-player%" with lore "&7Click to teleport!" to close then run player command "/tp loop-player"')
     
  13. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Download TuSKe.
     
  14. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    [TuSKe] Main commands:
    [09:48:44 INFO]: /tuske reload > Reload config/enchantments.
    [09:48:44 INFO]: /tuske update > Check for latest update.
    [09:48:44 INFO]: /tuske ench > Manage the enchantments.
     
  15. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Maybe you got old version. Do /ver tuske
     
  16. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    [TuSKe] Checking for update...
    [09:49:53 INFO]: [TuSKe] You are running the latest version: v1.8.1
     
Thread Status:
Not open for further replies.

Share This Page

Loading...