Single Spawn Mob Killer + Rest for monk, Please read

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

xtremek43
decaying skeleton
decaying skeleton
Posts: 1
Joined: Mon Sep 09, 2002 4:24 pm

Single Spawn Mob Killer + Rest for monk, Please read

Post by xtremek43 » Mon Sep 09, 2002 4:28 pm

what i want this macro to do, is to make it so i enter a name, like Osargen in HHK, and it waits there sitting till he spawns, then it stands up, kill him, deletes all loot (or loots it, pref: del) then go's back to starting point, and sits till 80% health and rinses and repeats... Im terrible with scripting, this is what i came up so far , i just edited someone elses script. And it doesnt work good at all, can l1z4rd or someone else good at this help, this one is for lislia the bard in HHK, all help will be much appreatited

edit:Rizwank likes code brackets too

Code: Select all

| - Hunter.mac - 
| Semi-intelligent hunting & autoloot macro 
| 
| 
#include routines.mac 

Sub Main 
   /varset v80 0 

   :Autokill 
      /if $t1==0 /call Buff 
      /call SelectTarget 
      /if "$target()"=="FALSE" /goto :WaitASec 
      /if "$target(type)"=="lislia" /call AttackAndFollow 
      /call AutoLoot 
      :WaitASec 
      /call Rest 
   /goto :AutoKill 
/return 


Sub SelectTarget 
   /press esc 
   /for v81 1 to 5 
      /if "$target()"=="TRUE" /return 
      /delay 5 
   /next v81 

   /target alert 
   /if "$target()"=="FALSE" /call Rest
    
/return 

Sub AttackAndFollow 
   /varset v90 $target(id) 
   /echo Going after $target(name)... 
   /face 
   /attack on 
   /varset t0 4m 
   :CloserAF 
      /if "$target(id)"!="$v90" /goto :EndAF 
      /if n $target(distance)>14 /call AutoRun 1 
      /if n $target(distance)<15 /call AutoRun 0 
      /if n $target(distance)<5 /call BackPedal 0 
      /if n $target(distance)>4 /call BackPedal 1 
      /if n $t0==0 /press esc 
      /face 
   /goto :CloserAF 

   :EndAF 
   /call AutoRun 0 
   /attack off 
/return 

Sub AutoLoot 
   /press esc 
   /target mycorpse 
   /if "$target()"!="FALSE" /goto :TargetMyCorpse 
   /target s corpse 

   :TargetMyCorpse 
   /face 
   /if n $target(distance)<15 /goto :CloseEnough 
   /call AutoRun 1 
   /varset t0 3m 
   :CloserAL 
      /face 
   /if n $target(distance)>14 /if n $t0>0 /goto :CloserAL 

   :CloseEnough 
   /call AutoRun 0 
   /loot 
   /Delay 10 
   /for v1 0 to 9 
      /Delay 5 
      /click left corpse $v1 
      /Delay 5 
      /if "$cursor(name)"=="NULL" /goto :continue 
      /if "$cursor(name)"!="NULL" /click left auto 
   /next v1 
   :continue 
   /press esc 
/return    


Sub Rest 
   /if n $hp(pct)>50 /goto :DontMove 
   /call AutoRun 1 
   :CloserRest 
      /face loc -280,100 
   /if n $distance(-280,100)>20 /goto :CloserRest 
   /call AutoRun 0 
   :DontMove 
   /if n $hp(pct)>80 /return 
   /sit 
   :KeepResting 
      /if "$target()"!="FALSE" /return 
   /if n $hp(pct)<80 /goto :KeepResting 
   /stand 
/return 


Sub HeadRandom 

/return 

Sub Buff 
   /press esc 
   /target myself 
/return 

| End of Hunter.mac

Everguide
a lesser mummy
a lesser mummy
Posts: 63
Joined: Mon Jun 24, 2002 11:00 pm

I was working on one for a caster

Post by Everguide » Mon Sep 09, 2002 5:07 pm

I was working on doing the same thing for a caster (mage) but I could not make in "int" enough.