WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Can you macro a way to add map pin? (https://www.wowinterface.com/forums/showthread.php?t=58767)

Jynks 05-28-21 12:10 AM

Can you macro a way to add map pin?
 
Can you make a macro to add a map pin?

Kanegasi 05-28-21 06:33 AM

Code:

/run local c,p,t,m=C_Map,"player","target" m=c.GetBestMapForUnit(p)c.SetUserWaypoint({position=c.GetPlayerMapPosition(m,p),uiMapID=m})SendChatMessage("%t "..floor((UnitHealth(t)/UnitHealthMax(t))*100).."% "..c.GetUserWaypointHyperlink(),"CHANNEL",nil,1)
This macro will create a waypoint at your location and share it, along with your target's name and health percentage, to the General channel. Delete SendChatMessage and everything after it if you just want the waypoint creation.

wownpc 01-09-22 03:29 AM

Amazing macro! Is there also a way to pin my targets location instead of mine? Often i need to pin a targets location from a distance.

Kanegasi 01-09-22 10:31 AM

Not possible. Only your position is available in the API.


All times are GMT -6. The time now is 02:42 AM.

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