Help with a macro

Need help running MacroQuest 1? Too bad! Use MQ2.

Moderator: MacroQuest Developers

DontShoot
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Jun 20, 2002 11:20 am

Help with a macro

Post by DontShoot » Thu Jun 20, 2002 11:29 am

I'm looking for a very simple macro, but try as I might, I don't know where to begin. I want to include the following aspects:

As I'm a monk with epic, I'd like to be able to activate the epic effect before/during a battle, while using Flying Kick. I'd like to automatically use mend if I hit 40% health, and hit FD if I hit 30%. I'd also like to include the attackandfollow portion that most macros are running nowadays, but that's as easy as copy/pasting, right?

I'd like to put a social in my hotkey bank that just has /macro monkfight.mac on it, and it'd end automatically after each fight.

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

Post by L124RD » Thu Jun 20, 2002 11:37 am

Salutations,
As I'm not a monk with an epic, I need to know some things first:
  • How do you activate your epic.
    Is this a macro that runs constantly or just when your fighting? ie Do you move yourself between mobs?
[/list]

DontShoot
a lesser mummy
a lesser mummy
Posts: 58
Joined: Thu Jun 20, 2002 11:20 am

thank you.

Post by DontShoot » Thu Jun 20, 2002 11:46 am

the epic is a right click from inventory (I have the glove slot hotkeyed though)

This would be a macro that I run myself between mobs, for general high lvl encounters, to maximize damage (always face mob) and minimize keypresses.

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

Post by L124RD » Thu Jun 20, 2002 1:13 pm

Salutations,
This is (by what i hear) what you want. I don't have a monk with epic so i can't test it, but i think it should work.
setup: gloves in hotkey 1, kick in hk 2, mend in 3, fd in 4. Edit the first line in sub main (/varset v1 100) and change the 100 at the end to the value of the things you want to loot (100 is 1 gold, 1000 is 1 plat, 10 is one silver, 1 is one copper) It will loot things that have a value greater then this. If it is set to 0, Everything will be looted. if it is set to -1 nothing will be.

Code: Select all

| DontshootsMonk.mac
| -------------------------
| Written by l124rd
| Attackandfollow and Autoloot by: Plazmic
|   and Edited for this macro by: l124rd
#include routines.mac

sub main
  /varset v1 100
  if n $v1>0 /varset v2 v1
  if n $v1>0  /varsub v2 1
  /varset s0 $target(name)
  /varset v0 $target(id)
  /call attackandfollow
  /target corpse $s0
  /if n $v1==-1 /call autoloot
/return

Sub AttackAndFollow
 /echo Going after $target(name)...
 /mqlog Attacking: $target(name). It is level $target(level) and is $target(distance) clicks away...
 /face
 /attack on
 :CloserAF
  /if "$target(id)"!="$v0" /goto :EndAF
  /if n $target(distance)>15 /sendkey down up
  /if n $target(distance)<16 /sendkey up up
  /if n $target(distance)<11 /sendkey down down
  /if n $target(distance)>10 /sendkey up down
  /press 2
  /face
  /if n $hp(pct)<30 /goto :Feign
  /if n $hp(pct)<40 /press 3
  /goto :CloserAF

 :feign
  /call autorun 0
  /attack off
  /press 4
  /endmacro
  /return

 :EndAF
  /echo "$s1 slain successfully"
  /mqlog $s1 slain successfully
  /call AutoRun 0
  /attack off
/return

Sub AutoLoot
   /press esc
   /target corpse
   /echo looting $target(name)
   /mqlog looting $target(name)
   /face
   /if n $target(distance)<15 /goto :CloseEnough
   /sendkey down up
   :CloserAL
      /face
      /if n $target(distance)>14 /goto :CloserAL

   :CloseEnough
   /sendkey up up
   /loot
   /Delay 20
   /for v10 0 to 9
      /Delay 5
      /click left corpse $v10
      /Delay 10
      /if "$cursor(name)"=="NULL" /goto :continue
      /if "$target(name)"~~$char(name) /click left auto
      /if n $cursor(value)<$v1 /click left destroy
      /if "$cursor(name)"!="NULL" /mqlog looted $cursor(name). $cursor(name)'s value: $cursor(value)
      /if n $cursor(value)>$v2 /click left auto
      /delay 4
      /delay $rand(5)
   /next v10
   :continue
   /delay 5
   /delay $rand(5)
   /delay $rand(5)
   /cleanup
   /delay 10
   /press i
/return