[Help]Live map calculations

Have you created a useful tool? or Do you want to get help building one? This is the right place!
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Spyder
Posts: 8
Joined: Mon Nov 02, 2009 9:05 am

[Help]Live map calculations

Post by Spyder »

I'm trying to get the live maps working with the Gracia Final map, but I'm running into an obstacle.
How do I calculate this, and what do the values mean? Does it have to do something with the image dimensions? What do they represent?

Code: Select all

  $x=116+([x coordinate]+107823)/200;  $y=2580+([y coordinate]-255420 )/200;
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: [Help]Live map calculations

Post by janiii »

this is for gracia epilogue:
- each region block is 32768 coords wide and tall
- you have -10 x-blocks and +7 x-blocks on the x-axis from the 0 0 point in game
- you have -8 y-blocks and +8 y-blocks on the y-axis from the 0 0 point in game
- you have a map, x px wide and y pixel tall

- how many coords wide and tall is the lineage game map -> count the blocks and multiply by 32768
- how wide and tall is your image -> calculate the ratio between game coords and image size (game coords per pixel)
- coord - minimum coord (=how many game coords is from minimum to current) divided by the ratio

Image
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
Spyder
Posts: 8
Joined: Mon Nov 02, 2009 9:05 am

Re: [Help]Live map calculations

Post by Spyder »

Thank you for the explanation, it's all clear now :)
Post Reply