Jump to content
  • 0
Manny

hercules to rAthena

Question

Hi guys, 

 

First, I'm sorry about my english, this is not my native language. I'll try my best.

 

 

I come from hercules, and to be honest, they have a great emulator if we're not looking after third classes.

I started a new serveur few weeks ago, and players keep requesting me about some skill from third classes that don't work. I'm fixing each skill by comparing with rAthena sources, and *MAGIC* there is no problem.

 

I don't have a lot of player, they all leaved because of third classes bugs. Now, since yesterday, i'm trying to migrate to rAthena from hercules. Everything was great, until I started the mysql migration.

 

Well, this is my problem :

 

I had to transfer `char_reg_num_db` and `char_reg_str_db` into `global_reg_value` -> Perfectly done !

 

Now i'm transfering `acc_reg_num_db` and `acc_str_num_db` into `global_reg_value` and I keep getting this error : 

#1062 - Duplicate entry '0-#CASHPOINTS-2000000' for key 'PRIMARY' 
I tried a lot, but I have this error on each lines i'm trying to add.

 

Do you know how can I fix it ? 

 

Thank you for your help,

 

Manny.

 

Ps: I truncated my table each time I tried to add something, to be sure that my table is realy empty.

 

Ps2: Sorry for my bad english, I did my best.

 

Ps3: I don't know if i'm in the right place to post this topic :s Sorry for my mistake

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

You'll have to run something like:

 

INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 2 FROM `acc_reg_num_db` WHERE `str` NOT LIKE '#%$';
INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 2 FROM `acc_reg_str_db` WHERE `str` LIKE '#%$';
INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`) SELECT `char_id`, `key`, `value`, 3 FROM `char_reg_num_db` WHERE `str` NOT LIKE '%$';
INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`) SELECT `char_id`, `key`, `value`, 3 FROM `char_reg_str_db` WHERE `str` LIKE '%$';
INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 1 FROM `global_acc_reg_num_db` WHERE `str` NOT LIKE '##%$';
INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 1 FROM `global_acc_reg_str_db` WHERE `str` NOT LIKE '##%$';
Link to comment
Share on other sites

@Aleos : You made my week :D

This worked perfectly:

INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 2 FROM `acc_reg_num_db` WHERE `key` NOT LIKE '#%$';
INSERT INTO `global_reg_value` (`account_id`, `str`, `value`, `type`) SELECT `account_id`, `key`, `value`, 2 FROM `acc_reg_str_db` WHERE `key` LIKE '#%$';
INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`) SELECT `char_id`, `key`, `value`, 3 FROM `char_reg_num_db` WHERE `key` NOT LIKE '%$';
INSERT INTO `global_reg_value` (`char_id`, `str`, `value`, `type`) SELECT `char_id`, `key`, `value`, 3 FROM `char_reg_str_db` WHERE `key` LIKE '%$';

Thanks a lot !

Edited by Manny
Link to comment
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
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.



×
×
  • Create New...

Important Information

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