Openkore: <ITEML> feature

Created on 3 Nov 2018  路  12Comments  路  Source: OpenKore/openkore

------------------ Openkore Issues Template ------------------

  • Openkore version git: 4c33ea5bd02630fcc53c1156533c47a240b47960
  • Server: idRO_Renewal (can be appear in other servers)
  • Bug Report / Feature Request:
    Feature Request
  • Summary:
    Parsing all string inside <ITEML>somebytestring</ITEML> from RO client feature: Shift+Left-click.
    This message can be appear in public chat or broadcast message

The basic pattern is
<ITEML>000000000&00(00(00(00(00</ITEML>
later if the equip is refned, becomes
<ITEML>000000000%0n&00(00(00(00(00</ITEML> (added %0n before &00)
and (00 will be becomes (1nn if there's the card or char_id for forger/item created
then the &00 is equip location, if link the item from equipment window the value becomes &nn

Example from log

image
image

645 Concentration Potion
<ITEML>000000ap&00(00(00(00(00</ITEML>
30 30 30 30 30 30 61 70
26 30 30
28 30 30
28 30 30
28 30 30
28 30 30

656 Awakening Potion
<ITEML>000000aA&00(00(00(00(00</ITEML>
30 30 30 30 30 30 61 41
26 30 30
28 30 30
28 30 30
28 30 30
28 30 30

657 Berserk Potion
<ITEML>000000aB&00(00(00(00(00</ITEML> 
30 30 30 30 30 30 61 42
26 30 6a
28 30 30
28 30 30
28 30 30
28 30 30

15042 White Wing Suit [1] LUK+4:LUK+3:CRIT+5
<ITEML>0000g13UC&00(00(1eF(1eE(1eQ</ITEML>
30 30 30 30 67 31 33 55 43
26 30 30
28 30 30
28 31 65 46
28 31 65 45
28 31 65 51

15042 White Wing Suit [1] Evil Druid Card:Sharp 2:LUK+2:LUK+1
<ITEML>0000g13UC&00(14N(1fH(1eD(1eC</ITEML>
30 30 30 30 67 31 33 55 43
26 30 30
28 31 34 4e
28 31 66 48
28 31 65 44
28 31 65 43

2589 +9 Fallen Angel Wing [1] EA1:EA3:EA1
<ITEML>000041FL%09&03(00(1fW(1fY(1fW</ITEML>
30 30 30 30 34 31 46 4c
25 30 39 # refine +9
26 30 33
28 30 30
28 31 66 57
28 31 66 59
28 31 66 57

1726 +8 Rune Hunter Bow [1] Archer Skeleton Card
<ITEML>0000y1rQ%08&0b(142(00(00(00</ITEML>
30 30 30 30 79 31 72 51
25 30 38 # refine +8
26 30 62
28 31 34 32
28 30 30
28 30 30
28 30 30

2115 +4 Valkyrja's Shield [1] Thara Frog Card
<ITEML>0000w1y7%04&04(13s(00(00(00</ITEML>
30 30 30 30 77 31 79 37
25 30 34 # refine +4
26 30 34
28 31 33 73
28 30 30
28 30 30
28 30 30

20510 Costume Sword Wing
<ITEML>0028815kO&0j(00(00(00(00</ITEML>
30 30 32 38 38 31 35 6b 4f
26 30 6a # from Equip window, costume garment
28 30 30
28 30 30
28 30 30
28 30 30

1746 +7 Elven Bow [1] Archer Skeleton Card
<ITEML>0000y1sa%07&0b(142(00(00(00</ITEML>
30 30 30 30 79 31 73 61
25 30 37 # refine +7
26 30 62 # from Equip window, 2-hand weapon same value
28 31 34 32
28 30 30
28 30 30
28 30 30

19543 Oliver Wolf Hood
<ITEML>000gw155d&dH(00(00(00(00</ITEML>
30 30 30 67 77 31 35 35 64
26 64 48 # from equip window, costume headgear top
28 30 30
28 30 30
28 30 30
28 30 30

20166 Costume Hockey Mask
<ITEML>001B615fg&5q(00(00(00(00</ITEML>
30 30 31 42 36 31 35 66 67
26 35 71 # from equip window, costume headgear mid-bottom
28 30 30
28 30 30
28 30 30
28 30 30
help wanted idRO

Most helpful comment

According to my experiment:

The first 6 digits is the type of item converted from its item ID to base62
1 = Lower Headgear
2 = Weapon
4 = Garment
136 (8 + 128) = Accessory
16 = Armor
32 = Shield
64 = Footgear
256 = Upper Headgear
512 = Middle Headgear
1024 = Costume Top Headgear
2048 = Costume Mid Headgear
4096 = Costume Low Headgear
8192 = Costume Garment/Robe
32768 = Ammo
other = 0
If the item type is other than 0, then the itemID is converted to base62 and followed by string "1" (left padded by "0")


Then the next chars, base62-converted-itemID


If "%" found, then next 2 chars must be the refine degree (left padded by "0", length 2)


If "&" found, then next 2 chars must be the weapon type (if the item is a weapon)
1: Daggers
2: One-handed swords
3: Two-handed swords
4: One-handed spears
5: Two-handed spears
6: One-handed axes
7: Two-handed axes
8: Maces
10: One-handed staves
11: Bows
12: Knuckles
13: Musical Instruments
14: Whips
15: Books
16: Katars
17: Revolvers
18: Rifles
19: Gatling guns
20: Shotguns
21: Grenade launchers
22: Fuuma Shurikens
23: Two-handed staves

1: Arrows
2: Throwable daggers
3: Bullets
4: Shells
5: Grenades
6: Shuriken
7: Kunai
8: Cannonballs
9: Throwable Items (Sling Item)

For garment like AAW, FAW, and other garments that have viewID, it appears this field value is 1.


Then the rest is for card, converted to base62 fro its itemID

for some case, like item made by brewing or forging, it appears the card is filled by charID

All 12 comments

657 Berserk Potion
<ITEML>000000aB&00(00(00(00(00</ITEML> 
30 30 32 38 38 31 35 6b 4f
26 30 6a
28 30 30
28 30 30
28 30 30
28 30 30

Is this correct? Shouldn't it be

657 Berserk Potion
<ITEML>000000aB&00(00(00(00(00</ITEML> 
30 30 30 30 30 30 61 42
26 30 30
28 30 30
28 30 30
28 30 30
28 30 30

?

my bad, paste'd from Costume Sword Wing

and clarification about &00, it's just item class/equip location doesn't matter if it's equipped or not

If it doesn't matter whether equipped or not, why are the White Wing Suits &00?

0000g13UC&00(00(1eF(1eE(1eQ
3UC => item ID 15042 (White Wing Suits [1])
( is a slot separator
1st slot: 00 => nothing
2nd slot: 1eF => item ID 4753 (LUK+4)
3rd slot: 1eE => item ID 4752 (LUK+3)
4th slot: 1eQ => item ID 4764 (CRI+5)

No ideia what 0000g1 means

Everything seems to be encoded in base 62 with 0..9a..zA..Z dictionary
Dirty script for base conversion: https://gist.github.com/lututui/32d5304a16c9ea7ff947ce5f652bbb70

sorry, I meant by doesn't matter is not something we need to take care of... it's used for classnum in aegis term, just like in athena item_db, there's view field, that's for. WW suit is armor is 0.
Costume Sword Wing is 19, 0j
Elven Bow is 11, 0b

just noticed, every equip item hat in equip tab in inventory list, the 6th char is 1, and followed by item id.
WWsuit 0000g1 then 3UC
Fallen Angel Wing 000041FL
Valk Shield 0000w1y7

Rune Hunter Bow 0000y1rQ
Elven Bow 0000y1sa
Cursed Lyre 0000y1s5
Damascus 000021jI

Costume sword wing 0028815kO
Costume Oliver Wolf Hood 000gw155d
Costume Hockey mask 001B615fg

I can't say it "equip-type items" (armors & weapon) because the egg also in equip tab in inventory window
Scatleton's Portable Cage 0000012mN ID is 2mN = 9101

so, item id started from 7th char I think

just a quick implementation (in some plugin), just want to point the regex part if anything better than it
https://gist.github.com/cydh/cd1c3b5b68f21360488d10db05c2bcd5

According to my experiment:

The first 6 digits is the type of item converted from its item ID to base62
1 = Lower Headgear
2 = Weapon
4 = Garment
136 (8 + 128) = Accessory
16 = Armor
32 = Shield
64 = Footgear
256 = Upper Headgear
512 = Middle Headgear
1024 = Costume Top Headgear
2048 = Costume Mid Headgear
4096 = Costume Low Headgear
8192 = Costume Garment/Robe
32768 = Ammo
other = 0
If the item type is other than 0, then the itemID is converted to base62 and followed by string "1" (left padded by "0")


Then the next chars, base62-converted-itemID


If "%" found, then next 2 chars must be the refine degree (left padded by "0", length 2)


If "&" found, then next 2 chars must be the weapon type (if the item is a weapon)
1: Daggers
2: One-handed swords
3: Two-handed swords
4: One-handed spears
5: Two-handed spears
6: One-handed axes
7: Two-handed axes
8: Maces
10: One-handed staves
11: Bows
12: Knuckles
13: Musical Instruments
14: Whips
15: Books
16: Katars
17: Revolvers
18: Rifles
19: Gatling guns
20: Shotguns
21: Grenade launchers
22: Fuuma Shurikens
23: Two-handed staves

1: Arrows
2: Throwable daggers
3: Bullets
4: Shells
5: Grenades
6: Shuriken
7: Kunai
8: Cannonballs
9: Throwable Items (Sling Item)

For garment like AAW, FAW, and other garments that have viewID, it appears this field value is 1.


Then the rest is for card, converted to base62 fro its itemID

for some case, like item made by brewing or forging, it appears the card is filled by charID

here is the format for random options,

it add after cards

*01+01,4I

*01 => option id (MHP + %d)

+01 => option param

,4I => option value (292)

@jchcc can you get another sample for item with 2 or more random options?
it'll be *01+01,4I*01+01,4I*01+01,4I*01+01,4I*01+01,4I?

@cydh
yes, here's another sample:
<ITEML>0002c1GU&00(00(00(00(00*03+01,0a*0h+01,08</ITEML>

Input

message "".solveITEML("<ITEML>0000415o9%03&00(00(00(1e9(1eF</ITEML>")."\n";
message "".solveITEML("<ITEML>0000415o9%03&00(00(00(1e9(1eF*01+01,4I*01+01,4I*01+01,4I*01+01,4I*01+01,4I</ITEML>")."\n";
message "".solveITEML("<ITEML>0002c1GU&00(00(00(00(00*03+01,0a*0h+01,08</ITEML>")."\n";

Solved message

<+3 Giant Faceworm Snake Skin [DEX+2:LUK+4]>
<+3 Giant Faceworm Snake Skin [DEX+2:LUK+4:Option(1,292,1):Option(1,292,1):Option(1,292,1):Option(1,292,1):Option(1,292,1)]>
<Vesper Core 02 [Option(17,8,1):Option(3,10,1)]>

personally, I don't want bother about equip type, in message it doesn't needed

Was this page helpful?
0 / 5 - 0 ratings