Multiple Homes List "<None>"

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

  • 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.

BryHunter

Member
Jan 10, 2018
35
2
8
27
Okay so my whole home system is down below and it works other than the fact that whenever I add a second or third home it always adds "<none>" with it... I can't seem to figure out why any help would be great :emoji_grinning:



Code:
command /sethome [<text>]:
    trigger:
        if arg 1 is not set:
            set {homes::%player%::location} to location of player
            send "&7Your home has been set to your current location"
        if arg 1 is set:
            if player has permission "server.homes.multiple":
                set {homes::%player%::%arg 1%::location} to location of player
                send "&7Your home has been set with the name %arg-1%"
                add "%arg 1%" to {homes::%player%::*}
            else:
                send "&7You do not have permission to set multiple homes"


command /homes [<offline player>]:
    trigger:
        if arg 1 is not set:
            if {homes::%player%::*} is set:
                send "&4Current Homes: &8%{homes::%player%::*}%"
            else:
                send "&7You do not have multiple homes set."
        if arg 1 is set:
            if player has permission "server.homes.others":
                if {homes::%arg 1%::*} is set:
                    send "&4%arg 1%'s Current Homes: &8%{homes::%arg 1%::*}%"
                else:
                    send "&7This player has no homes set"
            else:
                send "&7You do not have permission to execute this command"

command /delhome [<text>]:
    trigger:
        if arg 1 is not set:
            delete {homes::%player%::location}
            send "&7Your home has been deleted"
        if arg 1 is set:
            if {homes::%player%::*} contains "%arg-1%":
                delete {homes::%player%::%arg 1%::location}
                send "&7Your home with the name %arg-1% has been deleted"
                remove "%arg 1%" from {homes::%player%::*}
            else:
                send "&7You have no home set with the name %arg 1%"

command /home [<text>] [<text>]:
    trigger:
        if arg 1 is not set:
            if arg 2 is not set:
                if {homes::%player%::location} is not set:
                    send "&7You currently have no home set"
                    stop trigger
                if player has permission "server.home.cooldown.bypass":
                    teleport player to {homes::%player%::location}
                    stop trigger
                teleport player to {homes::%player%::location}
        if arg 1 is set:
            if arg 2 is not set:
                if {homes::%player%::*} contains "%arg-1%":
                    if player has permission "server.home.cooldown.bypass":
                        teleport player to {homes::%player%::%arg 1%::location}
                        stop trigger
                    teleport player to {homes::%player%::%arg 1%::location}
                else:
                    send "&7You do not have a home with the name %arg 1% set"
        if arg 1 is set:
            if arg 2 is set:
                set {_player} to arg-2 parsed as offlineplayer
                if {homes::%{_player}%::*} contains "%arg-1%":
                    if player has permission "server.home.cooldown.bypass":
                        teleport player to {homes::%{_player}%::%arg 1%::location}
                        stop trigger
                    teleport player to {homes::%{_player}%::%arg 1%::location}
                else:
                    send "&7%{_player}% does not have a home with the name %arg 1% set"
 
Last edited:
Status
Not open for further replies.