Targeting

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

tadaka
orc pawn
orc pawn
Posts: 18
Joined: Thu Sep 02, 2004 11:20 pm

Targeting

Post by tadaka » Thu Nov 18, 2004 11:43 pm

Im trying to figure out how to target what ever is close to me that I can cast on. Every thing I try ends up with targeting mobs behind walls and such any help would be great thanks.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Fri Nov 19, 2004 12:04 am

F8? :roll:

or

/keypress f8

from within a macro.

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Fri Nov 19, 2004 9:12 am

You could create an event when you get the line of sight message, then take that mob's spawn id out of your targeting array.

-j

User avatar
blueninja
a grimling bloodguard
a grimling bloodguard
Posts: 541
Joined: Thu Aug 28, 2003 7:03 am
Location: Göteborg, Sweden

Post by blueninja » Fri Nov 19, 2004 10:26 am

Spawn.LineOfSight

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Fri Nov 19, 2004 11:00 am

That's how I ended up doing it in my Assist healing portion of my druid mac. Feel free to butcher it to your liking. I'm not sure if there's a way to check LoS without actually targetting the mob.

Code: Select all

/varset NPCsInRange ${SpawnCount[npc radius 200 zradius 20]} 
/for index ${NPCsInRange} downto 1 
/if (${index}<=0) /goto :HealCycle 
/varset NPCArray[${index}] ${NearestSpawn[${index}, npc].ID} 
/next index 
/for index ${NPCsInRange} downto 1 
/squelch /target id ${NPCArray[${index}]} 
/if (${Target.LineOfSight}) { 
  /assist 
  /delay 5 
  /call ShouldIHeal 
} 
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]









xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Targeting

Post by xyilla » Fri Jan 02, 2026 10:38 pm