Thread Tools Display Modes
06-17-22, 04:55 AM   #1
Yukka
A Theradrim Guardian
 
Yukka's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 60
Macro: Share enemy name, faction & position with map pin in chat

Hi, I'd like to share my enemy position in the chat when he invades my city. Something that says "Target name (HORDE) [map pin]"

So I already found 2 macros that send rare creatures position in the chat, I tryed to use some parts to make a new macro but I lack knowledge so I need your help.

Here the 2 macros I'm talking about:

/run a=UnitName('target');b=C_Map.GetPlayerMapPosition(C_Map.GetBestMapForUnit('player'),'player');SendChatMessage(a..' RARE '..floor(b.x*100)..' '..floor(b.y*100)..' : '..floor(UnitHealth('target')/UnitHealthMax('target')*100)..'%','CHANNEL',nil,1);
This one says "Target name RARE coordinates : life%"
Exemple: Pig RARE 54 21 : 100%

/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..' : '..b.GetUserWaypointHyperlink(),'CHANNEL',c,1);b.ClearUserWaypoint()
This one says "Target name : [map pin]"
Exemple: Pig : [map pin]

I already wrote the following but I need your help for the map pin thing...
/run a=UnitName('target');SendChatMessage(a..' (HORDE) ','CHANNEL',nil,1);

Last edited by Yukka : 06-17-22 at 06:22 PM.
  Reply With Quote
06-17-22, 03:41 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
/run local u,c,t,m="player",C_Map,UnitName("target")m=c.GetBestMapForUnit(u)c.SetUserWaypoint(UiMapPoint.CreateFromVector2D(m,c.GetPlayerMapPosition(m,u)))SendChatMessage(t.." (HORDE) "..c.GetUserWaypointHyperlink(),'CHANNEL',nil,1)c.ClearUserWaypoint()
There you go, 254 characters.
  Reply With Quote
06-17-22, 06:10 PM   #3
Yukka
A Theradrim Guardian
 
Yukka's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 60
Amazing, thanks a lot

*goes on patrol*
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Macro: Share enemy name, faction & position with map pin in chat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off