basicfighting.mac - Does combat skills, inc message, etc

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

Moderator: MacroQuest Developers

ddh
decaying skeleton
decaying skeleton
Posts: 7
Joined: Sat Aug 31, 2002 6:22 am

basicfighting.mac - Does combat skills, inc message, etc

Post by ddh » Sun Sep 01, 2002 4:58 am

I made this for my monk, but it should be easily customizable. You'd just need to remove :feignit and the health checks. Also rename some of the #define stuff..and it'd be good to go.

Anyway, this is my first macro from scratch. Figured someone else might want something like this.

Code: Select all

| Basic fighting macro by ddh
| Syntax: /macro basicfighting.mac <1/0>
| The parameter determines if you give an inc message when you first attack the mob.
| 1 = Give a message
| 0 = No message
| ---------------------
| Designed with a monk, change what you need.
| mend, feigndeath, etc contain the numbers required for /doability
| Skills is the timer for pressing the skill buttons.

#define mend        3
#define feigndeath  7
#define disarm      9
#define flyingkick 10
#define skills     6s

Sub Main
/varset t0 skills
/varset v0 0
/varset v1 $p0

/if $v1==1 {
/echo Starting basicfighting as a puller.
} else /if $v1==0 {
/echo Starting basicfighting as a group mate.
} else {
/goto :param
}
/goto :loop

:param
/echo Invalid parameter. Use 1 for inc messages, 0 for group mate.
/echo Assuming you are a group mate.
/varset v1 0
/goto :loop

:loop
 /doevents
 /if n $v1==1 /if $target()==false /varset v0 0
 /if "$target(type)"!="NPC" /goto :loop
 /if $combat==false /goto :loop

 /if n $char(hp,pct)<=20 /doability mend
 /if n $char(hp,pct)<=10 /goto :feignit
 /if n $v1==0 /goto :loop
 /if n $v0==1 /goto :loop
  /g Incoming %t
  /varset v0 1
/goto :loop

:feignit
 /attack off
 /doability feigndeath
/goto :loop

Sub Event_Timer
 /varset t0 skills

 /if $combat==false /goto :loop
  /doability disarm
  /doability flyingkick
/goto :loop
[b]d[/b]igital [b]d[/b]emon [b]h[/b]amster

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Mon Sep 02, 2002 11:42 pm

Considering MQ now has support for doing an ability when it becomes available again why not just /doability when it is ready again....
[[L124RD fixes code brackets!]]

Code: Select all

Sub DoAbilities
      /if n $char(ability,taunt)>0 /doability taunt
      /if n $char(ability,kick)>0 /doability kick
      /if n $char(ability,begging)>0 {
         /attack off
         /doability begging
         /attack on
      }
err... L124rd code brackets are not working for me for some odd reason
[[L124RD doesn't know whats wrong. if L124RD did, he would fix it. Imperfect have problem with buttons me thinks...]]