Mansome Posted January 31, 2017 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 01/31/17 Last Seen: April 20, 2017 Share 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 Link to comment Share on other sites More sharing options...
0 Technoken Posted January 31, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: April 13 Share 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 Link to comment Share on other sites More sharing options...
0 Mansome Posted February 1, 2017 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 01/31/17 Last Seen: April 20, 2017 Author Share Posted February 1, 2017 Thank you, this script can working on my server Quote Link to comment Share on other sites More sharing options...
Question
Mansome
First. My Englisg isn't that good
.
I need this script
______________________________________
OnPcLoadMapEvent : if charector name < 4 letters = Block them
Help me pls,
Link to comment
Share on other sites
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.