WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Macro: Share enemy name, faction & position with map pin in chat (https://www.wowinterface.com/forums/showthread.php?t=59151)

Yukka 06-17-22 04:55 AM

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:

Quote:

/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%

Quote:

/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...
Quote:

/run a=UnitName('target');SendChatMessage(a..' (HORDE) ','CHANNEL',nil,1);

Kanegasi 06-17-22 03:41 PM

Quote:

/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.

Yukka 06-17-22 06:10 PM

Amazing, thanks a lot :)

*goes on patrol*


All times are GMT -6. The time now is 04:53 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI