wolf.mac Helps you hunt wolves

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

wolf.mac Helps you hunt wolves

Post by younglove » Tue Feb 18, 2003 2:58 am

We'll finally after ungodly amounts of time I successfully wrote my first .mac.
I got tired of vendor diving and shouting in newbie zones that I would pay x # of plat for a stack of wolf meat so I could work on my baking. I took a look at some of the other macs originally posted and came up with the following:

Code: Select all

#turbo 
Sub Main
:wolf 
   /target nopcnear 100 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :Nextwolf 
   } else { 
      /Goto :Foundwolf 
:Nextwolf 
   /target nopcnear 200 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :NextwolfA 
   } else { 
      /Goto :Foundwolf 
:NextwolfA 
   /target nopcnear 300 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :NextwolfB 
   } else {  
      /Goto :Foundwolf 
:NextwolfB 
   /target nopcnear 400 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :NextwolfC 
   } else { 
      /Goto :Foundwolf 
:NextwolfC 
   /target nopcnear 500 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :NextwolfD 
   } else { 
      /Goto :Foundwolf 
:NextwolfD 
   /target nopcnear 700 npc "wolf" 
   /delay 5 
   /if n $target(hp,pct)!=100 { 
      /goto :NextwolfEnd 
   } else { 
      /Goto :Foundwolf 
:NextwolfEnd 
/goto :wolf 
:Foundwolf 
/face 
/echo DIST $target(distance) SPEED $target(speed)  LEVEL $target(level) ID $target(id) 
/endmacro
I should of thought about this sooner when I had to hunt down those stupid Snow Griffs in EW when I needed the eggs for the 3rd Shawl quest lol

Only problem is unless I have the num lock on to continue in the direction the wolf is in I stop after a few seconds if I am depressing my forward key. Dunno if it just my machine or the code itself. If any one can figure it out I'd appreciate it

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

Well...

Post by Malachi » Tue Feb 18, 2003 11:28 am

First you need to stick a /return at the end or it's gonna die eventually...

It seems to me like this code is sorta bloated. It's a hell of a lot better than my first mac, but it's too big for what it does.

I would think that instead of using nopcnear you'd use range, and then do a KS check once you got closer...because by your last one, you're avoiding any wolf that has a person within 700 units...

Fippy's default KS radius is 60, some people suggest 100 because of casters. Since you're checking for it to not be at 100% health, you should be ok. If it's at 100% health and someone's near it and you damage it first, it's yours.

you could probably get by with something more like:

Code: Select all

|wolf.mac--Kill dem wolvies!
|Base coded by younglove, edited by malachi
|no delays cuz I'm not using turbo

sub Main
:wolf
    /target  npc range 2000  nopcnear 60 "wolf"
|still not sure about the quotes, but it should work
   /if n $target(hp,pct) !=100 {
         |get a new one
           /goto :Getanother
           } else {
           /goto :Killdatwolf

:Getanother
    /target  npc range 4000  nopcnear 60 "wolf"
|still not sure about the quotes, but it should work
   /if n $target(hp,pct) !=100 {
         |get a new one
           /goto :Getanother2
           } else {
           /goto :Killdatwolf

:Getanother2
    /target  npc range 6000  nopcnear 60 "wolf"
|still not sure about the quotes, but it should work
   /if n $target(hp,pct) !=100 {
         |get a new one
           /goto :wolf
           } else {
           /goto :Killdatwolf

:Killdatwolf
:chasehimdown
/sendkey UP down
|turns autorun on for us
/face
/if n $target(distance)>50 {
     /goto :chasehimdown
      } else  {
      /goto Stop

:Stop
/mqlog Targeted $target(name) and ran to it.
/sendkey UP up
/echo There is your $target(name) , go kill it!

/return
/endmacro
There, that should work and maybe be a spot more effecient. It'll also run it down for us after we target it, or at least get within a distance of 50 units from it. I'm assuming you're a caster, if you're melee set it to like 15. You also don't need to be running when you start it, because it will attempt to turn autorun on for you when it has acquired a target. If that doesn't work let me know, I probably forgot a { or an } or something.

happy hunting,
~malachi
~Oh danny boy, the pipes the pipes are calling.~

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

Post by younglove » Tue Feb 18, 2003 9:14 pm

very kewl malachi thanks I'll give it a shot and post my results :D

BTW I'm a Shammy :)

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

Post by younglove » Wed Feb 19, 2003 12:20 am

Okay I just now managed to get back online to check and see how the script worked Malachi and this is is what i got

[Wed Feb 19 00:14:38 2003] There are no '60' around here.
[Wed Feb 19 00:14:38 2003] Couldn't find a comparision operator in '0'
[Wed Feb 19 00:14:38 2003] Couldn't find label 'Stop'
[Wed Feb 19 00:14:38 2003] Cleared the following: Timers Vars Arrays
[Wed Feb 19 00:14:38 2003] The current macro has ended.


any ideas here?

lifewolf
a ghoul
a ghoul
Posts: 143
Joined: Fri Oct 18, 2002 6:29 pm

Post by lifewolf » Wed Feb 19, 2003 12:48 am

younglove wrote:Okay I just now managed to get back online to check and see how the script worked Malachi and this is is what i got

[Wed Feb 19 00:14:38 2003] There are no '60' around here.
[Wed Feb 19 00:14:38 2003] Couldn't find a comparision operator in '0'
[Wed Feb 19 00:14:38 2003] Couldn't find label 'Stop'
[Wed Feb 19 00:14:38 2003] Cleared the following: Timers Vars Arrays
[Wed Feb 19 00:14:38 2003] The current macro has ended.


any ideas here?
Wolves good! No hurt wolfies! No debug for you!

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

Post by younglove » Wed Feb 19, 2003 12:50 am

Just an idle thought malachi or anyone. What if a variable was set to where the script was set to not target a mob if a PC were near in stead of just stating in the script "nopcnear 60 "wolf"?" If that would be an option in this to not get the "no 60 near" error. I forget how to set this up :?

would it be

Code: Select all

|/varset KSRadius 60 
?

younglove
a lesser mummy
a lesser mummy
Posts: 38
Joined: Fri Jul 26, 2002 3:17 am
Location: Jacksonville Fl
Contact:

Post by younglove » Wed Feb 19, 2003 1:07 am

Okay found out one of the errors

In malachi's script where it says

Code: Select all

:Killdatwolf 
:chasehimdown 
/sendkey UP down 
|turns autorun on for us 
/face 
/if n $target(distance)>50 { 
     /goto :chasehimdown 
      } else  { 
      /goto Stop 
where it says gog to stop it should look like

Code: Select all

 
      /goto :Stop 
So far that is what I've found

now if only I could figure out why the "there are no 60 around here" problem fixed I'll be gtg

Oh and lifewolf I understand completely about your love of wolves. Unfortunately the baking skill does require wolf meat and since no wolf meat is readily available at the vendors A shammy has to do what a shammy has to do :) Besides what do you expect of a barbarian :lol:

Malachi
a hill giant
a hill giant
Posts: 227
Joined: Tue Nov 19, 2002 1:29 am
Contact:

roops

Post by Malachi » Wed Feb 19, 2003 10:09 am

Hehe, that's what I get for coding on the fly.

I've never used the "nopcnear" before, I'm not 100% sure that it can be stacked with range.

Other than that, check that line, it looks like I might have an extra space in there.

Code: Select all

    /target  npc range 2000  nopcnear 60 "wolf" 
should maybe be

Code: Select all

    /target  npc range 2000 nopcnear 60 "wolf" 
(of course fix them in every npc range line, I just cut and pasted when I did that)
I'm not sure though. Like I said, I don't know that nopcnear can be nested so well. It looks like it can in the readme, but again me no sure. It would appear from the error code that "there are no 60" that they can't. Take it out and try again. (it's searching for a 60, but it's supposed to be searching for a wolf)

Fippy used the KSRadius variable in his hunting script, and what you wrote (minus the pipe comment) is what he used.

You might try changing the nopcnear 60 or whatever to the loop AFTER it has targeted and begins to run to the mob, or you could just forgoe it like I said since you're already checking for 100% hp's.

As for the empty comparison, that *may* be because it's trying to get the hp's from a variable that hasn't been filled. I dunno about that one...I guess maybe have to add the hp check to the found routine....

Sorry I'm not much help, lol.
~malachi
~Oh danny boy, the pipes the pipes are calling.~

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

/target range

Post by grimjack » Wed Apr 16, 2003 6:24 am

I was under the assumption that range was used to specify a min/max level not distance.
example:
/target range 10 20 npc orc
would target an orc that as between the levels 10 and 20.

From the documentation for /target:
range <min> <max> Limits matching to level range

Does it work based on level or distance?

Zxeses
a ghoul
a ghoul
Posts: 103
Joined: Tue Jan 07, 2003 4:17 pm

corrections

Post by Zxeses » Wed Apr 16, 2003 11:23 am

grimjack is correct, you dont want to use range, use radius.


/target npc radius 6000 nopcnear 100 range 1 20 "wolf"

Notice also the order that I stack them, from most general to most specific.