Page 1 of 2

MOB MAP [DESISTANCE]

Posted: Sat Jan 08, 2011 2:35 am
by morfiuz
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision 4473:
L2JDP Revision 7737:

how to list mobs on a map, using the coordinates "locx" and "locy" the table spawnlist...

But i need MOBs not bosses, i'm using php, can someone help me?
need only calculate the coordinates in php or who have...

Ex:

Code: Select all

 //locate boss and gradboss X$X = ((116 + ($row['loc_x'] + 107823) / 200));//locate boss and gradboss Y$Y = ((2580 + ($row['loc_y'] - 255420 ) / 200));  
exists solution?

thanks...

Re: MOB MAP

Posted: Sat Jan 08, 2011 10:11 am
by jurchiks
search google for raidboss maps and read their code...
you just need to read all spawn locs of that mob and loop over them and mark them on map.

Re: MOB MAP

Posted: Sat Jan 08, 2011 10:29 pm
by morfiuz
"jurchiks" thanks, but I have the bosses code running on my website, but the same code does not work with mobs

Can someone tell how these coordinates.
Is somenthing like google maps...

what size map of the lineage, so I can do some tests and fit my needs
developers could help me?

Thankoy!

Re: MOB MAP

Posted: Sat Jan 08, 2011 11:26 pm
by janiii
if a code for getting coordinates on a map does work for raidbosses, there is no reason that it does not work with normal mobs. probably you calculate something else, or you use other map/picture/resolution, or you totally dont know what you are doing.. we cannot help you without seeing the code you use, because probably the problem is somewhere else than the coord calc logic.

Re: MOB MAP

Posted: Sun Jan 09, 2011 1:21 pm
by pinkcore
This map will be for HW heavier than emulator my friend.
I recommend you to rapidly increase your MySQL cache.

Post your script code, beacuse you can't get any kind of support.

Re: MOB MAP

Posted: Sun Jan 09, 2011 1:24 pm
by jurchiks
pinkcore wrote:This map will be for HW heavier than emulator my friend.
I recommend you to rapidly increase your MySQL cache.
not if he saves them in a cache I think...

Re: MOB MAP

Posted: Sun Jan 09, 2011 1:25 pm
by pinkcore
Best way is to make XML file with coordinates of mobs and make the map stable without MySQL connection.

Re: MOB MAP

Posted: Sun Jan 09, 2011 1:40 pm
by jurchiks
IMHO best way is to store them in memory... like a Map in Java. OFC, on website host, not game server.

Re: MOB MAP

Posted: Fri Jan 21, 2011 8:39 pm
by morfiuz
the code was available in the first post from the first moment

Code: Select all

 //locate boss and gradboss X$X = ((116 + ($row['loc_x'] + 107823) / 200));//locate boss and gradboss Y$Y = ((2580 + ($row['loc_y'] - 255420 ) / 200));  
loc_x and loc_y from database data.

Resolution of my map
http://www.l2alone.com.br/new/images/Gracia.jpg

MAP= 895px x 1295px

Re: MOB MAP

Posted: Fri Jan 21, 2011 9:43 pm
by pinkcore
I think this map is very small, and you need to calculate coordinates to image's resolution...

Re: MOB MAP

Posted: Fri Jan 21, 2011 10:02 pm
by jurchiks
You don't really want it to be fullHD or higher resolution, it's for a website after all. There are still people who use 1024x768 or 1280x1024 monitors and for them this resolution is quite enough.

Re: MOB MAP

Posted: Sat Jan 22, 2011 8:31 pm
by morfiuz
I think this map is very small, and you need to calculate coordinates to image's resolution...
You don't really want it to be fullHD or higher resolution, it's for a website after all. There are still people who use 1024x768 or 1280x1024 monitors and for them this resolution is quite enough.
??????????? :shock: :? :roll: :| :?: :!:
maybe you did not understand

I think it was the best "janiii" which tell the exact size of the map for me it just use the coordinates.
Thus decreasing the map size by 50% only the coordinates divided by 2

Re: MOB MAP

Posted: Sun Jan 23, 2011 11:59 am
by tukune
This is my script.

Code: Select all

//$MapImagePath = 'worldmap_small.jpg';$MapImagePath = 'worldmap_medium.jpg';//$MapImagePath = 'worldmap_large.jpg'; list($ImgWidth, $ImgHeight, $type, $attr) = getimagesize($MapImagePath);list($MapX,$MapY,$MapWidth,$MapHeight) = array(-131072, -262144, 362948, 524288); function mark($locx,$locy,$pic,$alt='') //PHP{    global $MapX,$MapY,$MapWidth,$MapHeight;    global $ImgWidth,$ImgHeight;     $px = round(($locx - $MapX) * $ImgWidth  / $MapWidth);    $py = round(($locy - $MapY) * $ImgHeight / $MapHeight);     if ($px<0 || $px>$ImgWidth || $py<0 || $py>$ImgHeight) return;     echo "\n".'<img src="'.$pic.'" border=0 style="position:absolute; border-width:0px; left:'.($px-4).'px; top:'.($py-4).'px;" alt="'.$alt.'">';}

Re: MOB MAP

Posted: Sun Jan 23, 2011 12:23 pm
by _DS_
[quote="morfiuz"][/quote]
Remove server advertising from your signature please, its against forum rules.

Re: MOB MAP

Posted: Sun Jan 23, 2011 1:20 pm
by Probe
morfiuz wrote:the code was available in the first post from the first moment

Code: Select all

 //locate boss and gradboss X$X = ((116 + ($row['loc_x'] + 107823) / 200));//locate boss and gradboss Y$Y = ((2580 + ($row['loc_y'] - 255420 ) / 200));  
loc_x and loc_y from database data.

Resolution of my map
http://www.l2alone.com.br/new/images/Gracia.jpg
but what table are you getting it from? if it's from grandboss table it really won't work on mobs, if you want mobs you'll have to select locations from spawnlist table
MAP= 895px x 1295px