Thread Tools Display Modes
05-28-21, 12:10 AM   #1
Jynks
A Frostmaul Preserver
Join Date: Oct 2006
Posts: 264
Can you macro a way to add map pin?

Can you make a macro to add a map pin?
  Reply With Quote
05-28-21, 06:33 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
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.
  Reply With Quote
01-09-22, 03:29 AM   #3
wownpc
A Kobold Labourer
Join Date: Jan 2022
Posts: 1
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.
  Reply With Quote
01-09-22, 10:31 AM   #4
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Not possible. Only your position is available in the API.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Can you macro a way to add map pin?

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