Get Luckperms values

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

CubescGaming

Member
Apr 14, 2023
13
0
1
38
I am trying to change a player's luckperms rank and geting the rank name, player's rank, and the weight of the rank. sharpsk is not working for me, please help

here is my code
Code:
command /grant <player> <text=default>:
  permission: nativeranks.grant
  permission message: &cYou do not have the required permissions to execute this command!
  trigger:
    set {_playerrank} to the luckperms primary group of player
    set {_y} to the luckperms primary group of arg-1
    set {_%arg-1%-weight} to the weight of the LuckPerms group named arg-2
    set {_%player%-weight} to the weight of the LuckPerms group named {_playerrank}
    if {_%arg-1%-weight} is higher than {_%player%-weight}:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank!" to player
    if {_%arg-1%-weight} is the weight of the LuckPemrs group named arg-1:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank! - Player is higher!" to player
    else:
      send "&a&lSucess! &6Sucessfully Granted %arg-1% the rank %arg-2%"
      set player's primary luckperms group to arg-2
      send "&a&lYou have been granted the rank &6%arg-1%" to arg-1
 
I am trying to change a player's luckperms rank and geting the rank name, player's rank, and the weight of the rank. sharpsk is not working for me, please help

here is my code
Code:
command /grant <player> <text=default>:
  permission: nativeranks.grant
  permission message: &cYou do not have the required permissions to execute this command!
  trigger:
    set {_playerrank} to the luckperms primary group of player
    set {_y} to the luckperms primary group of arg-1
    set {_%arg-1%-weight} to the weight of the LuckPerms group named arg-2
    set {_%player%-weight} to the weight of the LuckPerms group named {_playerrank}
    if {_%arg-1%-weight} is higher than {_%player%-weight}:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank!" to player
    if {_%arg-1%-weight} is the weight of the LuckPemrs group named arg-1:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank! - Player is higher!" to player
    else:
      send "&a&lSucess! &6Sucessfully Granted %arg-1% the rank %arg-2%"
      set player's primary luckperms group to arg-2
      send "&a&lYou have been granted the rank &6%arg-1%" to arg-1
Use PermSk instead of SkUniversal.
 
Use PermSk instead of SkUniversal.
PermSK didnt work either.
[doublepost=1685160870,1685160724][/doublepost]i might try again using PermsSK cuz it didnt work the first time
Code:
command /grant <player> <text=default>:
  permission: nativeranks.grant
  permission message: &cYou do not have the required permissions to execute this command!
  trigger:
    set {_playerrank} to the luckperms primary group of player
    set {_y} to the luckperms primary group of arg-1
    set {_%arg-1%-weight} to the weight of the LuckPerms group named arg-2
    set {_%player%-weight} to the weight of the LuckPerms group named {_playerrank}
    if {_%arg-1%-weight} is higher than {_%player%-weight}:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank!" to player
    if {_%arg-1%-weight} is the weight of the LuckPemrs group named arg-1:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank! - Player is higher!" to player
    else:
      send "&a&lSucess! &6Sucessfully Granted %arg-1% the rank %arg-2%"
      set player's primary luckperms group to arg-2
      send "&a&lYou have been granted the rank &6%arg-1%" to arg-1
 
PermSK didnt work either.
[doublepost=1685160870,1685160724][/doublepost]i might try again using PermsSK cuz it didnt work the first time
Code:
command /grant <player> <text=default>:
  permission: nativeranks.grant
  permission message: &cYou do not have the required permissions to execute this command!
  trigger:
    set {_playerrank} to the luckperms primary group of player
    set {_y} to the luckperms primary group of arg-1
    set {_%arg-1%-weight} to the weight of the LuckPerms group named arg-2
    set {_%player%-weight} to the weight of the LuckPerms group named {_playerrank}
    if {_%arg-1%-weight} is higher than {_%player%-weight}:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank!" to player
    if {_%arg-1%-weight} is the weight of the LuckPemrs group named arg-1:
      send "&c&lAccess Denied: &bYou cannot grant this player that rank! - Player is higher!" to player
    else:
      send "&a&lSucess! &6Sucessfully Granted %arg-1% the rank %arg-2%"
      set player's primary luckperms group to arg-2
      send "&a&lYou have been granted the rank &6%arg-1%" to arg-1
Pls use correct syntax of Skperm