Natural Beastlord Hunter v1.1.9 (Updated 2004-07-11)

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Fri Jun 25, 2004 12:12 pm

1. Line 520 contains

Code: Select all

 /varset TargDist ${Math.Calc[ ${Target.DistancePredict} - (${Target.MaxRangeTo}/1.2) ]}
The Target.MaxRangeTo tells me to stay just at the edge of the fighting range. Then I use "/1.2" to get a little bit closer. I will change that to "2" in the next release so that one will stand closer.

2. How the max distance works (under Sub AquireTarget):
Before aquiring a new target we check if we are outside the max range.
If we are, start running towards home. Every second, we check if there is a new target. The target can be outside the max range. We will run to it, kill it and then try to run home again. That way you wont ignore mobs on the way home.

Thanks for all input.

-Wolf5

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Fri Jun 25, 2004 4:23 pm

Ah I see. I was just going to post that when you have 'always go home' on, it targets a mob from where you are, runs home, then runs back. Guess that's what you meant by buggy. Would it be possible to do one of the following?

1) If 'always move home' is on, then go back to the starting spot before targeting a new mob

or

2) I would have no idea how to do it, but you've done a lot of similar stuff with angles it seems already. When you're outside the max range, would it be possible to face home, and start running there, only stopping for targets within range (perhaps even a reduced range until we get back inside the radius) that are +/- 60 degrees or so from home? I know I'm being picky and in most zones it wouldn't matter, but running it in dsp it keeps running over and aggroing the shrooms and tribal members (most of the mobs within the original radius are non-aggro so it's safer)

Oh well, I'll look into it later. The second one at least seems like a big change so I don't expect you to spend the time for something so minor, so I'll try if I get a chance. Oh... and one more bug I've found. I have no idea what the cause is, but sometimes when my bl tries to heal herself, she just starts backing up while casting, and never stops. And since spellcast.inc is made so it'll keep trying after being interupted, the macro is effectively done until I intervene. Again not a big bug, just something else I noticed. Thanks again for your work on this

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Fri Jun 25, 2004 6:29 pm

Changes in next release 1.1.0 (soon to be up, minutes?):

-Fix: A backoff forever bug.
-Fix: When returning home after out of range, move at least halfway before aquiring new targets. If we get attacked on the way assist pet.
-New target system. Does not use /target to get a target.
-Fix: a strange outward circle strafe is now prevented. You can not turn right while strafing right and vice versa.

SEARCH_RADIUS is gone!
Replaced with:

Code: Select all

|-- The max search radius for a mob (will not use /target untill closer than SEARCH_RADIUS). 
#define MAXIMUM_SEARCH_RADIUS 1200
|-- The max TARGET radius for a mob (above 500 could be bad?).
#define TARGET_RADIUS 500
|-- Target method. 1-Prioritize mob sequence or 2-Prioritize distance
#define TARGET_METHOD 2
MAXIMUM_SEARCH_RADIUS - equals the old SEARCH_RADIUS
however. You will run towards the target, but will not /target it untill its closer than TARGET_RADIUS.

There are now 2 ways to target through mobs. If you use an array of mobs to hunt, you can choose to target the closest of the mobs in the list first, or search for the first mob within MAXIMUM_SEARCH_RANGE before looking for the 2nd type of mob in your list (1 for mob first, 2 for distance first).

IgnoreList. If we have aborted a beginning fight due to someone else getting the target first, add the mob to an ignore list so we don't try that mob again (unless it attacks us of course).

If target is below 100% when aquiring new target, ignore it (with /target you'd get the same target over and over).

Will put this one out soon.

-Wolf5

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Fri Jun 25, 2004 6:42 pm

Wow, you're quick. I just finished writing my fix for the home/target thing and the backup thing too, and just noticed the third circle bug LOL. Well I'm sure yours are better anyway, so thanks. My solution to the target thing was, as we're running home, only target and attack things that are closer to the home point than we are, unless we're very close to home. (I was tentatively using max_range / 4) Seemed to be working fine, but I'm interested to see your new one. Also what was the bug with the backup? I just added another 'stopallmovement' call before combat healing, seemed to work but not the best way hehe. well, thanks again for this great macro.

Edit: Just noticed the new prioritize feature, very cool. k going to play with it now hehe

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Fri Jun 25, 2004 8:19 pm

Here it is. I am still testing it out, but feel free to test it as well and give me some feedback.

http://halsvik.net/d/?/public/nbh_1.1.0.mac

Experiencing "macro has ended" with no special reason to. If it has something to do with the depth of subs called, I dont think I have that many lvls.

-Wolf5

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Sat Jun 26, 2004 10:34 am

The new version works great. All the bugs seem to be fixed and I love the new target system. The only problem I had that caused death was not dealing with aggro while healing, but that's more trouble to code than it's worth.

Terramantian
a ghoul
a ghoul
Posts: 120
Joined: Thu May 13, 2004 6:20 pm

Post by Terramantian » Sat Jun 26, 2004 2:16 pm

Found one new problem: Once, it kept targetting a mob that was like 3x the max distance away, and even with many mobs near the homespot (and the bl there too) it kept picking that one (that also happened to be under the world). Restarting the macro didn't fix it but camping and relogging did. Very strange. I'm also experiencing the random quit thing, no idea why.

raytrace
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Jun 20, 2004 2:50 pm

Post by raytrace » Sat Jul 03, 2004 7:52 am

Nice work on the macro, I love it. Using version 1.1.0.

I do have 2 issues to report. One is running into the macro ending randomly. The second is it detects an obstacle after casting the slow each and every time.

raytrace
a lesser mummy
a lesser mummy
Posts: 41
Joined: Sun Jun 20, 2004 2:50 pm

Post by raytrace » Sat Jul 03, 2004 8:09 am

I noticed that the Sub Main doesn't have a /return at the end before starting the next Sub call. Maybe this will stop the macro from ending randomly. Then again, maybe not.

Code: Select all

:EndMacro
/endmacro 
[color=red]/return[/color]

|----------------------------------------------------------------------------
|SUB: UntargetPet - If pet is targeted, untarget it.
|----------------------------------------------------------------------------

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Sat Jul 03, 2004 12:21 pm

Haven't been playing for a little while. Sunny weather outside these days :-)

But please go ahead and take a crack at my code and see if you can figure out what makes the sudden ending.

I have a finger on my Sub that adds an item to an array. First copying the array, then destroying the array creating a new array with size 1 higher. Copying the data back and adding the new value to the last entry. Maybe there might be an issue there with declaring and destroying variables.

1 test would be to just do a /return straight under the Sub :

Code: Select all

Sub AddToArray(string varname, string vartype, targID)
/return
/declare i int local
/declare copyofarr[0] ${vartype} local
...
here: http://halsvik.net/d/?/public/nbh_1.1.0_b.mac

It will in effect disable the ignore list, but if someone tests this and the sudden ending stops, I might find another way to do the arraying.

Regarding the casting slow and then backing off as if an obstacle was in the way. I know of it. Haven't found a good way around it yet. It detects an obstacle by checking how far we have run since the last iteration, and the stopping to slow kind of stops the movement.

-Wolf5

Jarid
a lesser mummy
a lesser mummy
Posts: 33
Joined: Sat Jul 03, 2004 2:14 pm

Post by Jarid » Sat Jul 03, 2004 2:30 pm

Great macro, runs well alot of the time, but here are some things I've noticed.

Issues:

Targetting?:
Send pet on a mob, then autorun and miss the mob.

Running in circles about halfway from the home point spamming "target cleared." If left alone it will eventually end the macro, but if you manually engage a target it will get back on track. Edit: Seems to be when the bot has chosen a target and doesn't move to it(?)

Forgetting targets? Does the prioritize mob sequence favor the right or left side? /macro nbh gornit|seafury will start by favoring gornit over the seafuries, but eventually seems to ignore him and target only seafuries.(Ocean of Tears)

Looting.
Will sometimes not move close enough to corpse, decide it's dealing with an empty corpse, and acquire a new target.

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Sat Jul 03, 2004 5:18 pm

I'm guessing you're using version 1.1.0.

Send in pet and miss the mob. Does that mean it aquires a new target or just runs on forever? (sounds like version 1.0.x)

"Target cleared" will come when the command /target clear is issued. This should will only happen if you have a target (if I havent missed a spot).

I have noticed that sometimes just as I have gotten a target and are about to start running towards it, I run in a circle once or twice before running. Might be a long delay I have missed, so that when I start turning left it wont stop till the next iteration(and check).

If you chose prioritize mob, it will look for the closest mob of that name (ignoring those that are to close to other PC's). There is no "left" or "right" side here. Just distance.

If Gornit has somehow gotten onto the ignore list, he will never be targeted again unless he is a respawn (new mob ID). (try downloading the 1.0.0_b version. It has the ignorelist disabled.)

Looting. I did change a parameter that told me how close to a spot I should be before being "at the spot". This might have affected the loot thing you say.
In the "Sub StepToSpot(float X, float Y)" you will find a line "/if ( ${TargDist}<15 ) {". You could try changing this to a lower number like 5. Might help. Maybe I should fix the sub to accept that number as a parameter to use different distances for looting and running home.

Will go through the issues I read here when I get back to working on the script. I am a casual player so I don't play all the time. And sometimes I got to play for the playing and not the macroing :-)

Thanks for all the input, though.

-Wolf5

lan
orc pawn
orc pawn
Posts: 21
Joined: Sat Jul 03, 2004 5:23 pm
Location: Tinker AFB

Post by lan » Sat Jul 03, 2004 7:34 pm

help... please?
I've been looking at this for 3 days and decided its time to ask.
I'm new to this so its probly somthing stuiped but I've tried everything I can think of to get this working but I keep getting the following error.

/verset 'tmp_tmp[-1]' failed, out of bounds on array
nbh.mac@1635 (Splitstring(string varname, string inputstring,
string splitter)): /varset ${varname}[${c}] ${inputstring.Left[${i}]}
nbh.mac@1204 (MaintainCriticalSelfBuffs): /call SplitString
tmp_tmp ${CritBuffs[${iCount}]} "|"
nbh.mac@655 (DowntimeWork): /call MaintainCriticalSelfBuffs
nbh.mac@334 (MainSub: /call DowntimeWork
nbh.mac@262 (Main): /call MainSub

I'm trying this on a 45 beastlord in Overthere same error on version 1.0.4 to 1.1.0-b.

I've changed the spells to the ones at that level and treid removing all buffs but SoW.

I'm running the MQ that was released 7/3/04 and the one from about a week befor that.

One version I forget which would summon a pet then go into a loop of the above error but all other tries go strait into this loop.

any assitance is much appreciated and thanks for writing the macro :)

wolf5
a ghoul
a ghoul
Posts: 89
Joined: Wed Jun 02, 2004 12:58 pm

Post by wolf5 » Sat Jul 03, 2004 7:48 pm

Downloaded the latest version of the source and compiled. Tested the 1.1.0 version of the macro. I do not get your errors.

Try downloading the macro again and run it using the "July 03 2004 03:08:11" release of MQ2.

So I can't put my finger on what your error is caused by.

Maybe someone else might know why you are unlucky with the macro.

-Wolf5

lan
orc pawn
orc pawn
Posts: 21
Joined: Sat Jul 03, 2004 5:23 pm
Location: Tinker AFB

Post by lan » Sat Jul 03, 2004 8:21 pm

I believe it somthing to do with how I'm trying to list the targets, could you give me a good example of how to list the targets? say A kunark Rhino, sabertooth tigeress and sabertooth tiger?

for the tigers can you just say ssabertooth cat? or is there a way to set it to just kill everything in an area?

i'm very very new to this, if there is a place that has trivial stuff like this if you could point me in the direction I'd much appreciate it as I cant find anything to do with newbie stuff like this