Location Macros

I’ve only found one working macro that calls out location information in General Chat and it requires the TomTom addon. The macro was kinda helpful but put a decimal in front of the x and y coordinates which some found confusing. It took awhile cause i don’t know LUA but i fixed it with trial and error. I’ve made two versions with it. I thought others might find them useful.

The first version calls out War Crate locations:

/run local m,x,y = TomTom:GetCurrentPlayerPosition(); SendChatMessage(string.format(“WAR CRATE up at %.0f %.0f”,x100,y100),“CHANNEL”,nil,“1”);

The second will put the name of whatever or whoever I’m targeting with the coordinate info:

/run local m,x,y = TomTom:GetCurrentPlayerPosition(); SendChatMessage(string.format("%%t is at %.0f %.0f",x100,y100),“CHANNEL”,nil,“1”);

If anyone knows of a way to make a similar macro without using TomTom or another addon I’d love to know.

Enjoy

Here is an example without a decimal

/run local m = C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit("player"), "player"); SendChatMessage(format("%%t is at %d, %d", m.x*100, m.y*100), "CHANNEL", nil, 1)

https://wow.gamepedia.com/API_C_Map.GetPlayerMapPosition

But in a few weeks time this will be obsoleted by the new map pins anyway

1 Like

You rock! Thank you

https://www.curseforge.com/wow/addons/macro-talk

/1 %T %Thp - %sz (%loc)

TargetName TargetHP - SubZone (Coords)

Thank you Elvenbane. You actually answered another one of my questions regarding how to add conditionals to chat macros.

1 Like