Hunter.mac - Hunting script --- Updated

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

Moderator: MacroQuest Developers

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

Post by Ariain » Fri Oct 11, 2002 7:45 pm

If somthing agros me while Iam fighting another mob I dont seem to turn auto attack on for the new mob
Looting doesnt seem to work reutnr the syntax for /click
Just wondering what I am doing wrong in reguards to this.

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 11, 2002 8:24 pm

Hey still luv the script ;) one question tho

Im not sure how to go about it with your script, but seeing as how im a monk, is there anyway to implement deletion of silver and copper??

such as /if $char(copper)>0 /click left destroy copper (or something)

not sure what the code is but if you know could u lemme know :P

Thanks!

Draekz

Draekz
a hill giant
a hill giant
Posts: 263
Joined: Thu Aug 01, 2002 6:07 pm
Location: Winnipeg, Manitoba, Canada

Post by Draekz » Fri Oct 11, 2002 8:35 pm

Another thing is..because the script is moving me constantly (maybe to maintain distance) it keeps spinning me in circles around the mob (the script runs me right on top of hte mob..then backs up and runs around) possibly because its getting the even "Cant see your target" or whathave you..unfortunately this kills me fast as im simply running around the mob letting it hit me :P


Is thre any worka round for this spinning effect?

Draekz

User avatar
ap50
a snow griffon
a snow griffon
Posts: 425
Joined: Sun Aug 18, 2002 2:29 pm

Deleting Coins

Post by ap50 » Fri Oct 11, 2002 9:03 pm

The things you can find when you click the SEARCH button....

http://macroquest2.com/phpBB2/viewtopic ... te%20coins
[color=yellow][size=92][b]Just because you're paranoid, it doesn't mean everyone isn't out to get you![/b][/size][/color]

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Oct 12, 2002 10:11 am

Are you using the most up to date script ?. I made some changes that got rid of the spinning around the mob a couple of updates ago.

I have changed this script by moving the zone specific stuff to a seperate .mac whick you #include at the start to make it easier. Still testing it so ill post the update in a few hours.

Fippy

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Oct 12, 2002 7:21 pm

Updated script to move zone specific stuff to a seperate file.

Fippy

Ariain
a ghoul
a ghoul
Posts: 88
Joined: Fri Oct 11, 2002 10:35 am

For bards.

Post by Ariain » Sun Oct 13, 2002 3:33 am

Its not even close to being perfect but it can be used with other macros which is why I made it. With alot of help from Amadmonk and others.

Code: Select all

#define SONG1 t1
#define SONG2 t2
#define SONG3 t3
#define SONG4 t4

#event MissedNote "You miss a note, bringing your song to a close!" 
#event Stunned "You are unstunned."

Sub Main
/call sing1
 :Mainloop
/doevents
/goto :Mainloop


Sub Sing1
/stop song
/delay 2
/cast 5
/varset SONG1 50s
/varset SONG2 31
/goto :Mainloop


Sub Sing2
/stop song
/delay 2
/cast 4
/click left hotkey 6
/click left hotkey 8
/click left hotkey 9
/click left hotkey 7
/varset SONG2 50s
/varset SONG3 31
/goto :Mainloop


Sub Sing3
/stop song
/delay 2
/cast 2
/click left hotkey 7
/click left hotkey 9
/click left hotkey 8
/click left hotkey 6
/varset SONG3 50s
/varset SONG4 31
/goto :Mainloop


Sub Sing4
/stop song
/delay 2
/cast 1
/varset SONG4 50s
/varset SONG1 31
/goto :Mainloop


Sub Event_Timer

/if n $SONG1==0 /call Sing1
/if n $SONG2==0 /call Sing2
/if n $SONG3==0 /call Sing3
/if n $SONG4==0 /call Sing4
/doevents
/goto :Mainloop

Sub Event_Missednote
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/varset SONG4 50s
/call sing1


Sub Event_Stunned
/varset SONG1 50s
/varset SONG2 50s
/varset SONG3 50s
/varset SONG4 50s
/call sing1

boldor
a ghoul
a ghoul
Posts: 94
Joined: Tue Sep 10, 2002 11:46 am

Looting

Post by boldor » Tue Oct 15, 2002 8:05 am

Fippy

Using 20011001a, and the most current parts you have listed under your inital post, runs and hunts down the monsters listed no problem.

For some reason, it appears only to keep the first occurance of the Item listed in the array.

Here is the singlet that I am using from your code:

Code: Select all

| Cycle through each loot slot 
   /varset LootSlot 0 
   :LootLoop 
      /delay 1 
      /click left corpse $LootSlot 
      /delay 3 
      /if "$cursor()"!="TRUE" /goto :NoLoot 

      | Scan list of loot to keep and auto drop it if we are keeping it. 
      /varset CheckLoot 0 
      :GetLoot 
         /if "$cursor(name)"~~"$a(1,$CheckLoot)" { 
            /mqlog  Looted $cursor(name) 
            /click left auto 
            /goto :Looted 
         } 
          
         /varadd CheckLoot 1 
         /delay 0 
         /if n $CheckLoot<$LootTotal /goto :GetLoot 
          
         | Checked list of loot to keep with no matches so destroy (must turn on fast destroy) 
         /mqlog Destroying $cursor(name) 
         /click left destroy 
          
         :Looted 
         /varadd LootSlot 1 
      /delay 0 
      /goto :LootLoop 
   :NoLoot        


Then the set up for the loot from eastcommons.mac

| This sub sets up the list loot we wish to keep. 
| 
sub SetLootList 

   /varset a(1,0) "silk" 
   /varset a(1,1) "quality" 
   /varset a(1,2) "High" 
   /varset a(1,3) "Low" 
   /varset a(1,4) "Thick" 
   /varset a(1,5) "Medium" 
       
  
   | Put number of items in list here. 
   /varset LootTotal 6 

/return 

I added elements 2 thru 6 as an attempt to have it save those off as well.

Thanks for you help

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Oct 15, 2002 10:05 am

Sorry boldor cant see whats wrong. I just ran it for an hour farming Leather Padding components in EC and I always picked up multiple drops of the same thing (e.g. Spiderling silks). if you look in the logs directory and skim through hunter.mac.log you should see the Looted XXX messages.


Fippy

PS I did notice the aggro code isnt working 90% of the time so I am gonna take a look at that.

boldor
a ghoul
a ghoul
Posts: 94
Joined: Tue Sep 10, 2002 11:46 am

partial log file from today

Post by boldor » Tue Oct 15, 2002 4:09 pm

Fippy,

While on lunch today I ran the macro again and the log shows a "Quality" pelt being destroyed argh

2002/10/15 14:04:52] Targeted a_black_bear04 range 210 on alert list 1

[2002/10/15 14:04:53] Targeted a_black_bear04 range 235 on alert list 1

[2002/10/15 14:04:54] Targeted a_black_bear04 range 211 on alert list 1

[2002/10/15 14:04:58] In melee range

[2002/10/15 14:04:58] Targeted a_black_bear04 range 3 on alert list 1

[2002/10/15 14:04:58] Started melee

[2002/10/15 14:04:58] In melee with NULL at 0 I am at 100

[2002/10/15 14:04:58] Target is dead

[2002/10/15 14:04:58] Advancing to corpse

[2002/10/15 14:04:59] starting to loot

[2002/10/15 14:05:00] Destroying Ruined Bear Pelt

[2002/10/15 14:05:01] Targeted a_woodland_lioness00 range 55 on alert list 1

[2002/10/15 14:05:02] close to 337 4063

[2002/10/15 14:05:08] In melee range

[2002/10/15 14:05:08] Targeted a_woodland_lioness00 range 8 on alert list 1

[2002/10/15 14:05:08] Started melee

[2002/10/15 14:05:08] In melee with a_woodland_lioness00 at 100 I am at 100

[2002/10/15 14:05:09] In melee with a_woodland_lioness00 at 100 I am at 100

[2002/10/15 14:05:09] 14 from a_woodland_lioness00

[2002/10/15 14:05:09] In melee with a_woodland_lioness00 at 100 I am at 100

[2002/10/15 14:05:10] In melee with a_woodland_lioness00 at 100 I am at 100

[2002/10/15 14:05:10] 14 from a_woodland_lioness00

[2002/10/15 14:05:11] In melee with a_woodland_lioness00 at 23 I am at 100

[2002/10/15 14:05:11] 14 from a_woodland_lioness00

[2002/10/15 14:05:12] 0 from NULL

[2002/10/15 14:05:12] In melee with NULL at 0 I am at 100

[2002/10/15 14:05:12] Target is dead

[2002/10/15 14:05:12] Advancing to corpse

[2002/10/15 14:05:12] starting to loot

[2002/10/15 14:05:14] Destroying Ruined Cat Pelt

[2002/10/15 14:05:14] Destroying Medium Quality Cat Pelt

[2002/10/15 14:05:15] Destroying Lion Tail

[2002/10/15 14:05:16] Targeted a_giant_spider03 range 610 on alert list 1

[2002/10/15 14:05:17] Targeted a_giant_spider03 range 616 on alert list 1

[2002/10/15 14:05:17] Targeted a_giant_spider03 range 604 on alert list 1

2002/10/15 14:08:36] In melee with a_spiderling10 at 100 I am at 100

[2002/10/15 14:08:37] In melee with NULL at 0 I am at 100

[2002/10/15 14:08:37] Target is dead

[2002/10/15 14:08:37] Advancing to corpse

[2002/10/15 14:08:37] starting to loot

[2002/10/15 14:08:39] Looted Spiderling Silk

[2002/10/15 14:08:40] Destroying Spider Legs

[2002/10/15 14:08:41] Targeted a_large_spider00 range 327 on alert list 1

[2002/10/15 14:08:42] Targeted a_large_spider00 range 323 on alert list 1

[2002/10/15 14:08:42] Targeted a_large_spider00 range 312 on alert list 1

[2002/10/15 14:08:42] Targeted a_large_spider00 range 299 on alert list 1

[2002/10/15 14:08:43] Targeted a_large_spider00 range 285 on alert list 1

[2002/10/15 14:08:43] Targeted a_large_spider00 range 271 on alert list 1

[2002/10/15 14:08:44] Targeted a_large_spider00 range 257 on alert list 1

[2002/10/15 14:08:44] Targeted a_large_spider00 range 244 on alert list 1

[2002/10/15 14:08:44] Targeted a_large_spider00 range 231 on alert list 1

[2002/10/15 14:08:45] Targeted a_large_spider00 range 218 on alert list 1

[2002/10/15 14:08:45] Targeted a_large_spider00 range 204 on alert list 1

[2002/10/15 14:08:46] Ouch! ran into something

[2002/10/15 14:08:51] In melee range

[2002/10/15 14:08:51] Targeted a_large_spider00 range 11 on alert list 1

[2002/10/15 14:08:51] Started melee

[2002/10/15 14:08:53] In melee with NULL at 0 I am at 100

[2002/10/15 14:08:53] Target is dead

[2002/10/15 14:08:53] Advancing to corpse

[2002/10/15 14:08:53] starting to loot

[2002/10/15 14:08:55] Looted Spider Silk

[2002/10/15 14:08:55] Looted Spider Silk

[2002/10/15 14:08:56] Looted Woven Spider Silk

[2002/10/15 14:08:57] Targeted NULL range 0 on alert list 1


May just have to write my own to avoid the use of the array which has a ncie thought to it. Sigh

Bolo

Nerfy
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Oct 15, 2002 11:37 am

Target only mobs on alert?

Post by Nerfy » Sat Oct 19, 2002 11:47 am

Just wondering if this is a feature or a bug =). When I run this macro it seems like it ignores the alert lists I have set up. It goes after the first NPC that it sees! As it is currently written, will it always get a target, regardless of whether that target is on one of the alert lists? I was doing my best to run this in gFay so that it didn't attack pixes. I added pixies to the avoid list yet it was still bashing on them.

What I was hoping for is a macro that would only hunt for those npcs that I listed, if one of those wasn't found then it would run the RestUp routine. If this can't be easily adapted then I'll try to write one on my own.

As a side note, do not run this in gFay with 'orc' on your hit list. There is a gaurd named 'Orcslayer' and... well, he's pretty strong. We'll leave it at that.

Thanks for any help, great macro.
----------
* Nerfy *

Nerfy
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Oct 15, 2002 11:37 am

Follow Up

Post by Nerfy » Sat Oct 19, 2002 6:07 pm

I tested this out. I set all three lists to 'bat', and the first thing I ran after was an orc pawn. Am I missing a setting? I created a new file based off of the EastCommons.mac file, and changed the include to include mine. Then I wiped all of the AvoidLocs, set a HomePoint, and set the first three lists to bat, the last one (mobs to avoid) to orc, ran the thing and it took me after an orc pawn.

Checking the logs I see:
[2002/10/19 XX:XX:XX] Targeted orc_pawnXX range 13 on alert list 1
Just to verify, here's my alert list 1:

Code: Select all

   /alert clear 1 
   /alert add 1 npc radius 500 bat 

Any advice?
----------
* Nerfy *

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Oct 19, 2002 8:07 pm

Nerfy

Post the included .mac and the zone you ran it in and ill check it out. Sounds like it could be a problem with alerts but I can double check my code.

Boldor

Ill add in some more logging in the looting loop so the comparisons will appear in the logfile.

Fippy

Nerfy
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Oct 15, 2002 11:37 am

gFay.mac

Post by Nerfy » Sat Oct 19, 2002 8:12 pm

Here it is:

Code: Select all

| gFay.mac 
| 
| Zone specific Info for Hunter Script 
#define HomeY v58 
#define HomeX v59 

| This Sub sets up the alert lists for the mobs we want to hunt 
| 
sub SetAlerts 
| Setup Alerts for the most important mobs here (rare) 
| 
   /alert clear 1 
   /alert add 1 npc radius 500 bat 

| Setup Alerts for the next most important mobs here (uncommon) 
| 

   /alert clear 2 
   /alert add 2 npc radius 1000 bat
    
| Setup Alerts for the next most important mobs here (common) 
| 
   /alert clear 3 
   /alert add 3 npc bat

| Setup Alerts for Scary mobs here 
| 
   /alert clear 4 
   /alert add 4 npc radius 500 orc 

/return 


| This sub sets up the list loot we wish to keep. 
| 
sub SetLootList 

   /varset a(1,0) "bat"
   /varset a(1,1) "fur"
  
   | Put number of items in list here. 
   /varset LootTotal 2

/return 



| This sub sets our home point we return to if low on health 
| 
sub SetHomePoint    

   | Set home to be entrance of tunnel 
   /varset HomeX 204.63 
   /varset HomeY 137.18
   /mqlog Home Point is $HomeX, $HomeY - POD Lift

/return 


| This sub does the checks to make sure we avoid certain specified areas 
sub CheckObstacles 

| this sub just calls avoidloc for each area i want to avoid in EC 
      
   | Single Hut Near WF Zone 
   |/call avoidloc 184 -856 30 
    
/return

Note that I left a single avoidloc in there just in case. If/when I start to use those I wanted to remember the format.
----------
* Nerfy *

Nerfy
a lesser mummy
a lesser mummy
Posts: 72
Joined: Tue Oct 15, 2002 11:37 am

For what it's worth..

Post by Nerfy » Sat Oct 19, 2002 8:34 pm

I have a much simpler macro that I've cobbled together from others on these boards that is working fine. It only uses 1 alert list though - and the logic isn't as nice.

After running the script with the above gFay.mac, it targets the nearest NPC - regardless of if it is on the alert list. If I then do a /endmacro, followed by a /alert list # for the three lists that I defined... well, they appear just as I defined them. Even though the log states that it aggroed on the random closest npc because he was on list 1.
----------
* Nerfy *