Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Help] 32 Byte to 16 Byte Item Converter

Joined
Feb 4, 2014
Messages
962
Reaction score
36
32 Byte to 16 Byte Item Converter that convert the Warehouse and Inventory of players...

Any body knows or have Item Converter like in IGCN use, but IGCN only convert 16 to 32 Byte only and they have no reverse for it :( .

lNI0Mp3 - [Help] 32 Byte to 16 Byte Item Converter - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Joined
Feb 4, 2014
Messages
962
Reaction score
36
hmm is it even possible.. ? @myheart


Hopefully yes so i can backup my character items from igcn to muemu database :(

IGCN GENERTED ITEM HEX:: (Jewel of Chaos)
0F0000000000000000C000FFFFFFFFFF017B5AA6FFFFFFFFFFFFFFFFFFFFFFFF
MUEMU GENERTED ITEM HEX: (Jewel of Chaos)
0F0000FFFFFE1C0000C000FFFFFFFFFF

MUEMU using season 6 hex while IGCN using Season 9 and Up version.
You cant just remove the exist code it will ruin your vault or inventory :(
 
Last edited:
Upvote 0
Joined
Feb 4, 2014
Messages
962
Reaction score
36
i wish i could help ... searched abit the internet but nothing much
its complex :/

hopefully someone have a solution for this , i already search in intertn i use convert script of sql but its not fixing the prob its worsting the problem hahaha.

hayyyyz i cant use igcn anymore there season 6 is dead they dont update/fix the bugs, it useless files, they focus only in there latest season 13... IGCN season 6 has skill delay issue and they do nothing. also there main.exe are very laggy and have big consumption of cpu not advisable to use.



@
jacubb

Maybe its possible to make webmodule to convert hex per item?
Logical ways:
Items should be in IGCN Vault then using webmodule you will go to warehouse module then in warehouse you will click item in vault to send item hex in sql database then hex in database should save as 16 byte hex code then after that you can return in vault again but this time website using muemu database which has 16 byte hex for item.
Its like buy and sell module but logic is you will sell from IGCN then Return item to MUEMU databse. :D
thanks
 
Upvote 0
Experienced Elementalist
Joined
Apr 15, 2012
Messages
203
Reaction score
25
I do this with PHP, its for me the easyer code to do "advanced things" but only coded 16 to 32 bytes item code :/

Code:
Function UpdateItem($item,$t) {
	if($item != 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF') {
	$ItemType =  substr($item, 0, 4);

	$itempart1 =  substr($item, 0, 6);
	$serial =  substr($item, 6, 8);
	$itempart2 =  substr($item, 14, 8);
	$seeds =  substr($item, 22, 6);
	$end =  substr($item, 28, 4);
	
	if($seeds != '000000') { $seeds = 'FFFFFF'; }
	$totalitem = $itempart1.$serial.$itempart2.$seeds.$end;
	echo ''.$item.' => '.$totalitem .' (S: '.$serial.') OK<br/>'; 

	} else {
		$totalitem = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF';
	}
	return $totalitem;
}

I used this with a foreach in the warehouse, you can implement handling ware and inventorys, all its the same.

Always starts with 0x, you need to remove it.

Use this code of example for creating 32b items. The structure its a little bit similar. You can use the editor for know and understand all the parts of the item, and a hexa to decimal converter for see the values.


When you create new items, maybe need to create serials like dataserver, executing WZ_GETITEMSERIAL from the DB, and updating Itemcount in the DB too for prevent duplicated serials.



For read warehouse and write it in another DB:

Code:
Function CopyWHContent($Acc1,$Acc2) {
	
	$warehouse = '';

	$WareQuery = mssql_query("declare [USER=237319]Vault[/USER] varbinary(3840); set [USER=237319]Vault[/USER]=(SELECT Items FROM [MuOnlineOld].[dbo].[warehouse] where AccountId='$Acc1');print [USER=237319]Vault[/USER];");
	$WareContent = substr(mssql_get_last_message(),2);
	$WareItem = str_split($WareContent, 32); 
	$indx = 0;
	$t = 1;
	$tx  = 1;
	while($indx <= 119) {
		if($WareItem[$indx] != 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ) {
			//echo $WareItem[$indx].' -> COPY (tx '.$tx.') <br/>' ;
		}
		
		$warehouse .= UpdateItem($WareItem[$indx],$tx);
		
		
		$indx++; 
	}

	mssql_query("INSERT INTO [MuOnlineNew].[dbo].[warehouse] (AccountID) VALUES ('$Acc2')");
	mssql_query("UPDATE [MuOnlineNew].[dbo].[warehouse] SET [Items]=0x$warehouse WHERE AccountID='$Acc2'");
}


remember too check the size of the cells in the DB and edit the code in Vault varbinary(3840);
 
Last edited:
Upvote 0
Joined
Feb 4, 2014
Messages
962
Reaction score
36
I do this with PHP, its for me the easyer code to do "advanced things" but only coded 16 to 32 bytes item code :/

Code:
Function UpdateItem($item,$t) {
    if($item != 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF') {
    $ItemType =  substr($item, 0, 4);

    $itempart1 =  substr($item, 0, 6);
    $serial =  substr($item, 6, 8);
    $itempart2 =  substr($item, 14, 8);
    $seeds =  substr($item, 22, 6);
    $end =  substr($item, 28, 4);
    
    if($seeds != '000000') { $seeds = 'FFFFFF'; }
    $totalitem = $itempart1.$serial.$itempart2.$seeds.$end;
    echo ''.$item.' => '.$totalitem .' (S: '.$serial.') OK<br/>'; 

    } else {
        $totalitem = 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF';
    }
    return $totalitem;
}

I used this with a foreach in the warehouse, you can implement handling ware and inventorys, all its the same.

Always starts with 0x, you need to remove it.

Use this code of example for creating 32b items. The structure its a little bit similar. You can use the editor for know and understand all the parts of the item, and a hexa to decimal converter for see the values.


When you create new items, maybe need to create serials like dataserver, executing WZ_GETITEMSERIAL from the DB, and updating Itemcount in the DB too for prevent duplicated serials.



For read warehouse and write it in another DB:

Code:
Function CopyWHContent($Acc1,$Acc2) {
    
    $warehouse = '';

    $WareQuery = mssql_query("declare @[I][B][URL="http://forum.ragezone.com/members/237319.html"]Vault[/URL][/B][/I] varbinary(3840); set @[I][B][URL="http://forum.ragezone.com/members/237319.html"]Vault[/URL][/B][/I]=(SELECT Items FROM [MuOnlineOld].[dbo].[warehouse] where AccountId='$Acc1');print @[I][B][URL="http://forum.ragezone.com/members/237319.html"]Vault[/URL][/B][/I];");
    $WareContent = substr(mssql_get_last_message(),2);
    $WareItem = str_split($WareContent, 32); 
    $indx = 0;
    $t = 1;
    $tx  = 1;
    while($indx <= 119) {
        if($WareItem[$indx] != 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ) {
            //echo $WareItem[$indx].' -> COPY (tx '.$tx.') <br/>' ;
        }
        
        $warehouse .= UpdateItem($WareItem[$indx],$tx);
        
        
        $indx++; 
    }

    mssql_query("INSERT INTO [MuOnlineNew].[dbo].[warehouse] (AccountID) VALUES ('$Acc2')");
    mssql_query("UPDATE [MuOnlineNew].[dbo].[warehouse] SET [Items]=0x$warehouse WHERE AccountID='$Acc2'");
}


remember too check the size of the cells in the DB and edit the code in @Vault varbinary(3840);
if yours is 16 to 32 byte convert its easy because IGCN already have that function in there Essential Tools.
 
Upvote 0
Experienced Elementalist
Joined
Apr 15, 2012
Messages
203
Reaction score
25
if yours is 16 to 32 byte convert its easy because IGCN already have that function in there Essential Tools.

I never can run the Essential Tools, so i writed that sh** for do it xD

32 to 16 its the same thing, you need to indentify all byte in one item and ready ^^
 
Upvote 0
Experienced Elementalist
Joined
Apr 15, 2012
Messages
203
Reaction score
25
Just Install VC++2015
or use SQL info incorrect.

I have installed Runtime 2015 x64, maybe need the x86 version libs?
The GS runs perfect. :/

All the sql configs are fine, tcp ip enabled
 
Upvote 0
Back
Top