Post
by JudgeD » Sun Apr 10, 2016 3:11 pm
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.
-
Attachments
-
- MQ2Map.cpp
- (17.67 KiB) Downloaded 60 times
-
- MQ2MapCommands.cpp
- (23.61 KiB) Downloaded 49 times
-
- MQ2MapAPI.cpp
- (42.98 KiB) Downloaded 45 times
-
- MQ2Map.h
- (4.6 KiB) Downloaded 44 times
Last edited by
JudgeD on Fri Sep 30, 2016 11:27 pm, edited 11 times in total.