Page 1 of 1

MapLoc

Posted: Sun Apr 10, 2016 3:11 pm
by JudgeD
Had some vacation time and decided to work on a feature I've been wanting.

I do lots of random quests and use Alla a lot, and many times it's like "find such and such at loc -2148, 1860" and I have no idea where tf that is.

So I added new commands: /maploc and /clearloc (where [ ] items are optional)

/maploc
Usage: /maploc [[size 10-200] | [width 1-10] | [color r g b] | [yloc xloc]]
This adds a red X marker on your map at the y,x location.
Size = length of each line of the X from the middle point
Width = adds 1 extra line to each side of the cardinal line to make it appear thicker.
Color = pretty obvious.

Supplying only a location will create the marker using your ini's default settings.

Supplying Size / width / Color without supplying a location will update your map's ini file with new default values.

Supplying Size / width / Color with a location will give that location unique settings without updating your default ini settings.

So, if you have 3 X's using default settings, and 2 other X's with their own unique settings, then updating the default settings will only reflect changes to the 3 X's that were already using the defaults.


/clearloc
Usage: /clearloc [yloc xloc]

If used without supplying a location, it removes all current MapLocs.
If used with a location, it removes only that MapLoc.


For both of these commands, I made them pretty smart about the values passed in. You can supply multiple options in any order Also if you try to give a string to an int, it will reject it instead of setting the value to 0. I also updated /highlight to have the same enhanced detection and constraint checking.


Please let me know what you think. I had to learn some new C++ to do this, so if there's code improvements please teach me. I've used it for awhile now and find it pretty helpful for my daily grind. Makes it easy to copy / paste into the map from Alla guides. Also the files I'm including also include the /mapactivelayer command I added recently and mentioned in another thread.

Re: MapLoc

Posted: Sun Apr 10, 2016 3:12 pm
by JudgeD
removed source in favor of file attachments in original post.

Re: MapLoc

Posted: Sun Apr 10, 2016 10:03 pm
by JudgeD
/bump, I made some tweaks and read up on better ways to handle pointer deletion from maps, and so far no crashes. Please try it out and let me know what you think.

I didn't want to scare anyone away from trying this out :)

Re: MapLoc

Posted: Fri May 20, 2016 11:24 am
by Wink-
Thanks JudgeD. This is a great feature!

Re: MapLoc

Posted: Sat Aug 13, 2016 11:12 pm
by JudgeD
Wink- wrote:Thanks JudgeD. This is a great feature!
Thanks!

This has now been merged with EqMule's latest MQ2Map changes. The attachments on the original post are updated for easy download.

The plugin seems stable and I've been using it since the original post. The only outstanding issue is that the plugin fails to load on entering the game, but doing "/plugin mq2map" after entering the game works just fine. Any help appreciated on that bug, I'll attempt to figure it out though not promising anything :/.

Re: MapLoc

Posted: Sun Aug 28, 2016 8:32 pm
by dewey2461
Nice utility for doing quests where you are looking to find things by location.

Fixed pre-mature pointer referencing :oops:

Re: MapLoc

Posted: Sun Aug 28, 2016 8:46 pm
by JudgeD
Awesome, now bug free thanks Dewey! Updated my attachment in the original post

Re: MapLoc

Posted: Fri Sep 30, 2016 11:29 pm
by JudgeD
Fixed a bug in current live map version where /high pulse, is set to the wrong default size upon plugin initialization. (was fixable by turning pulse off and back on) Should look a little cleaner now.

Any chance for these new features to be added to vanilla map? Attached files include:

1) Maploc / clearloc commands
2) mapactivelayer command (sets which layer map is active on)
3) /high command is more intelligent about valid arguments
4) pulse fix

Re: MapLoc

Posted: Sat Oct 01, 2016 2:10 pm
by EqMule
Get with me on skype and send the files there, it's the fastest way to get me to include stuff.
Skypechat address is EQ.MULE