1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Nickname Script

Discussion in 'Requests' started by Kolsenstein, Jul 1, 2021.

  1. Kolsenstein

    Kolsenstein Member

    Joined:
    Jul 1, 2021
    Messages:
    4
    Likes Received:
    0
    Category: Request

    Suggested name: RPname

    Spigot/Skript Version: latest

    What I want:
    Hello random user, Im very very new to skript and know basically nothing. Im struggling to find a script to change the nickname of the player above their head and in chat and in Tablist. Yes I do have Tablisknu installed but it seems that all scripts I find are outdated. Can someone please help me or send me a script. I want this to happen when I use the command /rpname [<text>]

    Ideas for commands: /rpname [<text>]

    Ideas for permissions: rp.name

    When I'd like it by: Any time really, im in no rush
     
    #1 Kolsenstein, Jul 1, 2021
    Last edited: Jul 1, 2021
  2. Frog

    Frog Member

    Joined:
    Apr 30, 2021
    Messages:
    17
    Likes Received:
    7
    Code (Text):
    1. # Made by Frog#2803
    2. command rpname [<text>]:
    3.   permission: rp.name
    4.   trigger:
    5.     if arg-1 isn't set:
    6.       send "&8[&aRolePlay&8]&r Please choose a &anickname!" to player
    7.     if arg-1 is set:
    8.       if arg-1 contains " ":
    9.         send "&8[&aRolePlay&8]&r Your &anickname&r can't contain spaces!" to player
    10.         stop
    11.       if length of arg-1 is above 16:
    12.         send "&8[&aRolePlay&8]&r Your &anickname&r can't contain more than 16 characters!" to player
    13.         stop
    14.       else:
    15.         set display name of player to arg-1
    16.         set tab list name of player to arg-1
    17.         send "&8[&aRolePlay&8]&r Successfully set your &anickname&r to &a%arg-1%!" to player
    18.  
    19. command rpreset:
    20.   permission: rp.name
    21.   trigger:
    22.     reset display name of player
    23.     reset tab list name of player
    24.     send "&8[&aRolePlay&8]&r Successfully reset your &anickname!" to player
    does this work?
     
    #2 Frog, Jul 19, 2021
    Last edited: Sep 7, 2021
  3. Crocie

    Crocie Member

    Joined:
    Jul 2, 2021
    Messages:
    27
    Likes Received:
    0
    This code is not tested because I was bored in school, and I can't go to Minecraft.

    Code (Text):
    1. command /nick <text>:
    2.     permission: nick.use
    3.     trigger:
    4.         if arg 1 contains " ":
    5.             send "no spacaes"
    6.         else if length of arg 1 is above 16:
    7.             send "to long"
    8.         else if arg 1 is "reset":
    9.             reset display name of player
    10.             reset tab list name of player
    11.             send "reseted nick"
    12.         else:
    13.             set display name of player to colored arg 1
    14.             set tab list named of player to colored arg 1
    15.             send "renamed to %arg 1%"
     
  4. LoLTony_

    LoLTony_ New Member

    Joined:
    May 10, 2020
    Messages:
    5
    Likes Received:
    0
    Heres something I did for someone else. It'll save their nickname upon joining also.


    Code (Text):
    1.  
    2. Options:
    3.  
    4.   # Basic Configuration
    5.  
    6.   MaxLength: 15
    7.   MinLength: 4
    8.   AllowColorNames: true
    9.   ChangeTabName: true
    10.  
    11.   # Permission Section.
    12.  
    13.   ColorNickPermission: "CoolPermission.Coolness"
    14.   CommandUsagePerm: "ReallyCool.Permission"
    15.  
    16.   # Messages
    17.  
    18.   NoPerm: "&cYou do not have permission to use this command!"
    19.   Forbidden: "&cYou cannot use color codes in your nickname!"
    20.   InvalidChar: "&cYou've used a Forbidden Letter, or Word!"
    21.   TooLong: "&cYour nickname is too long!"
    22.   TooShort: "&cYour nickname is too short!"
    23.   InvalidArg: "&cYou're missing Arguments &b/nick <name>"
    24.  
    25.   # Prefix
    26.  
    27.   Prefix: &c[&7Nickname&c] &7
    28.  
    29. command /nickAdmin [<text>] [<text>]:
    30.   trigger:
    31.     if player is op:
    32.       if arg 1 is not set:
    33.         if arg 2 is not set:
    34.           send "--------- {@Prefix} ---------"
    35.           send "&c"
    36.           send "&b/nickAdmin add [<Char>] &7: &cWill add a forbidden character"
    37.           send "&b/nickAdmin remove [<Char>] &7: &cWill remove a forbidden character"
    38.           send "&b/nickAdmin list &7: &cWill display forbidden characters"
    39.           send "&c"
    40.           stop
    41.       if arg 1 is "add":
    42.         if arg 2 is set:
    43.           add arg 2 to {forbiddenChars::list::*}
    44.           send "{@Prefix} Added &b&l%arg 2% &7to forbidden char list"
    45.         else:
    46.           send "Specify a Char, or Word"
    47.       if arg 1 is "remove":
    48.         if arg 2 is set:
    49.           if {forbiddenChars::list::*} contains arg 2:
    50.             remove arg 2 from {forbiddenChars::list::*}
    51.             send "{@Prefix} You've removed &b&l%arg 2%&7 from the Forbidden Word / Char List"
    52.           else:
    53.             send "{@Prefix} Word, or Letter not found!"
    54.         else:
    55.           send "{@Prefix} Specify a Word, or Letter. For a list do &b/nickAdmin list"
    56.        
    57.       if arg 1 is "list":
    58.         if {forbiddenChars::list::*} != 0:
    59.           send {forbiddenChars::list::*} to player
    60.         else:
    61.           send "&cThere are no forbidden chars"
    62.  
    63. command /nick [<text>]:
    64.   trigger:
    65.     if player has permission {@CommandUsagePerm}:
    66.       if length of arg 1 > {@MaxLength}:
    67.         send {@TooLong}
    68.         stop
    69.       if length of arg 1 < {@MinLength}:
    70.         send {@TooShort}
    71.         stop
    72.       if arg 1 is "reset" or "Reset":
    73.         set player's display name to player's name
    74.         set player's tab list name to player's name
    75.         set {nickname.%player%} to false
    76.         send "{@Prefix} You've reset your Nickname"
    77.         stop
    78.       if arg 1 is set:
    79.         if size of {forbiddenChars::list::*} > 0:
    80.           if arg 1 contains {forbiddenChars::list::*}:
    81.             send {@InvalidChar}
    82.             stop
    83.         else:
    84.           if player has permission {@ColorNickPermission}:
    85.             if {@ChangeTabName} = true:
    86.               set player's tab list name to coloured arg 1
    87.             set player's display name to coloured arg 1
    88.             send coloured "{@Prefix} You set your name to %arg 1%"
    89.             set {nickname.%player%} to arg 1
    90.             stop
    91.           set player's display name to arg 1
    92.           set player's tab list name to arg 1
    93.           set {nickname.%player%} to arg 1
    94.           send "{@Prefix} You set your name to %arg 1%"
    95.       else:
    96.         send {@InvalidArg}
    97.     else:
    98.       send {@NoPerm}
    99.      
    100.      
    101. on join:
    102.   if {nickname.%player%} is set:
    103.     if {nickname.%player%} != false:
    104.       if player has permission {@ColorNickPermission}:
    105.         set player's display name to coloured {nickname.%player%}
    106.         send coloured "{@Prefix} Your current nickname is %player's display name%"
    107.       else:
    108.         set player's display name to {nickname.%player%}
    109.         send coloured "{@Prefix} Your current nickname is %player's display name%"
    110.  
    111.  
     
  5. ShyDoge

    ShyDoge Member

    Joined:
    Jul 31, 2021
    Messages:
    41
    Likes Received:
    1
    No Offense, but your spelling is a bit off and there are probably way too many typo's for this to work.
     
  6. Frog

    Frog Member

    Joined:
    Apr 30, 2021
    Messages:
    17
    Likes Received:
    7
    I fixed my spelling mistakes but my script works.. idk if u wanted to reply to the person below me but ty for pointing out my dumb spelling mistakes
     

Share This Page

Loading...