2 issues in kill.mac ~ Auto monk meleer

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

notadruid
a ghoul
a ghoul
Posts: 143
Joined: Mon Dec 08, 2003 6:02 pm

2 issues in kill.mac ~ Auto monk meleer

Post by notadruid » Sun Feb 22, 2004 9:42 am

Bug 1: Cannot chat easily because it frequently uses /press up, so whenever you press shift it will shift+up and kill your chat message
Bug 2: The events that are only supposed to happen if Flying Kick is ready are constantly occuring, whether or not the button is pressed or ready..

I don't know how to fix these so I'm tossing the ball to you =p

Code: Select all

|K I L L . M A C
|B Y ~ N O T A D R U I D ! ! !
|Usage:  /mac kill.  It's that simple!
|Intended for monks.  moves to the mob, autoattackks
|Uses flying kick and celestial fists.
|autoattack off on enrage
|Mends automatically if below 70% life
|~ ~ Version 2.6 ~ ~

#turbo 90
#Event enraged " has become ENRAGED."
#Event toofar "Your target is too far away, get closer!"
#Event tooclose "You cannot see your target."

Sub Main
  /if "$target()"=="False" /end
  /echo Running ~ K I L L . M A C ~ by Notadruid!  "Feel the pwnage!" ~ Version 2.6
  /declare RangeMax global
  /declare RangeMin global
  /declare FastRange global
  /varset RangeMax 10
  /varset RangeMin 5
  /varset FastRange 12
  /face fast nolook
  /call move
  /attack on
  :fight
  /face fast nolook
[color=red]  /if n $char(ability,"Flying Kick")>0 {[/color]
    /do "Flying Kick"
    /cast item "Celestial Fists"
  }
  /if n $char(hp,pct)<=70 {
    /if $char(ability,"Mend")>0 {
      /do "Mend"
    }
  }
  /call move
  /doevents
  /if "$target()"=="False" {
    /sendkey up up
    /attack off
    /end
  }
  /goto :fight
/return

Sub move
   /face fast nolook
   /doevents enraged
   /if n $target(distance)>=@FastRange /call fastmove
   /if n $target(distance)>@RangeMax {
[color=red]      /press up[/color]
   }
   /if n $target(distance)<@RangeMin {
[color=red]      /press down[/color]
   }
/return

Sub fastmove
  :fastmoveloop
  /doevents enraged
  /if $target()=="FALSE" {
     /sendkey up up
     /end
  }
  /face fast nolook
  /if n $target(distance)>@FastRange {
[color=red]     /sendkey down up[/color]
  }
  /if n $target(distance)<=@FastRange {
     /sendkey up up
     /return
  }
  /goto :fastmoveloop
/return

Sub Event_toofar
[color=red]  /press up[/color]
  /if n $target(distance)<@RangeMax {
|RangeMax is too large.
|Adjust RangeMax to current distance
|Adjust RangeMin and FastRange
|to eliminate impossible constraints
    /varset RangeMax $target(distance)
    /varset RangeMin $calc(@RangeMax-5)
    /varset FastRange $calc(@RangeMax+5)
  }
/return

Sub Event_tooclose
[color=red]  /press down[/color]
  /if n $target(distance)>@RangeMin {
|RangeMin is too small.
|Adjust RangeMin to current distance
|Adjust RangeMax and FastRange
|to eliminate impossible constraints
    /varset RangeMin $target(distance)
    /varset RangeMax $calc(@RangeMin+5)
    /varset FastRange $calc(@RangeMax+5)
  }
/return

Sub Event_enraged
  /attack off
  /press esc
  /end
/return
Color coded for ease
Last edited by notadruid on Fri Feb 27, 2004 3:20 pm, edited 1 time in total.

notadruid
a ghoul
a ghoul
Posts: 143
Joined: Mon Dec 08, 2003 6:02 pm

Post by notadruid » Fri Feb 27, 2004 3:20 pm

Anyone have any ideas?

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Post by Gumby » Fri Feb 27, 2004 4:27 pm

You're pretty much hosed on the /press up issue if you require using it. Can sendkey instead but you risk overshooting your target by a large margin.

Code: Select all

/sendkey down up
/delay 1
/sendkey up up
As a replacement for /press up sort of works, could try with /delay 0 or even take the /delay out alltogether for the finest of resolutions; something I played with for a different reason which didn't work out but might be of use to you.

Your

Code: Select all

/if n $char(ability,"Flying Kick")>0 { 
    /do "Flying Kick" 
    /cast item "Celestial Fists" 
}
While I can't check it, is probably busted a la Backstab / Frenzy / et al. where $char(ability,xxx) will return the slot number, always greater than 0, so you'll execute all the time.

Since you're doing a /cast call, no real good solution but to implement a timer on it, but you'll have to time the Flying Kick refresh on your own for it.

As an example to illustrate:

Code: Select all

/declare FlyingKickTimer timer
/varset FlyingKickTimer 0

....

/if n @FlyingKickTimer<=0 {
    /do "Flying Kick" 
    /cast item "Celestial Fists" 
    /varset FlyingKickTimer 120
}
No clue what the real refresh value is so I tossed in two ticks as an example. As stated, you'll have to figure it out on your own and it's probably modified by char haste. Been meaning to work out an autocalculation routine for melee skill timers but haven't gotten around to it =/.

G

notadruid
a ghoul
a ghoul
Posts: 143
Joined: Mon Dec 08, 2003 6:02 pm

Post by notadruid » Fri Feb 27, 2004 6:41 pm

Thanks, I'll check it out.

In the manual (yah I RTFM =p) it says that if a button is pressed $char(ability) will return -2 Probably busted.

Gumby
a ghoul
a ghoul
Posts: 99
Joined: Sat Jan 24, 2004 5:27 pm

Post by Gumby » Sat Feb 28, 2004 8:07 am

notadruid wrote:Thanks, I'll check it out.

In the manual (yah I RTFM =p) it says that if a button is pressed $char(ability) will return -2 Probably busted.
Yeah, it's been known busted for a while :). Not a pressing issue though with everything else going on.

G

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Sat Apr 17, 2004 2:51 am

Ok I have Noticed Multi things that happens when am using this macro. This is no dought a nice macro and i would like to get it inproved.

So far i have change the script just a little mine looks like this

Code: Select all

|K I L L . M A C 
|B Y ~ N O T A D R U I D ! ! ! 
|Usage:  /mac kill.  It's that simple! 
|Intended for monks.  moves to the mob, autoattackks 
|Uses flying kick and celestial fists. 
|autoattack off on enrage 
|Mends automatically if below 70% life 
|~ ~ Version 2.6 ~ ~ 

#turbo 90 
#Event enraged " has become ENRAGED." 
#Event toofar "Your target is too far away, get closer!" 
#Event tooclose "You cannot see your target." 

Sub Main 
  /if "$target()"=="False" /end 
  /echo Running ~ K I L L . M A C ~ by Notadruid!  "Feel the pwnage!" ~ Version 2.6 
  /declare RangeMax global 
  /declare RangeMin global 
  /declare FastRange global 
  /varset RangeMax 10 
  /varset RangeMin 5 
  /varset FastRange 12 
  /face fast nolook 
  /call move 
  /attack on 
  :fight 
  /face fast nolook 
  /if n $char(ability,"Flying Kick")>0 { 
    /do "Flying Kick" 
    /cast item "Celestial Fists" 
  } 
  /if n $char(hp,pct)<=70 { 
    /if $char(ability,"Mend")>0 { 
      /do "Mend" 
    } 
  } 
  /call move 
  /doevents 
  /if "$target()"=="False" { 
    /sendkey up up 
    /attack off 
    /end 
  } 
  /goto :fight 
/return 

Sub move 
   /face fast nolook 
   /doevents enraged 
   /if n $target(distance)>=@FastRange /call fastmove 
   /if n $target(distance)>@RangeMax { 
      /press up 
   } 
   /if n $target(distance)<@RangeMin { 
      /press down 
   } 
/return 

Sub fastmove 
  :fastmoveloop 
  /doevents enraged 
  /if $target()=="FALSE" { 
     /sendkey up up 
     /end 
  } 
  /face fast nolook 
  /if n $target(distance)>@FastRange { 
     /sendkey down up 
  } 
  /if n $target(distance)<=@FastRange { 
     /sendkey up up 
     /return 
  } 
  /goto :fastmoveloop 
/return 

Sub Event_toofar
[color=red]/face fast  [/color]
[color=red]/call fastmove  [/color]
  /if n $target(distance)<@RangeMax { 
|RangeMax is too large. 
|Adjust RangeMax to current distance 
|Adjust RangeMin and FastRange 
|to eliminate impossible constraints 
    /varset RangeMax $target(distance) 
    /varset RangeMin $calc(@RangeMax-5) 
    /varset FastRange $calc(@RangeMax+5) 
  } 
/return 

Sub Event_tooclose
[color=red]/face fast [/color]
  /if n $target(distance)>@RangeMin { 
|RangeMin is too small. 
|Adjust RangeMin to current distance 
|Adjust RangeMax and FastRange 
|to eliminate impossible constraints 
    /varset RangeMin $target(distance) 
    /varset RangeMax $calc(@RangeMin+5) 
    /varset FastRange $calc(@RangeMax+5) 
  } 
/return 

Sub Event_enraged 
  /attack off 
  /press esc 
  /end 
/return
First i would like to Explain why i changed the code that i ajusted

1. for the Sub event_toofar The macro was acting up in making the monk to follow around a kiting mob in kite groups. i ajusted it by making /press up to /call fastmove it was Easy that way, and it didnt mess up the macro even if the mob was standing in one spot.

2. in the sub event_tooclose I noticed that when the macro was on and i was chasing mobs around because of casters being agroed and stuff, i noticed that sometimes the macro would act up and keep pressing back over and over and soon enough i had to repress the macro in order for it to reset its varsets to get back on the mob and it was creating a problem so i put in a /face fast command which helped alot, (Noticed when it was pressing back i would be going off to some unknow durection) and took out the /press down command all together which didnt ruin anything because it only took 1 sec for the mob to move or get pushed somewere.


Now with that said, it was working great intill now probebley because of the new version of MQ2data the macro. probley the macro just needs to be updated a bit more.

I have noticed now that when using the macro.

1. Using it in Kite groups, i would sometimes follow the mob but far enough so i dont hit the mob any more during the middle of the fight and i would have to repress the macro.

2. I can no longer click on anything or use any command's for some unknow reason i dont know any more, often locks up my keyboard when its running now, and is hard to shut the macro down because i have /end as a hotkey.

I hope i helped out, and hope that someone will soon update this macro 8) Thanks agian for making it, it still is a great macro

Cy soon[/code]

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Sat Apr 17, 2004 7:50 am

WEll me got Board so i thought of some fixes that could work and also Estamated the flying Kick timer, that was mentioned Earlyier... you can Cut and paste as you like.

Code: Select all

Version 2.6 
  /declare RangeMax global 
  /declare RangeMin global 
  /declare FastRange global
[color=red]  /declare FlyingKickTimer timer[/color] 
[color=red]  /varset FlyingKickTimer 0[/color]
  /varset RangeMax 10 
  /varset RangeMin 5 
  /varset FastRange 12 
  /face fast nolook 
  /call move 
  /attack on 
  :fight 
  /face fast nolook 
[color=red]  /if n @FlyingKickTimer<=0 {[/color]   
    /do "Flying Kick" 
    /cast item "Celestial Fists"
[color=red]   /varset FlyingKickTimer 53[/color]
I set the Varset to 53 for the flyingkicktimer because some people lag a tinny bit so i decided 53 was a safe number, for the people with no problems 50 was the exact varset # with 31% worn haste and epic haste on.

Also went ahead and tryed to fix the issues with my kite groups so i put in somethings a bit Diffrent, havnt tryed it yet. hope to soon.

Code: Select all

Sub Event_toofar 
[color=red]/face fast[/color]
   /if n $target(distance)<@RangeMax { 
|RangeMax is too large. 
|Adjust RangeMax to current distance 
|Adjust RangeMin and FastRange 
|to eliminate impossible constraints 
    /varset RangeMax $target(distance) 
[color=red]    /varset RangeMin $calc(@RangeMax-7) [/color]
[color=red]    /varset FastRange $calc(@RangeMax+3)[/color]
[color=red]/call fastmove[/color]
  } 
/return 

Sub Event_tooclose 
[color=red]/face fast[/color]
  /if n $target(distance)>@RangeMin { 
|RangeMin is too small. 
|Adjust RangeMin to current distance 
|Adjust RangeMax and FastRange 
|to eliminate impossible constraints 
    /varset RangeMin $target(distance) 
[color=red]    /varset RangeMax $calc(@RangeMin+2) [/color]
[color=red]    /varset FastRange $calc(@RangeMax+3) [/color]
[color=red]/call fastmove[/color]
  } 
/return 
I will Add in a Disarm varset also while am at it 8)

Code: Select all

Version 2.6 
  /declare RangeMax global 
  /declare RangeMin global 
  /declare FastRange global
  /declare FlyingKickTimer timer 
  /declare Disarm timer
  /varset Disarm 0
  /varset FlyingKickTimer 0
  /varset RangeMax 10 
  /varset RangeMin 5 
  /varset FastRange 12 
  /face fast nolook 
  /call move 
  /attack on 
  :fight 
  /face fast nolook 
  /if n @FlyingKickTimer<=0 {   
    /do "Flying Kick" 
    /cast item "Celestial Fists"
    /varset FlyingKickTimer 53
  }
  /if n @Disarm<=0 {
    /do "Disarm"
    /varset Disarm 103
  }



Hopefully this works i mite have a slite chance to try it tonight but no one is on to snare around a mob for me while i try it. If someone can, plz try it and tell me what you think. Thanks

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: 2 issues in kill.mac ~ Auto monk meleer

Post by grimjack » Mon Apr 19, 2004 3:12 am

notadruid wrote:Bug 1: Cannot chat easily because it frequently uses /press up, so whenever you press shift it will shift+up and kill your chat message
Bug 2: The events that are only supposed to happen if Flying Kick is ready are constantly occuring, whether or not the button is pressed or ready..

I don't know how to fix these so I'm tossing the ball to you =p

|K I L L . M A C
|B Y ~ N O T A D R U I D ! ! !

/echo Running ~ K I L L . M A C ~ by Notadruid! "Feel the pwnage!" ~ Version 2.6
I never was able to find a better solution for the /press up portion of this macro.

Code: Select all

|rogue-assist.mac (Removed rogue abilities, added monks)
|Rogue Melee assist macro. (Edited for a monk)
|version 3
|Author GrimJack
#Turbo 90 
#Event Enraged "has become ENRAGED" 

Sub Main 
   /declare RangeMin global 
   /declare RangeMax global 
   /declare FastRange global 
   /varset RangeMin @Param0 
   /varset RangeMax @Param1 
   /varset FastRange @Param2 
   :Mainloop 
   /call Combatcheck 
   /call RangeSub 
   /call FlyKickIt
   /call MendCheck
   /doevents 
   /goto :Mainloop 
/return 

Sub FlyKickIt 
   /if n $char(ability,"Flying Kick")>0 { 
    /do "Flying Kick" 
    /cast item "Celestial Fists" 
  } 
/return 

Sub Combatcheck 
   /if $target()=="FALSE" { 
      /if $combat=="TRUE" { 
         /attack off
      } 
      /end 

   }
   /if $combat=="FALSE" /attack on
   /return  
/return 

Sub Rangesub 
   /stand 
   /face fast 
   /if n $target(distance)>=@FastRange /call Fastmove 
   /if n $target(distance)>@RangeMax { 
      /press up 
   } 
   /if n $target(distance)<@RangeMin { 
      /press down 
   } 
/return

Sub MendCheck
   /if n $char(hp,pct)<=70 { 
      /if $char(ability,"Mend")>0 { 
         /do "Mend" 
      }
   } 
/return 

Sub Fastmove 
   :fastmoveloop 
   /if $target()=="FALSE" { 
      /sendkey up up 
      /if $combat=="TRUE" { 
         /attack off 
         /return 
      } 
   } 
   /stand 
   /face fast 
   /if n $target(distance)>@FastRange { 
      /sendkey down up 
   } 
   /if n $target(distance)<=@FastRange {  
      /sendkey up up 
      /return 
   } 
   /goto :fastmoveloop 
/return 

Sub Event_Enraged 
  /attack off 
  /press esc 
  /end 
/return
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Mon Apr 19, 2004 4:10 am

For some Reason That Macro freezes my keyboard and i cant click on anything,

The reason why i use my keyboard is when am in front of a mob i press ctrl-right or left to get behind it while the macro is still using the /face fast command and keeping me in range of the mob, by the macro pressing up or down for me. :?

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Mon Apr 19, 2004 5:54 pm

s0meth1ng wrote:For some Reason That Macro freezes my keyboard and i cant click on anything,

The reason why i use my keyboard is when am in front of a mob i press ctrl-right or left to get behind it while the macro is still using the /face fast command and keeping me in range of the mob, by the macro pressing up or down for me. :?
It's really really really old. I would be supprised if it did work.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Mon Apr 19, 2004 7:48 pm

Going to check out some of the macros out right now to see if thay would work if i was just to modify it for a monk 8) I will post here if i need some help rescripting it

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Thu Apr 22, 2004 5:56 am

This macro seems to be way obsolete now. going to try and repair it, so far this is posing a problem.

Code: Select all

/if "$target()"=="False" /end
Dont know if it needs to be, from what i read so far in the help forums, but this is what i got... will try it later

Code: Select all

/if ($target())=="False" /end {

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Thu Apr 22, 2004 6:50 am

Code: Select all

/if "$target()"=="False" /end
this is now:

Code: Select all

/if (!${Target.ID}) /end

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Thu Apr 22, 2004 4:47 pm

Need more Help with this, Changing of all the varset calc's and Stuff, And i woul like to change how the Combat is Engaged, Instead of have the Attack on all through the battle, i would like it when the Mob Moves away the attack go's off intill i reach the mob combat area then attack go's back on.

Here is what i got so far need Help to Finesh the Rest plz :D

Code: Select all

|K I L L . M A C 
|B Y ~ N O T A D R U I D ! ! ! 
|Usage:  /mac kill.  It's that simple! 
|Intended for monks.  moves to the mob, autoattackks 
|Uses flying kick and celestial fists. 
|autoattack off on enrage 
|Mends automatically if below 70% life 
|~ ~ Version 2.6 ~ ~ 

#turbo 90 
#Event enraged " has become ENRAGED." 
#Event toofar "Your target is too far away, get closer!" 
#Event tooclose "You cannot see your target." 

Sub Main
  /if (!${Target.ID}) /end   
  /echo Running ~ K I L L . M A C ~ by Notadruid!  "Feel the pwnage!" ~ Version 2.6 
  /declare MaxRange global 
  /declare MinRange global 
  /declare FastRange global 
  /varset MaxRange 10 
  /varset MinRange 5 
  /varset FastRange 10
  /face  nolook fast
  /call move 
  /attack on 
  :fight 
  /face nolook fast
  /if (${Me.AbilityReady["Flying Kick"]}) {
    /doability "Flying Kick"
  }
  /if (${Me.AbilityReady["Disarm"]}) {
    /doability "Disarm"
    /cast iteam "Celestial Fists"
  }
  /if (${Me.PctHPs}<=70) { 
    /if (${Me.AbilityReady["Mend"]}) { 
      /doability "Mend" 
    } 
  } 
  /call move 
  /doevents 
  /if (!${Target.ID}) { 
    /keypress forward hold
    /attack off 
    /end 
  } 
  /goto :fight 
/return 

Sub move 
   /face nolook fast
   /doevents enraged 
   /if (${Target.Distance}>=${Target.FastRange}) /call fastmove 
   /if (${Target.Distance}>${Target.MaxRange}) { 
      /keypress forward hold
   } 
   /if (${Target.Distance}<${Target.MinRange}) { 
      /keypress back
   } 
/return 

Sub fastmove 
  :fastmoveloop 
  /doevents enraged 
  /if (!${Target.ID}) { 
     /keypress forward hold
     /end 
  } 
  /face fast nolook 
  /if (${Target.Distance}>${Target.FastRange}) { 
     /keypress down
  } 
  /if (${Target.Distance}<=${Target.FastRange}) { 
     /keypress forward hold
     /return 
  } 
  /goto :fastmoveloop 
/return 

Sub Event_toofar
/face nolook fast
  /if (${Target.Distance}<${Target.MaxRange}) { 
|RangeMax is too large. 
|Adjust RangeMax to current distance 
|Adjust RangeMin and FastRange 
|to eliminate impossible constraints 
    /varset MaxRange (${Target.Distance})
    /varset MinRange $calc(@MaxRange-5) 
    /varset FastRange $calc(@MaxRange+5) 
  } 
/return 

Sub Event_tooclose 
/face nolook fast
  /if (${Target.Distance}>${Target.MinRange}) { 
|RangeMin is too small. 
|Adjust RangeMin to current distance 
|Adjust RangeMax and FastRange 
|to eliminate impossible constraints 
    /varset MinRange (${Target.Distance})
    /varset MaxRange $calc(@MinRange+3) 
    /varset FastRange $calc(@MaxRange+3)
  } 
/return 

Sub Event_enraged 
  /attack off
  /keypress back
  /press esc 
  /end 
/return

s0meth1ng
orc pawn
orc pawn
Posts: 28
Joined: Sun Feb 22, 2004 7:00 am

Post by s0meth1ng » Thu Apr 22, 2004 5:03 pm

Ok i Just tryed What i just did to the Macro, and for some Reason Am not moving to the Target at all, need some assistance plz :?

Also Noticed even if i was close to the Mob i was not using any of my abilitys :?