Lastname command and Name Registrar NPC

Discussions on various DOL development features

Moderator: Support Team

Lastname command and Name Registrar NPC

Postby Gavinius » Tue Jan 04, 2005 10:56 am

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
Attachments
lastname.zip
(2.98 KiB) Downloaded 109 times
Last edited by Gavinius on Tue Jan 04, 2005 11:29 am, edited 1 time in total.
Gavinius
DOL Visitor
 
Posts: 8
Joined: Wed Dec 15, 2004 1:33 pm

Postby Etaew » Tue Jan 04, 2005 12:44 pm

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 :-)
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Postby alex_speed » Tue Feb 15, 2005 10:53 am

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).
alex_speed
Inactive Staff Member
 
Posts: 691
Joined: Sun Nov 21, 2004 5:37 pm

Postby alex_speed » Mon Mar 21, 2005 8:42 pm

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 ?
alex_speed
Inactive Staff Member
 
Posts: 691
Joined: Sun Nov 21, 2004 5:37 pm

Postby Gavinius » Mon Mar 21, 2005 10:01 pm

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
Gavinius
DOL Visitor
 
Posts: 8
Joined: Wed Dec 15, 2004 1:33 pm

Postby alex_speed » Mon Mar 21, 2005 11:48 pm

Oki thanks,

Yes, when player use the /lastname command, sometime this error appears. Don't know why.
alex_speed
Inactive Staff Member
 
Posts: 691
Joined: Sun Nov 21, 2004 5:37 pm

Postby Tartoule Sauvageonne » Tue Mar 22, 2005 12:19 am

Maybe a wrong character in lastname do that.
Tartoule Sauvageonne
Flap Flap !!
User avatar
Tartoule Sauvageonne
DOL Visitor
 
Posts: 12
Joined: Tue Mar 01, 2005 8:53 am

Postby alex_speed » Tue Mar 22, 2005 9:27 am

Nope, this script check for wrong characters and I've tested with 'Test' as lastname.
alex_speed
Inactive Staff Member
 
Posts: 691
Joined: Sun Nov 21, 2004 5:37 pm


Return to “%s” DOL Development Discussion

Who is online

Users browsing this forum: No registered users and 0 guests