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!

[Inventory]Item Serial

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
Hi guys, I'm trying to make a invetario to my site, but when i get the inventory data show:

ffffffffffffffffffffffffffffffff0f7c5b001b8cb46c00607affffffffff036c590003e3256c0970

but I wanted to show a different way like:
160001000385C70000E000FFFFFFFFFF286CFC00020FCF0100C00AFFFFFFFFFF

so I could get the webshop pictures to show.

Any idea ?
 
ImperiaMuCMS CEO
Loyal Member
Joined
Jul 4, 2011
Messages
1,390
Reaction score
370
I really don't understand your examples what you have posted. One is 84 characters and the second is 64 characters (IGCN right?). And you want to get this
Code:
160001000385C70000E000FFFFFFFFFF286CFC00020FCF0100C00AFFFFFFFFFF
from this?
Code:
ffffffffffffffffffffffffffffffff0f7c5b001b8cb46c00607affffffffff036c590003e3256c0970

Or what?
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
Oh sorry i go explain better, i have in database varbinary numbers and i need to convert to hex because i want use webshop images with hex names. But when i convert bin2hex i get this "ffffffffffffffffffffffffffffffff0f7c5b001b8cb46c00607affffffffff036c590003e3256c0970" who do not have serial item. Example item: Kris = 0000000 = webshop_item = 000000.gif.



So how i can convert to 64 characters ?
 
Upvote 0
ImperiaMuCMS CEO
Loyal Member
Joined
Jul 4, 2011
Messages
1,390
Reaction score
370
You don't need to convert it from bin to hex, it's already in hex. Datatype is varbinary, I know, but when you will look on format, you will see that's something like "0x160001000385C70000E000FFFFFFFFFF286CFC00020FCF0100C00AFFFFFFFFFF...". So, you can easily just delete first two characters and you will have all items from inventory. In cyclus always take 64 characters (1 item) and process it.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
Hm interesting, you cleared my mind a lot, these "FFFFF" is what exactly? void? and among them are the items?



because i only need the serial to show the .gif files.



i have example in one char the inventory with: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F7C5B001B8CB46C00607AFFFFFFFFFF (i think its first hand slot) so this "0F7C5B001B8CB46C00607A" is the item ?
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
Thanks you help me alot. I'm gonna work this :)



but still something strange, is located where the id? example: 8F28EA00000000000000 ?
 
Upvote 0
ImperiaMuCMS CEO
Loyal Member
Joined
Jul 4, 2011
Messages
1,390
Reaction score
370
PHP:
$sy = hexdec(substr($_item,0,2)); 	// Item ID
$iop = hexdec(substr($_item,2,2)); 	// Item Level/Skill/Option Data
$itemdur = hexdec(substr($_item,4,2)); 	// Item Durability
$serial = substr($_item,32,8);		// Item SKey
$ioo = hexdec(substr($_item,14,2)); 	// Item Excellent Info/ Option
$ac = hexdec(substr($_item,16,2)); 	// Ancient data
$itemtype = hexdec(substr($_item,18,1)); 	// Item Type
$jog = hexdec(substr($_item,19,1)); // JoG option
$harm = hexdec(substr($_item,20,1)); // Harmony option
$harmlvl = hexdec(substr($_item,21,1)); // Harmony option level
$socket = substr($_item,22,10); // Sockets
$soc1 = hexdec(substr($_item,22,2));
$soc2 = hexdec(substr($_item,24,2));
$soc3 = hexdec(substr($_item,26,2));
$soc4 = hexdec(substr($_item,28,2));
$soc5 = hexdec(substr($_item,30,2)
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
oh you are a god.



What will be challenging now is to build the image library kkkkkkkkkkkkk



I have some ideia to get items delete all FF in code and separate the characters every 10 numbers and letters :)



original: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F7C5B001B8CB46C00607AFFFFFFFFFF036C590003E3256C09700AFFF
example $hand1 = 7C5B001B8CB46C00607A $hand2 = 036C590003E3256C09700A



i think i'm generate wrongs ID's example: Viper Bow 94EFFF00275F0A7F0000 /item 4 20 "Arrow Viper Bow"
<?
$_item = "94EFFF00275F0A7F0000";


$sy = hexdec(substr($_item,0,2));
$iop = hexdec(substr($_item,2,2));
$itemdur = hexdec(substr($_item,4,2));
$serial = substr($_item,32,8);
$ioo = hexdec(substr($_item,14,2));
$ac = hexdec(substr($_item,16,2));
$itemtype = hexdec(substr($_item,18,1));
$jog = hexdec(substr($_item,19,1));
$harm = hexdec(substr($_item,20,1));
$harmlvl = hexdec(substr($_item,21,1));
$socket = hexdec(substr($_item,22,10));
$soc1 = hexdec(substr($_item,22,2));
$soc2 = hexdec(substr($_item,24,2));
$soc3 = hexdec(substr($_item,26,2));
$soc4 = hexdec(substr($_item,28,2));
$soc5 = hexdec(substr($_item,30,2));


echo $sy;


?>

Result:
148
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
I'm doing something wrong? and i can use substr to get serial of inventory ? example make a while to get the items?
 
Upvote 0
ImperiaMuCMS CEO
Loyal Member
Joined
Jul 4, 2011
Messages
1,390
Reaction score
370
I think I have posted enough, if you want more, I have custom character profile with intentory preview. So if you are interest, write me PM or add me on Skype, otherwise you should try to handle it by yourself, I can't do anything more for you.
 
Upvote 0
Newbie Spellweaver
Joined
Apr 19, 2015
Messages
37
Reaction score
0
Ok, thanks for the help and attention you help me alot, and i found my mistake. :p
 
Upvote 0
Status
Not open for further replies.
Back
Top