A good guide, tnx, but you have some mishaps.
Lets try it again, this time my way:)
Use the attached word document or just have a look here:
Byte 1-2: Item ID
Byte 3-4: Level, Option(0-12), Luck, Skill
Byte 5-6: Durability
Byte 7-14: SN
Byte 15-16: Excellent Opts, Additional Option(12~28)
Byte 17-18: Ancient Data
Byte 19-20: Item Index
Byte 21-32: Blank Zero data
there is now "17 byte" for the simple reason that it cannot exist. The minimum length of a binary string is "FF" (2 varchar symbols which is equal to 1varbin string)
The item id and item index are the same as the once in item(kor).txt with a minor differences in the types (12,13 and 14) and four of the shields (Legendary, Chaos and two more i don't remember at this time)
further more the excellent options coding are not correct (in your doc file)
00 = not excellent
01 = Increase Zen +40%
02 = Defense Success rate +10%
04 = Reflect Damage +5%
08 = Damage Decrease +4%
10 = Increase Mana +4%
20 = Increase HP +4%
<- NOT !
Correct ->
01 = Increase Zen +40%
02 = Defense Success rate +10%
04 = Reflect Damage +5%
08 = Damage Decrease +4%
16 = Increase Mana +4%
32 = Increase HP +4%
Also the level byte is calculated by (ItemLevel*8)
The item type is calculated by (ItemIndex*16)
And the skill adds 128 to the value , not 8
about people wondering how to convert int into binary here's the function's u'll need to do it (php and mssql)
php:
PHP Code:
//Int -> Bin
sprintf("%02X", $INTVALUE, 00);
//Bin -> Int
hexdec(bin2hex($BinaryValue));
mssql:
Code:
-- For Int -> Bin
cast(IntValue as varbinary(1))
OR
convert(varbinary(1), Int Value);
-- For Bin>Int
cast(IntValue as int)
OR
convert(int, Bin Value);
gl