Many questions - mainly macro performance with math functs.

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Many questions - mainly macro performance with math functs.

Post by SlimFastForYou » Tue Sep 14, 2004 3:56 am

Hi everyone...

(long post.. most of the info provided for context.. you can skip down if you want :) )

I have written an autopull macro. It works almost perfectly but it does a LOT of math calculations (takes 4-8 seconds to make a decision... ugh). I'll throw the logic behind it and the code out there, and maybe some of you could suggestions on how to shave off valuable seconds. I am actually debating on whether to develop a custom plugin for this macro and outsource some of the work (I'm assuming native C++ is much faster than the macro language for some of the complicated math functions). The warrior's box has a p4 2.0 ghz CPU with 512 MB RAM.

The assumptions:
Full group with cleric, slower, etc. This macro is for a warrior pulling in a zone with wandering mobs (the point of this include file is to pull without adds, not simply /target.. duh ;P )

The progress:
Last night the macro worked for about 130 kills untouched (before I shut it down to log off). Still some minor bugs, but whenever our warrior gets adds its usually because he isn't calculating fast enough. Today I started it and it pulled 24 before it messed up (he was running to a far away mob and didn't realize mobs were crossing his path soon enough).

Overview of Logic:
The macro basically consideres the nearest 10 npcs as candidates to pull, starting with nearest first. It consideres the 15 nearest npcs mobs that might add, and checks the current candidate for pulling against the 15 closest npcs.

Detail of logic:
An EvaluateDistance subroutine (messy to write the distance formula in MQ2 in one line) sees if ${NearestSpawn[candidate, npc nopcnear]} is within the specified aggro range of ${NearestSpawn[checkmob, npc]}.

So far however, we have overlooked the fact that there might be mobs in the way of our candidate (since the macro decided that there were 2 mobs too close together). So while going to pull the "single mob", the warrior gets two in addition to the one he's pulling.

My solution is once I find a candidate that wont have adds around it, I plot a line of 15 coordinates in a path from the warrior to the NPC. Then I do the distance formula from each coordinate to all 15 nearest mobs (remember, candidate is the value with nopcnear factored in - checkmob is all mobs). If all is good, he targets that mob, runs to it, gets in bowing distance, and shoots (but that's not the problem and all im posting at this point is the acquiretarget.inc).

As you all probably know, 4-8 seconds is practically an eternity in computer time. On simple pulls, it's not so bad, but the more candidates he has to evaluate the longer it takes (and he has to keep checking to make sure everything is still OK and a mob hasn't pathed in a bad spot).

The question:
I used to always reference by ${NearestSpawn[x,npc nopcnear]} throughout the code. By changing it to ${NearestSpawn[id X]} and setting the ID at the start of the loop I improved the performance somewhat (I think).

Should I go a further step and set variables of type spawn (I think I can do that)? Does doing NearestSpawn[id X] cause MQ to do a somewhat expensive lookup similar to what i'm assuming NearestSpawn[N,npc nopcnear] does?

Might the fact that every distance calculation requires a square root to be taken be holding things up? Here's my current EvaluateDistance sub. Would changing EvaluatedDistance to an int make a huge difference when calculating the square root, or does the square root function always calculate a few decimal places? Remember, c^2 = a^2+b^2... c = sqrt(a^2+b^2).

Code: Select all

Sub EvaluateDistance(int y1, int x1, int y2, int x2)
	/declare EvaluatedDistance float local
	/declare ASquared ${Math.Calc[${Math.Calc[${y1}-${y2}]}*${Math.Calc[${y1}-${y2}]}]}
	/declare BSquared ${Math.Calc[${Math.Calc[${x1}-${x2}]}*${Math.Calc[${x1}-${x2}]}]}
	/varset EvaluatedDistance ${Math.Sqrt[${ASquared}+${BSquared}]}
/return ${EvaluatedDistance}
In general, should I simply use ints instead of floats? I suppose EQ coordinates don't need to be so precise, but hell for all I know using ints might make the square root calculations take slightly longer :roll:.

Lastly, does /echo and /mqlog hamper performance when dumping a lot of them to the log file/mq window? I'm probably going to get rid of some of the debugging info currently dumped to the screen/text file, but would I be better off putting text in a string and then writing to the log file at a later time (not sure how expensive /mqlog is with regards to disk access)?

The current code (yes its a little spaghetti coded; yes I am doing significant rewrites but the logic is all down there). Note, this will not run without other include files and a wrapper macro - to be released later =).

Code: Select all

|
| AcquireTarget will evaluate the distance between the closest
| X mobs and see if there is one that isn't too close to another mob
| Returns true if it found and targetted a valid spawn
|
| Also builds the array of ids of the nearest ${ClosestMobsToEvaluate} npcs
| This is later checked to see if mobs are moving around and if there is need
| to worry (return to anchor and reacquire target)
|
Sub AcquireTarget

	/for Candidate 1 to ${Math.Calc[${ClosestMobsToEvaluate}-3]}

		/if (${Candidate}!=1&&${NearestSpawn[npc nopcnear].Distance}<=${TooCloseDistance}) {

			/target clear

			/varset TargetToPull 0

			/return ${Bool[FALSE]}

		}

		/varset CannotPull ${Bool[FALSE]}
		/varset CandidateID ${NearestSpawn[${Candidate},npc nopcnear].ID}

		/call CheckSneaker

		/echo Evaluating the number ${Candidate} candidate (${NearestSpawn[id ${CandidateID}].Name})
		/mqlog Evaluating the number ${Candidate} candidate (${NearestSpawn[id ${CandidateID}].Name})

		/call CheckMobDistanceFromCandidate

		/if (!${CannotPull}&&${NearestSpawn[id ${CandidateID}].PctHPs}==100) {

			/if (${Candidate}==1) {

				/mqlog AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank ${NearestSpawn[id ${CandidateID}].Name}

				/varset TargetToPull ${NearestSpawn[id ${CandidateID}].ID}

				/target id ${TargetToPull}

				/return ${Bool[TRUE]}

			} else {

				/mqlog AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro

				/call CheckMobsInPathToCandidate

				/varset TargetToPull ${NearestSpawn[id ${CandidateID}].ID}

				/target id ${TargetToPull}

				/return ${Bool[TRUE]}

			}
		}

	/next Candidate
	/echo AquireTarget:  Returning ${Bool[FALSE]}
	/mqlog AquireTarget:  Returning ${Bool[FALSE]}

/return ${Bool[FALSE]}


Sub ComputePlane(int Numerator,int Divisor,float MeN,float MobN)

	/declare Difference float local

	/declare Answer float local

	/varset Difference ${Math.Calc[${MobN}-${MeN}]}

	/varset Answer ${Math.Calc[${Difference}*${Numerator}]}

/return ${Math.Calc[${Answer}/${Divisor}]}





Sub CheckSneaker

    /if (${Candidate}!=1&&${NearestSpawn[npc].Distance}<100) {
			/call EvaluateDistance ${Me.Y} ${Me.X} ${AnchorY} ${AnchorX}
			/if (${Macro.Return}<30) {
				/target npc
				/varset TargetToPull ${Target.ID}
				/call Engage
				/return ${Bool[TRUE]}
			}
			/echo AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
			/mqlog AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
			/return ${Bool[FALSE]}
		}

/return





Sub CheckMobDistanceFromCandidate

		/for CheckMob 1 to ${ClosestMobsToEvaluate}
			/varset CheckMobID ${NearestSpawn[${CheckMob},npc].ID}

			/if (${Candidate}!=${CheckMob}&&!${CannotPull}) {

				/call EvaluateDistance ${NearestSpawn[id ${CandidateID}].Y} ${NearestSpawn[id ${CandidateID}].X} ${NearestSpawn[id ${CheckMobID}].Y} ${NearestSpawn[id ${CheckMobID}].X}
				
				/varset TheDistance ${Macro.Return}
				
				/if (${TheDistance}<=${TooCloseDistance}) {

					/varset CannotPull ${Bool[TRUE]}

					/echo AcquireTarget: Cannot Pull ${NearestSpawn[id ${CandidateID}].Name}; ${NearestSpawn[id ${CheckMobID}].Name} will aggro

					/mqlog AcquireTarget: Cannot Pull ${NearestSpawn[id ${CandidateID}].Name}; ${NearestSpawn[id ${CheckMobID}].Name} will aggro

					/varset CheckMob ${ClosestMobsToEvaluate}

				}

			}

		/next CheckMob
		
/return


Sub CheckMobsInPathToCandidate

				/for CheckMob 1 to ${Math.Calc[${Candidate}-1]}

					/if (${NearestSpawn[${CheckMob},npc].ID}!=${NearestSpawn[id ${CandidateID}].ID}) /varset CheckMobID ${NearestSpawn[${CheckMob},npc].ID}

					/mqlog AcquireTarget: Seeing if ${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name}

					/echo AcquireTarget: Seeing if ${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name}

					/for LocCounter 1 to 15

						/call ComputePlane ${LocCounter} 15 ${Me.Y} ${NearestSpawn[id ${CheckMobID}].Y}

						/varset CheckY ${Macro.Return}

						/call ComputePlane ${LocCounter} 15 ${Me.X} ${NearestSpawn[id ${CheckMobID}].X}

						/varset CheckX ${Macro.Return}

						/call EvaluateDistance ${CheckY} ${CheckX} ${NearestSpawn[id ${CheckMobID}].Y} ${NearestSpawn[id ${CheckMobID}].X}

						/if (${Macro.Return}<${TooCloseDistance}) {

							/varset CannotPull ${Bool[TRUE]}

							/varset LocCounter 15

							/varset CheckMob ${Math.Calc[${Candidate}-1]}

							/echo AcquireTarget: KEIKAKU KEIKAKU!!!!   <<${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>>

							/mqlog AquireTarget: KEIKAKU KEIKAKU!!!!   <<${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>>  (compensating)

							/return ${Bool[FALSE]}

						}

					/next LocCounter

				/next CheckMob

				/if (${TargetToPull}!=0&&${Target.ID}!=${TargetToPull}) {

					/mqlog AcquireTarget... I'm not going to switch targets while im way the hell out there.
					/echo AcquireTarget... I'm not going to switch targets while im way the hell out there.

					/call ReturnToAnchor

					/varset TargetToPull 0

					/target clear

					/return ${Bool[FALSE]}

				}
				
/return
Here is some sample log output (from the entire macro, not just AcquireTarget. The entire kit and kaboodle isn't perfect so you may see glitches (such as ExperienceChecker messages) ):
Last 350 lines of the warrior macro log:

[09/13/2004 22:53:08] AcquireTarget: Cannot Pull a_virulent_arachnid16; a_virulent_arachnid04 will aggro
[09/13/2004 22:53:08] Evaluating the number 7 candidate (a_virulent_arachnid00)
[09/13/2004 22:53:08] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:53:08] AcquireTarget: Seeing if a_gnarled_treant04 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:09] AcquireTarget: Seeing if a_blood_raven05 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:10] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:10] AcquireTarget: Seeing if a_virulent_arachnid04 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:11] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:12] AcquireTarget: Seeing if a_virulent_arachnid16 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:12] RunToMob: Running to a_virulent_arachnid00
[09/13/2004 22:53:12] Evaluating the number 1 candidate (a_gnarled_treant04)
[09/13/2004 22:53:12] AcquireTarget: Cannot Pull a_gnarled_treant04; a_blood_raven05 will aggro
[09/13/2004 22:53:12] Evaluating the number 2 candidate (a_blood_raven05)
[09/13/2004 22:53:12] AcquireTarget: Cannot Pull a_blood_raven05; a_gnarled_treant04 will aggro
[09/13/2004 22:53:12] Evaluating the number 3 candidate (a_gnarled_treant10)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 22:53:13] Evaluating the number 4 candidate (a_virulent_arachnid04)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_virulent_arachnid04; a_virulent_arachnid16 will aggro
[09/13/2004 22:53:13] Evaluating the number 5 candidate (a_blood_raven00)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 22:53:13] Evaluating the number 6 candidate (a_virulent_arachnid16)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_virulent_arachnid16; a_virulent_arachnid04 will aggro
[09/13/2004 22:53:13] Evaluating the number 7 candidate (a_blood_raven04)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_blood_raven04; a_gnarled_treant13 will aggro
[09/13/2004 22:53:13] Evaluating the number 8 candidate (a_blood_raven11)
[09/13/2004 22:53:13] AcquireTarget: Cannot Pull a_blood_raven11; a_gnarled_treant10 will aggro
[09/13/2004 22:53:13] Evaluating the number 9 candidate (a_virulent_arachnid00)
[09/13/2004 22:53:14] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:53:14] AcquireTarget: Seeing if a_gnarled_treant04 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:14] AcquireTarget: Seeing if a_blood_raven05 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:15] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:16] AcquireTarget: Seeing if a_virulent_arachnid04 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:16] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:17] AcquireTarget: Seeing if a_blood_raven04 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:18] AcquireTarget: Seeing if a_blood_raven11 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:18] AcquireTarget: Seeing if a_virulent_arachnid16 will give problems when running to a_virulent_arachnid00
[09/13/2004 22:53:23] Evaluating the number 1 candidate (a_gnarled_treant04)
[09/13/2004 22:53:23] AcquireTarget: Cannot Pull a_gnarled_treant04; a_blood_raven05 will aggro
[09/13/2004 22:53:23] Evaluating the number 2 candidate (a_blood_raven05)
[09/13/2004 22:53:23] AcquireTarget: Cannot Pull a_blood_raven05; a_gnarled_treant04 will aggro
[09/13/2004 22:53:23] Evaluating the number 3 candidate (a_virulent_arachnid04)
[09/13/2004 22:53:24] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:53:24] AcquireTarget: Seeing if a_gnarled_treant04 will give problems when running to a_virulent_arachnid04
[09/13/2004 22:53:25] AcquireTarget: Seeing if a_blood_raven05 will give problems when running to a_virulent_arachnid04
[09/13/2004 22:53:30] Evaluating the number 1 candidate (a_gnarled_treant04)
[09/13/2004 22:53:30] AcquireTarget: Cannot Pull a_gnarled_treant04; a_blood_raven05 will aggro
[09/13/2004 22:53:30] Evaluating the number 2 candidate (a_blood_raven05)
[09/13/2004 22:53:30] AcquireTarget: Cannot Pull a_blood_raven05; a_gnarled_treant04 will aggro
[09/13/2004 22:53:30] Evaluating the number 3 candidate (a_virulent_arachnid04)
[09/13/2004 22:53:30] AcquireTarget: Cannot Pull a_virulent_arachnid04; a_gnarled_treant13 will aggro
[09/13/2004 22:53:30] Evaluating the number 4 candidate (a_gnarled_treant13)
[09/13/2004 22:53:30] AcquireTarget: Cannot Pull a_gnarled_treant13; a_virulent_arachnid04 will aggro
[09/13/2004 22:53:30] Evaluating the number 5 candidate (a_blood_raven04)
[09/13/2004 22:53:31] AcquireTarget: Cannot Pull a_blood_raven04; a_gnarled_treant13 will aggro
[09/13/2004 22:53:31] Evaluating the number 6 candidate (a_virulent_arachnid09)
[09/13/2004 22:53:31] AcquireTarget: Cannot Pull a_virulent_arachnid09; a_virulent_arachnid00 will aggro
[09/13/2004 22:53:31] Evaluating the number 7 candidate (a_virulent_arachnid08)
[09/13/2004 22:53:31] AcquireTarget: Cannot Pull a_virulent_arachnid08; a_blood_raven04 will aggro
[09/13/2004 22:53:31] Evaluating the number 8 candidate (a_virulent_arachnid16)
[09/13/2004 22:53:31] AcquireTarget: Cannot Pull a_virulent_arachnid16; a_gnarled_treant01 will aggro
[09/13/2004 22:53:31] Evaluating the number 9 candidate (a_gnarled_treant10)
[09/13/2004 22:53:32] AcquireTarget: Cannot Pull a_gnarled_treant10; a_gnarled_treant10 will aggro
[09/13/2004 22:53:32] Evaluating the number 10 candidate (a_blood_raven01)
[09/13/2004 22:53:32] AcquireTarget: Cannot Pull a_blood_raven01; a_blood_raven14 will aggro
[09/13/2004 22:53:32] Evaluating the number 11 candidate (a_virulent_arachnid00)
[09/13/2004 22:53:32] AcquireTarget: Cannot Pull a_virulent_arachnid00; a_virulent_arachnid09 will aggro
[09/13/2004 22:53:32] Evaluating the number 12 candidate (a_gnarled_treant01)
[09/13/2004 22:53:33] AcquireTarget: Cannot Pull a_gnarled_treant01; a_virulent_arachnid16 will aggro
[09/13/2004 22:53:33] AquireTarget: Returning FALSE
[09/13/2004 22:53:33] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:54:11] Evaluating the number 1 candidate (a_blood_raven05)
[09/13/2004 22:54:12] AcquireTarget: Cannot Pull a_blood_raven05; a_virulent_arachnid08 will aggro
[09/13/2004 22:54:12] Evaluating the number 2 candidate (a_gnarled_treant10)
[09/13/2004 22:54:12] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 22:54:12] Evaluating the number 3 candidate (a_virulent_arachnid08)
[09/13/2004 22:54:12] AcquireTarget: Cannot Pull a_virulent_arachnid08; a_blood_raven05 will aggro
[09/13/2004 22:54:12] Evaluating the number 4 candidate (a_gnarled_treant13)
[09/13/2004 22:54:12] AcquireTarget: Cannot Pull a_gnarled_treant13; a_blood_raven05 will aggro
[09/13/2004 22:54:12] Evaluating the number 5 candidate (an_ethereal_banshee00)
[09/13/2004 22:54:12] AcquireTarget: Cannot Pull an_ethereal_banshee00; a_virulent_arachnid04 will aggro
[09/13/2004 22:54:12] Evaluating the number 6 candidate (a_blood_raven00)
[09/13/2004 22:54:13] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 22:54:13] Evaluating the number 7 candidate (a_virulent_arachnid04)
[09/13/2004 22:54:13] AcquireTarget: Cannot Pull a_virulent_arachnid04; an_ethereal_banshee00 will aggro
[09/13/2004 22:54:13] Evaluating the number 8 candidate (a_virulent_arachnid14)
[09/13/2004 22:54:13] AcquireTarget: Cannot Pull a_virulent_arachnid14; an_ethereal_banshee00 will aggro
[09/13/2004 22:54:13] Evaluating the number 9 candidate (a_blood_raven04)
[09/13/2004 22:54:13] AcquireTarget: Cannot Pull a_blood_raven04; an_ethereal_banshee00 will aggro
[09/13/2004 22:54:13] Evaluating the number 10 candidate (a_virulent_arachnid13)
[09/13/2004 22:54:13] AcquireTarget: Cannot Pull a_virulent_arachnid13; a_virulent_arachnid14 will aggro
[09/13/2004 22:54:14] Evaluating the number 11 candidate (a_blood_raven11)
[09/13/2004 22:54:14] AcquireTarget: Cannot Pull a_blood_raven11; a_gnarled_treant10 will aggro
[09/13/2004 22:54:14] Evaluating the number 12 candidate (a_virulent_arachnid01)
[09/13/2004 22:54:14] AcquireTarget: Cannot Pull a_virulent_arachnid01; a_virulent_arachnid04 will aggro
[09/13/2004 22:54:14] AquireTarget: Returning FALSE
[09/13/2004 22:54:14] Evaluating the number 1 candidate (a_blood_raven05)
[09/13/2004 22:54:14] AcquireTarget: Cannot Pull a_blood_raven05; a_virulent_arachnid08 will aggro
[09/13/2004 22:54:14] Evaluating the number 2 candidate (a_gnarled_treant10)
[09/13/2004 22:54:14] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 22:54:14] Evaluating the number 3 candidate (a_virulent_arachnid08)
[09/13/2004 22:54:14] AcquireTarget: Cannot Pull a_virulent_arachnid08; a_blood_raven05 will aggro
[09/13/2004 22:54:15] Evaluating the number 4 candidate (a_gnarled_treant13)
[09/13/2004 22:54:15] AcquireTarget: Cannot Pull a_gnarled_treant13; a_blood_raven05 will aggro
[09/13/2004 22:54:15] Evaluating the number 5 candidate (an_ethereal_banshee00)
[09/13/2004 22:54:15] AcquireTarget: Cannot Pull an_ethereal_banshee00; a_virulent_arachnid14 will aggro
[09/13/2004 22:54:15] Evaluating the number 6 candidate (a_blood_raven00)
[09/13/2004 22:54:15] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 22:54:15] Evaluating the number 7 candidate (a_virulent_arachnid14)
[09/13/2004 22:54:15] AcquireTarget: Cannot Pull a_virulent_arachnid14; an_ethereal_banshee00 will aggro
[09/13/2004 22:54:15] Evaluating the number 8 candidate (a_blood_raven04)
[09/13/2004 22:54:15] AcquireTarget: Cannot Pull a_blood_raven04; an_ethereal_banshee00 will aggro
[09/13/2004 22:54:15] Evaluating the number 9 candidate (a_virulent_arachnid13)
[09/13/2004 22:54:16] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:54:16] AcquireTarget: Seeing if a_blood_raven05 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:17] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:18] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:19] AcquireTarget: Seeing if a_virulent_arachnid08 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:20] AcquireTarget: Seeing if a_gnarled_treant13 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:21] AcquireTarget: Seeing if a_virulent_arachnid01 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:22] AcquireTarget: Seeing if an_ethereal_banshee00 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:23] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_virulent_arachnid13
[09/13/2004 22:54:25] RunToMob: Running to a_virulent_arachnid13
[09/13/2004 22:54:25] Evaluating the number 1 candidate (a_gnarled_treant02)
[09/13/2004 22:54:25] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_gnarled_treant02
[09/13/2004 22:54:29] Evaluating the number 1 candidate (a_gnarled_treant02)
[09/13/2004 22:54:30] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_gnarled_treant02
[09/13/2004 22:54:32] CheckMatrix: There has been a change in the matrix!
[09/13/2004 22:54:32] Evaluating the number 1 candidate (a_gnarled_treant02)
[09/13/2004 22:54:33] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_gnarled_treant02
[09/13/2004 22:54:33] PlinkMob: Shooting an arrow at a_gnarled_treant02 (53 Warrior)
[09/13/2004 22:54:34] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:54:46] Returning to Anchor to avoid adds.
[09/13/2004 22:54:46] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:54:49] Evaluating the number 1 candidate (a_virulent_arachnid01)
[09/13/2004 22:54:49] AcquireTarget: Cannot Pull a_virulent_arachnid01; a_virulent_arachnid01 will aggro
[09/13/2004 22:54:50] Engage: Attacking a_gnarled_treant02
[09/13/2004 22:56:59] Evaluating the number 2 candidate (a_blood_raven05)
[09/13/2004 22:57:00] AcquireTarget: Cannot Pull a_blood_raven05; a_blood_raven05 will aggro
[09/13/2004 22:57:00] Evaluating the number 3 candidate (a_virulent_arachnid07)
[09/13/2004 22:57:00] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:57:00] AcquireTarget: Seeing if a_blood_raven05 will give problems when running to a_virulent_arachnid07
[09/13/2004 22:57:01] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid07
[09/13/2004 22:57:02] AcquireTarget... I'm not going to switch targets while im way the hell out there.
[09/13/2004 22:57:02] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:57:05] RunToMob: Running to a_virulent_arachnid07
[09/13/2004 22:57:05] Evaluating the number 1 candidate (a_blood_raven05)
[09/13/2004 22:57:06] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven05
[09/13/2004 22:57:10] Evaluating the number 1 candidate (a_blood_raven05)
[09/13/2004 22:57:10] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven05
[09/13/2004 22:57:14] CheckMatrix: There has been a change in the matrix!
[09/13/2004 22:57:14] Evaluating the number 1 candidate (a_blood_raven05)
[09/13/2004 22:57:15] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven05
[09/13/2004 22:57:15] PlinkMob: Shooting an arrow at a_blood_raven05 (52 Warrior)
[09/13/2004 22:57:16] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:57:31] Engage: Attacking a_blood_raven05
[09/13/2004 22:59:27] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:59:29] ExperienceChecker: Made 0.91% XP (8.19% XP in 21)
[09/13/2004 22:59:29] ExperienceChecker: No noticeable experience =/
[09/13/2004 22:59:29] ExperienceChecker: Made 0.00% XP (8.19% XP in 22)
[09/13/2004 22:59:35] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 22:59:35] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 22:59:35] Evaluating the number 2 candidate (a_blood_raven08)
[09/13/2004 22:59:36] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:59:36] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven08
[09/13/2004 22:59:37] AcquireTarget... I'm not going to switch targets while im way the hell out there.
[09/13/2004 22:59:37] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 22:59:38] RunToMob: Running to a_blood_raven08
[09/13/2004 22:59:38] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 22:59:38] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 22:59:38] Evaluating the number 2 candidate (a_blood_raven08)
[09/13/2004 22:59:39] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 22:59:39] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven08
[09/13/2004 22:59:43] Evaluating the number 1 candidate (a_blood_raven08)
[09/13/2004 22:59:44] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven08
[09/13/2004 22:59:48] Evaluating the number 1 candidate (a_blood_raven08)
[09/13/2004 22:59:48] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven08
[09/13/2004 22:59:49] CheckMatrix: There has been a change in the matrix!
[09/13/2004 22:59:50] Evaluating the number 1 candidate (a_blood_raven08)
[09/13/2004 22:59:50] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_blood_raven08
[09/13/2004 22:59:50] PlinkMob: Shooting an arrow at a_blood_raven08 (52 Warrior)
[09/13/2004 22:59:51] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:00:08] Engage: Attacking a_blood_raven08
[09/13/2004 23:01:54] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:01:57] ExperienceChecker: Made 0.30% XP (8.49% XP in 23)
[09/13/2004 23:01:57] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 23:01:57] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:01:57] Evaluating the number 2 candidate (a_virulent_arachnid08)
[09/13/2004 23:01:58] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro

[09/13/2004 23:01:58] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid08
[09/13/2004 23:01:59] AcquireTarget... I'm not going to switch targets while im way the hell out there.
[09/13/2004 23:01:59] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:01:59] RunToMob: Running to a_virulent_arachnid08
[09/13/2004 23:01:59] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 23:01:59] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:01:59] Evaluating the number 2 candidate (a_virulent_arachnid08)
[09/13/2004 23:02:00] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:02:00] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_virulent_arachnid08
[09/13/2004 23:02:04] Evaluating the number 1 candidate (a_virulent_arachnid08)
[09/13/2004 23:02:05] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_virulent_arachnid08
[09/13/2004 23:02:12] CheckMatrix: There has been a change in the matrix!
[09/13/2004 23:02:12] Evaluating the number 1 candidate (a_virulent_arachnid08)
[09/13/2004 23:02:13] AcquireTarget: Candidate is one, CannotPull is false so I am scot free to gank a_virulent_arachnid08
[09/13/2004 23:02:13] PlinkMob: Shooting an arrow at a_virulent_arachnid08 (53 Warrior)
[09/13/2004 23:02:14] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:02:35] Engage: Attacking a_virulent_arachnid08
[09/13/2004 23:04:36] Engage: Add Detected!
[09/13/2004 23:04:36] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:04:38] ExperienceChecker: Made 0.30% XP (8.79% XP in 24)
[09/13/2004 23:04:38] Evaluating the number 1 candidate (a_gnarled_treant12)
[09/13/2004 23:04:38] AcquireTarget: Cannot Pull a_gnarled_treant12; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:38] Evaluating the number 2 candidate (a_gnarled_treant10)
[09/13/2004 23:04:38] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:04:38] Evaluating the number 3 candidate (a_virulent_arachnid02)
[09/13/2004 23:04:38] AcquireTarget: Cannot Pull a_virulent_arachnid02; a_gnarled_treant12 will aggro
[09/13/2004 23:04:39] Evaluating the number 4 candidate (a_blood_raven00)
[09/13/2004 23:04:39] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 23:04:39] Evaluating the number 5 candidate (a_blood_raven04)
[09/13/2004 23:04:39] AcquireTarget: Cannot Pull a_blood_raven04; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:39] Evaluating the number 6 candidate (a_blood_raven11)
[09/13/2004 23:04:39] AcquireTarget: Cannot Pull a_blood_raven11; a_gnarled_treant10 will aggro
[09/13/2004 23:04:39] Evaluating the number 7 candidate (a_blood_raven06)
[09/13/2004 23:04:39] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:04:39] AcquireTarget: Seeing if a_gnarled_treant12 will give problems when running to a_blood_raven06
[09/13/2004 23:04:40] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven06
[09/13/2004 23:04:41] AcquireTarget: Seeing if a_virulent_arachnid02 will give problems when running to a_blood_raven06
[09/13/2004 23:04:42] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_blood_raven06
[09/13/2004 23:04:42] AcquireTarget: Seeing if a_blood_raven04 will give problems when running to a_blood_raven06
[09/13/2004 23:04:43] AcquireTarget: Seeing if a_blood_raven04 will give problems when running to a_blood_raven06
[09/13/2004 23:04:44] AcquireTarget... I'm not going to switch targets while im way the hell out there.
[09/13/2004 23:04:44] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:04:44] RunToMob: Running to a_blood_raven06
[09/13/2004 23:04:44] Evaluating the number 1 candidate (a_gnarled_treant12)
[09/13/2004 23:04:44] AcquireTarget: Cannot Pull a_gnarled_treant12; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:44] Evaluating the number 2 candidate (a_gnarled_treant10)
[09/13/2004 23:04:44] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:04:45] Evaluating the number 3 candidate (a_virulent_arachnid02)
[09/13/2004 23:04:45] AcquireTarget: Cannot Pull a_virulent_arachnid02; a_gnarled_treant12 will aggro
[09/13/2004 23:04:45] Evaluating the number 4 candidate (a_gnarled_treant15)
[09/13/2004 23:04:45] AcquireTarget: Cannot Pull a_gnarled_treant15; a_gnarled_treant12 will aggro
[09/13/2004 23:04:45] Evaluating the number 5 candidate (a_blood_raven00)
[09/13/2004 23:04:45] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 23:04:45] Evaluating the number 6 candidate (a_blood_raven04)
[09/13/2004 23:04:45] AcquireTarget: Cannot Pull a_blood_raven04; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:45] Evaluating the number 7 candidate (a_blood_raven11)
[09/13/2004 23:04:45] AcquireTarget: Cannot Pull a_blood_raven11; a_gnarled_treant10 will aggro
[09/13/2004 23:04:45] Evaluating the number 8 candidate (a_blood_raven06)
[09/13/2004 23:04:45] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:04:45] AcquireTarget: Seeing if a_gnarled_treant12 will give problems when running to a_blood_raven06
[09/13/2004 23:04:46] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven06
[09/13/2004 23:04:47] AcquireTarget: Seeing if a_virulent_arachnid02 will give problems when running to a_blood_raven06
[09/13/2004 23:04:48] AcquireTarget: Seeing if a_gnarled_treant15 will give problems when running to a_blood_raven06
[09/13/2004 23:04:49] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_blood_raven06
[09/13/2004 23:04:50] AcquireTarget: Seeing if a_blood_raven04 will give problems when running to a_blood_raven06
[09/13/2004 23:04:50] AcquireTarget: Seeing if a_blood_raven11 will give problems when running to a_blood_raven06
[09/13/2004 23:04:55] Evaluating the number 1 candidate (a_gnarled_treant12)
[09/13/2004 23:04:55] AcquireTarget: Cannot Pull a_gnarled_treant12; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:55] Evaluating the number 2 candidate (a_gnarled_treant10)
[09/13/2004 23:04:55] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:04:55] Evaluating the number 3 candidate (a_virulent_arachnid02)
[09/13/2004 23:04:55] AcquireTarget: Cannot Pull a_virulent_arachnid02; a_gnarled_treant12 will aggro
[09/13/2004 23:04:56] Evaluating the number 4 candidate (a_gnarled_treant15)
[09/13/2004 23:04:56] AcquireTarget: Cannot Pull a_gnarled_treant15; a_gnarled_treant12 will aggro
[09/13/2004 23:04:56] Evaluating the number 5 candidate (a_blood_raven00)
[09/13/2004 23:04:56] AcquireTarget: Cannot Pull a_blood_raven00; a_gnarled_treant10 will aggro
[09/13/2004 23:04:56] Evaluating the number 6 candidate (a_blood_raven04)
[09/13/2004 23:04:56] AcquireTarget: Cannot Pull a_blood_raven04; a_virulent_arachnid02 will aggro
[09/13/2004 23:04:56] Evaluating the number 7 candidate (a_blood_raven06)
[09/13/2004 23:04:56] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:04:56] AcquireTarget: Seeing if a_gnarled_treant12 will give problems when running to a_blood_raven06
[09/13/2004 23:04:57] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven06
[09/13/2004 23:04:58] AcquireTarget: Seeing if a_virulent_arachnid02 will give problems when running to a_blood_raven06
[09/13/2004 23:04:59] AcquireTarget: Seeing if a_gnarled_treant15 will give problems when running to a_blood_raven06
[09/13/2004 23:04:59] AcquireTarget: Seeing if a_blood_raven00 will give problems when running to a_blood_raven06
[09/13/2004 23:05:00] AcquireTarget: Seeing if a_blood_raven04 will give problems when running to a_blood_raven06
[09/13/2004 23:05:05] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 23:05:05] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:05:05] Evaluating the number 2 candidate (a_virulent_arachnid02)
[09/13/2004 23:05:05] AcquireTarget: Cannot Pull a_virulent_arachnid02; a_gnarled_treant12 will aggro
[09/13/2004 23:05:05] Evaluating the number 3 candidate (a_blood_raven06)
[09/13/2004 23:05:06] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:05:06] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven06
[09/13/2004 23:05:06] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_blood_raven06
[09/13/2004 23:05:16] CheckMatrix: There has been a change in the matrix!
[09/13/2004 23:05:16] Evaluating the number 1 candidate (a_blood_raven06)
[09/13/2004 23:05:16] AcquireTarget: Cannot Pull a_blood_raven06; a_virulent_arachnid12 will aggro
[09/13/2004 23:05:16] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:05:33] Evaluating the number 1 candidate (a_blood_raven06)
[09/13/2004 23:05:33] AcquireTarget: Cannot Pull a_blood_raven06; a_virulent_arachnid12 will aggro
[09/13/2004 23:05:33] Evaluating the number 2 candidate (a_virulent_arachnid12)
[09/13/2004 23:05:33] AcquireTarget: Cannot Pull a_virulent_arachnid12; a_blood_raven06 will aggro
[09/13/2004 23:05:33] Evaluating the number 3 candidate (a_gnarled_treant10)
[09/13/2004 23:05:33] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:05:33] Evaluating the number 4 candidate (a_gnarled_treant15)
[09/13/2004 23:05:34] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:05:34] AcquireTarget: Seeing if a_blood_raven06 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:34] AcquireTarget: Seeing if a_virulent_arachnid12 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:35] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:36] RunToMob: Running to a_gnarled_treant15
[09/13/2004 23:05:36] Evaluating the number 1 candidate (a_virulent_arachnid12)
[09/13/2004 23:05:36] AcquireTarget: Cannot Pull a_virulent_arachnid12; a_blood_raven06 will aggro
[09/13/2004 23:05:36] Evaluating the number 2 candidate (a_blood_raven06)
[09/13/2004 23:05:36] AcquireTarget: Cannot Pull a_blood_raven06; a_virulent_arachnid12 will aggro
[09/13/2004 23:05:36] Evaluating the number 3 candidate (a_gnarled_treant10)
[09/13/2004 23:05:36] AcquireTarget: Cannot Pull a_gnarled_treant10; a_blood_raven00 will aggro
[09/13/2004 23:05:36] Evaluating the number 4 candidate (a_gnarled_treant15)
[09/13/2004 23:05:37] AcquireTarget: This is not the first candidate, so checking all prior mobs to see if I will get aggro
[09/13/2004 23:05:37] AcquireTarget: Seeing if a_virulent_arachnid12 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:38] AcquireTarget: Seeing if a_blood_raven06 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:39] AcquireTarget: Seeing if a_gnarled_treant10 will give problems when running to a_gnarled_treant15
[09/13/2004 23:05:43] Evaluating the number 1 candidate (a_gnarled_treant15)
[09/13/2004 23:05:44] AcquireTarget: Cannot Pull a_gnarled_treant15; a_gnarled_treant15 will aggro
[09/13/2004 23:05:44] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:44] Evaluating the number 2 candidate (a_blood_raven04)
[09/13/2004 23:05:44] AcquireTarget: Cannot Pull a_blood_raven04; a_blood_raven04 will aggro
[09/13/2004 23:05:44] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:44] Evaluating the number 3 candidate (a_gnarled_treant10)
[09/13/2004 23:05:44] AcquireTarget: Cannot Pull a_gnarled_treant10; a_gnarled_treant10 will aggro
[09/13/2004 23:05:44] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:44] Evaluating the number 4 candidate (a_gnarled_treant01)
[09/13/2004 23:05:44] AcquireTarget: Cannot Pull a_gnarled_treant01; a_gnarled_treant01 will aggro
[09/13/2004 23:05:44] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:44] Evaluating the number 5 candidate (a_blood_raven00)
[09/13/2004 23:05:44] AcquireTarget: Cannot Pull a_blood_raven00; a_blood_raven00 will aggro
[09/13/2004 23:05:45] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:45] Evaluating the number 6 candidate (a_gnarled_treant14)
[09/13/2004 23:05:45] AcquireTarget: Cannot Pull a_gnarled_treant14; a_gnarled_treant14 will aggro
[09/13/2004 23:05:45] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:45] Evaluating the number 7 candidate (a_gnarled_treant02)
[09/13/2004 23:05:45] AcquireTarget: Cannot Pull a_gnarled_treant02; a_gnarled_treant14 will aggro
[09/13/2004 23:05:45] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:45] Evaluating the number 8 candidate (a_blood_raven11)
[09/13/2004 23:05:45] AcquireTarget: Cannot Pull a_blood_raven11; a_gnarled_treant10 will aggro
[09/13/2004 23:05:45] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:45] Evaluating the number 9 candidate (a_blood_raven05)
[09/13/2004 23:05:46] AcquireTarget: Cannot Pull a_blood_raven05; a_blood_raven05 will aggro
[09/13/2004 23:05:46] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:46] Evaluating the number 10 candidate (a_gnarled_treant12)
[09/13/2004 23:05:46] AcquireTarget: Cannot Pull a_gnarled_treant12; a_gnarled_treant12 will aggro
[09/13/2004 23:05:46] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:46] Evaluating the number 11 candidate (a_virulent_arachnid16)
[09/13/2004 23:05:47] AcquireTarget: Cannot Pull a_virulent_arachnid16; a_virulent_arachnid16 will aggro
[09/13/2004 23:05:47] AcquireTarget: Finding a suitible mob to pull is taking too long and a mob is sneaking up on me!
[09/13/2004 23:05:47] Evaluating the number 12 candidate (a_gnarled_treant12)
[09/13/2004 23:05:47] AcquireTarget: Cannot Pull a_gnarled_treant12; a_gnarled_treant12 will aggro
[09/13/2004 23:05:47] AquireTarget: Returning FALSE
[09/13/2004 23:05:47] ReturnToAnchor: Running to anchor (-918.35, 1729.78)
[09/13/2004 23:06:23] Evaluating the number 1 candidate (a_gnarled_treant10)
[09/13/2004 23:06:24] AcquireTarget: Cannot Pull a_gnarled_treant10; a_gnarled_treant10 will aggro
[09/13/2004 23:07:11] Engage: Attacking NULL
[09/13/2004 23:07:11] Engage: Add Detected!
(I ended the macro at this point because of a bug that causes him to not detect adds)
Offtopic question: Anyone know of a decent log parser that can provide decent HTML output? I am making somewhat of an admin interfece with my Linux server but am only currently employing tools like grep, tail, etc =(.

To sum it up:
${NearestSpawn[N, nopcnear]} vs ${NearestSpawn[id X]} vs /declare Candidate spawn local; ${Candidate}?
Float/Int performance/suggestions?
${Math.Sqrt[X]} tips?
/mqlog and /echo performance/suggestions?


Thanks in advance (I know I asked a lot of strange questions lol)!

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Tue Sep 14, 2004 4:39 am

Without a doubt moving at least some of it into C++ will speed things up. It's not so much that the math itself is expensive, but parsing all the ${blahblah[${foo[${bar[baz]}].blahblah[blah].fleem}} eats up a lot, as it has to walk the string one character at a time matching braces and brackets until it gets to a "kernel", then call itself recursively with that kernel, rinse and repeat.. you an often save a lot of cycles just getting all of your stuff into a /varcalc rather than using ${Math}.

Spawn searches of any kind are fairly expensive, and I suspect that's a lot of the issue. Unfortunately even if you port those to C++ you're not going to save much, so I can't see. Once you have the ID, use Spawn[ID] instead of NearestSpawn[ID].

I think there's also a brute force wall of exactly how much of a time slice macros are given to run...I'm not sure of how this works myself, since I've gotten away from using macros for anything but the simplest of tasks, but somebody that works with the uberbots can probably help you.

Don't be afraid to look at the source. You obviously know a bit about coding to have gotten this far and be asking the right questions. Even if you don't plan on writing any C++ code yourself, getting a better idea of how the MQ internals work can only help you as far as seeing what the macro commands are "actually doing"

And PLEASE, feel free to use 0 and 1 instead of ${Bool}. I was doing a ton of ${Bool}s in my HUD.ini at one point, and found that I was eating up a ton of cycles for something that's completely redundant. ${If} is going to treat anything you feed it as if it were inside of ${Bool[]} anyway.

Sorry I didn't comment much on the actual logic of the code you provided. I was on my way to bed when this post caught my eye...I'll take a deeper look at what it's actually doing tomorrow if nobody else has taken a shot at it.

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Tue Sep 14, 2004 5:28 am

Thanks for the tips cr4zy...

I think when I first was getting accustomed to the macro language I tried 1s and 0s and they didn't work. Probably was because I made some other mistake and thought I needed ${Bool} and used it ever since. My macros were very simple when params were around and I mostly patched other macros together without design in mind.

I have read some of the MQ2 source in the past and from just looking at mq2data.cpp and mq2commands.cpp, NearestSpawn probably is probably a big factor as to why the macro drags its feet. I guess i just got used to NearestSpawn because it always worked for me, but upon looking at some of the MQ2Main code it seems that is quite an expensive request. I've only completed 2 semesters of C++, so I can somewhat read the MQ code but it's a little difficult understanding how it all fits in (I'm used to reading smaller programs not big projects :smile: ). I should try to spend more time getting familiar with it, as I want to develop plugins after I finish some of my semi-big macro projects.

I'll start making some of those changes tomorrow (well technically today =) ). If anyone else has some suggestions I would love to hear them (it would be uber to be able to calculate everything in real time instead of forcing the toon to stop every 4 seconds and re-evaluate (a messy kludge) ).

I think there might be a slight bug or two in the logic but it should be otherwise good. I recently broke it up into subroutines - before that was all one sub.. ack! It started simple, I kept realizing things I needed to put in, and the result became one huge monsterous mindfuck of a sub hehe.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Tue Sep 14, 2004 8:26 am

I've never needed to nest ${Math.Calc[]}, one around the outside is plenty and will possibly shave some time off evaluations (although the calc/parser are fairly fast nowadays, but a little is a little). Instead of say:

Code: Select all

Sub EvaluateDistance(int y1, int x1, int y2, int x2) 
   /declare EvaluatedDistance float local 
   /declare ASquared ${Math.Calc[${Math.Calc[${y1}-${y2}]}*${Math.Calc[${y1}-${y2}]}]} 
   /declare BSquared ${Math.Calc[${Math.Calc[${x1}-${x2}]}*${Math.Calc[${x1}-${x2}]}]} 
   /varset EvaluatedDistance ${Math.Sqrt[${ASquared}+${BSquared}]} 
/return ${EvaluatedDistance}
Maybe try slimming it down like so:

Code: Select all

Sub EvaluateDistance(float y1, float x1, float y2, float x2)
/return ${Math.Sqrt[(${y1}-${y2})^2 + (${x1}-${x2})^2].Int}
You are mainly passing floats to the sub. As such I'm guessing its faster to place a float into a float variable than to typecast every float passed to the sub as an int before performing calculations on it.

edit: Although, once you shrink the sub to this point, it makes me wonder if its not best to inline this back into your code instead of /call;${Marco.Return} stuff that is needed now.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Tue Sep 14, 2004 10:12 am

Hmm, this is more of a logic question. Instead of making multiple spawn searches for each candidate and then evaluating all the mobs around the candidates for distance checks, why not have the spawn search do the distance check for you?

Code: Select all

   /if (${Spawn[id ${CandidateID}].NearestSpawn[radius ${TooCloseDistance}].ID}) {
     /echo I got an ID on the search
     /echo ${Spawn[id ${CandidateID}].NearestSpawn[radius ${TooCloseDistance}].CleanName} was to close
   } else {
     /echo No spawn was found close to my mob, paydirt
   }

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Tue Sep 14, 2004 11:15 am

OH MY GOD THANK YOU dman lol.

I had looked for a way to compare the distance of one spawn to the other but thought MQ would only calculate distance between ${Me} and ${SomeMob}; that there was no way to see the distance between ${SomeMob00} and ${SomeMob01}. Upon examining TFM closely, type spawn has NearestSpawn as a member which could probably be employed like you showed. Originally, I was somewhat discouraged when I learned /target had nopcnear but didn't have nonpc near lol.

It wasn't all a waste though lol. I still need to plot a line of 15 or so coordinates to the mob and make sure no other mobs are close to each of the coordinates. I'll get working on the rewrite with those suggestions in mind and report back on the performance. When AcquireTarget is fast and reliable enough I'll throw a copy of my entire macro (including add handling, etc) on the Macro Depot. I'll try to make it where it could be easily included and used by other macros. Too bad MQ is probably broken with EQLive since today OOW was released. I'll have to check.

zanomo
a hill giant
a hill giant
Posts: 285
Joined: Thu Jun 24, 2004 11:21 pm

Post by zanomo » Tue Sep 14, 2004 1:08 pm

something similar in this pacificaiton routine:

looping to check the distance of other mobs surrounding a target mob to see if they are within aggro distacnce with each other and to pacify them in necessary.

http://www.macroquest2.com/phpBB2/viewtopic.php?t=9236

Now i can change it instead of looping and calculating to just get the nearest spawn around the mob... :D

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Tue Sep 14, 2004 1:14 pm

I'm surprised that one didn't hit me right off as well.

I've often heard the caveat that doing spawn-based NearestSpawns are a lot slower than player-based and to never-ever use them, but in this case they're probably slow because they're doing exactly what you're trying to re-create, and are probably the way to go.
I've never needed to nest ${Math.Calc[]}, one around the outside is plenty and will possibly shave some time off evaluations (although the calc/parser are fairly fast nowadays, but a little is a little).
Aye, this is something else I would have noticed if I wasn't so tired at the time. Match.Calc takes a "formula" as its argument, so there's rarely need to nest them. You're still better off IMO doing /varcalc and saving yourself the overhead of parsing out the ${[]} squiggles.

As for Int vs Float, I'd just go with floats the whole way through. Sure using ints can be faster, but the cost of parsing and then implimenting the conversion is a LOT slower than just using a float in the first place.

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Thu Sep 16, 2004 3:33 am

I figured out why I didn't do it dman's way.

Distance is ALWAYS the distance from the player. For example

Code: Select all

/echo ${NearestSpawn[1,npc ravenous].NearestSpawn[npc radius 200].Distance} from ${NearestSpawn[1,npc ravenous].NearestSpawn[npc radius 200].Name} id ${NearestSpawn[1,npc ravenous].NearestSpawn[npc radius 200].ID}
will give the distance of the nearest mob from the player (eg 1700), the name of the nearest mob, and the id. Obviously that presents a problem as there can be 2 mobs that evaluate to 1700 when in fact they are 3400 apart! But your answer does halfway help, and i am simplifying / optimizing the code for finding the nearest mob to the candidate.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Thu Sep 16, 2004 10:16 am

If I might ask though, why do you need to know the exact distance mobs are apart from each other? The only reason I see for getting the distance spawns are apart is to compare it and then see if they are too close or far enough apart, correct?

My solution takes that into account by shortening the radius it searches around the mob to your defined break off point in distance. The search would then only return an id if a mob is too-close and therefore unsuitable. ie

Code: Select all

/declare i local 1
:loop
/if (${NearestSpawn[${i}, npc ravenous].NearestSpawn[npc radius ${TooCloseDistance}].ID}) {
  /echo ${NearestSpawn[${i}, npc ravenous].NearestSpawn[npc radius ${TooCloseDistance}].Name} is too close to ${NearestSpawn[${i}, npc ravenous].Name}, trying next.
  /varcalc i ${i} + 1
  /goto :loop
  } else {
   /echo Nothing was found too close to ${NearestSpawn[${i}, npc ravenous].Name}, selecting it as target and plotting course.
  }
Unless you are using the distance between the two spawns for something other than determining if they will chain agro onto you, you only really need to know if it is too-close, or far enough and this will give you that without any further calculations.

dman
a hill giant
a hill giant
Posts: 181
Joined: Fri Dec 05, 2003 12:54 pm

Post by dman » Thu Sep 16, 2004 12:17 pm

Code: Select all

            /for CheckMob 1 to ${Math.Calc[${Candidate}-1]} 

               /if (${NearestSpawn[${CheckMob},npc].ID}!=${NearestSpawn[id ${CandidateID}].ID}) /varset CheckMobID ${NearestSpawn[${CheckMob},npc].ID} 

               /mqlog AcquireTarget: Seeing if ${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} 

               /echo AcquireTarget: Seeing if ${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} 

               /for LocCounter 1 to 15 

                  /call ComputePlane ${LocCounter} 15 ${Me.Y} ${NearestSpawn[id ${CheckMobID}].Y} 

                  /varset CheckY ${Macro.Return} 

                  /call ComputePlane ${LocCounter} 15 ${Me.X} ${NearestSpawn[id ${CheckMobID}].X} 

                  /varset CheckX ${Macro.Return} 

                  /call EvaluateDistance ${CheckY} ${CheckX} ${NearestSpawn[id ${CheckMobID}].Y} ${NearestSpawn[id ${CheckMobID}].X} 

                  /if (${Macro.Return}<${TooCloseDistance}) { 

                     /varset CannotPull ${Bool[TRUE]} 

                     /varset LocCounter 15 

                     /varset CheckMob ${Math.Calc[${Candidate}-1]} 

                     /echo AcquireTarget: KEIKAKU KEIKAKU!!!!   <<${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>> 

                     /mqlog AquireTarget: KEIKAKU KEIKAKU!!!!   <<${NearestSpawn[id ${CheckMobID}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>>  (compensating) 

                     /return ${Bool[FALSE]} 

                  } 

               /next LocCounter 

            /next CheckMob 

Could also be rewritten for fewer loops and checks by using a radius check in your spawnsearch. Where the speed comes in is you should only have to evaluate each loc of your 15 points on the line to your target once, not (n-1)*15 times.

Code: Select all

              /for LocCounter 1 to 15 

                  /call ComputePlane ${LocCounter} 15 ${Me.Y} ${NearestSpawn[id ${CheckMobID}].Y} 

                  /varset CheckY ${Macro.Return} 

                  /call ComputePlane ${LocCounter} 15 ${Me.X} ${NearestSpawn[id ${CheckMobID}].X} 

                  /varset CheckX ${Macro.Return} 

                  /if (${Spawn[loc ${CheckX} ${CheckY} radius ${TooCloseDistance}].ID}) { 

                     /varset CannotPull ${Bool[TRUE]} 

                     /varset LocCounter 15 

                     /varset CheckMob ${Math.Calc[${Candidate}-1]} 

                     /echo AcquireTarget: KEIKAKU KEIKAKU!!!!   <<${Spawn[loc ${CheckX} ${CheckY} radius ${TooCloseDistance}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>> 

                     /mqlog AquireTarget: KEIKAKU KEIKAKU!!!!   <<${Spawn[loc ${CheckX} ${CheckY} radius ${TooCloseDistance}].Name} will give problems when running to ${NearestSpawn[id ${CandidateID}].Name} when crossing loc (${CheckY} ${CheckX})>>  (compensating) 

                     /return ${Bool[FALSE]} 

                  } 

               /next LocCounter 

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Thu Sep 16, 2004 12:35 pm

You are right dman.. I had misread your first post. For some reason I was reading it like ${Spawn[Candidate].NearestSpawn[npc].Distance}. I probably read it too late at night or whatever =).

Was posting how I planned to adjust the code and when I clicked preview I saw you had replied again hehe.

With what I have so far for my rewrite, simply seeing how far the mobs are away from each other only takes ~1 second. I'm going to switch that to use radius like you suggested.

What drags the macro is evaluating each of the candidates and the mobs in their path. Takes much longer than the first step (eliminating spawns with friends too close). Your suggestion should help; I'm going to make the change and test out what I currently have so far and if I'm pleased I'll post it.

If anyone whose reading this is not too sure what my macro is doing, I made an ani gif (mostly so i can watch it at 3 am and be say.. yeah i remember now thats what im supposed to do) =).

Image

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Thu Sep 16, 2004 12:37 pm

This is pretty nifty.

SlimFastForYou
a hill giant
a hill giant
Posts: 174
Joined: Sat Jan 24, 2004 1:38 am

Post by SlimFastForYou » Thu Sep 16, 2004 11:07 pm

Completed, optimized macro here.

Thanks everyone, i was able to significantly shrink/simplify/optimize the code. Havent done too much testing, if you have any problems please post bugs on that thread.