Homes GUI help

  • 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 community!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Mattllama987

Supporter
Aug 5, 2018
225
7
18
Hello all! Im working on a homes GUI skript, and im running into a very small problem. Its very close on being done now. The problem im having is, teleporting to the homes in the GUI. Setting the homes work. Adding the homes in the GUI works. Just teleporting isnt working. Im use to using Tuske for GUI's, and not using vanilla. How can i get the teleport to the homes part work?

Thanks!
~Matt

Code:

Code:
on first join:
    set {maxhomes::%player%} to 0
command /sethome [<text>]:
    trigger:
        if arg-1 isn't set:
            send "&7[&aHomes&7] &7You must have a home name!"
        else:
            if {HOME::%player%::*} contains arg-1:
                send "&7[&aHomes&7] &7You already have a home named that!"
            set {LOC::HOME::%player%::%arg 1%} to player's location
            add arg-1 to {HOME::%player%::*}
            set {HCOL::%player%::%arg 1%} to "&c&l"
            send "&7[&aHomes&7] &7You set a home named %arg-1%&7!"
command /delhome [<offlineplayer>]:
    trigger:
        if player has permission "%{SKHOME::DB::PERM::DELH}%":
            if arg-1 is set:
                delete {HOME::%arg-1%::*}
                send "&7[&aHomes&7] &7You deleted all of %arg-1%&7's homes!"
command /homes:
    trigger:
        open chest inventory with 6 rows named "&c&lHomes(s)" to player
        set {_o} to 0
        loop 55 times:
            set slot {_o} of player's current inventory to gray glass pane named ""
            add 1 to {_o}
        if size of {HOME::%player%::*} is bigger than 0:
            set {_home} to 0
            loop {HOME::%player%::*}:
                set {_ahome} to loop-value
                set slot {_home} of player's current inventory to chest named "%{HCOL::%player%::%{_ahome}%}%%{_ahome}%"
                add 1 to {_home}
on inventory click:
    if "%event.getView().getTitle()%" = "&c&lHomes(s)":
        cancel event
    if size of {HOME::%player%::*} is bigger than 0:
        set {_home} to 0
        loop {HOME::%player%::*}:
            set {_ahome} to loop-value
            teleport player to {LOC::HOME::%player%::%{_ahome}%}
            send "&7[&aHomes&7] &7You have been teleported to your home!"
[doublepost=1589416227,1589329814][/doublepost]bump
[doublepost=1589573881][/doublepost]bump
 
I did have it 100% working with tuske, but its been crashing my server in 1.15.2, and now i need to remake it all in vanilla skript... :/
 
Status
Not open for further replies.