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?
Character Rename
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Character Rename
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.
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- Posts: 4
- Joined: Sat Aug 18, 2012 3:45 am
Re: Character Rename
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.
Thanks for the info.
- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
Re: Character Rename
Look at game/data/scripts/handlers/telnethandlers/ you may code your own telnet commands.
- papadkostas
- Posts: 128
- Joined: Fri Jul 02, 2010 8:34 am
- Location: Greece
- Contact:
Re: Character Rename
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
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

I'm learning as fast..as roadrunner - Beeep Beeeep


- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: Character Rename
...
You didn't read what he wrote, did you?
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.