RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Resource icon

[2.x] Unique Naming System (Re-Release) 1.0

No permission to download

Evanonian

Sorceror
Evanonian submitted a new resource:

Unique Naming System (Re-Release) (version 1.0) - Checks for duplicate player names and forces a name change.

Unique Naming System 1.0

I can't take credit for the original code, this is a optimized re-release of an existing script.

Original Script:

http://www.runuo.com/community/threads/duplicated-names-double-names.526974/

Description:

- Checks for duplicate names on login and forces a name change. Players with a duplicate name will be prompted as such with a Gump and will not be able to walk until their name is changed.

- The NameChangeGump uses the same NameValidation as the initial...

Read more about this resource...
 

MrNice

Squire
I see the problem, Its checking the list of all banned names also like GM or Counselor. This is a big problem.
 

shtoink

Sorceror
I am using this (by merging your distro edits) on runuo2.0final based on sean andres repack and I do not have any problem with my staff accounts so far... note that none of our staff have GM or Seer in their name (all 3 of us lol).
 

Evanonian

Sorceror
It does a check for offline players, so banned accounts will be included. Players that already have the name should not be affected. I haven't had any issues with staff accounts however none of our staff have GM or any such prefix's in front of their name. We use titles, I'll test your issue MrNice once I get a chance and see what's going on. Thanks for the input. :)
 

MrNice

Squire
hehe yah it includes all the names and prefixes already on the no no list when trying to create a new character and first naming. gm seer osi british ect. Just do not want it to limit staff is all :) I do use player Counselors on my server thats why :)
 

Evanonian

Sorceror
So if I understand correctly, if a Staff account creates a NEW character named "GM So-And-So" it asks them to re-name? Or is it asking existing staff to re-name?
 

Evanonian

Sorceror
Okay so it looked like staff with existing names such as "GM User" would be forced to re-name on next login when I tested it. However I don't consider this a bug that is sort of my initial intent. Terms such as GM are already restricted for players to use in their names. If I used a name like 'GM Evanonian' that means a player could still use 'Evanonian' it wouldn't count as a duplicate, so I think it's better this way. I use titles such as 'User [GM]' so I don't have such issues.

However if you would like it to ignore staff then you could always change LoginStats.cs to look like this.
Code:
if (m.AccessLevel == AccessLevel.Player)
{
if (m.Name == CharacterCreation.GENERIC_NAME || !CharacterCreation.CheckDupe(m, m.Name))
           {
               m.CantWalk = true;
               m.SendGump( new NameChangeGump( m) );
               
           }
 
}
This way it only applies to Players.

I hope this helps. :)
 

Lanking

Traveler
Thank you so much for this!! I am experiencing this error: Please kindly help me to check!!^^

Errors:
+ Misc/NameVerification.cs:
CS1513: Line 213: } expected
CS1002: Line 213: ; expected
CS1519: Line 217: Invalid token '"generic player"' in class, struct, or inte
rface member declaration
CS1022: Line 223: Type or namespace definition, or end-of-file expected
 

otimpyre

Sorceror
Thank you so much for this!! I am experiencing this error: Please kindly help me to check!!^^

Errors:
+ Misc/NameVerification.cs:
CS1513: Line 213: } expected
CS1002: Line 213: ; expected
CS1519: Line 217: Invalid token '"generic player"' in class, struct, or inte
rface member declaration
CS1022: Line 223: Type or namespace definition, or end-of-file expected

Line 213

From:

Code:
                "origin"
 
        //Unique Naming System//
 
                "generic player"

TO:

Code:
                "origin",
 
        //Unique Naming System//
 
                "generic player"
 

Alyssa Dark

Sorceror
Hello,

I have this running and working on test shard without issue except for one thing. We have a few duplicate names already and I'm wondering how to go about getting the force name change gump sent to the 2nd+ char who duplicated a name and not to the first char created who originally used it.

I've tested a few variations and who ever logs on first is the one who gets the force name change gump, even if they are the original person to use that name. Is there some other script that would be a good reference or any suggestions on how to approach this, possibly something that goes to check CreationTime after it has checked for duplicates and sends the name change gump based on that?

Or possibly some other search method to come up with a list of the duplicate named chars and I'll manually go through them, wouldn't think it'd be that many....

Thanks in advance for any suggestions.
 

pooka01

Sorceror
Compare their character creation date.
There should be a kind of:
if (char1.CreationTime.CompareTo(char2.CreationTime) (!!insert '<' or '>' here!!) 0)

basically, would be comparing which one is bigger than the other, alaso you could consider using an arraylist or a list to sort all the duplicated names, sort by name first, then by their creation time, the first name it sees is the correct one, so if:

Stefan
Steven -> date 4:0:0
Steven -> data 0:0:0
Zazaza

then to

Stefan
Steven -> date 0:0:0
Steven -> data 4:0:0
Zazaza

then to

Stefan
Steven -> date 0:0:0 - first time we see that name, store it in a temporary string.
Steven -> data 4:0:0 - this name Equal()s that temporary string of above, force this character to change name.
Zazaza -> this name is different, store in temporary string and so on.

if you need help with the coding you can send it in the script support

-----
realized i didn't take a look at the released script, but meh, late.
 

Alyssa Dark

Sorceror
thanks for the suggestions, will look further into those and see what I can come up with, lol

oh, just had a thought... maybe easier to look through the [va in chat system to find the duplicate named chars and manually go through those, lol, that prob be quicker with my lack of brain power at the moment, lol...

thanks again and have a good one :)
 
Top