Map Pins - Super Useful Macro from Reddit!

So I wanted to share a very useful macro from /u/Grayvves on the WoW reddit found over in this post. The macro itself is posted below.

What this macro basically does is, when you are targeting a creature and use this macro it will say "[Target Name] at [Map Pin Location] in /1. This macro is useful for sharing in general chat where the location of a rare elite is, like Rustfeather for example, using the new Map Pin system instead of using co-ordinate mods.

/run a=UnitName('target');b=C_Map;c='player';d=b.GetBestMapForUnit(c);e=b.GetPlayerMapPosition(d,c);b.SetUserWaypoint(UiMapPoint.CreateFromCoordinates(d,e.x,e.y));SendChatMessage(a..' at '..b.GetUserWaypointHyperlink(),'CHANNEL',_,1);b.ClearUserWaypoint()

Anyway, this is a very useful macro and I thought it would be worth sharing with everyone. All credit goes to Grayvves of reddit for making this super helpful macro and some how, the mad lad, fitting it within the 255 character limit macros are allotted.

Edit: Changed how the macro was linked, the forums was auto transforming ( c ) into the copyright symbol (c). If you copied the old quote of the macro try the new one instead, sorry for the fail quote. Honestly, it would be great if there was an easier way to go about this through some kind of macro call like ā€œ/MapPin @Targetā€ or something. I am sure someone will eventually make an addon for sending messages with more info like mob health% and stuff but until then there is at least this macro made by Grayvves :slight_smile:

Edit 2: Apparently some alliance players are having issues with this macro and one of the comments said that this worked if its not working on Alliance.

/run a=UnitName('target');b=C_Map;c='player';d=b.GetBestMapForUnit(c);e=b.GetPlayerMapPosition(d,c);b.SetUserWaypoint(UiMapPoint.CreateFromCoordinates(d,e.x,e.y));SendChatMessage(a..' at '..b.GetUserWaypointHyperlink(),'CHANNEL',c,1);b.ClearUserWaypoint()

So if the first one does not work on your Alliance toon then give the second one a try.

15 Likes

Super useful macro is super useful indeed. Just gave it a go and it works perfectly. :round_pushpin:
Thanks for sharing, dude. :green_heart:

2 Likes

Awesome!!! I’ll be sure to share this with my guild. You rock!

1 Like

My pleasure, Lull! Happy to shine a light on this macro and maybe help a few people out!

Happy to share it with yall, really though all credit should go to Grayvves on reddit with his original post and having made the macro. I just wanted to share it here because its very useful and I know not everyone visits the WoW subreddit :blush:

This is wonderful, I looked for this ages ago but came up with nothing, I normally use a macro to call rares out with hp, co ords and target name ā€œMacro talkā€ adds additional commands, my macro was

/1 %t is up at %loc (%sz) with %thp health.

It worked well, %loc is co ords, %sz is subzone %thp is target health percentage, Using Macro talk and Macro toolkit (to extend macros past 255 characters).

I was able to combine the 2, now it says in general ā€œTarget name is up with target health at 23.4 53.2 (subzone) [map pin]ā€

It’s a bit of a dodgey workaround but I don’t like using auto announcing addons I’d rather have to click a macro (pointless announcing something that’s almost dead) You can change where it says ’ at’ to any text you’d like.

/run a=UnitName('target');b=C_Map;c='player';d=b.GetBestMapForUnit(c);e=b.GetPlayerMapPosition(d,c);b.SetUserWaypoint(UiMapPoint.CreateFromCoordinates(d,e.x,e.y));SendChatMessage(a..' is up with %thp health at %loc (%sz) - '..b.GetUserWaypointHyperlink(),'CHANNEL',c,1);b.ClearUserWaypoint()

Hope this helps.

Edit: Here’s what it looks like ingame: https://imgur.com/a/Tc5yJLQ

The blue brackets for the normal co ords are added by tompoints (that turns co ords into clickable links to auto place a waypoint, also super handy)
Addons used to get my version of the script working as intended: Macro talk (to add additional commands like health and co ords) and Macro Toolkit (to extend the macro limit past 255 - just open your macro options like normal and click ā€˜toolkit’ then ā€˜extend’ and your macro can be 1000 characters long)

2 Likes

Okay, well I must of derped and missed the update for Macro talk, there is now a %wp command which adds pins, so I can just use my original macro and add a %wp command to it, makes things much neater and easier.

/1 %t is up with %thp at %loc (%sz) %wp

Edit: This will also make things much easier if I’m camping a rare and someone asks what one is next, can just type %wp in general and it’ll create and link the pin at my location, even more win! haha

1 Like

Tag for when I can get into the game.

Awesome stuff. Thank you!

the %wp is part of macro-talk addon so make sure you have that. Also it wont work if you have a current marker so clear it first:

/run C_Map.ClearUserWaypoint()
/1 %t (%thp) - %wp (%loc)
2 Likes