Mansome Posted January 31, 2017 Posted January 31, 2017 First. My Englisg isn't that good . I need this script ______________________________________ OnPcLoadMapEvent : if charector name < 4 letters = Block them Help me pls, Quote
0 Technoken Posted January 31, 2017 Posted January 31, 2017 (edited) Do you already have a live server running with character name that has 4 letters? If not you can just diff a new client on nemo and UNBUTTON "Disable 4 Letter Character Name Limit" If yes you can try to create a script that let's the players rename their character that has 4 letters and below. Try this and let me know if it works - script namelengthchk -1,{ OnPCLoginEvent: OnPCStatCalcEvent: OnRetry: .@charname$ = strcharinfo(0); if( getstrlen(.@charname$) > 4 )end; mes "Please rename your character,"; mes "Enter new name:"; input .@newname$; if( getstrlen(.@newname$) < 4 || getstrlen(.@newname$) > 23 ){ mes "You cannot enter less than minimum of 4 and greater than maximum of 23 characters."; goto OnRetry; } .@gid = getcharid(2); if( .@GID ){ mes "Please leave your guild first before you change name."; goto OnRetry; } query_sql "SELECT `name` FROM `char` WHERE `name` = '"+.@newname$+"'",.@existing$; if( .@newname$ == .@existing$){ mes "Name already exists."; goto OnRetry; } query_sql("UPDATE `name` FROM `char` SET `name`='"+.@newname$+"' WHERE `name`='"+strcharinfo(0)+"'"); next; mes "Please relog for the changes to be applied."; mes "signing out...."; sleep2 3000; atcommand "@kick " +strcharinfo(0); end; } Edited January 31, 2017 by Technoken Forgot to do some checking XD Quote
0 Mansome Posted February 1, 2017 Author Posted February 1, 2017 Thank you, this script can working on my server Quote
Question
Mansome
First. My Englisg isn't that good
.
I need this script
______________________________________
OnPcLoadMapEvent : if charector name < 4 letters = Block them
Help me pls,
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.