fight.mac - face and kill macro for melee classes

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

Moderator: MacroQuest Developers

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

fight.mac - face and kill macro for melee classes

Post by L124RD » Tue Jul 02, 2002 2:10 pm

Salutations,
This is a macro(like the title says) that goes to, then kills (following) the enemy which you have selected when you started the macro. The autoloot won't work

without autoloot

Code: Select all

Sub main
/echo Fighting $target(name). It is level $target(level).
/varset v0 $target(name)
/varset v1 $target(id)
/face
/sendkey down up
/attack on
:CloserAF
  /if "$target(id)"!="$v1" /goto :EndAF
  /if n $target(distance)>20 /sendkey down up
  /if n $target(distance)<11 /sendkey down down
  /if n $target(distance)<21 /sendkey up up
  /if n $target(distance)>10 /sendkey up down
  /face
  /goto :CloserAF

:EndAF
  /echo $v0 is dead
  /sendkey up up
  /sendkey up down
  /attack off
  /varset v0 0

/return
with autoloot

Code: Select all

Sub main
/echo Fighting $target(name). It is level $target(level).
/varset v0 $target(name)
/varset v1 $target(id)
/face
/sendkey down up
/attack on
:CloserAF
  /if "$target(id)"!="$v1" /goto :EndAF
  /if n $target(distance)>20 /sendkey down up
  /if n $target(distance)<11 /sendkey down down
  /if n $target(distance)<21 /sendkey up up
  /if n $target(distance)>10 /sendkey up down
  /doability 9
  /doability 8
  /doability 7
  /face
  /goto :CloserAF

:EndAF
  /echo $v0 is dead
  /sendkey up up
  /sendkey up down
  /attack off
  /varset v0 0
  /target corpse
  /call autoloot
/return

sub autoloot
   /if $target(distance)>=75 /goto :continue
   /stand
   /echo Looting $taget(name)
   /face
   /if n $target(distance)<15 /goto :CloseEnough
   /sendkey down up
   /varset t0 3m
   :CloserAL
      /if $t0==0 /goto :continue
      /face
   /if n $target(distance)>14 /if n $t0>0 /goto :CloserAL

   :CloseEnough
   /sendkey up up
   /loot
   /Delay 10
   /for v10 0 to 9
      :waitforitem0
      /if $cursor()==true /goto :waitforitem0
      /click left corpse $v10
      :waitforitem1
      /if $cursor()!=true /goto :waitforitem1
      /if "$cursor(name)"=="NULL" /goto :continue
      /if "$target(name)"~~$char(name) /click left auto
      /if n $cursor(weight)>5 /click left destroy
      /if n $cursor(value)<10 /click left destroy
      /if $cursor()==true /echo looted $cursor(name). it has a value of $cursor(value).
      /if n $cursor(value)>9 /click left auto
   /next v10
   :continue
   /cleanup
/return
Last edited by L124RD on Fri Jul 05, 2002 3:08 pm, edited 2 times in total.

Rookie
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Jul 03, 2002 4:58 am

fight.mac

Post by Rookie » Wed Jul 03, 2002 5:01 am

A nice addition would be when mob Enrages to stop fighting and then start fighting when it is no longer enraged.

Also, a cool macro would be a Archery macro in which ya don't have to press the damn button all the time to shoot arrows.

Otherwise, I would like to thank everyone who has done a geat job on the macros.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Wed Jul 03, 2002 8:32 am

salutations,
archery macro... presses a hotkey and maybe keeps you in range? I'll look into it...

King Bass Fisher
orc pawn
orc pawn
Posts: 11
Joined: Tue Jun 25, 2002 3:30 am

Post by King Bass Fisher » Thu Jul 04, 2002 1:51 pm

I like this one is. :D
Dont mean to sound greedy but is there a way to stick an auto loot in there?
Im still learning or I would try myself. 8)

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Thu Jul 04, 2002 5:03 pm

Salutations,
I don't know if the autoloot will work? i've been grouping mostly (playing a rogue) so i don't usually loot till everything is dead. I just ripped the autoloot from ecmonk.mac and edited it...

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

stick.mac

Post by LamahHerder » Fri Jul 05, 2002 6:16 am

Pulled outa my monk xp bot
Some things comented out

Code: Select all

| - Stick.mac -
| - 7/5/02 -
#include routines.mac

Sub Main
 	|/call DangerCheck
	/varset v10 $target(id)
	/echo Killing $v10
	/varset t0 1m
	
 	:attackBegin
		/if n $t0==0 /press ESC
		/face
		/if "$target(id)"!="$v10" /goto :attackEnd
		/attack on
		/goto :attackFight
	:attackFight
		/if n $target(distance)>16 /call GotoTarg "id $v10"
		/if n $target(distance)<5 /press down
		/if n $t1==0 /goto :attackSpecial
		/goto :attackStatus
	:attackSpecial
		/face
		|/do 7 | Flying Kick
		|/press 4 | Monk Epic
		/varset t1 4s
		/goto :attackFight
	:attackStatus
		|/if n $char(hp,pct)<50 /call Feign
		/if "$combat"!="TRUE" /goto :attackEnd
		/if n $target(distance)>30 /goto :attackWait
		/face
		/goto :attackFight
	:attackEnd
		/press ESC
		/call AutoLoot

Sub AutoLoot
 	|/call DangerCheck
 	/target id $v10
 	/if n $target(distance)>40 /goto :lootDone
 	
 	:lootCloser
		/if n $target(distance)>15 /call GotoTarg
		/if n $target(distance)<6 /press down
 	:lootDo
		/call AutoRun 0 
		/loot
		/delay 1s
		/for v1 0 to 9
		/delay 1s
		/click left corpse $v1 
		/delay 1s
		/if "$cursor(name)"=="NULL" /goto :lootDone 
		/if "$cursor(name)"!="NULL" /click left auto 
		/next v1 
 	:lootDone
		/press esc

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Fri Jul 05, 2002 1:59 pm

Salutations,
that shouldn't work... there are no /returns...

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Fri Jul 05, 2002 3:09 pm

Salutations,
fixed a prob in autoloot, before it was

Code: Select all

/autoloot
now it is correctly

Code: Select all

/call autoloot

schue
decaying skeleton
decaying skeleton
Posts: 7
Joined: Fri Jul 05, 2002 3:16 pm

Re: fight.mac - face and kill macro for melee classes

Post by schue » Fri Jul 05, 2002 3:21 pm

L124RD wrote: ...
/if "$target(id)"!="$v1" /goto :EndAF
...
I found that sometimes at the end of fight the corpse of the dead mob gets targetted. This corpse seems to have the same id as the mob he was ;-))

So if this happens, the macro gets stuck here on a dead mob.

To avoid the problem, /if $combat=="TRUE" should be the better way here.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Fri Jul 05, 2002 3:27 pm

Salutations,
on my client, the corpse isn't targetted when you kill something, so i don't have that problem...

LamahHerder
a hill giant
a hill giant
Posts: 299
Joined: Sat Jun 29, 2002 2:37 am

hrmm

Post by LamahHerder » Fri Jul 05, 2002 3:42 pm

It works pretty flawless

There is no /returns because it just keeps going back until its dead with /goto's , and removed some of the returns since it was imbeded in a bigger macro

And as far as getting a corpse target, that happens about 3% of the time, when this happens

[Mon Jul 01 07:10:40 2002] You resist the Shrieker Slow spell!
[Mon Jul 01 07:10:41 2002] a small mushroom was hit by non-melee for 10 points of damage.
[Mon Jul 01 07:10:41 2002] You have slain a small mushroom!
[Mon Jul 01 07:10:41 2002] You gain experience!!
[Mon Jul 01 07:10:41 2002] a small mushroom's corpse slumps to the ground.
[Mon Jul 01 07:10:41 2002] a small mushroom bashes YOU for 38 points of damage.
[Mon Jul 01 07:10:41 2002] a_small_mushroom's_corpse1 tries to cast a spell on you, but you are protected.

schue
decaying skeleton
decaying skeleton
Posts: 7
Joined: Fri Jul 05, 2002 3:16 pm

corpse

Post by schue » Fri Jul 05, 2002 5:17 pm

L124RD wrote:Salutations,
on my client, the corpse isn't targetted when you kill something, so i don't have that problem...
It usually is not on mine either. It seems to be a very rare occasion, maybe one in hunderd kills or so. But if it happens, the script gets stuck there.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Fri Jul 05, 2002 6:03 pm

Salutations,
if it happens once every 100 kills, i'd just do a /endmacro and loot it myself... but whatever...

gingertips
a hill giant
a hill giant
Posts: 230
Joined: Wed Jun 26, 2002 3:47 am
Location: Tseu-Qorcam

Whats your doabilities?

Post by gingertips » Mon Jul 08, 2002 7:41 am

You have 3 lines for

/doability 9
/doability 8
/doability 7

What have u got these 3 set up to do m8?

:wink:

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Jul 08, 2002 2:52 pm

Salutations,
first 3 combat abilities, was put kick/slam/tiger claw/whatever in those three slots to do em during battle.