Map max x , y

06/05/2014 09:05 elitesuckup#1
how can i get map max x and y ?
is there any way to do that?
06/05/2014 09:46 Spirited#2
You would want to read in the data map (dmap) file from the client and read in the x and y lengths of the map. Your server should be forced to load these lengths in to manage player coordinates (if this is server related). If this isn't server related, then you should reference dmap loaders and load that information in from dmaps.
06/05/2014 10:06 elitesuckup#3
it's not server i making memory based bot in vb.net and i need to make a small map in my bot when clicked the account move to this location i know how to move account but when i click the small map it goes to x , y like {122,45}
not {544,672}
06/06/2014 00:29 TwitchTime#4
Quote:
Originally Posted by elitesuckup View Post
it's not server i making memory based bot in vb.net and i need to make a small map in my bot when clicked the account move to this location i know how to move account but when i click the small map it goes to x , y like {122,45}
not {544,672}
You need to write an algorithm that can convert between where is clicked on a picture (visal representation of the dmap file) to where the coords are in game.

Usually the simplest way to do this is to have each pixel of the image represent a certain grid of coords (say... shrink it in half or into a quarter of the original size) then when you click you can use that same ratio to convert back to ingame coords.


EG: If the original dmap is 2000-1000 and the image is half sized (1000-500) and you click on the coords 100-200 then in game that would be 200-400


Now there's still the problem of the dmap rotation but you at least get the idea :)
06/07/2014 14:58 elitesuckup#5
Yea i got it but .....
i can't read the dmap file in vb.net i think i need dll or something
soo i trying to get it from memory in client or something like that :P
06/07/2014 17:40 Spirited#6
The dmap file doesn't require any additional dlls. It's the next best thing to plain text in a file - plain binary. All you have to do is look at any Conquer Online private server source and look at how it reads in dmap files. It's nothing complicated - anyone writing a bot should be able to do it without any effort. There are also dmap libraries that you can take advantage of, like tinymaps.
06/08/2014 11:01 elitesuckup#7
:( i can't find any way to do that when i click the map in my bot it goes to x,y {74,200} instead of {543,731}:(