Move Character to another account with all data, cabal_tool_CopyCharacter? O.o

Joined
Nov 9, 2004
Messages
527
Reaction score
53
Hi. =P its very important, i must move char data from username to another clean one, with all equipt and inventory and quests. i know that the CharacterIdx its UserNum X 8 and this, but if i change the value in cabal_character_table so it move without the data. so i saw stored procedure named cabal_tool_CopyCharacter. somebody knows how to use it? i mean how to exec it correctly, what values to put in the exec command. because its very not simple to copy the values my self, because there are many tables to copy :S so how can i use the procedure correctly? thanks a lot. =]

It is very important guys, please take a little look :S it looks like it possible to do it, but i need your help =P
 
Last edited by a moderator:
Hi Dor,

Pease wait a little longer before bumping. It's 13:04 here in the UK and many people are at work/school etc. and wouldn't get a chanc to take a look for a few more hours yet.

To do the copy the SP need the origin charidx, the destination charidx and you must also give it the char's existing equipment and inventory binaries.

I have only had a quick look at the SP (i'm on lunch now) and i can see potential problems with it even if you supply everything right. There is one call in there for a function i know nobody edits so the chances of it going wrong are quite high.

I'll update again later when i have had a chance to look into it a bit more deeply.
 
Upvote 0
Hi Dor,

Pease wait a little longer before bumping. It's 13:04 here in the UK and many people are at work/school etc. and wouldn't get a chanc to take a look for a few more hours yet.

To do the copy the SP need the origin charidx, the destination charidx and you must also give it the char's existing equipment and inventory binaries.

I have only had a quick look at the SP (i'm on lunch now) and i can see potential problems with it even if you supply everything right. There is one call in there for a function i know nobody edits so the chances of it going wrong are quite high.

I'll update again later when i have had a chance to look into it a bit more deeply.

OK sorry for this, i didnt know =P

What "SP" mean?

I will wait for answer, thanks chumpy. ;)
 
Upvote 0
Ok, there is a better SP for moving chars but it references some tables we don't have so that isn't going to be any good and CopyCharacter is going to to be the only way.

Make SURE you have good backups before even thinking about trying this!

The first thing to do is get the equip binary for the char you want to move using this on your gamedb, change 32 to the charidx and copy the Data field it returns:
Code:
exec dbo.cabal_tool_GetEquipment 32
Now do the same with the cabal_tool_GetInventory SP to get the chars inventory value as well.

Next is the bit i was worried about. Right-click the cabal_tool_CopyCharacter SP and edit so youc an find the bit in red:
Code:
ALTER    PROCEDURE cabal_tool_CopyCharacter ( @OriginCharacterIdx int, @CharacterIdx int , @Name varchar(50), @EquipmentData varbinary([COLOR="Red"]256[/COLOR]), @InventoryData varbinary(4096) )
Now open the cabal_equipment_table->columns and check the definition of the Data varbinary in there, the size is probably 512 instead of 256 so alter the red value in the CopyCharacter SP to match 512 before saving.

Now you should be ready to move the char:
Code:
dbo.cabal_tool_CopyCharacter '32','64','mychar','equipdata','inventorydata'
32 is my original charidx and 64 is the charidx i am moving it to (remember these go up in sequence, usernum * 8 is the first charidx for the account). 'mychar' is the name of my char and the equipdata and inventorydata are the 2 binaries copied earlier.

That in theory should work looking at the SP but i will admit i have not tested it. If it is successful everything including inventory, equips, quest data, skills and quickslots will be moved. Warehouse items will not as they belong to the account and not the char, so anything they want to take with them will need to be in their inventory.
 
Upvote 0
Ok, there is a better SP for moving chars but it references some tables we don't have so that isn't going to be any good and CopyCharacter is going to to be the only way.

Make SURE you have good backups before even thinking about trying this!

The first thing to do is get the equip binary for the char you want to move using this on your gamedb, change 32 to the charidx and copy the Data field it returns:
Code:
exec dbo.cabal_tool_GetEquipment 32
Now do the same with the cabal_tool_GetInventory SP to get the chars inventory value as well.

Next is the bit i was worried about. Right-click the cabal_tool_CopyCharacter SP and edit so youc an find the bit in red:
Code:
ALTER    PROCEDURE cabal_tool_CopyCharacter ( @OriginCharacterIdx int, @CharacterIdx int , @Name varchar(50), @EquipmentData varbinary([COLOR="Red"]256[/COLOR]), @InventoryData varbinary(4096) )
Now open the cabal_equipment_table->columns and check the definition of the Data varbinary in there, the size is probably 512 instead of 256 so alter the red value in the CopyCharacter SP to match 512 before saving.

Now you should be ready to move the char:
Code:
dbo.cabal_tool_CopyCharacter '32','64','mychar','equipdata','inventorydata'
32 is my original charidx and 64 is the charidx i am moving it to (remember these go up in sequence, usernum * 8 is the first charidx for the account). 'mychar' is the name of my char and the equipdata and inventorydata are the 2 binaries copied earlier.

That in theory should work looking at the SP but i will admit i have not tested it. If it is successful everything including inventory, equips, quest data, skills and quickslots will be moved. Warehouse items will not as they belong to the account and not the char, so anything they want to take with them will need to be in their inventory.

Thank you very much for the hard work. =]

I will check this now, and edit my post.

Edit:

Error when run the query, I saw in the equipment its 512, and i succesfully change in the SP from 256 to 512. then i run the query, and im getting this error:

Server: Msg 257, Level 16, State 2, Procedure cabal_tool_CopyCharacter, Line 0
Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.

I tryed with 256 in the SP but its the same. what to do?
 
Last edited:
Upvote 0
Back