Jump to content
Mumbles

Merging with existing eAthena login

Recommended Posts

As I stated in my previous topic, I would like to use Hercules as a second channel with my existing server's login database. The problem with this is that it uses level instead of group_id. What conflicts will I face with Hercules reading from my other login database? Is there a workaround to get the different emulators sharing login? Constructive replies are appreciated. Thanks in advance. c:

Share this post


Link to post
Share on other sites

There's one way and that is to make Hercules read from database "level" field or make the other one read the "group_id" field through modifying source.

However I'm unsure where in the source it's at.

 

As for conflict, it would happen when an emulator goes through a field or require one that doesn't exist in either emulator.

 

Personally, I wouldn't recommend sharing existing server database for second channel since it risks breaking down on future update from either emulator.

Share this post


Link to post
Share on other sites

 

What conflicts will I face with Hercules reading from my other login database?

actually nothing if you uses the upgrade sqls...Hercules just add new  tables so that your database can support new features..only attribute that will be changed is level to group_id..

 

:meow:

Share this post


Link to post
Share on other sites

 

 

What conflicts will I face with Hercules reading from my other login database?

actually nothing if you uses the upgrade sqls...Hercules just add new  tables so that your database can support new features..only attribute that will be changed is level to group_id..

 

:meow:

 

...but wouldn't changing the field name break the other server's queries? I don't feel like I got much out of this response, though I may just be misreading it; from what I understand, you're claiming that upgrading my SQL table's fields will magically make Hercules work? If anything, I feel like that would break both servers. As with JoWei's response, I think it would work out fine if I were able to edit the source so that it reads from level instead of group_id in the database; essentially, it would function normally - it would just be reading from a differently named column. If someone could direct me as to where I'd make this change, it'd help me move things along. I don't wanna break this before I even get it running. .-.

 

And, with all cautions heeded, I still would like to make a second channel available, if at all possible. Thanks for your input so far guys.

Share this post


Link to post
Share on other sites

After a bit of research in the source, you can modify the field it reads inside of Hercules's /src/login/account_sql.c at line 525:

"SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate` FROM `%s` WHERE `account_id` = %d" 

 

just change `group_id` to `level`.

 

It should be around the same place in eAthena (and other) source if you want to change the other emulator query instead.

Share this post


Link to post
Share on other sites

if your planning to use Hercules SQL files i think you'll just add the level column in the login in order for your eAthena Based Server to run.

Share this post


Link to post
Share on other sites

After a bit of research in the source, you can modify the field it reads inside of Hercules's /src/login/account_sql.c at line 525:

"SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate` FROM `%s` WHERE `account_id` = %d" 

 

just change `group_id` to `level`.

 

It should be around the same place in eAthena (and other) source if you want to change the other emulator query instead.

 

Thanks for looking into it; this is just what I needed.

Share this post


Link to post
Share on other sites

if your planning to use Hercules SQL files i think you'll just add the level column in the login in order for your eAthena Based Server to run.

 

This actually seems like a better solution than other posted ones. Add the columb to your login database that reads level in addition to the group_id.

Share this post


Link to post
Share on other sites

After a bit of research in the source, you can modify the field it reads inside of Hercules's /src/login/account_sql.c at line 525:

"SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate` FROM `%s` WHERE `account_id` = %d" 

 

just change `group_id` to `level`.

 

It should be around the same place in eAthena (and other) source if you want to change the other emulator query instead.

 

 

 

if your planning to use Hercules SQL files i think you'll just add the level column in the login in order for your eAthena Based Server to run.

 

This actually seems like a better solution than other posted ones. Add the columb to your login database that reads level in addition to the group_id.

 

@Jman:

So you're saying that if I add group_id as a column, let's say, after level, in my eAthena's login database, Hercules and eAthena would be able to read from it without conflicting? From what it looks like on my end, I think it'd work; I just wanna confirm this before I make changes to a live server's database.

Share this post


Link to post
Share on other sites

 

After a bit of research in the source, you can modify the field it reads inside of Hercules's /src/login/account_sql.c at line 525:

"SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate` FROM `%s` WHERE `account_id` = %d" 

 

just change `group_id` to `level`.

 

It should be around the same place in eAthena (and other) source if you want to change the other emulator query instead.

 

 

if your planning to use Hercules SQL files i think you'll just add the level column in the login in order for your eAthena Based Server to run.

 

This actually seems like a better solution than other posted ones. Add the columb to your login database that reads level in addition to the group_id.

 

@Jman:

So you're saying that if I add group_id as a column, let's say, after level, in my eAthena's login database, Hercules and eAthena would be able to read from it without conflicting? From what it looks like on my end, I think it'd work; I just wanna confirm this before I make changes to a live server's database.

 

 

There can be extra columns in a database without conflicting with each other. The Hercules/rAthena source code is looking for a group_id field. If there is none, it will error. If there is a 'level' field in addition Hercules simply won't read it (it won't even know its there nor will it care).

Share this post


Link to post
Share on other sites

 

 

After a bit of research in the source, you can modify the field it reads inside of Hercules's /src/login/account_sql.c at line 525:

"SELECT `account_id`,`userid`,`user_pass`,`sex`,`email`,`group_id`,`state`,`unban_time`,`expiration_time`,`logincount`,`lastlogin`,`last_ip`,`birthdate` FROM `%s` WHERE `account_id` = %d" 

 

just change `group_id` to `level`.

 

It should be around the same place in eAthena (and other) source if you want to change the other emulator query instead.

 

 

>> 

if your planning to use Hercules SQL files i think you'll just add the level column in the login in order for your eAthena Based Server to run.

 

This actually seems like a better solution than other posted ones. Add the columb to your login database that reads level in addition to the group_id.

 

@Jman:

So you're saying that if I add group_id as a column, let's say, after level, in my eAthena's login database, Hercules and eAthena would be able to read from it without conflicting? From what it looks like on my end, I think it'd work; I just wanna confirm this before I make changes to a live server's database.

 

 

There can be extra columns in a database without conflicting with each other. The Hercules/rAthena source code is looking for a group_id field. If there is none, it will error. If there is a 'level' field in addition Hercules simply won't read it (it won't even know its there nor will it care).

 

 

Thanks for the confirmation. Now to just get it running...lol.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.