ID:164284
![]() Jun 30 2007, 11:14 pm
|
|
Is it possible to code it (without having to list every single NPC name) so NPC names cannot be created?
|
![]() Jul 1 2007, 7:49 am
|
|
You could loop through the NPCs when someone is creating a character, but it's going to be more work for the game then making a list. You could create the list at runtime (and add to it if you happen to be adding NPCs mid-session). Just make all of your uniquely named NPCs a different subtype for easy access.
|
If you are trying to make it so a player cannot name themselves a monsters name, use this:
for(mob/M in world) Put that in a name-choosing proc. |
The best way to solve your issue would be to change your NPC names rather than the player names. Your NPC names could have a suffix of "(NPC)" behind it. That way, players know those are NPCs.
All you have to do to prevent players from faking as NPCs is to reject them having "(NPC)" as a suffix to their name! It's the easiest and most efficient solution around. -- Data |