Page 1 of 1

Lastname command and Name Registrar NPC

PostPosted: Tue Jan 04, 2005 10:56 am
by Gavinius
In the actual CVS is not included any /lastname command handler or any Name Registrar NPC, so I've written these two scripts that work together: are both necessary since one depends from the other.
lastname.cs contains /lastname command handler and you can put it under /scripts/playercommands
NameRegistrar.cs contains Name Registrar NPC and you can put it under /scripts/customnpc

To change your lastname select a Name Registrar and type:

/lastname <name>

The script check your level and/or your crafting skill to see if you can have a lastname.
Also check if lastname contains invalid characters or it's too long.

All the checks done are based on how is actually working on american live servers, maybe GOA localized server permits lastname with accented letters or so.

edit: I attached an old zip, this new one also check for illegal lastnames by the file invalidnames.txt

PostPosted: Tue Jan 04, 2005 12:44 pm
by Etaew
nice work Gavinus we used one which has served us well but didnt check for invalid characters or crafting skills .. FR will switch over to your script when tested i believe :-)

PostPosted: Tue Feb 15, 2005 10:53 am
by alex_speed
Hi, got this error since newer CVS :
Code: Select all
2/15/2005 11:46:18 359 ERR Error while processing packet
2/15/2005 11:46:18 437 ERR System.NullReferenceException: La référence d'objet n'est pas définie à une instance d'un objet.
at DOL.PacketOut.WritePascalString(String str) in d:\DOLSharp\DOLBase\PacketOut.cs:line 183
at DOL.GS.PacketHandler.PacketLib168.SendUpdatePlayer() in d:\DOLSharp\GameServer\packets\PacketLib168.cs:line 1661
at DOL.GS.GamePlayer.set_LastName(String value) in d:\DOLSharp\GameServer\gameobjects\GamePlayer.cs:line 807
at DOL.GS.Scripts.LastnameCommandHandler.LastNameDialogResponse(GamePlayer player, Byte response)
at DOL.GS.PacketHandler.v168.DialogResponseHandler.HandlePacket(GameClient client, GSPacketIn packet) in d:\DOLSharp\GameServer\packets\168\DialogResponseHandler.cs:line 45
at DOL.GS.PacketHandler.PacketProcessor.HandlePacket(GSPacketIn packet) in d:\DOLSharp\GameServer\packets\PacketProcessor.cs:line 391
And when you leave the capitol, you got 0 at each stat, your character's stats page become empty lol. (but solved by disconnecting and logging on again).

PostPosted: Mon Mar 21, 2005 8:42 pm
by alex_speed
Hmmm don't know why but it seems that this message randomly happens sometime it works sometimes not I haven't seen any wrong code on those line, so if someone can tell me why ?

PostPosted: Mon Mar 21, 2005 10:01 pm
by Gavinius
It is related to my script?

I can't understand if you get this error using my script or not, since in cvs is not included any /lastname command handler.

However now i'm away from home, when will come back (on april 1) i'll check.

bye

PostPosted: Mon Mar 21, 2005 11:48 pm
by alex_speed
Oki thanks,

Yes, when player use the /lastname command, sometime this error appears. Don't know why.

PostPosted: Tue Mar 22, 2005 12:19 am
by Tartoule Sauvageonne
Maybe a wrong character in lastname do that.

PostPosted: Tue Mar 22, 2005 9:27 am
by alex_speed
Nope, this script check for wrong characters and I've tested with 'Test' as lastname.