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

azwildfire
Contributing Member
Contributing Member
Posts: 72
Joined: Fri Jul 05, 2002 5:12 am
Location: Phoenix arizona
Contact:

,my mods

Post by azwildfire » Wed Jul 10, 2002 5:01 pm

i have tired to mod this script to do some things diffreent for me
here is what i have modded it to
[Edit by plazmic: I can't read code outside of code tags ;)]

Code: Select all

Sub main 
/g Fighting %t. It is level $target(level). 
/varset v0 $target(name) 
/varset v1 $target(id) 
/face 
/attack on
| /sendkey CTRL down
| /press R
| /sendkey ctrl up 
:running
/if n $target(distance)>15 /sendkey up down /goto :running
/if n $target(distance)<15 /sendkey up up
:CloserAF
 /face 
 /if "$target()"!="FALSE" /if "$target(type)"!="NPC" /goto :endAF 
  /if "$target()"=="FALSE" /goto :endAF  
  /if "$target(id)"!="$v1" /goto :EndAF
  /if n $target(distance)>15 /sendkey up down /goto :running 
|  /if n $target(distance)>12 /sendkey down up  
  /if n $target(distance)<9 /press down 
|  /if n $target(distance)<13 /sendkey up up 
  /if n $target(distance)>11 /press up  
  /doability 7
  /goto :CloserAF 

:EndAF 
  /g $v0 is dead 
  /sendkey up up 
  /sendkey up down 
  /attack off 
  /varset v0 0
|  /sendkey CTRL down
|  /press R
|  /sendkey ctrl up   
  /endmacro
what i noticed is with auto run on, the thing jumps all over the place as the macro proccesses.

my first goal was to turn off auto run as part of the macro. that didnt work too well so i took it out

when in close range the /press works nice becdause it is smaller movements
however when mobs run, it doesnt keep up. so my hope was to use teh /sendkey when the mob is further then say 15 ticks away...

but what i did above didnt work. any ideas?

Thank you
p.s. i also like to set up my macros to automatically end when the mob dies

azwildfire
Contributing Member
Contributing Member
Posts: 72
Joined: Fri Jul 05, 2002 5:12 am
Location: Phoenix arizona
Contact:

what i go

Post by azwildfire » Sat Jul 13, 2002 3:43 am

after fiddling with this. being my first macro n all. i came up with a macro that works better for me.
if a mob is not snared and flees, this macro will chase it. at the same time it does not do the goofy yoyo effect i had with the original script. the /press command works great at close range, where as the /sendkey works well at further rangers.

Code: Select all

#turbo
#include routines.mac
Sub main 
/g Fighting %t. %s is level $target(level).
/echo %s is level $target(level). 
/varset v0 $target(name) 
/varset v1 $target(id) 
/attack on
:Run 
 /doevents
 /face  
 /call AutoRun 1
 /if n $target(distance)>15 /goto :Run
 /if n $target(distance)<15 /goto :CloserAF

:CloserAF
/doevents
/face 
  /if "$target()"!="FALSE" /if "$target(type)"!="NPC" /goto :EndAF 
  /if "$target()"=="FALSE" /goto :EndAF  
  /if "$target(id)"!="$v1" /goto :EndAF
  /if n $target(distance)<8 /press down
  /if n $target(distance)>12 /press up
| /doability 7
  /if n $target(distance)>25 /goto :Run 
  /goto :CloserAF 

:EndAF 
 /sendkey up up  
 /sendkey up down
 /attack off 
 /call AutoRun 0
 /varset v0 0
 /endmacro
my next step is to setup a home point, have it only engage mobs that are within a certain range, and auto assist someone every few cycles...

i just get so sick of all the work it takes in velks to assist, attack, repeat hehe

the other thing i would like to fix, is all the spam i get from the kick command. when stunned forexample i get a TON of spam "cannot do this command while stunned" or while castin g a spell. perhaps put ina pause when i cast etc

Genoius
a lesser mummy
a lesser mummy
Posts: 49
Joined: Sat Jul 13, 2002 8:20 am

My WC macro, complete w/ auto-loot

Post by Genoius » Sat Jul 13, 2002 8:26 am

This one collects pelts and spider silks, destroying everything else. In your coding, you have "/if cursor(value)<10 /click left destroy", which might be why you aren't looting anything at all, but I've been using this one since the night I got MacroQuest, and it works awesome. I haven't had any problems killing the Dragoon or Kizdean either, and if my health gets below 50%, its set to run to the guards(I do believe) Here goes.

Code: Select all

| wc.mac
| 
|
|
#include routines.mac

Sub Main
   /varset v80 0
   /alert clear 1
   /alert add 1 kodiak radius 4000
   /alert add 1 bear radius 4000
   /alert add 1 giant_spider radius 4000

   :Autokill
      /call SelectTarget
      /if "$target()"=="FALSE" /goto :WaitASec
      /if "$target(type)"=="NPC" /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 1
|   /if "$target()"=="FALSE" /call HeadRandom
   
/return

Sub AttackAndFollow
   /varset v90 $target(id)
   /echo Going after $target(name)...
   /face
   /doability 7
   /doability 9
   /doability 10
   /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)<15 /call AutoRun 0
      /if n $target(distance)>14 /call AutoRun 1
      /if n $t0==0 /press esc
      /face
      /doability 7
      /doability 9
      /doability 10
   /goto :CloserAF

   :EndAF
   /call AutoRun 0
   /attack off
/return

Sub AutoLoot
   /press esc
   /target mycorpse
   /if "$target()"!="FALSE" /goto :TargetMyCorpse
   /target alert 1 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 "$target(name)"~~$char(name) /click left auto
      /if "$cursor(name)"~~pg /click left destroy
      /if "$cursor(name)"~~word /click left destroy
      /if "$cursor(name)"~~leg /click left destroy
      /if "$cursor(name)"~~rune /click left destroy
      /if "$cursor(name)"~~paw /click left destroy
      /if "$cursor(name)"~~venom /click left destroy
      /if "$cursor(name)"~~meat /click left destroy
      /if "$cursor(name)"!="NULL" /identify
      /click left auto
   /next v1
   :continue
   /press esc
/return   


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


Sub HeadRandom
   /varset v1 $rand(4000)
   /varset v2 $rand(2000)
   /varsub v1 500
   /varsub v2 1000
   /echo Heading towards $v1,$v2
   /face loc $v1,$v2
   /press q
   /autorun 1
   /varset t0 2s
   :RandLoop
   /if "$target()"=="TRUE" /return
   /if n $t0>0 /goto :RandLoop
   /press q
/return

Sub Buff
   /press esc
   /target myself
   /delay 3

   | Cast spells on self
 
   /cast 8
   /delay 1s
   /cast 8
   /delay 1s   
   /cast 8
   /delay 5s
   /cast 7
   /delay 1s
   /cast 7
   /delay 1s   
   /cast 7
   /delay 3s
   /cast 6
   /delay 1s
   /cast 6
   /delay 1s   
   /cast 6
   /delay 6s
   /cast 3
   /delay 1s
   /cast 3
   /delay 1s   
   /cast 3
   /delay 5s
   /cast 2
   /delay 1s
   /cast 2
   /delay 1s   
   /cast 2
   /delay 5s
   /cast 1
   /delay 1s
   /cast 1
   /delay 1s   
   /cast 1
   /delay 5s
   
   | Summon pet if not out
   /if $char(pet)==0 /cast 5
   /if $char(pet)==0 /delay 1s
   /if $char(pet)==0 /cast 5
   /if $char(pet)==0 /delay 1s
   /if $char(pet)==0 /cast 5
   /if $char(pet)==0 /delay 10s

   | Buff pet with 2 spells
   /target id $char(pet)
   /cast 4
   /delay 1s
   /cast 4
   /delay 1s   
   /cast 4
   /delay 3s
   /cast 6
   /delay 1s
   /cast 6
   /delay 1s   
   /cast 6
   /delay 5s

   /varset t1 15m
/return

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

Post by L124RD » Sat Jul 13, 2002 1:43 pm

Salutations,
About Home Points, You might wanna look at ECMonk.mac. I don't think it actually works any more (to much updating of variables) but it has a homepoint in it, centered around one of the guards (inn2 i believe)

azwildfire
Contributing Member
Contributing Member
Posts: 72
Joined: Fri Jul 05, 2002 5:12 am
Location: Phoenix arizona
Contact:

Post by azwildfire » Sun Aug 04, 2002 4:40 pm

Code: Select all

#Event Closer " get closer " 
|#Event Slain " slain by "

Sub main 
/g Fighting %t. 
| %s is level $target(level).
/echo %s is level $target(level). 
/varset v0 $target(name) 
/varset v1 $target(id) 
/stand
/press 0
:Run 
 /doevents
 /face nopredict 
 /sendkey down up
 /if n $target(distance)>15 /goto :Run
 /sendkey up up
 /attack on
 /if n $target(distance)<15 /goto :CloserAF
:CloserAF
/doevents
/face nopredict 
  /if "$target()"!="FALSE" /if "$target(type)"!="NPC" /goto :EndAF 
  /if "$target()"=="FALSE" /goto :EndAF  
  /if "$target(id)"!="$v1" /goto :EndAF
  /if n $target(distance)<9 /press down
  /if n $target(distance)>13 /press up
  /doability 7
  /if n $target(distance)>14 /goto :Run 
  /goto :CloserAF 

:EndAF 
 /sendkey up up  
 /sendkey up down
 /attack off 
 /endmacro

Sub Event_Closer
/if n $target(distance)>15 /goto :Run
/press up
/goto :CloserAF
this is my current macro for fighting and works really really well :) am very happy with it finally

eqjim
a lesser mummy
a lesser mummy
Posts: 35
Joined: Tue Aug 27, 2002 3:56 pm

Post by eqjim » Tue Aug 27, 2002 4:57 pm

anyone have auto loot totally stop if there are 0 items left :( or no items on the mob?

inspector
orc pawn
orc pawn
Posts: 11
Joined: Fri Sep 20, 2002 9:19 pm
Location: Grand Rapids, Michigan
Contact:

is there a way to find out if your attacking?

Post by inspector » Tue Sep 24, 2002 11:01 pm

like the subject says... I wana make a macro to taunt and kick for me, but only when I am attacking.

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

Post by L124RD » Wed Sep 25, 2002 9:54 am

Salutations,
I believe there is a '$combat' variable which is true or false relative to wether auto attack is on or off.

eqjoe
a grimling bloodguard
a grimling bloodguard
Posts: 984
Joined: Sat Sep 28, 2002 12:26 pm

Post by eqjoe » Sat Sep 28, 2002 12:30 pm

Not bad guys. I am thinking about modifing this to target and pull as well.. only question I have is how to use range attack.

Will /sendkey 2 work if range attack is setup on the "2" key?

Valerian
a grimling bloodguard
a grimling bloodguard
Posts: 709
Joined: Sun Jul 28, 2002 3:29 am

Post by Valerian » Sat Sep 28, 2002 2:36 pm

pretty sure /press 2 should work, as long as ctrl, alt, shift aren't pressed at the same time