MOB MAP [DESISTANCE]

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
User avatar
morfiuz
Posts: 90
Joined: Sun Sep 19, 2010 5:45 pm
Location: Brasil

MOB MAP [DESISTANCE]

Post 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...
Last edited by morfiuz on Sun Feb 13, 2011 7:06 am, edited 1 time in total.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: MOB MAP

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
morfiuz
Posts: 90
Joined: Sun Sep 19, 2010 5:45 pm
Location: Brasil

Re: MOB MAP

Post 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!
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: MOB MAP

Post 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.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
pinkcore
Posts: 247
Joined: Fri Jul 24, 2009 3:04 am
Location: Czech Republic

Re: MOB MAP

Post 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.
Last edited by pinkcore on Sun Jan 09, 2011 1:25 pm, edited 1 time in total.
I'm not here only for food!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: MOB MAP

Post 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...
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
pinkcore
Posts: 247
Joined: Fri Jul 24, 2009 3:04 am
Location: Czech Republic

Re: MOB MAP

Post by pinkcore »

Best way is to make XML file with coordinates of mobs and make the map stable without MySQL connection.
I'm not here only for food!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: MOB MAP

Post by jurchiks »

IMHO best way is to store them in memory... like a Map in Java. OFC, on website host, not game server.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
morfiuz
Posts: 90
Joined: Sun Sep 19, 2010 5:45 pm
Location: Brasil

Re: MOB MAP

Post 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
User avatar
pinkcore
Posts: 247
Joined: Fri Jul 24, 2009 3:04 am
Location: Czech Republic

Re: MOB MAP

Post by pinkcore »

I think this map is very small, and you need to calculate coordinates to image's resolution...
I'm not here only for food!
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: MOB MAP

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
User avatar
morfiuz
Posts: 90
Joined: Sun Sep 19, 2010 5:45 pm
Location: Brasil

Re: MOB MAP

Post 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
User avatar
tukune
Posts: 533
Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan

Re: MOB MAP

Post 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.'">';}
_DS_
L2j Veteran
L2j Veteran
Posts: 3437
Joined: Wed Apr 30, 2008 8:53 am
Location: Russia

Re: MOB MAP

Post by _DS_ »

[quote="morfiuz"][/quote]
Remove server advertising from your signature please, its against forum rules.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: MOB MAP

Post 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
Post Reply