Re: [Inventory]Item Serial
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?
Re: [Inventory]Item Serial
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.
- - - Updated - - -
So how i can convert to 64 characters ?
Re: [Inventory]Item Serial
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.
Re: [Inventory]Item Serial
Hm interesting, you cleared my mind a lot, these "FFFFF" is what exactly? void? and among them are the items?
- - - Updated - - -
because i only need the serial to show the .gif files.
- - - Updated - - -
i have example in one char the inventory with: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F7C5B001B8CB46C00607AFFFFFFFFFF (i think its first hand slot) so this "0F7C5B001B8CB46C00607A" is the item ?
Re: [Inventory]Item Serial
You don't need serial of item at all to show images. You need to get from this hex code item info - id, type and level to get correct image.
Re: [Inventory]Item Serial
Thanks you help me alot. I'm gonna work this :)
- - - Updated - - -
but still something strange, is located where the id? example: 8F28EA00000000000000 ?
Re: [Inventory]Item Serial
PHP Code:
$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)
Re: [Inventory]Item Serial
oh you are a god.
- - - Updated - - -
What will be challenging now is to build the image library kkkkkkkkkkkkk
- - - Updated - - -
I have some ideia to get items delete all FF in code and separate the characters every 10 numbers and letters :)
- - - Updated - - -
original: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F7C5B001B8CB46C00607AFFFFFFFFFF036C590003E3256C09700AFFF
example $hand1 = 7C5B001B8CB46C00607A $hand2 = 036C590003E3256C09700A
- - - Updated - - -
i think i'm generate wrongs ID's example: Viper Bow 94EFFF00275F0A7F0000 /item 4 20 "Arrow Viper Bow"
Quote:
<?
$_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
Re: [Inventory]Item Serial
I'm doing something wrong? and i can use substr to get serial of inventory ? example make a while to get the items?
Re: [Inventory]Item Serial
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.
Re: [Inventory]Item Serial
Ok, thanks for the help and attention you help me alot, and i found my mistake. :P