Solved Groups?

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

BirdCanFly

Member
Jun 22, 2017
29
2
3
Hello, i want to make a Kingdom plugin, but i have an problem:
code_language.skript:
command /kingdom [<text>] [<offlineplayer>]:
    trigger:
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.Name.%uuid of player%} is not set:
                    set {Kingdom.Name.%uuid of player%} to "&8[&6%arg-2%&8]"
                    set {Kingdom.King.%uuid of player%} to "&8[&6K&8]"
                    broadcast "&7[&cKingdom&7] &9The kingdom &6%arg-2% &9has been born!"
                else:
                    send "&7[&cKingdom&7] &9You are already in a Kingdom!"
            else:
                send "&7[&cKingdom&7] &9Dont forget to choose a name!"
on chat:
    cancel event
    if {Kingdom.Name.%uuid of player%} is set:
        if {Kingdom.King.%uuid of player%} is set:
            broadcast "%{Kingdom.King.%uuid of player%}%&8[&6%{Kingdom.Name.%player%}%&8][&f%player%&8]&f: &7%message%"
        else:
            broadcast "&8[&6%{Kingdom.Name.%uuid of player%}%&8][&f%player%&8]&f: &7%message%"
    else:
        broadcast "&8[&aKingdom-Loos&8][&f%player%&8]&f: &7%message%"
When i make a Kingdom, the Kingdom binds to the player and it isn't rlly a group. Its more a prefix for one player. How do i make it so it is a real Kingdom so they can promote, kick and set spawns for a kingdom?
 
Last edited:
Hello, i want to make a Kingdom plugin, but i have an problem:
code_language.skript:
command /kingdom [<text>] [<offlineplayer>]:
    trigger:
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.Name.%uuid of player%} is not set:
                    set {Kingdom.Name.%uuid of player%} to "&8[&6%arg-2%&8]"
                    set {Kingdom.King.%uuid of player%} to "&8[&6K&8]"
                    broadcast "&7[&cKingdom&7] &9The kingdom &6%arg-2% &9has been born!"
                else:
                    send "&7[&cKingdom&7] &9You are already in a Kingdom!"
            else:
                send "&7[&cKingdom&7] &9Dont forget to choose a name!"
on chat:
    cancel event
    if {Kingdom.Name.%uuid of player%} is set:
        if {Kingdom.King.%uuid of player%} is set:
            broadcast "%{Kingdom.King.%uuid of player%}%&8[&6%{Kingdom.Name.%player%}%&8][&f%player%&8]&f: &7%message%"
        else:
            broadcast "&8[&6%{Kingdom.Name.%uuid of player%}%&8][&f%player%&8]&f: &7%message%"
    else:
        broadcast "&8[&aKingdom-Loos&8][&f%player%&8]&f: &7%message%"
When i make a Kingdom, the Kingdom binds to the player and it isn't rlly a group. Its more a prefix for one player. How do i make it so it is a real Kingdom so they can promote, kick and set spawns for a kingdom?
You should create faction and userdata variables so:
# {k::user::%uuid of player%::kingdom}
This will store the players faction he is in.

# {k::kingdom::%{_kingdom}%:;players::*}
Here will all players in the kingdom be stored

# {k::kingdom::%{_kingdom}%::king}
This will store the king of the kingdom.


If you have any more questions feel free to ask :emoji_slight_smile: .
 
to replace the following commands(kingdom command only)
code_language.skript:
command /kingdom [<text>] [<offlineplayer>]:
    trigger:
        if arg-1 is not set:
            send "&7&m---------------&8[&6&lKingdom&8]&7&m---------------"
            send ""
            send "&c/kingdom create (naam)&9Maak een kingdom aan."
            send "&c/kingdom leave &9Leave je kingdom."
            send "&c/kingdom disband &9Disband jouw kingdom"
            send "&c/kingdom invite (speler)&9Invite iemand voor je kingdom."
            send "&c/kingdom accept (speler)&9accepteer een invite."
            send ""
            send "&7&m-------------&8[&aDoor: &3BirdCanFly&8]&7&m-----------"
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.Naam.%uuid of player%} is not set:
                    set {Kingdom.Naam.%uuid of player%} to "&8[&6%arg-2%&8]"
                    set {Kingdom.Koning.%uuid of player%} to "&8[&6K&8]"
                    broadcast "&7[&cKingdom&7] &9Het kingdom &6%arg-2% &9is zojuist aangemaakt!"
                else:
                    send "&7[&cKingdom&7] &9Je zit al in een kingdom!"
            else:
                send "&7[&cKingdom&7] &9Vergeet geen Kingdom naam te kiezen!"
        if arg-1 is "disband":
            if {Kingdom.Naam.%uuid of player%} is set:
                if {Kingdom.Koning.%uuid of player%} is set:
                    delete {Kingdom.Naam.%uuid of player%}
                    delete {Kingdom.Koning.%uuid of player%}
                    send "&7[&cKingdom&7] &9Je hebt jouw kingdom geleaved&9!"
                else:
                    send "&8[&cKingdom&8] &9Alleen een koning mag een kingdom verwijderen!"
            else:
                send "&7[&cKingdom&7] &9Je bent al &aKingdom-Loos&9!"
        if arg-1 is "invite":
            if arg-2 is a player:
                if arg-2 is online:
                    set {Kingdom.%player%.Invite.%arg-2%} to true
                    send "&7[&cKingdom&7] &c%player% &9heeft je geinvite voor zijn &6kingdom&9!" to argument 2
                    send "&9typ &c/kingdom accept %player% &9om te accepteren!" to argument 2
                    message "&7[&cKingdom&7] &9Kingdom invite verzonden naar &c%arg-2%."
                    wait 5 minute
                    if {Kingdom.%player%.Invite.%arg-2%} is true:
                        set {Kingdom.%player%.Invite.%arg-2%} to false
                        delete {Kingdom.%player%.Invite.%arg-2%}
                        send "&7[&cKingdom&7] &6%arg 2% &9heeft niet op je invite gereageerd."
        if arg-1 is "accept":
            if arg-2 is a player:
                if arg-2 is online:
                    if {Kingdom.%arg-2%.Invite.%player%} is true:
                        set {Kingdom.Naam.%uuid of player%} to {Kingdom.Naam.%uuid of arg-2%}
                        send "&7[&cKingdom&7] &9Je bent het kingdom: &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to player
                        send "&7[&cKingdom&7] &c%player% &9is &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to argument 2
                        set {Kingdom.%arg-2%.Invite.%player%} to false
        if arg-1 is "debugg":
            delete {Kingdom.Naam.%uuid of player%}
            delete {Kingdom.Koning.%uuid of player%}
            send "&7[&cKingdom&7] &9Je hebt jouw kingdom geleaved&9!"
command /rank [<offlineplayer>] [<text>]:
    trigger:
        if arg-1 is not set:
            if arg-2 is not set:
                send "&7&m-------------&8[&6&lServerRanks&8]&7&m-------------"
                send ""
                send "&c/rank (speler) (rank)"
                send "&6Staff: &aHelper&9, &3Moderator&9, &cAdmin&9, Owner"
                send "&6Donator: &2Orc&9, &4Vampier&9, &aElf"
                send "&6default: &dMens"
                send ""
                send "&7&m-------------&8[&aDoor: &3BirdCanFly&8]&7&m-----------"
        if player has permission "BirdCanFly.Rank":
            if arg-1 is a player:
                if arg-2 is "helper":
                    set {rank.helper.%uuid of arg-1%} to true
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Helper" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&aHelper&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&aHelper&8]&9!" to player
                if arg-2 is "moderator":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to true
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Moderator" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&3Moderator&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&3Moderator&8]&9!" to player
                if arg-2 is "admin":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to true
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Admin" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&cAdmin&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&cAdmin&8]&9!" to player
                if arg-2 is "owner":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to true
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&b%arg-1%"
                    pex add group "Owner" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Orc" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&b&lOwner&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&b&lOwner&8]&9!" to player
                if arg-2 is "orc":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to true
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&2%arg-1%"
                    pex add group "Orc" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&2Orc&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&2Orc&8]&9!" to player
                if arg-2 is "vampier":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to true
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&4%arg-1%"
                    pex add group "Vampier" to arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&4Vampier&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&4Vampier&8]&9!" to player
                if arg-2 is "elf":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to true
                    set arg-1 tab name to "&a%arg-1%"
                    pex add group "Elf" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&aElf&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&aElf&8]&9!" to player
                if arg-2 is "mens":
                    delete {rank.helper.%uuid of arg-1%}
                    delete {rank.moderator.%uuid of arg-1%}
                    delete {rank.admin.%uuid of arg-1%}
                    delete {rank.owner.%uuid of arg-1%}
                    delete {rank.orc.%uuid of arg-1%}
                    delete {rank.vampier.%uuid of arg-1%}
                    delete {rank.elf.%uuid of arg-1%}
                    pex add group "Mens" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&dMens&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&dMens&8]&9!" to player
        else:
            send "&7[&cKingdom&7] &9Jij hebt hier geen permissions voor! Wel mag je een solli doen ;)."
#DIT ZIJN DE PREFIXES EN SUFFIX VAN KINGDOM EN STAFF
on chat:
    if {rank.helper.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aHelper&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aHelper&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&aHelper&8] &f» &7%message%"
    if {rank.moderator.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
    if {rank.admin.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Admin&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Admin&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&4Admin&8] &f» &7%message%"
    if {rank.owner.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
    if {rank.orc.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&2Orc&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&2Orc&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&2Orc&8] &f» &7%message%"
    if {rank.vampier.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
    if {rank.elf.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aElf&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aElf&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&aElf&8] &f» &7%message%"
    if {rank.helper.%uuid of player%} is not set:
        if {rank.moderator.%uuid of player%} is not set:
            if {rank.admin.%uuid of player%} is not set:
                if {rank.owner.%uuid of player%} is not set:
                    if {rank.orc.%uuid of player%} is not set:
                        if {rank.vampier.%uuid of player%} is not set:
                            if {rank.elf.%uuid of player%} is not set:
                                if {Kingdom.Naam.%uuid of player%} is set:
                                    if {Kingdom.Koning.%uuid of player%} is set:
                                        cancel event
                                        broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&dMens&8] &f» &7%message%"
                                    else:
                                        cancel event
                                        broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&dMens&8] &f» &7%message%"
                                else:
                                    cancel event
                                    broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&dMens&8] &f» &7%message%"
on join:
    if {rank.owner.%uuid of player%} is true:
        set player tab name to "&b%player%"
    if {rank.elf.%uuid of player%} is true:
        set player tab name to "&a%player%"
    if {rank.orc.%uuid of player%} is true:
        set player tab name to "&2%player%"
    if {rank.vampier.%uuid of player%} is true:
        set player tab name to "&4%player%"
 
to replace the following commands(kingdom command only)
code_language.skript:
command /kingdom [<text>] [<offlineplayer>]:
    trigger:
        if arg-1 is not set:
            send "&7&m---------------&8[&6&lKingdom&8]&7&m---------------"
            send ""
            send "&c/kingdom create (naam)&9Maak een kingdom aan."
            send "&c/kingdom leave &9Leave je kingdom."
            send "&c/kingdom disband &9Disband jouw kingdom"
            send "&c/kingdom invite (speler)&9Invite iemand voor je kingdom."
            send "&c/kingdom accept (speler)&9accepteer een invite."
            send ""
            send "&7&m-------------&8[&aDoor: &3BirdCanFly&8]&7&m-----------"
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.Naam.%uuid of player%} is not set:
                    set {Kingdom.Naam.%uuid of player%} to "&8[&6%arg-2%&8]"
                    set {Kingdom.Koning.%uuid of player%} to "&8[&6K&8]"
                    broadcast "&7[&cKingdom&7] &9Het kingdom &6%arg-2% &9is zojuist aangemaakt!"
                else:
                    send "&7[&cKingdom&7] &9Je zit al in een kingdom!"
            else:
                send "&7[&cKingdom&7] &9Vergeet geen Kingdom naam te kiezen!"
        if arg-1 is "disband":
            if {Kingdom.Naam.%uuid of player%} is set:
                if {Kingdom.Koning.%uuid of player%} is set:
                    delete {Kingdom.Naam.%uuid of player%}
                    delete {Kingdom.Koning.%uuid of player%}
                    send "&7[&cKingdom&7] &9Je hebt jouw kingdom geleaved&9!"
                else:
                    send "&8[&cKingdom&8] &9Alleen een koning mag een kingdom verwijderen!"
            else:
                send "&7[&cKingdom&7] &9Je bent al &aKingdom-Loos&9!"
        if arg-1 is "invite":
            if arg-2 is a player:
                if arg-2 is online:
                    set {Kingdom.%player%.Invite.%arg-2%} to true
                    send "&7[&cKingdom&7] &c%player% &9heeft je geinvite voor zijn &6kingdom&9!" to argument 2
                    send "&9typ &c/kingdom accept %player% &9om te accepteren!" to argument 2
                    message "&7[&cKingdom&7] &9Kingdom invite verzonden naar &c%arg-2%."
                    wait 5 minute
                    if {Kingdom.%player%.Invite.%arg-2%} is true:
                        set {Kingdom.%player%.Invite.%arg-2%} to false
                        delete {Kingdom.%player%.Invite.%arg-2%}
                        send "&7[&cKingdom&7] &6%arg 2% &9heeft niet op je invite gereageerd."
        if arg-1 is "accept":
            if arg-2 is a player:
                if arg-2 is online:
                    if {Kingdom.%arg-2%.Invite.%player%} is true:
                        set {Kingdom.Naam.%uuid of player%} to {Kingdom.Naam.%uuid of arg-2%}
                        send "&7[&cKingdom&7] &9Je bent het kingdom: &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to player
                        send "&7[&cKingdom&7] &c%player% &9is &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to argument 2
                        set {Kingdom.%arg-2%.Invite.%player%} to false
        if arg-1 is "debugg":
            delete {Kingdom.Naam.%uuid of player%}
            delete {Kingdom.Koning.%uuid of player%}
            send "&7[&cKingdom&7] &9Je hebt jouw kingdom geleaved&9!"
command /rank [<offlineplayer>] [<text>]:
    trigger:
        if arg-1 is not set:
            if arg-2 is not set:
                send "&7&m-------------&8[&6&lServerRanks&8]&7&m-------------"
                send ""
                send "&c/rank (speler) (rank)"
                send "&6Staff: &aHelper&9, &3Moderator&9, &cAdmin&9, Owner"
                send "&6Donator: &2Orc&9, &4Vampier&9, &aElf"
                send "&6default: &dMens"
                send ""
                send "&7&m-------------&8[&aDoor: &3BirdCanFly&8]&7&m-----------"
        if player has permission "BirdCanFly.Rank":
            if arg-1 is a player:
                if arg-2 is "helper":
                    set {rank.helper.%uuid of arg-1%} to true
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Helper" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&aHelper&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&aHelper&8]&9!" to player
                if arg-2 is "moderator":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to true
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Moderator" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&3Moderator&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&3Moderator&8]&9!" to player
                if arg-2 is "admin":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to true
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "%arg-1%"
                    pex add group "Admin" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&cAdmin&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&cAdmin&8]&9!" to player
                if arg-2 is "owner":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to true
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&b%arg-1%"
                    pex add group "Owner" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Orc" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&b&lOwner&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&b&lOwner&8]&9!" to player
                if arg-2 is "orc":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to true
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&2%arg-1%"
                    pex add group "Orc" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&2Orc&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&2Orc&8]&9!" to player
                if arg-2 is "vampier":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to true
                    set {rank.elf.%uuid of arg-1%} to false
                    set arg-1 tab name to "&4%arg-1%"
                    pex add group "Vampier" to arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&4Vampier&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&4Vampier&8]&9!" to player
                if arg-2 is "elf":
                    set {rank.helper.%uuid of arg-1%} to false
                    set {rank.moderator.%uuid of arg-1%} to false
                    set {rank.admin.%uuid of arg-1%} to false
                    set {rank.owner.%uuid of arg-1%} to false
                    set {rank.orc.%uuid of arg-1%} to false
                    set {rank.vampier.%uuid of arg-1%} to false
                    set {rank.elf.%uuid of arg-1%} to true
                    set arg-1 tab name to "&a%arg-1%"
                    pex add group "Elf" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Mens" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&aElf&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&aElf&8]&9!" to player
                if arg-2 is "mens":
                    delete {rank.helper.%uuid of arg-1%}
                    delete {rank.moderator.%uuid of arg-1%}
                    delete {rank.admin.%uuid of arg-1%}
                    delete {rank.owner.%uuid of arg-1%}
                    delete {rank.orc.%uuid of arg-1%}
                    delete {rank.vampier.%uuid of arg-1%}
                    delete {rank.elf.%uuid of arg-1%}
                    pex add group "Mens" to arg-1
                    pex remove group "Vampier" from arg-1
                    pex remove group "Orc" from arg-1
                    pex remove group "Elf" from arg-1
                    pex remove group "Helper" from arg-1
                    pex remove group "Moderator" from arg-1
                    pex remove group "Admin" from arg-1
                    pex remove group "Owner" from arg-1
                    send "&7[&cKingdom&7] &9Jouw rank is gezet naar: &8[&dMens&8]&9!" to arg-1
                    if arg-1 is not "%player%":
                        send "&7[&cKingdom&7] &9%arg 1%'s rank is nu &8[&dMens&8]&9!" to player
        else:
            send "&7[&cKingdom&7] &9Jij hebt hier geen permissions voor! Wel mag je een solli doen ;)."
#DIT ZIJN DE PREFIXES EN SUFFIX VAN KINGDOM EN STAFF
on chat:
    if {rank.helper.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aHelper&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aHelper&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&aHelper&8] &f» &7%message%"
    if {rank.moderator.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&3Moderator&8] &f» &7%message%"
    if {rank.admin.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Admin&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Admin&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&4Admin&8] &f» &7%message%"
    if {rank.owner.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&b&lOwner&8] &f» &7%message%"
    if {rank.orc.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&2Orc&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&2Orc&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&2Orc&8] &f» &7%message%"
    if {rank.vampier.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&4Vampier&8] &f» &7%message%"
    if {rank.elf.%uuid of player%} is true:
        if {Kingdom.Naam.%uuid of player%} is set:
            if {Kingdom.Koning.%uuid of player%} is set:
                cancel event
                broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aElf&8] &f» &7%message%"
            else:
                cancel event
                broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&aElf&8] &f» &7%message%"
        else:
            cancel event
            broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&aElf&8] &f» &7%message%"
    if {rank.helper.%uuid of player%} is not set:
        if {rank.moderator.%uuid of player%} is not set:
            if {rank.admin.%uuid of player%} is not set:
                if {rank.owner.%uuid of player%} is not set:
                    if {rank.orc.%uuid of player%} is not set:
                        if {rank.vampier.%uuid of player%} is not set:
                            if {rank.elf.%uuid of player%} is not set:
                                if {Kingdom.Naam.%uuid of player%} is set:
                                    if {Kingdom.Koning.%uuid of player%} is set:
                                        cancel event
                                        broadcast "%{Kingdom.Koning.%uuid of player%}%%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&dMens&8] &f» &7%message%"
                                    else:
                                        cancel event
                                        broadcast "%{Kingdom.Naam.%uuid of player%}%&8[&f%player%&8]&8[&dMens&8] &f» &7%message%"
                                else:
                                    cancel event
                                    broadcast "&8[&aKD-Loos&8][&f%player%&8]&8[&dMens&8] &f» &7%message%"
on join:
    if {rank.owner.%uuid of player%} is true:
        set player tab name to "&b%player%"
    if {rank.elf.%uuid of player%} is true:
        set player tab name to "&a%player%"
    if {rank.orc.%uuid of player%} is true:
        set player tab name to "&2%player%"
    if {rank.vampier.%uuid of player%} is true:
        set player tab name to "&4%player%"
I only edited the first parts cuz i am on my phone rn and i don't have a proper text editor.
code_language.skript:
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.User.Naam.%uuid of player%} is not set:
                    If {Kingdom.Kd.%arg-2%} is set:
                        Send "Dit kingdom bestaat al"
                        Stop
                    Set {Kingdom.Kd.%arg-2%.koning} to player
                    Add player to {Kingdom.Kd.%arg-2%.players::*}
                    set {Kingdom.Naam.%uuid of player%} to "%arg-2%"
                    set {Kingdom.Koning.%uuid of player%} to "&8[&6K&8]"
                    broadcast "&7[&cKingdom&7] &9Het kingdom &6%arg-2% &9is zojuist aangemaakt!"
                else:
                    send "&7[&cKingdom&7] &9Je zit al in een kingdom!"
            else:
                send "&7[&cKingdom&7] &9Vergeet geen Kingdom naam te kiezen!"
        if arg-1 is "disband":
            if {Kingdom.Naam.%uuid of player%} is set:
                if {Kingdom.Koning.%uuid of player%} is set:
#This will set kick all the players from the kingdom:
                    Loop {Kingdom.Kd.%{Kingdom.Naam.%uuid of player%}%.Players::*}:
                        delete {Kingdom.Naam.%uuid of loop-value%}
                    delete {Kingdom.Koning.%uuid of player%}
                    send "&7[&cKingdom&7] &9Je hebt jouw kingdom geleaved&9!"
                else:
                    send "&8[&cKingdom&8] &9Alleen een koning mag een kingdom verwijderen!"
            else:
                send "&7[&cKingdom&7] &9Je bent al &aKingdom-Loos&9!"
        if arg-1 is "invite":
            if arg-2 is a player:
                if arg-2 is online:
                    set {Kingdom.%player%.Invite.%arg-2%} to true
                    send "&7[&cKingdom&7] &c%player% &9heeft je geinvite voor zijn &6kingdom&9!" to argument 2
                    send "&9typ &c/kingdom accept %player% &9om te accepteren!" to argument 2
                    message "&7[&cKingdom&7] &9Kingdom invite verzonden naar &c%arg-2%."
                    wait 5 minute
                    if {Kingdom.%player%.Invite.%arg-2%} is true:
                        set {Kingdom.%player%.Invite.%arg-2%} to false
                        delete {Kingdom.%player%.Invite.%arg-2%}
                        send "&7[&cKingdom&7] &6%arg 2% &9heeft niet op je invite gereageerd."
        if arg-1 is "accept":
            if arg-2 is a player:
                if arg-2 is online:
                    if {Kingdom.%arg-2%.Invite.%player%} is true:
                        set {Kingdom.Naam.%uuid of player%} to {Kingdom.Naam.%uuid of arg-2%}
                        add player to {Kingdom.Kd.%{Kingdom.Naam.%uuid of player%}%.players::*}
                        send "&7[&cKingdom&7] &9Je bent het kingdom: &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to player
                        send "&7[&cKingdom&7] &c%player% &9is &6%{Kingdom.Naam.%uuid of arg-2%}% &9gejoined!" to argument 2
                        set {Kingdom.%arg-2%.Invite.%player%} to false
And this code above will not work correctly because off some typ mistakes so its just meant as example.
 
Status
Not open for further replies.