Atk.mac Help Please

Got a cool macro idea? Wanna request a macro? Here is the place for you!

Moderator: MacroQuest Developers

captainj2001
orc pawn
orc pawn
Posts: 16
Joined: Sat May 31, 2003 6:39 pm
Location: Michigan
Contact:

Atk.mac Help Please

Post by captainj2001 » Mon Dec 01, 2003 10:02 pm

I've been looking for a good plain ol atk.mac that works, I don't know cpp at all and as the usual jackass I am I decided that my post should be named Help me I'm a dumb bastard, because I am one, did I mention helpless also? Anyhow I know that the existing atk.mac can be edited to be made functional but I'm not sure what needs to be done to it. I replaced all the nopredicts with nolook (cuz i hate that shit(no offense to the genius who coded it though)) but it still doesn't work in game.

As always,

Justin

EDIT: Changed post name to more approaprite(sp*) name for topic
Last edited by captainj2001 on Fri Dec 05, 2003 4:54 pm, edited 1 time in total.
Silly macs... http://members.cox.net/clyqz/macs.html

koad
Plugins Czar
Posts: 127
Joined: Fri May 16, 2003 8:32 pm

Post by koad » Mon Dec 01, 2003 11:34 pm

im not sure if your abbreviating but im not familiar with the macro your having problems with. give me a link or the code and ill look into updating it for you.

captainj2001
orc pawn
orc pawn
Posts: 16
Joined: Sat May 31, 2003 6:39 pm
Location: Michigan
Contact:

Here's the code

Post by captainj2001 » Tue Dec 02, 2003 8:29 pm

Here's the code, thanks again.

EDIT: Must give credit where credit is due. Thanks for the code loadingpleasewait :D

Code: Select all

|** atk.mac Auto-Attack Macro for everyday use.
Mashed together from other assorted macros.
has the ability to toggle taunting, and autofollowing
for those situations wher you jusnt might not want ta
follow that mob.

NOTE: I play a ranger, and use this during
every group in one form or another.

NOTE: I've remaped hotkey 10 to also be activated using Num_6
Then I put the archery ability in hotkey 10, which is how the auto archery
works. That way when I'm using autoarch, I can still chat.

NEW Version 1.0a

Usage:
/macro atk.mac arch (to enable Rapid Fire Archery
[forages too, take that code out if it annoys ya])
/macro atk.mac forage (auto forages, even while attacking)
/macro atk.mac forage taunt (forages and taunts)
/macro atk.mac follow taunt (to follow and taunt)
/macro atk.mac follow (to just follow)
/macro atk.mac taunt (to just taunt)
/macro atk.mac (to neither taunt nor follow)

NOTE: Auto-Following works, but sux,
use at yer own risk**|

#Event exp "experience!"
#Event Casting "You begin casting"
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"

Sub Main(FirstArg,SecondArg)
   /echo "Auto-Attack Macro has begun."
   /declare Toggle local
   /declare Toggle2 local
   /declare startexp global
   /declare startaaxp global
   /declare EnrageVar global
   /declare Combatstatus global
   /declare currentxp global
   /declare xpgain global
   /declare currentaa global
   /declare aagain global
   /declare taunttoggle global
   /declare followtoggle global
   /declare foragetoggle global
   /declare archtoggle global
   /declare targetarray array

   /varset Toggle @FirstArg
   /varset Toggle2 @SecondArg
   /varset startexp $char(exp)
   /varset startaaxp $char(aa,exp)

/if "@Toggle"=="Follow" {
   /echo "Auto-Follow enabled"
   /varset "followtoggle" 1
   }
/if "@Toggle2"=="taunt" {
   /echo "Auto-Taunt enabled"
   /varset "taunttoggle" 1
   }
/if "@Toggle"=="taunt" {
   /echo "Auto-Taunt enabled"
   /varset "taunttoggle" 1
   }
/if "@Toggle"=="forage" {
   /echo "Auto-Forage enabled"
   /varset "foragetoggle" 1
   }
/if "@Toggle"=="arch" {
   /echo "Auto-Arch enabled"
   /varset "archtoggle" 1
   }

      :mainloop
         /if "$combat"=="TRUE" /call melee
         /delay 3
         /if "@foragetoggle"==1 {
         /if n $char(ability,"Forage")>0 /doability "Forage"
         }
         /doevents
      /goto :mainloop
/return

Sub melee
 
  /varset targetarray(0) "$target(name,clean)"
  /varset targetarray(1) $target(level)
  /varset targetarray(2) $target(name)
  /varset targetarray(3) $target(id)
 
  /delay 3
  /if "@targetarray(3)"=="0" /return
   :archcheck
  /if "@archtoggle"==1 {
  /attack off
  /press num_6
      /if "$target(id)"!=@targetarray(3) /goto :EndAF
      /doevents
         /if "@foragetoggle"==1 {
         /if n $char(ability,"Forage")>0 /doability "Forage"
         }
      /goto :archcheck
      }     
  /if "$combat"!="TRUE" /return
|  /if n $target(distance,nopredict)>10 /return

  /echo Fighting a level @targetarray(1) @targetarray(0)
  /face nopredict
  /varset Combatstatus 1

  :CloserAF
    /if "$target(id)"!=@targetarray(3) /goto :EndAF
    /doevents
    /call Combatcheck
    /if "@followtoggle"==1 /call AF
    /doevents
    /if n $target(distance,nopredict)<11 {
      /if n $char(ability,"Kick")>0 /doability "Kick"
      }
    /doevents
    /if n $target(distance,nopredict)<11 {
      /if n $char(ability,"Disarm")>0 /doability "Disarm"
      }
    /doevents
          /if "@foragetoggle"==1 {
          /if n $char(ability,"Forage")>0 {
          /attack off
          /doability "Forage"
          /attack on
          }
          }
    /if "@taunttoggle"==1 /doability taunt
    /delay 4
    /goto :CloserAF
/return

:EndAF
    /echo The level @targetarray(1) @targetarray(0) is dead...
    /sendkey up up
    /sendkey up down
    /attack off
    /varset Combatstatus 0
    /varset targetarray(3) 0
    /press Num_5
    /delay 4
/return

Sub AF
    /if n $target(distance,nopredict)>25 /sendkey down up
    /if n $target(distance,nopredict)>10 {
      /if n $target(distance,nopredict)<25 {
         /press Num_9
         /delay 3
         /sendkey down up
         /press Num_9
      }
    }
    /if n $target(distance,nopredict)<10 /sendkey up up
    /face fast nopredict
/return

Sub Combatcheck
   /if @EnrageVar=="1" {
      /if $target()=="TRUE" {
         /return
      } else {
         /varset EnrageVar 0
         /varset Combatstatus 0
      }
   }
   /if $target()=="FALSE" {
      /varset Combatstatus 0
      /if $combat=="TRUE" {
         /attack off
      }
      /return
   }
/return

Sub Event_Enraged
   /if $target()=="TRUE" {
      /if n @Combatstatus==1 {
         /varset EnrageVar 1
         /attack off
      }
      /varset EnrageVar 1
   }
/return

Sub Event_Offrage
   /if $target()=="TRUE" {
      /if n @Combatstatus==1 {
         /varset EnrageVar 0
         /attack
      }
      /varset EnrageVar 0
   }
/return

Sub Event_exp
   /varset currentxp $char(exp)
   /varcalc xpgain @currentxp-@startexp
   /varset currentaa $char(aa,exp)
   /varcalc aagain @currentaa-@startaaxp
      /echo "You've gained @xpgain% xp and @aagain% aaxp."
      /echo "Currently at @currentxp% xp and @currentaa% aaxp."
   /varset startexp $char(exp)
   /varset startaaxp $char(aa,exp)
/return

Sub Casting
   :check
    /delay 3
    /if "$char(casting)"=="TRUE" goto :check
/return 
As always,

Justin
Silly macs... http://members.cox.net/clyqz/macs.html