farmpad.mac - farm quality pelts and spiderling silk

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

Moderator: MacroQuest Developers

arantius2
orc pawn
orc pawn
Posts: 12
Joined: Sun Sep 01, 2002 10:10 pm

farmpad.mac - farm quality pelts and spiderling silk

Post by arantius2 » Wed Sep 04, 2002 11:51 pm

This macro, semi-intelligently, will kill mobs that drop quality pelts, and spiderling silks for leather padding. It will loot the body and keep just those items, quality pelts and spiderling silks, destroying the rest. It has been designed for running in East Commons.

Features:
-Smart tree navigation: If you are stuck like on a tree, back up and strafe left or right a few steps, go on your way. If you have been trying for 2 minutes and haven't made it, assume you're really stuck, give up, pick new target.
-Anti-KS code: Target selected initially with "nopcnear" range, and then this is verified once we get into range of the mob. I've noted good results of running up to the mob, seeing a player near, and automatically giving up and picking a new target.
-Easy cancel: Press esc and you will cancel your target and choose a new one. The same one if it is still the closest. Press F1 to target yourself and the script terminates (turning off attack and run and such along the way).

Limitations:
-This is designed for a high level melee character. I use it with a level 48 shadowknight, he runs around and reams these things, takes no damage, and goes on his merry way. This script does not attempt to cast in any way, or verify safety. That's your job, it's a bad idea to really go AFK during this anyway, what if a GM shows up?
-This was designed for East Commons, a relatively open flat zone. More trees and more buildings equals more getting caught on them. Plus:
-Faction issues are important. My shadowknight will occasionally aggro the rangers, or I found (the hard way) a cleric guildmaster that doesn't quite like him. I suggest you watch where you are going if anything big might try to kill you.

DISCLAIMER: These motions are rather machinelike and I personally would say it's obvious that it's a script. The Anti-KS code helps IMO, the people you would have KSed would be the most likely to notice. But, if you turn this script on and go AFK, you might well be discovered. The turning and running right to the correct mobs, and the rigid paths that are followed are dead giveaways.

And now for the code!!!!

Code: Select all

| farmpad.mac
| farm quality pelts and spiderling silk in EC
| for making into leather padding
#include routines.mac

sub Main
	/lootn never
	/alert clear 1
	/alert add 1 npc bear
	/alert add 1 npc kodiak
	/alert add 1 npc spiderling
	/alert add 1 npc puma
	/alert add 1 npc lion
	/alert add 1 npc cat
	/alert add 1 npc wolf
	/press esc

	:Start
		/call findTarget
		/varset v11 $target(id)
		/call killTarget
		/if n $target(id)==$char(id) /goto :Stop
		/target corpse
		/if n $target(id)==$v11 /call lootTarget
	/goto :Start

	:Stop
	/attack off
	/call autorun 0
	/lootn always
/return

Sub findTarget
	/target alert 1 nopcnear 60
	/delay 2
/return

Sub killTarget
	/varset v60 $target(id)
	/if $v60==0 /return
	/varset t0 2m
	/varset v12 1
	/varset v80 0
	/face nopredict

	:Follow
		/if n $target(id)==$char(id) /return
		/if "$target(id)"!="$v60" /goto :KillDone
		/if "$target(name)"~~"corpse" /goto :KillDone
		/face nopredict
		/if n $target(distance)>12 /call autorun 1
		/if n $target(distance)<15 {
			/call autorun 0
			/if $v12==1 {
				/if n $target(id)==$char(id) /return
				/call findTarget            |anti-ks code

				/if "$target(id)"!="$v60" /goto :KillDone
				/attack on
				/varset v12 0
			}
		}
		/if n $t0==0 /press esc
		/varset v51 $char(x)
		/varset v52 $char(y)
		|/delay 1
		/if n $v51==$char(x) /if $v52==$char(y) /call tree $v12
	/goto :Follow
	
	:KillDone
	/sendkey up up
	/attack off
	/delay 3
/return

Sub Tree
	/delay 3
	/if $p0==0 /return
	/sendkey up up
	/sendkey down down
	/delay 2
	/sendkey up down
	/sendkey down ctrl
	/if n $rand(99)>50 {
		/sendkey down right
	} else {
		/sendkey down left
	}
	/delay 3
	/sendkey up right
	/sendkey up left
	/sendkey up ctrl
	/varset v80 0
/return

Sub lootTarget
	/delay 2
	:gotocorpse
	/if n $target(distance)>10 {
		/face
		/sendkey down up
		/goto :gotocorpse
	}
	/sendkey up up

	/face
	/loot
	/delay 10
	
	/varset v10 0
	:LootLoop
		/click left corpse $v10
		/delay 5
		/if "$cursor(name)"=="NULL" /goto :LootDone
		/if "$cursor(name)"~~"silk" {
			/click left auto
		} else /if "$cursor(name)"~~"quality" {
			/click left auto
		} else {
			/click left destroy
			/delay 1
			/click left 458 420
			/delay 1
		}
		/varadd v10 1
	/goto :LootLoop
	
	:LootDone
	/delay 3
	/press esc
	/delay 2
/return

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Thu Sep 05, 2002 1:34 am

Create another alert for the guys that kill you....

noalert #: limits matching to spawns that do not have an alert that would be active at their location

Code: Select all

/alert add 1 radius 500 "Hill Giant"
/target noalert 1 
This will not trigger for anything within 500 ft of a Hill Giant

pxlpluker
a lesser mummy
a lesser mummy
Posts: 53
Joined: Tue Aug 27, 2002 12:20 pm

Post by pxlpluker » Thu Sep 05, 2002 3:16 pm

what is the

Code: Select all

/lootn never 
command ?

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Thu Sep 05, 2002 3:21 pm

/lootn never
/lootnodrop never
- Plazmic

arantius2
orc pawn
orc pawn
Posts: 12
Joined: Sun Sep 01, 2002 10:10 pm

Post by arantius2 » Thu Sep 05, 2002 3:55 pm

Imperfect, let me use the rangers in EC as an example. My SK will wander *past* them and aggro them, quite often. I haven't yet seen him stop to fight something within aggro range though. So the real problem is just that this macro moves you all over the place, and possibly that is inside aggro range of something that might want to kill you.

I suppose I could use alerts to watch if something KoS is nearby, but the avoidance routines would be very dificult. I just am careful and don't really go AFK, hit F1 and stop for a moment if I'm headed the wrong way ;)

And the /lootnodrop never is because of all the junky no-drop newbie quest pieces that drop all over the old world now.

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

avoiding a target is easy...

Post by Plazmic » Thu Sep 05, 2002 4:43 pm

Assuming my math is right here... this will make you head tangent around the target, keeping yourself in the same general direction you were headed.

Code: Select all

targ           new heading
\_             __/
  \_        __/
    \_   __/
      \ /
       x
       |
       |
      you

/if n $calc($target(headingto)-$char(heading)<0 {
   /face heading $calc($target(headingto)+90)
} else {
   /face heading $calc($target(headingto)-90)
}
- Plazmic

arantius2
orc pawn
orc pawn
Posts: 12
Joined: Sun Sep 01, 2002 10:10 pm

Post by arantius2 » Thu Sep 05, 2002 5:41 pm

All the mobs this script huts roam, always moving (that's why the /face is in the loop in the killTarget sub). The complexity I referred to would be constantly checking for the kos mobs as you move, and making sure that you are still headed towards where the mob really is.

Plus I use the target for canceling the script, which would be another layer of complexity.

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Post by Banned_From_EQ » Sat Sep 07, 2002 1:14 pm

When i tried this I let it run for a few hours. He kills things just fine but cant loot or destroy anything and gets stuck on the corpses. Any idea's?

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

Post by Fippy » Sat Sep 07, 2002 1:41 pm

Without more info I would guess your not running the old UI

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Post by Banned_From_EQ » Sun Sep 08, 2002 4:43 am

was running old ui. It didnt appear any clicking would go on and if it did it would pick up ruined pelts and just sit on corpse then end macro ideas if you need more ask and i will answer best i can

arantius2
orc pawn
orc pawn
Posts: 12
Joined: Sun Sep 01, 2002 10:10 pm

Post by arantius2 » Sun Sep 08, 2002 1:03 pm

If you've got a slow computer or connection, you might just need more /delay commands sprinkled around where appropriate. I only know it works fine for me :)

Banned_From_EQ
orc pawn
orc pawn
Posts: 16
Joined: Mon Jun 24, 2002 7:01 pm

Post by Banned_From_EQ » Mon Sep 09, 2002 4:40 am

System specs

amd k7 700
512 megs of ram
geforce2 gts 32meg
cable connection

Consilium
Contributing Member
Contributing Member
Posts: 100
Joined: Wed Oct 02, 2002 10:42 pm

also tried this

Post by Consilium » Thu Oct 03, 2002 5:19 am

I also tried this only to have it hang on corpses with anything other then greater then med hides and spiderling silks... it hangs waiting for my destroy confirmation. If I manuelly click the yes for destroy the char then runs to another mob.

Hmm now I am thinking perhaps a turn fast destroy on command would remedy this as it is attempting the destroy but interface wants the confirmation.


Place: everfrost
Old UI
AMD 1.7ghz
64mb Vid card
1gig Ram
DSL
-SH
+Student
digitalsavior.com

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Re: also tried this

Post by DeathSpiral » Thu Oct 03, 2002 1:28 pm

Consilium wrote:Hmm now I am thinking perhaps a turn fast destroy on command would remedy this as it is attempting the destroy but interface wants the confirmation.
Any time you want to use /click left destroy in a macro you have to have fast item destroy on.

Cheers!
I am orc pawn, hear me yell for centurians...

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Thu Oct 03, 2002 1:36 pm

or you can click the exact xy coordinates of the yes button... the coin destroy macro had em for 800x600 i beleive.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]