Page 1 of 1

BUG: /face

Posted: Sun Oct 05, 2003 2:30 pm
by MacroFiend
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]

Posted: Sun Oct 05, 2003 4:37 pm
by Plazmic
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]

Posted: Sun Oct 05, 2003 4:56 pm
by MacroFiend
Either way works for me :)

Posted: Sun Oct 05, 2003 4:58 pm
by Plazmic
I have a set of changes that I'll submit soon... this will be in CVS today.

Posted: Sun Oct 05, 2003 6:44 pm
by Random()
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.

Posted: Sun Oct 05, 2003 7:38 pm
by MacroFiend
If you mean like ground spawn items or drops, you can use /itemtarget and then $distance(item) or $ground(distance)

Posted: Mon Oct 06, 2003 6:52 am
by Random()
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.

Posted: Mon Oct 06, 2003 10:41 am
by Plazmic
/if n $spawn(@MasterID,distance)>20 /call MoveRoutine

Posted: Mon Oct 06, 2003 2:11 pm
by Jaerin
Unless you're doing a face to each of the targets you should have nothing to worry about.

Jaerin

Posted: Mon Oct 06, 2003 4:10 pm
by Random()
Bugger. I think I knew that but for some reason it wasn't clicking. Thanks Plaz.