hunter.mac simple hunt macro with loot capability.

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

Moderator: MacroQuest Developers

KhaosWolf
a lesser mummy
a lesser mummy
Posts: 41
Joined: Wed Sep 10, 2003 11:34 pm

Freezing of keyboard

Post by KhaosWolf » Sun Nov 30, 2003 4:20 pm

When running this macro, during its run to the mob you cant do anything using the keyboard. Anyway to fix this?

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Sun Nov 30, 2003 7:22 pm

Hi there, this macro works great! However, I do have a question, if anyone knows how to add this because I am new to coding.

I play a ranger and would like to keep myself Spirit of Eagled and hasted during battle with my Dark Cloak of the Sky, and healed when needed. (clicks from inventory)

And also, is there a way to make the macro use the Entrap AA (either /alt activate or hit my hotbutton) and check for resists and interrupts?

Maybe there is a more advanced macro already like this that I have not found.

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

Post by Drunkensloth » Wed Dec 03, 2003 3:45 am

stop being lazy demorphina :P


heres how to make it use your entrap aa...


find out the EQ command to use your entrap ability, its like /doalternate or whatever it is, find the correct number for entrap

during the movetomob section, add in a line, something like this...

/if n $target(distance)<=65 /doalternete 3204230423094

which would CAST entrap or whatever

THEN to see if it worked!
you need to be a little more... tricky

i use animations to tell if it resisted~

so you need to add TWO loops

so before that first if statement,
add in a :resist
and after... add in a
/if $target(animation)!=34 /goto :resist

this will check to see if the mob is walking... and if it is... it will go through and recast entrap! check out which animation is which, i forget... its easy to test tho... go snare a mob, and type /echo $target(animation)
and youll get a number~
root a mob and do it to get a rooted mob
and have a mob full out run chase you and do it to get a mob running~


and for the SoE buff... you can either add an event for when it fades to recast... or you can have a small sub on a timer check all yoru buffs to see if you have it or not if you need someone to do this... msg me
same thing with haste and for heals you can add a /if n $char(hp,pct)<=45 /goto Heal

where Heal is a sub that targets yourself and heals with chloro or whatever, enjoy~
And here I was clicking like a sucker!

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Wed Dec 03, 2003 3:54 am

or use event driven resists, ie:

use a variable to track your last spell casted, and when you see "your spell has been resisted" or whatever the actual message is, you cast the last spell that you casted again. Animation checking would work here too though, expecially if you wanted to make sure the mob was both rooted and snared.

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Wed Dec 03, 2003 3:57 am

Snare spells dont return a message outside of a certain range. And Im not being lazy, Im just learning :p

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

Post by Drunkensloth » Wed Dec 03, 2003 3:57 am

problem with event driven things is you need a doevents at the right time for it to work... and what if you get 2 resists... you need to have doevents in right place... the animations will work... no matter the resists~
but you may need to worry about location~
And here I was clicking like a sucker!

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Wed Dec 03, 2003 4:03 am

only problem i have with animations is when EQ bugs, your char dies and your corpse timer expires cause the mob was "iceskating" due to lag and the script never recovers. though, as you said due to range animationsa re probably the best bet.

Scary_Penguin
a lesser mummy
a lesser mummy
Posts: 76
Joined: Sun Nov 16, 2003 11:45 am

Post by Scary_Penguin » Wed Dec 03, 2003 4:07 am

Adding that line would cast the AA while I was running. How can I make it stop me? I hate being ignorant.

I was thinking that I would use the MoveTo Sub as a place for it, but make it cast the AA first, then start attacking.

Alas, I know nothing, so trial and error is my only way to figure stuff out for now :p

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

Post by Drunkensloth » Wed Dec 03, 2003 4:57 am

this mac is what i used to learn everything i know :)

haha

:)

after that i picked up small things here and there... and having someone post about how to make my stuff better was always good, so i suggest trying out some code, posting what you have, what problems it has, and do things that way :)

it may not be very efficient, but you will learn

ok ready? heres A possible way to make it stop you from running~
oh just thought about this... but it would probably cast entrap MULTIPLE times... so you should make a variable to check it, so we will call our variable checker and i forgot if its != or =! and i still dont remember snare animation number~

i will post everything to include resist check

Code: Select all

/declare checker local
:resist
/if n @checker!=1 /if n $target(distance)<=70 {
    /sit
    /delay 0
    /sit off
    /activate altnerate or /click hotkey#
    }
/if n $target(animation)=!34 {
     /varset checker 2
     /goto :resist
     }

we could make the sit command even smarter....

you might wanna use this later. i liked knowing this tidibt
/if $char(state)=!"SIT" /sit

$char(state) will return SIT STAND DUCK
dependong, so this says, if its NOT sitting to /sit :)
And here I was clicking like a sucker!

Drunkensloth
a lesser mummy
a lesser mummy
Posts: 67
Joined: Sat Oct 18, 2003 2:54 am

sorry for the double post

Post by Drunkensloth » Wed Dec 03, 2003 4:59 am

sorry for the double post, but i think i am gonna work on making it so you can actually type while its moving...

its only a matter of changing the keypress up loops with
/press Num_lock

and a well placed /press up
to stop it when it needs to readjust....
i am gonna look into doing this... but i dont really need it.... yet :P
And here I was clicking like a sucker!

User avatar
Undies
a ghoul
a ghoul
Posts: 94
Joined: Mon Oct 20, 2003 9:12 pm

Post by Undies » Mon Dec 08, 2003 8:15 pm

Just a note on weapon's addition that searches through all possible targets for the closest one.

As a dev mentioned in another thread, all targets go through to the server, so it is probably unwise to cycle through a load of targets in a short time frame (hey look at me SOE, see how many targets I can scan in 100 msec?).

The $searchspawn feature should enable this technique without target locking but at the time of writing it is bugged. It should be fixed in the next patch or two.

Brick 37
decaying skeleton
decaying skeleton
Posts: 6
Joined: Sun Nov 16, 2003 12:35 am

Post by Brick 37 » Wed Dec 24, 2003 11:49 am

looked a bit at the code and insert a /face fast where i though it would do some good :)

change this in the FastMove sub from:

Code: Select all

   /varadd ObstCount 1 
   /if n @ObstCount>=3 { 
      /call CheckObst 
   } 
   /goto :fastmoveloop 
/return
and

to this:

Code: Select all

   /varadd ObstCount 1 
   /if n @ObstCount>=3 { 
      /call CheckObst 
   } 
   /face fast
   /goto :fastmoveloop 
/return
So the will face when he moves. This worked for me, since im hunting moving targets.


/Brick 37

gn0m3
a lesser mummy
a lesser mummy
Posts: 39
Joined: Sat Dec 13, 2003 10:43 am

...

Post by gn0m3 » Sat Dec 27, 2003 12:08 pm

This is a great macro Grim.

I'm an enchanter, so I added a few things for us hunting greenies with a pet:

First, CheckBuffs called before GetTarget:

Code: Select all

sub CheckBuffs

/if n $char(buff,"arcane rune")==0 {
	/cast "arcane rune"
	:casting_ar
	/if $char(casting)=="TRUE" {
		/echo CASTING
		/goto :casting_ar
	}
	/delay 25
}

/if n $char(buff,"voice of quellious")==0 {
	/press ESC
	/press F1
	/echo VoQ on $target(name)
	/cast "voice of quellious"
	:casting_voq
	/if $char(casting)=="TRUE" {
		/echo CASTING
		/goto :casting_voq
	}
	/delay 25
}

/delay 25

/if n $char(buff,"levitation")==0 {
	/press ESC
	/press F1
	/echo Levitation on $target(name)
	/cast "levitation"
	:casting_lev
	/if $char(casting)=="TRUE" {
		/echo CASTING
		/goto :casting_lev
	}
	/delay 25
}
Next, as part of Combat, a check that my pet is still up:

Code: Select all

/if $char(class)==Enchanter {
	/echo Tab Target $target(name)
	/press TAB
	/delay 2
	/press ESC
	/delay 2
	/press F1
	/delay 2
	/press F1
	/delay 2
	/echo target pet $target(name)
	/if $target()=="FALSE" {
		/echo "Pet down"
		/endmacro
	}
	/press ESC
	/delay 2
	/press F1
	/delay 2
	/press TAB
	/echo kill target $target(name)
	/pet kill
}
Finally, I also enhanced GetTarget by specifying that it wait a set number of minutes if it can't find any targets and gave it a max range to check within...

Code: Select all

sub GetTarget 
:Acquire 
/echo Acquiring...
/target nopcnear @KSRadius npc "@MainArray(2,$rand(@MobArraySize))" 
/echo How about $target(name)
/varset MyTarget $target(id) 
/varset TargetDead 0 
/if n $target(id)==0 /goto :Acquire 
/if $target()=="False" /goto :Acquire 
/if n $target(distance)>@MaxTargDist {
	/echo Too Far $target(distance)
	/goto :Acquire
}
/varset HasTarget 1 
/echo Distance $target(distance)
/varset MobToHunt $target(name) 
/return 
... and finally I wrote a sub that will move thechar back to his original location if he strays too far. I had a problem with my char slowly ending up in a corner of the zone, and since I do ranged hunting, it won't go back to its original spot until serendipidous spawns.

Code: Select all

sub MoveToOrig
	/if n $distance(@OrigLocY,@OrigLocX)>@MaxDistFromOrig {
		/call moveto @OrigLocY @OrigLocX
	}
/return

bzt
a lesser mummy
a lesser mummy
Posts: 77
Joined: Fri Oct 10, 2003 3:39 pm

Post by bzt » Mon Jan 05, 2004 5:05 pm

couple questions..this works...BUT!..

Im farming silks in EK..it targets a spider across the zone..I run over to spider and someone is killing it..the macro starts attacking the spider anyway..


2) how the heck do you stop this macro when you target something across the zone and it starts running..the keyboard doesnt work..so I cant tyep /end..or even hit a /end hotkey.

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 » Mon Jan 05, 2004 9:34 pm

This has been dealt with already.


[edit]: Deleted nonsense.