Jump to content
  • 0

hercules to rAthena


Manny

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   1
  • Joined:  08/01/14
  • Last Seen:  

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


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   1
  • Joined:  08/01/14
  • Last Seen:  

@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


  • Group:  Development Manager
  • Topic Count:  56
  • Topics Per Day:  0.01
  • Content Count:  732
  • Reputation:   525
  • Joined:  12/13/11
  • Last Seen:  

:) Glad it worked for you!

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...