RunUO shows t-maps drawing map centered nearby treasure location. Then it sends packet to add pin to the map, using 0x56 packet. So here is an example:
T-map location is x:3246 y:245
Runuo sends packet to draw map:
- 039717015+0000 --- server Display Map
0000: 90 40 30 70 74 13 9d 0b 95 00 00 0d ed 02 58 01 : .@0pt.........X.
0010: 2c 01 2c -- -- -- -- -- -- -- -- -- -- -- -- -- : ,.,
so reading from it:
upper left x: 2965
upper left y: 0
lower right x: 3565
lower right y: 600
width 300
height 300
Now it sends some Map Data packets:
- 039717046+0031 --- server Map Data
0000: 56 40 30 70 74 05 00 00 00 00 00 -- -- -- -- -- : V@0pt......
- 039717046+0000 --- server Map Data
0000: 56 40 30 70 74 01 00 00 8c 00 7a -- -- -- -- -- : V@0pt.....z
- 039717046+0000 --- server Map Data
0000: 56 40 30 70 74 07 00 00 00 00 00 -- -- -- -- -- : V@0pt......
Its easy to notice that second one got info.
0x01 - thats a mode, it means that this packet adds pin
0x8c - pin X
0x7a - pin Y
in decimal its
x: 140
y: 122
Since its x,y on gump, not real x,y on map, it has to be doubled (map ingame size - 600x600 tiles, size on screen 300x300 pixels). Then it comes
x : 280
y: 244
When i add those to upper left coords:
x : 280 +2965 = 3245
y : 244 + 0 = 244
Then add 1 and i have exact t-map x,y.
Yoko can u code it into injection?
|