Character Rename

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
shaka0070
Posts: 4
Joined: Sat Aug 18, 2012 3:45 am

Character Rename

Post by shaka0070 »

I do not yet currently have an L2J Server, but I am considering setting one up. I want to allow account management from my web application though and connect through a socket to perform some actions.

I managed to find a short list of telnet commands posted in the forum and it did not include some things like renaming a character. I prefer not to change the database directly, but would renaming a character from a web application be something you would have to do with direct sql?

Would the changes to a character require a server restart, or simply logging in again?
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Character Rename

Post by jurchiks »

It would only require relogging, as all character data is selected from database on login.
It would be better, of course, if you were to make a simple java app that connects to the gameserver and listens to requests from the website (i.e. a proxy between the GS and web). You could send simple commands to it like "rename charId newname" and it would do the requested action in the gameserver.
However, making a tool like that would require a bit more knowledge than just writing dp scripts or changing configs.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
shaka0070
Posts: 4
Joined: Sat Aug 18, 2012 3:45 am

Re: Character Rename

Post by shaka0070 »

I had entertained the thought of extending the servers telnet commands to do the same. I have not do e much in Java but I know OOP pretty well and use a lot of design patterns already so it should be easy to pickup.

Thanks for the info.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Character Rename

Post by UnAfraid »

Look at game/data/scripts/handlers/telnethandlers/ you may code your own telnet commands.
Image
User avatar
papadkostas
Posts: 128
Joined: Fri Jul 02, 2010 8:34 am
Location: Greece
Contact:

Re: Character Rename

Post by papadkostas »

you can also add a new value to characters table ex. "rename"
that we insert the new name that user or admin want to set
then from simple php you can make it change the name
when we try to set the new name from website
if that character is online it inserts the new name in rename field
(inform the player that he has to restart game to changes aply)
when he log in the next time we place a check if that table field is not null
if its not it takes the value to char_name and clears rename field
if the character is not online , simply new name goes to char_name :D
I'm learning as fast..as roadrunner - Beeep Beeeep
Image
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Character Rename

Post by UnAfraid »

I wouldn't change char name in real time from database.
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Character Rename

Post by jurchiks »

...
You didn't read what he wrote, did you?
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply