BUG: /face

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

BUG: /face

Post by MacroFiend » Sun Oct 05, 2003 2:30 pm

If you are trying to face a non-target'ed item (aside from heading) and have something as your target, you will face your target and not what you intended.

To fix this add:

Code: Select all

[color=red]
	if (!bOtherArgs) {
		if [/color]([color=red](EQADDR_TARGET && *EQADDR_TARGET) [/color]&& (!pSpawnClosest)) [color=red]{
			pSpawnClosest = *EQADDR_TARGET;
		}
	} else {
[/color]

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Oct 05, 2003 4:37 pm

Cleaner(?) fix:

Code: Select all

[color=red]	if (!pSpawnClosest) {[/color]
		if (!bOtherArgs) {
			if (EQADDR_TARGET && *EQADDR_TARGET) {
				pSpawnClosest = *EQADDR_TARGET;
			}
		} else {
			[color=red]/* removed: if (!pSpawnClosest) */[/color]
			pSpawnClosest = SearchThroughSpawns(&SearchSpawn,pChar);
		}
[color=red]	}[/color]
- Plazmic

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Post by MacroFiend » Sun Oct 05, 2003 4:56 pm

Either way works for me :)

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Sun Oct 05, 2003 4:58 pm

I have a set of changes that I'll submit soon... this will be in CVS today.
- Plazmic

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Sun Oct 05, 2003 6:44 pm

Semi-related: Is there any way to get the NPC/PC struct for a non-targetted item? Would occasionally be nice to check $target(distance) of objects not targetted. Guessing it'd have to be done by ID, which would be fine.

MacroFiend
a grimling bloodguard
a grimling bloodguard
Posts: 662
Joined: Mon Jul 28, 2003 2:47 am

Post by MacroFiend » Sun Oct 05, 2003 7:38 pm

If you mean like ground spawn items or drops, you can use /itemtarget and then $distance(item) or $ground(distance)

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Mon Oct 06, 2003 6:52 am

No, the usage would be to clean up some of my leashing macros while waiting for the puller to drag something back (ie, wait for puller to call move up or stay put for inc).

In pseudocode I'd like to move from:

:top
target master
if master distance > 20 then call move routines
else
assist puller
if target hp,pct < hptoassist then call fight
goto :top

to just:

if master distance > 20 then call move routines
else
<you get the idea>


...Just the target flopping looks abnormal on the screen, and we all know we need a measure of caution when using macros even if they are attended.

I honestly don't know if that could be done, but it seems plausable that the distance of the master's ID should be able to be pulled without a target thrown in.

Anyway, just an idea for the masters.

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Mon Oct 06, 2003 10:41 am

/if n $spawn(@MasterID,distance)>20 /call MoveRoutine
- Plazmic

Jaerin
Developer
Developer
Posts: 133
Joined: Mon Mar 10, 2003 7:37 pm
Contact:

Post by Jaerin » Mon Oct 06, 2003 2:11 pm

Unless you're doing a face to each of the targets you should have nothing to worry about.

Jaerin

Random()
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Aug 29, 2003 11:31 am

Post by Random() » Mon Oct 06, 2003 4:10 pm

Bugger. I think I knew that but for some reason it wasn't clicking. Thanks Plaz.