Hunter bot for druids

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Spliffeh
orc pawn
orc pawn
Posts: 15
Joined: Wed Jan 07, 2004 4:42 pm

Post by Spliffeh » Fri Jan 09, 2004 6:14 pm

Spliffeh wrote:I gave your macro a quick test and I got errors regarding fail to parse IF command starting from this line (55):

/if ("$target()"="FALSE" || n $target(hp,pct)<=95) {

So I commented out that unnecessary IF command out to see if it would run, I got a bad variable error regarding line 62: /varset DIST 80

Also, before I made any changes I noticed it was not grabbing the target properly, it was adding the character @ in front of the proper name.
Ok I played a bit more. the IF statement if just missing an =

But there are weird variable problems after that starting with #62 /varset dist 80 then line #82 /varset CheckStuckA $target(distance). I'm a total newbie but there seems nothing wrong with these lines and it makes me wonder if my MQ2 is messed up somehow. Anyone else getting the same thing?

ps - psychotik there is no problem with it standing. See the movetotarget sub.

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Jan 09, 2004 6:14 pm

psychotik wrote:

Code: Select all

Sub GetTarget 
   :TargetLoop 
      /echo Searching for a victim! 
| Selects the nearest target available AND makes sure we don't KS if we do find one. 
| NOTE: There is MUCH better anti-KS code out there!  Search the forums and find one that works best for you. 
      /target npc "@ENEMY" nopcnear 200 
| If unable to find an available target, sit and med for 15 seconds before trying again.  (May as well put the down time to use!) 
      /if ("$target()"="FALSE" || n $target(hp,pct)<=95) { 
         /echo Unable to locate any targets nearby... Will try again in 15 seconds. 
         /if "$char(state)"!="SIT" /sit 
         /delay 15s 
         /goto :TargetLoop 
      } 
   /echo Closing in on $target(name,clean)... 
   /varset DIST 80 
   /call [color=red]MoveToTarget[/color] 
/return 
you never stand up by the looks of it[/code]

Code: Select all

Sub MoveToTarget 
   /if "$char(state)"!="STAND" /stand 
   /face 
   /delay 3s 
Take a look again. It calls "MoveToTarget" which then surmises if you're not standing, to stand up and then move. Just gotta follow the flow, my man.
-Elric

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 09, 2004 6:23 pm

psychotik wrote:you never stand up by the looks of it
Standing up is handled by the actual MoveToTarget routine. I did it there because the MoveToTarget sub is used by 2 different parts of the macro. Just a one of my "redundancy" pet peeves....and a "safety" check, in case you may or may not be standing from another routine or something you do manually to the toon between kills....
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 09, 2004 6:36 pm

I'm still learning all this....so thanks for pointing out the bugs so far.

The missing = was an oversite...I've added it.
I wasn't sure about how to pass the DIST....so I looked at other macros and determined that it should just be:

Code: Select all

   /varset DIST 80
I was thinking it SHOULD be:

Code: Select all

   /varset [b]@[/b]DIST 80
Can someone check that? Note that there are 2 of them...one on line 61, and the other on line 73.
Also, before I made any changes I noticed it was not grabbing the target properly, it was adding the character @ in front of the proper name.
Try removing the quotes from around the @ENEMY and see if that fixes it. (And let me know, so I can fix all occurances. =)) See what that does. I was under the impression that names should be wrapped in qoutes, so I added them.

I will post an update with these fixes after those 2 things have been tested.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Jan 09, 2004 7:04 pm

(Ending macro: Bad variable in /var function.)

(Druidfarm.mac@61 (GetTarget): /varset @DIST 80)

(Druidfarm.mac@40 (Main): /call GetTarget)

(Cleared the following: Timers Vars Arrays)

(The current macro has ended.)

After making the correct changes to all variable names. And the two fixes above.
-Elric

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Fri Jan 09, 2004 8:31 pm

Fixed a couple things, including the syntax on the /varset and changed the /delares. This should take care of the problem. If not, I'll hard-code the solution...

Please re-copy the code from my orginal posting for all the fixes.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
psychotik
a ghoul
a ghoul
Posts: 112
Joined: Mon Oct 06, 2003 3:48 am

Post by psychotik » Fri Jan 09, 2004 11:24 pm

nod must have missed it, i dont even remember posting that =p

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Jan 09, 2004 11:44 pm

Not sure if it's because I have to put the FULL name of the mob or not.. but getting this while farming in KT with the word skeleton as the enemy.


Going to try it with the full name, and go from there.

(Ending macro: Failed to parse /if command)
(druidfarm.mac@129 (KillMob): /if $target(name,clean)!=@skeleton /return)
(druidfarm.mac@41 (Main): /call KillMob)
-Elric

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Fri Jan 09, 2004 11:46 pm

Nope. Even with a specific name, I'm getting that error.
-Elric

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Sat Jan 10, 2004 1:54 am

Posted an update. I tested it out for about 40 mins on my Shaman.
The only thing I can't seem to get it to do proplerly is memorize the spells if they are not already there. It goes through the motions, but doesn't actually do it. Could be my SpellCast...or my system...been havving problems with meming spells for quite some time.

Grab the latest version, and let me know what oyu think.

(Yes, I know it stands up while looting...but it works...I'm just too lazy to move that right now. lol)

Make sure you set it all up correctly. I fixed the targeting issue by checking if the target name contains ENEMY, not equals exactly. You can mod that if you prefer....but by doing so, you run the risk of ignoring adds if you get jumped. Which I did ... quite a lot ... testing in FoB.
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Sat Jan 10, 2004 3:28 am

I'll have to give it a shot tomorrow. Got into a heavy epic camp tonight, and need sleep.

But I'll give 'er a shot first thing tomorrow morning.
-Elric

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Sat Jan 10, 2004 10:50 am

Ya know, before I even test this.

I looked at the code the other day, and I kinda thought that the declares had to be global rather than local, but kept my mouth shut. Next time I'll say something. :-\
-Elric

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Sat Jan 10, 2004 11:27 am

Okay. Works perfectly now, however.

When you have the proper spells memmed, they MUST be in the slots you put in the file, or else it unmems ALL of them, and then only mems the others as you need them.

So for farming chips, I only had firestrike and roots memmed the whole time. No egress, none of the others. Maybe we should look into a way to make it NOT unmem the other spells you have in those slots, but to look for the spell in the bar first, and if it's not there, mem it.
-Elric

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Sat Jan 10, 2004 7:27 pm

I'm a moron.
Now try. lol

It should have been $char(gem,"@SPELL"), not (spell.xx)
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

User avatar
Elric
Cheese Whore
Cheese Whore
Posts: 466
Joined: Sun Nov 23, 2003 12:31 am
Location: Tampa, Fl
Contact:

Post by Elric » Sat Jan 10, 2004 7:48 pm

There we go.

Perfect druid hunter spell for wide-open spaces.

Very nice, Bad. Very nice indeed. I'll be sure to use it to farm silks tomorrow. Congrats, you just made me a way to actually bring my tailoring up on the cheap and easy side.

Hehe.
-Elric