ImANoobFightMeh Posted October 16, 2019 Share Posted October 16, 2019 Want to have a rank system like minehut? Here you go! Variables: {playerrank.%player%} = "default" command /rank [<offlineplayer>] [<text>]: trigger: if player is op: if arg-1 is set: if arg-2 is set: if arg-1 is "default": set {playerrank.%arg-1%} to "default" send "&3You have set &b%player%&b's &3rank to &bDefault" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "vip": send "&3You have set &b%player%&b's &3rank to &bVIP" set {playerrank.%arg-1%} to "vip" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "pro": send "&3You have set &b%player%&b's &3rank to &bPRO" set {playerrank.%arg-1%} to "pro" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "legend": send "&3You have set &b%player%&b's &3rank to &bLEGEND" set {playerrank.%arg-1%} to "legend" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "patron": send "&3You have set &b%player%&b's &3rank to &bPATRON" set {playerrank.%arg-1%} to "patron" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "jrmod": send "&3You have set &b%player%&b's &3rank to &bJR.MOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "mod": send "&3You have set &b%player%&b's &3rank to &bMOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "srmod": send "&3You have set &b%player%&b's &3rank to &bSR.MOD" set {playerrank.%arg-1%} to "srmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "admin": send "&3You have set &b%player%&b's &3rank to &bADMIN" set {playerrank.%arg-1%} to "admin" make console execute the command "/sudo %arg-1% tablist" else: send "&c/rank (player) (rank)" else: send "&c/rank (player) (rank)" else: send "&cInsufficient permissions!" on chat: if {playerrank.%player%} = "default": set the chat format to "&7%player%&7: &7%message%" if {playerrank.%player%} = "vip": set the chat format to "&a[VIP] &a%player%&f: &7%message%" if {playerrank.%player%} = "pro": set the chat format to "&b[PRO] &b%player%&f: &7%message%" if {playerrank.%player%} = "legend": set the chat format to "&6[LEGEND] &6%player%&f: &7%message%" if {playerrank.%player%} = "patron": set the chat format to "&3[PATRON] &3%player%&f: &7%message%" if {playerrank.%player%} = "jrmod": set the chat format to "&e[JR.MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "mod": set the chat format to "&e[MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "srmod": set the chat format to "&e[SR.MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "admin": set the chat format to "&c[ADMIN]&c %player%&f: &7%message%" command /tablist: trigger: if {playerrank.%player%} = "default": set player's tablist name to "&7%player%" if {playerrank.%player%} = "vip": set player's tablist name to "&a[VIP] &a%player%" if {playerrank.%player%} = "pro": set player's tablist name to "&b[PRO] &b%player%" if {playerrank.%player%} = "legend": set player's tablist name to "&6[LEGEND] &6%player%" if {playerrank.%player%} = "patron": set player's tablist name to "&3[PATRON] &3%player%" if {playerrank.%player%} = "jrmod": set player's tablist name to "&e[JR.MOD] &e%player%" if {playerrank.%player%} = "mod": set player's tablist name to "&e[MOD] &e%player%" if {playerrank.%player%} = "srmod": set player's tablist name to "&e[SR.MOD] &e%player%" if {playerrank.%player%} = "admin": set player's tablist name to "&c[ADMIN] &c%player%" Link to comment Share on other sites More sharing options...
FadelessBanjo Posted October 16, 2019 Share Posted October 16, 2019 Good jop!! Vip (Unknown) >> Jr.Mod 30/10/2019 >> Mod 30/12/2019 Link to comment Share on other sites More sharing options...
Criticyl Posted October 18, 2019 Share Posted October 18, 2019 Nice, there could be a few improvements but at least it gets the job done -------------------------------------------------------------[VIP] - 2018/2019 [JR.MOD] - 28th April 2019[SR.MOD] - 21st June 2019 [LEGEND] - 28th July 2020 (Resigned) ------------------------------------------------------------- Discord - Criticyl#0002 IGN - Criticyl Link to comment Share on other sites More sharing options...
Stargazers Posted October 18, 2019 Share Posted October 18, 2019 Seems a bit long for no reason, you could shorten it by using functions. Ex: function setRank(p: offlineplayer, r: text): set {_uuid} to uuid of {_p} set {rank::%{_uuid}%} to {_r} You could also use a list variable to check if it is a rank you want to be able to get set, and see if that list contains the argument. [VIP] 2019 [JR.MOD] 10/29/2019 [MOD] 12/30/2019 Link to comment Share on other sites More sharing options...
Matqx Posted October 22, 2019 Share Posted October 22, 2019 On 10/16/2019 at 5:40 PM, ImANoobFightMeh said: Want to have a rank system like minehut? Here you go! Variables: {playerrank.%player%} = "default" command /rank [<offlineplayer>] [<text>]: trigger: if player is op: if arg-1 is set: if arg-2 is set: if arg-1 is "default": set {playerrank.%arg-1%} to "default" send "&3You have set &b%player%&b's &3rank to &bDefault" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "vip": send "&3You have set &b%player%&b's &3rank to &bVIP" set {playerrank.%arg-1%} to "vip" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "pro": send "&3You have set &b%player%&b's &3rank to &bPRO" set {playerrank.%arg-1%} to "pro" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "legend": send "&3You have set &b%player%&b's &3rank to &bLEGEND" set {playerrank.%arg-1%} to "legend" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "patron": send "&3You have set &b%player%&b's &3rank to &bPATRON" set {playerrank.%arg-1%} to "patron" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "jrmod": send "&3You have set &b%player%&b's &3rank to &bJR.MOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "mod": send "&3You have set &b%player%&b's &3rank to &bMOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "srmod": send "&3You have set &b%player%&b's &3rank to &bSR.MOD" set {playerrank.%arg-1%} to "srmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "admin": send "&3You have set &b%player%&b's &3rank to &bADMIN" set {playerrank.%arg-1%} to "admin" make console execute the command "/sudo %arg-1% tablist" else: send "&c/rank (player) (rank)" else: send "&c/rank (player) (rank)" else: send "&cInsufficient permissions!" on chat: if {playerrank.%player%} = "default": set the chat format to "&7%player%&7: &7%message%" if {playerrank.%player%} = "vip": set the chat format to "&a[VIP] &a%player%&f: &7%message%" if {playerrank.%player%} = "pro": set the chat format to "&b[PRO] &b%player%&f: &7%message%" if {playerrank.%player%} = "legend": set the chat format to "&6[LEGEND] &6%player%&f: &7%message%" if {playerrank.%player%} = "patron": set the chat format to "&3[PATRON] &3%player%&f: &7%message%" if {playerrank.%player%} = "jrmod": set the chat format to "&e[JR.MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "mod": set the chat format to "&e[MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "srmod": set the chat format to "&e[SR.MOD] &e%player%&f: &7%message%" if {playerrank.%player%} = "admin": set the chat format to "&c[ADMIN]&c %player%&f: &7%message%" command /tablist: trigger: if {playerrank.%player%} = "default": set player's tablist name to "&7%player%" if {playerrank.%player%} = "vip": set player's tablist name to "&a[VIP] &a%player%" if {playerrank.%player%} = "pro": set player's tablist name to "&b[PRO] &b%player%" if {playerrank.%player%} = "legend": set player's tablist name to "&6[LEGEND] &6%player%" if {playerrank.%player%} = "patron": set player's tablist name to "&3[PATRON] &3%player%" if {playerrank.%player%} = "jrmod": set player's tablist name to "&e[JR.MOD] &e%player%" if {playerrank.%player%} = "mod": set player's tablist name to "&e[MOD] &e%player%" if {playerrank.%player%} = "srmod": set player's tablist name to "&e[SR.MOD] &e%player%" if {playerrank.%player%} = "admin": set player's tablist name to "&c[ADMIN] &c%player%" Clean code. I have one small suggestion though, I think you should shorten the code. Also maybe make /tablist only excecutable by console? This is the prevent users from being able to perform random commands. To fix this just change the code to: command /tablist: executable by: console trigger: if {playerrank.%player%} = "default": set player's tablist name to "&7%player%" if {playerrank.%player%} = "vip": set player's tablist name to "&a[VIP] &a%player%" if {playerrank.%player%} = "pro": set player's tablist name to "&b[PRO] &b%player%" if {playerrank.%player%} = "legend": set player's tablist name to "&6[LEGEND] &6%player%" if {playerrank.%player%} = "patron": set player's tablist name to "&3[PATRON] &3%player%" if {playerrank.%player%} = "jrmod": set player's tablist name to "&e[JR.MOD] &e%player%" if {playerrank.%player%} = "mod": set player's tablist name to "&e[MOD] &e%player%" if {playerrank.%player%} = "srmod": set player's tablist name to "&e[SR.MOD] &e%player%" if {playerrank.%player%} = "admin": set player's tablist name to "&c[ADMIN] &c%player%" |Ex Staff| - Matqx#5545 - Matqx // Pro Rules // Discord // Voting Link Link to comment Share on other sites More sharing options...
iAmAdRevenue Posted October 24, 2019 Share Posted October 24, 2019 (edited) Edited October 24, 2019 by iAmAdRevenue Link to comment Share on other sites More sharing options...
AWorthySon Posted October 24, 2019 Share Posted October 24, 2019 (edited) Not big fan of this. It would be way more convenient if you'd use this expression: [the] [chat] (prefix|suffix) of %players% This requires vault & a permission plugin, obviously. You can just set their prefix to the rank. and you can just use `make player execute "/tablist"` From there you can just do: on chat: if player's prefix is " ": set player's prefix to "&7Default" set chat format to "%player's display name&f: %message%" On 10/22/2019 at 12:21 PM, Matqx said: Clean code. I have one small suggestion though, I think you should shorten the code. Also maybe make /tablist only excecutable by console? This is the prevent users from being able to perform random commands. To fix this just change the code to: command /tablist: executable by: console trigger: if {playerrank.%player%} = "default": set player's tablist name to "&7%player%" if {playerrank.%player%} = "vip": set player's tablist name to "&a[VIP] &a%player%" if {playerrank.%player%} = "pro": set player's tablist name to "&b[PRO] &b%player%" if {playerrank.%player%} = "legend": set player's tablist name to "&6[LEGEND] &6%player%" if {playerrank.%player%} = "patron": set player's tablist name to "&3[PATRON] &3%player%" if {playerrank.%player%} = "jrmod": set player's tablist name to "&e[JR.MOD] &e%player%" if {playerrank.%player%} = "mod": set player's tablist name to "&e[MOD] &e%player%" if {playerrank.%player%} = "srmod": set player's tablist name to "&e[SR.MOD] &e%player%" if {playerrank.%player%} = "admin": set player's tablist name to "&c[ADMIN] &c%player%" This won't work... His code is "Sudoing" the player, the player will execute the command. Edited October 24, 2019 by Creeper1841 The code snippet in the quote was "html" Link to comment Share on other sites More sharing options...
006600 Posted December 5, 2019 Share Posted December 5, 2019 Nice code but but if arg-2 is "jrmod": send "&3You have set &b%player%&b's &3rank to &bJR.MOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" if arg-2 is "mod": send "&3You have set &b%player%&b's &3rank to &bMOD" set {playerrank.%arg-1%} to "jrmod" make console execute the command "/sudo %arg-1% tablist" lol 2 same ranks Link to comment Share on other sites More sharing options...
pnguin Posted January 17, 2021 Share Posted January 17, 2021 how do u add perms I used to play Minehut I guess? Yeah, I still watch the forums for some reason. (15/5/2023) Link to comment Share on other sites More sharing options...
Reassembly Posted January 17, 2021 Share Posted January 17, 2021 1 hour ago, pajolike2 said: how do u add perms Don't post on topics with over 1 month old. Default: Feb 6 2018 VIP: April 14 2019 Jr. Mod: September 12 2020 Mod: Jan 11 2021 Am a person Hello Link to comment Share on other sites More sharing options...
Recommended Posts