MonkeyFight.mac -- Skill train plus auto mend and FD

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

Nicat
decaying skeleton
decaying skeleton
Posts: 3
Joined: Wed Feb 11, 2004 1:48 pm

MonkeyFight.mac -- Skill train plus auto mend and FD

Post by Nicat » Thu Feb 12, 2004 9:58 am

Special thanks to m0nk and ml2517 for their help with this. This code is still a work in progress.. Any bug reports or issues with the script, let me know..

This is my first attempt at macroing =)

My ideas actually came from a few scripts.. the doability sub was inspried by some of Catt's code, I took it and modified it with some of my own logic from my experience in coding.. I found that it would do the dragon punch and eagle strike only once, then it would only do the flying kick.. modified it by putting it into a for loop instead, makes it level up each skill more evenly.. =)

Basically what this code will do is when you attack a mob, it will automatically Disarm, Dragon Punch/tail rake (you will need to edit that part to suit your monk.. may change that in the future release), it will check your health each round, and if you're below 50% it will use mend if it's available.. if you drop to 25% health while in battle it will automatically FD for you, if FD fails, then it will continue to attempt until it hits, or you die.. of course :)

Questions, comments, criticizm all welcome.

Thanks 8) :D

Code: Select all

|---------------------------------------------------------
|
| MonkeyFight.mac v1.0
|
|---------------------------------------------------------

#turbo
|---------------------------------------------------------
| Events
|---------------------------------------------------------
#event FDF " has fallen to the ground" 
#event MendFail "You have failed to mend your wounds."
#event MendSucces "You mend your wounds to heal some dammage."
#event Scowls " scowls at you, ready to attack."
#event Glares " glares at you threateningly"
#event AttackOff "Auto attack is off." 
#event AttackOn "Auto attack is on." 
#event Slain "You have slain "
#event Exp "You gain experience!!"

|---------------------------------------------------------
| Main process and declarations
|---------------------------------------------------------
sub main
  /declare minHealth global
  /declare maxHealth global
  /declare skill global
  /declare FdFail global
  /declare Scowl global
  /declare Glare global
  /declare Atk global
  /declare AtkButton global
  /varset minHealth 25
  /varset maxHealth 50 
  /varset FdFail 0
  /varset Atk FALSE
  /varset AtkButton q

| Define Atkbutton to whatever you press to auto attack.. 
| for me it's the default of q

|---------------------------------------------------------
| Start main loop
|---------------------------------------------------------
:start
  /doevents AttackOn
  /doevents AttackOff
  /doevents Slain
  /doevents Exp
  /if n $char(hp,pct)<=@maxHealth {
    /if n $char(ability,"Mend")>0 /doability "Mend"
  }
  /if @Atk==TRUE {
      /if n $char(hp,pct)<=@minHealth {
        /if $char(state)=="FEIGN" /goto :start
        /call Feign
        /goto :start
      }
      /for skill 1 to 3 
        /call DoAbility "@skill"
        /call DoDisarm
        
      /next skill
      |/goto :endloop
    } else {
      /delay 5s
      /goto :start
    }
  /goto :start
:endloop
/end
|---------------------------------------------------------
| End main loop
|---------------------------------------------------------

|---------------------------------------------------------
| Sub Routines
|---------------------------------------------------------
sub DoAbility(skill)
   /if n @skill==1 {
      :Eagle
      /delay 1s
      /if n $char(ability,"Eagle Strike")<0 /goto :Eagle
      /if n $char(ability,"Eagle Strike")>0 {
         /doability "Eagle Strike"
         /return
      }
   }
   /if n @skill==2 {
      :Dragon
      /delay 1s
      /if n $char(ability,"Tail Rake")<0 /goto :Dragon
      /if n $char(ability,"Tail Rake")>0 {
         /doability "Tail Rake"
         /return
      }
   }
   /if n @skill==3 {
      :Flying
      /delay 1s
      /if n $char(ability,"Flying Kick")<0 /goto :Flying
      /if n $char(ability,"Flying Kick")>0 {
         /doability "Flying Kick"
         /varset skill 0
         /return
      }
   }
/return

Sub DoDisarm
  /if n $char(ability,"Disarm")>0 {
     /if n $target(distance)<=10 /doability "Disarm"
  }
/return

Sub Feign
  /press @AtkButton
  /delay 1s
  /doevents AttackOff
  :Floop
    /if n $char(ability,"Feign Death")>0 /doability "Feign Death" 
    /delay 1s
    /doevents FDF
    /if n @FdFail==1 { 
      /varset FdFail 0 
      /stand
      /goto :Floop
    }
    /press c
    /delay 1s
    /doevents Scowls
    /if n @Scowl==1 {
      /varset Scowl 0
      /stand
      /goto :Floop
    }
    /doevents Glares
    /if n @Glare==1 {
      /varset Glare 0
      /stand
      /goto :Floop
    }
  :endFloop
/return

|---------------------------------------------------------
| Sub Events
|---------------------------------------------------------
Sub Event_FDF
  /varset FdFail 1
/return

Sub Event_Scowls
  /varset Scowl 1
/return

Sub Event_Glares
  /vareset Glare 1
/return

Sub Event_AttackOn
  /varset Atk TRUE
/return

Sub Event_AttackOff
  /varset Atk FALSE
/return

Sub Event_Exp
  /varset Atk FALSE
/return

Sub Event_Slain
  /varset Atk FALSE
/return

Kerne
decaying skeleton
decaying skeleton
Posts: 1
Joined: Tue Feb 17, 2004 3:27 am

Post by Kerne » Tue Feb 17, 2004 4:39 am

nice script mate.

what happens if someone else kills the mob ?

Sadistic
orc pawn
orc pawn
Posts: 11
Joined: Mon Jan 19, 2004 1:33 am

Post by Sadistic » Mon Mar 01, 2004 6:11 pm

Im not sure what the purpose of the con message checks are. Also the one problem that your monk script (along with mine and everyone elses script) suffers from is the mend and FD issue. Unless you recieve a heal to get yourself above whatever hp marker you have set you will continue to do so repeatedly for quite awhile. This is extremely annoying with rapid FD AA which pulls the repop time on the button down to 4-5seconds. Hopefully someone with more brains than I will figure out how to check and see if the mob is facing the person who is swining and then check to see if the FD is still required. Having this code opens the door to a better enrage script as well since whats being passed around from script to script doesnt take into account nearby groups fighting enrage mobs.

User avatar
Leezard
a ghoul
a ghoul
Posts: 81
Joined: Wed Feb 04, 2004 12:54 pm

Post by Leezard » Sat Mar 06, 2004 6:51 pm

#event MendSucces "You mend your wounds to heal some dammage."
That prolly wont work since you mispelled damage. Just FYI :).
Death is merely a doorway, for a god!

icon
Official loudmouth
Official loudmouth
Posts: 158
Joined: Fri Jun 14, 2002 2:59 pm
Location: ...
Contact:

Post by icon » Wed Mar 10, 2004 3:53 am

He spelled "Success" in "MendSuccess" wrong too.

- Icon
In memory of [b][color=darkblue]MasTerKeyZ[/b][/color].

ImaNoob
a ghoul
a ghoul
Posts: 89
Joined: Mon Mar 08, 2004 4:37 am

This is great!

Post by ImaNoob » Sun Mar 21, 2004 6:01 pm

Ok I know this sounds braindead, but I just wanted to say thank you for a great macro, my monk is enjoying this macro immensly!