Jump to content

Custom Ranks


zKoro

Recommended Posts

Here is a simple ranks script. 

command /rank [<offline player>] [<string>]:
    trigger:
        if {rank::%uuid of executor%} is "owner" or "manager" or "admin":
            if arg 1 is set:
                if arg 2 is set:
                    if arg 2 is not {rank::%uuid of arg 1%}:
                        if arg 2 is "srmod" or "mod" or "trmod" or "default":
                            set {rank::%uuid of arg 1%} to arg 2
                            send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
                            send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
                        else if arg 2 is "admin":
                            if {rank::%uuid of executor%} is "manager" or "owner":
                                send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
                                send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
                                set {rank::%uuid of arg 1%} to "admin"
                            else:
                                send "&cYou cannot set someone's rank to that"
                        else if arg 2 is "manager":
                            if {rank::%uuid of executor%} is "owner":
                                set {rank::%uuid of arg 1%} to "manager"
                                send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
                                send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
                            else:
                                send "&cYou cannot set someone's rank to that"
                        else if arg 2 is "owner":
                            if {rank::%uuid of executor%} is "owner":
                                set {rank::%uuid of arg 1%} to "owner"
                                send "&9Assigned rank &7%arg 2% &9for &3%arg 1%"
                                send "&9Your rank has been set to &7%arg 2% &9by &3%executor%" to arg 1
                            else:
                                send "&cYou cannot set someone's rank to that"
                        else:
                            send "&cThat is not a valid rank"
                    else:
                        send "&cThat player already has that rank"
                else:
                    send "&c/rank <player> <rank (owner, manager, srmod, mod, trmod, default)>"
            else:
                send "&c/rank <player> <rank (owner, manager, srmod, mod, trmod, default)>"        
        else:
            send "&cYou do not have permission"
                        
                            

on first join: 
    set {rank::%uuid of player%} to "default" where [{rank::%uuid of player%} is not set]

on chat:
    if {rank::%uuid of player%} is "owner":
        set chat format to "&8[&cOwner&8] &7%player% &8» &f%colored message%"
    if {rank::%uuid of player%} is "manager":
        set chat format to "&8[&5Manager&8] &7%player% &8» &f%colored message%"
    if {rank::%uuid of player%} is "admin":
        set chat format to "&8[&cAdmin&8] &7%player% &8» &f%colored message%"
    if {rank::%uuid of player%} is "srmod":
        set chat format to "&8[&eSenior Mod&8] &7%player% &8» &f%message%"
    if {rank::%uuid of player%} is "mod":
        set chat format to "&8[&eMod&8] &7%player% &8» &f%message%"
    if {rank::%uuid of player%} is "trmod":
        set chat format to "&8[&eTrial Mod&8] &7%player% &8» &f%message%"
    if {rank::%uuid of player%} is "default":
        set chat format to "&8[&7Default&8] &7%player% &8» &f%message%"
Edited by Koroonotchii

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Link to comment
Share on other sites

  • 3 weeks later...
Just now, Froggy said:

Are there permissions with this?

The permissions are my custom ranks. If you want, you can replace "if {rank::%uuid of executor%} is "owner" or "manager" or "admin":" with "if executor has permission "p.node":"

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Link to comment
Share on other sites

2 minutes ago, Froggy said:

it says i dont have permissions 

Assign the permission to yourself using the groups plugin on your server.

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Link to comment
Share on other sites

1 minute ago, Froggy said:

what group plugin?

 

 

I would recommend LuckPerms. If you need help using it then you can find some tutorials on the Minehut YouTube Channel (https://www.youtube.com/channel/UC3pD8Ghxh7nAhpnhkClCuHg)

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Link to comment
Share on other sites

1 minute ago, Froggy said:

can pex be used?

 

Yeah, the permissions/group plugin that you install is your call. 🙂

Junior Mod (01/04/2020) - Resigned 

 Discord » Koronotchi#0001 
Minecraft Username » Koronotchi 

image.png.17a385f298c8969f6b1cf03e27ee50d3.png

 

Link to comment
Share on other sites

  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...