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

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

Post by wolf5 » Sat Jun 19, 2004 4:16 pm

This is a Beastlord hunter macro for solo hunting.

LINK OUTDATED! (Latest version here: http://halsvik.net/d/?/public/nbh.mac)
Zip that contains teh nbh.mac - http://halsvik.net/downloads/mq2.zip

(tested on July 03 2004 03:08:11 MQ2 release)

How to run (examples):
/macro nbh mob1|mob2|mob2
/macro a_skeleton|a_lizard
/macro "a rabbit|a snake"
/macro "a rabbit"|"a snake"

/macro nbh mymainmob1|mymainmob2 extramob1|extramob2
/macro a_skeleton|a_lizard snake|rat
etc...

My favorite while i'm working on the macro:
/macro nbh hill cyclopse|skeleton|lizard|basilisk

v1.1.9 Fixes: No uending backing off healing (needs testing though)
No more running towards target, then spinning once or twice and running again.
Think I have fixed the issues about getting stuck while running to loot (which aborted looting).
The loot report is fixed. And it will be showed once per corpse-looting.
Added Z-radius on targetsearch.

v1.1.8 I'm being very productive today. Added a secondary mob list (Usefull for TARGET_METHOD=2). If there is no mob from the first list, go ahead kill something from the second. Fixed backing off to let pet tank if mobs nearby bug.

v1.1.7 Added new looting options: LOOT_NORMAL_ITEMS_IF_VALUE_IS_ABOVE and LOOT_STACKABLE_ITEMS_IF_VALUE_IS_ABOVE. If LOOT_ITEMS is enabled it will normally just loot the items defines in your list. These to options lets you override, so you can grab those once in a while expensive items, and the more expensive stackable items as they take little room compared to their worth. The values is in Copper. So set it to 10000 if you want to loot all items worth over 10pp.
Will now DROP items instead of destroying them unless they are nondrop, then we destroy them.

v1.1.6 Fixed the sudden macro ending.
Added DESTROY_GOLD_IF_ABOVE, DESTROY_SILVER_IF_ABOVE and DESTROY_COPPER_IF_ABOVE to automatically destroy encumbering money. Set it to 0 to disable or set it to a desired maximum amount of money before automatically destroying it. It's setup to destroy silver if it gets over 500 and copper if it gets over 500 as well. (might fix a version that only destroys the surplus above 500 instead of all in the future).

v1.1.5 Added LOOT_KEEP_RECORD option. If True it will keep count on the number of any items you have looted, and the cash you have looted.
Added 3 options DEBUG_1, DEBUG_2, DEBUG_3. These 3 defines what output should be shown when the macro is running. The normal "runtime" debug is DEBUG_1, DEBUG_2 is for more detailed debugging, DEBUG_3 is a noisy one but shows a lot of details.
Unless you get any bugs, only keep DEBUG_1 active.

v1.1.4: Sub SplitString fixed. Should behave properly for most people now. (Not using Right anymore)

v1.1.3:
There is a lot of debug in this version. So it should be easier to pinpoint problem areas when people get bugs.
Did a lot of tweaking on the PULL_TO_HOMEPOINT part of the code. It does often affect the normal part, but for the better mostly.

Known bugs: ...

It uses the spellcast.inc: http://halsvik.net/d/?/public/spellcast.inc

Older versions:
http://halsvik.net/d/?/public/nbh_1.0.0.mac
http://halsvik.net/d/?/public/nbh_1.0.1.mac
http://halsvik.net/d/?/public/nbh_1.0.2.mac
http://halsvik.net/d/?/public/nbh_1.0.3.mac
http://halsvik.net/d/?/public/nbh_1.0.4.mac
http://halsvik.net/d/?/public/nbh_1.0.5.mac
http://halsvik.net/d/?/public/nbh_1.1.0.mac
http://halsvik.net/d/?/public/nbh_1.1.1.mac
http://halsvik.net/d/?/public/nbh_1.1.2.mac
http://halsvik.net/d/?/public/nbh_1.1.3.mac
http://halsvik.net/d/?/public/nbh_1.1.4.mac
http://halsvik.net/d/?/public/nbh_1.1.5.mac
http://halsvik.net/d/?/public/nbh_1.1.6.mac
http://halsvik.net/d/?/public/nbh_1.1.7.mac
http://halsvik.net/d/?/public/nbh_1.1.8.mac

Any bugs you report, please tell me if you are using PULL_TO_HOMEPOINT or not, as the attack system of those 2 are parallell but different.

Code is now to large to post in one post here. Posting the header only.

Code: Select all

| Natural Beastlord Hunter Macro c
| nbh.mac 
| Author      : wolf5
| Version     : v1.1.5 - 2004-07-08
| Useage      : /macro nbh target
|                /macro nbh target1|target2|target3|...|targetn
| Description : This macro will run your character around killing any mobs 
|                matching your targets.
|                Then it will loot either all items or none.
| Features:
|
|- Pet allways up, and no further than a defined distance away before being 
|        autosummoned
|
|- Keep pet buffed (noncombat)
|
|- Keep myself buffed (noncombat)
|
|- During combat, keep myself buffed with critical spells (SoW)
|
|- Target from targetlist within a given radius (default 499) - rumor has it 
|    targetting above 500 gets logged by SoE ? But search for mobs outside 
|    this range if chosen.
|
|- Run towards target using a selfwritten /face to allow a "slack" of a given
|        degree. Ie 45 degree means I wont turn 100% directly towards target 
|        but within 45 degrees making it look a little more natural. 
|
|- Initiate attack at a given range: send in pet, slow, nuke, run to attack 
|   
|- Let pet tank if:
|        Healthdifference in Pct between pet and myself differs more than a 
|        given percentage.
|        If no mobs nearby.
|        Only if pet is close.
|- When pet tanks:
|        Nuke if mana above a given pct.
|        Keep pet updated with buffs and heals.
|        Keep self updated. 
|        When health of pet reaches same Pct as self, attack again. 
|
|- Option to strafe around target to let pet attack the targets back.
|
|- Run to mob-corpse and loot if the mob was above a given level 
|        (to prevent looting low lvl greens) 
|
|- Keep track of the items looted during the runtime of the macro.
|
|- Allways using pet as a reference on me being attacked. If pet has something
|   targeted, help it.
|
|- Aquiring a new target:
|        After about 6 attempts with a delay between and there is still no target,
|        run back to homespot (where the script started) and sit down. 
|        Restless option. If nothing happens at homepoint, sooner or later we
|        run to a random point nearby looking for mobs.
|
|-If my health should drops below a certain %, heal till I'm above 
|        (after fights or when pet tanks) 
|
|-Alarm sound (/beep) if health gets below a certain level so prompt you to get
|  back to the computer.
|
|-If pet health drops below a certain %, heal pet 
|        (after fights or when pet tanks) 
|
|-If mana drops below a certain %, sit down and med till it's above. 
|
|-Choice of sending in pet before or after slow. 
|
|-Only nuke if we got excess mana (mana over a given %)
|    
|-Obstacle avoidance. If we are stuck while running to a target, back off 
|        random length and turn left or right randomly. Setting the default
|        "slack" degree of the /face sub to a high degree to prevent running
|        into the same obstacle again, in effect letting u run in 
|        an arc around the obstacle.
|
|-Attack no matter what if mob is below a certain % - dont back off. 
|
|-Max Range from homepoint to prevent running amokk on the map. 
|
|-Option to pull to homespot all the time.
|-Option to allways run to homespot after a fight.
|
|-2 methods to select mobs. Either by distance or by mobname first.
|
|-Dont pull mobs that are closer to a NPC or PC than a defined radius
|
|--------------------------------------------------------------------------------
Last edited by wolf5 on Wed Mar 30, 2011 3:50 pm, edited 28 times in total.

yesman
a lesser mummy
a lesser mummy
Posts: 64
Joined: Tue Apr 27, 2004 9:06 pm

Post by yesman » Sat Jun 19, 2004 9:23 pm

wow, I'll get some feedback for you soon -_-

DumbStruck
a ghoul
a ghoul
Posts: 125
Joined: Fri Apr 30, 2004 8:46 am

Post by DumbStruck » Sat Jun 19, 2004 9:58 pm

Ran the macro started and returned no targets chosen exiting ..

Ended macro

whathedoes
decaying skeleton
decaying skeleton
Posts: 4
Joined: Thu Jun 03, 2004 5:39 pm

Post by whathedoes » Sat Jun 19, 2004 10:21 pm

Code: Select all

[color=red]/varset 'targets[-1]'failed, out of bounds on array[/color]
nbh.mac@1617 (SplitString(string varname, string inputstring, string splitter)): /varset
${varname}[${c}] $(inputstring.Left[$[i]}
nbh.mac@271 (Main): /call SplitString targets "${Param0}" "I"

Loops that in my MQ window =\

Hope that helps.. or something ;)

Edit: Because I missed your edit lol
Edit: code owns me, I give up for tonight
[i] I make myself look stupid, for people that are afraid to..[/i]

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Sun Jun 20, 2004 12:21 am

Though I'll probably never use this, or something so Auto (no offence), this is a job well done. I really like the coding done with the maintain buffs, and strings used. I'm no great coder, but I'd call it genious :)

Thanx for the source.

magictiger
a snow griffon
a snow griffon
Posts: 450
Joined: Sun Mar 21, 2004 2:24 pm

Post by magictiger » Sun Jun 20, 2004 2:46 am

Looks very nice. Interesting to read through.
Wish I had a high-level beastlord so I could test it out :)

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

Post by wolf5 » Sun Jun 20, 2004 7:30 am

DumbStruck wrote:Ran the macro started and returned no targets chosen exiting ..

Ended macro
You need to call the macro like this:
/macro nbh mytarget
or
/macro nbh mytarget1|mytarget2|mytarget3|...|mytargetN

-Wolf5

Luthar
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Jun 20, 2004 6:00 am
Contact:

Please

Post by Luthar » Sun Jun 20, 2004 8:01 am

Please tell us what you do.
Else we cant know whats new and whats old.
Dont have a high lvl beastlord but a lvl 20+ one, so i have changed some...

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

Post by wolf5 » Sun Jun 20, 2004 8:22 am

It's a solo macro. You just configure it as you wish, and start it.

It's a hunter macro. It will make pet, buff both up, search for mob, run to mob, engage, back off if anyone else has the mob. Loot, then get the next mob.

Read the comment part of the code on top. Should explain all features.

-Wolf5

Luthar
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sun Jun 20, 2004 6:00 am
Contact:

Error.

Post by Luthar » Sun Jun 20, 2004 11:53 am

When the macro is starting without any parameters, then it say that you need to set targets.
But when i set any parameters i get a neverending loop.
I get the same errors as some post up (whathedoes).

Anyone know whats wrong?

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

Post by wolf5 » Sun Jun 20, 2004 1:44 pm

Look at his Edit. He fixed it. Just download nbh.mac anew.

(a stringsplitter on line 1616 or 1617 that did not work because of some undocumented change in the String.Find method i believe. Worked prior to june 16.)

-Wolf5

gryphin
orc pawn
orc pawn
Posts: 19
Joined: Wed Oct 29, 2003 10:27 pm

Post by gryphin » Mon Jun 21, 2004 11:52 am

Might just be me, but if you fix a bug shouldn't the version change as well? Version : v1.0.0 - 2004-06-16 ? Heh, nice work on the macro so far. Hope you keep adding and refineing the code.

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Re: Error.

Post by Drumstix42 » Mon Jun 21, 2004 4:00 pm

Luthar wrote:When the macro is starting without any parameters, then it say that you need to set targets.
But when i set any parameters i get a neverending loop.
I get the same errors as some post up (whathedoes).

Anyone know whats wrong?
Same thing here, even with the updated code.

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

Post by wolf5 » Mon Jun 21, 2004 4:46 pm

You are using the latest mq2, right? Get latest and recompile if not ( http://macroquest2.com/main.php?p=download ).

Here is a link to the old macro just in case a even later mq2 might've changed/fixed something: http://halsvik.net/d/?/public/nbh_old.mac

The only diff between the old code and the new is in the Sub Splitstring.

old:

Code: Select all

/varcalc i2 ${inputstring.Length} - ${i} - 1
new:

Code: Select all

/varcalc i2 ${inputstring.Length} - ${i} + 1
The "new" macro has been tested on the mq2 released on 18. june.

The 16. june one did not work as the if statement did not work correctly.

All in all since other people get it to work, I bet it's not the macro that is not working, but the environment (read MQ2 version) it's run under.

Error me if I'm wrong :-)

-Wolf5

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

Post by wolf5 » Mon Jun 21, 2004 4:50 pm

Anyone know of a good open "hunter"spot for a lvl 56 beastlord?

I need some place to tweak/adjust the code besides killing Hill Giants.
Preferably darkblues/lightblues that is killable.

-Wolf5