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
-
Quadzer
- orc pawn

- Posts: 15
- Joined: Sun Oct 19, 2003 10:12 pm
Post
by Quadzer » Sat Jan 03, 2004 3:53 pm
Is there a better way to tell if you are fighting other than using $combat?
It seams to work ok but everynow and then it will hang for 10 seconds or so. I read it's based on your swing of the weapon. So that is probley why it's slow.
Just looking for a better way.
Thanks
-
YKW-28983
- a hill giant

- Posts: 252
- Joined: Sun Dec 01, 2002 11:37 pm
Post
by YKW-28983 » Sat Jan 03, 2004 4:01 pm
MQ Manual wrote:
$combat
Returns TRUE if you are in attack mode, FALSE if not.
$combat returns if your auto-attack is on or off.
So no there is no "better" way of doing it, as that's the best.
Post the script your having issues with combat in, you may just have a delay where you dont want a delay.
-
Zxeses
- a ghoul

- Posts: 103
- Joined: Tue Jan 07, 2003 4:17 pm
Post
by Zxeses » Mon Jan 05, 2004 11:58 am
I think the 10 second thing shows there is a bug, one that should perhaps be corrected--Since $conbat always worked in the past...
I to have noticed an odd, somtimes incorrect response from $combat ever since the december patches.
One time I sat there in POK and tested it. Hit auto attack, then /echo $combat returned FALSE. This didnt happen before the december patch.
Since $combat is very important for botted characters, I'm sure it will be fixed soon.
-
FlashG
- Contributing Member

- Posts: 104
- Joined: Thu Jul 11, 2002 6:38 pm
Post
by FlashG » Mon Jan 05, 2004 12:32 pm
AFAIK $combat has never worked the way people expected. While it should reflect the status of the "Q" key it seems indicate that you are hitting or missing a target. Also others have posted that bards holding instruments $combat seems to be bugged. Here is a post called "$combat working?" I made from 12 November 2003. FYI I tested $combat while a bard (probably holding a instrument)
http://macroquest2.com/phpBB2/viewtopic ... highlight=
Flashg
-
Kracken
- orc pawn

- Posts: 24
- Joined: Sat Dec 20, 2003 3:01 pm
Post
by Kracken » Tue Jan 06, 2004 2:18 pm
It definately isn't just detecting if autoattack is on because it will 'go off' when you fire an arrow.
my 2c
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Tue Jan 06, 2004 2:44 pm
Try something like this. I'm not entirely sure what the text is when you turn on autoattack but it'd be something like this: (Yes its ghetto.. but its effective until there is a better way.)
Code: Select all
#Event AutoAttackOn "Attack is on."
#Event AutoAttackOff "Attack is off."
Sub Main
/declare AttackMode global
/varset AttackMode 0
:Loop
/if n @AttackMode==0 {
| Do things here that you'd do when you are not attacking.
} else {
| Do things here that you'd do when you are attacking.
}
/doevents
/goto :Loop
/return
Sub Event_AutoAttackOn
/varset AttackMode 1
/echo Auto Attack is ON.
/return
Sub Event_AutoAttackOff
/varset AttackMode 0
/echo Auto Attack is OFF.
/return
-
Grumpy
- a hill giant

- Posts: 167
- Joined: Sun Nov 10, 2002 4:22 pm
Post
by Grumpy » Wed Jan 07, 2004 9:57 am
Ghetto and won't work, when the target dies, autoattack stops silently. Also if you have "Attack on Assist" active, it goes ON silently as well. Also, if you sit, autoattack quietly stops.
The client obviously has a 100% foolproof way of detecting autoattack active, since it knows when to display the flashing border around the player window. Unless $combat() checks the same thing, I'd bet that the current reference is something like "swinging" or "start attack animation" rather than "autoattack active".
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Wed Jan 07, 2004 12:08 pm
Ah yes. Forgot about auto attack shutting off after the mob was dead. Well at any rate Sharp of Fairlight just posted the correct offset for checking of auto attack is on or off. So this will be a moot point soon.
-
Raebis
- a ghoul

- Posts: 81
- Joined: Fri Dec 12, 2003 6:23 am
Post
by Raebis » Thu Jan 08, 2004 7:09 pm
YKW-28983 wrote:
$combat returns if your auto-attack is on or off.
So no there is no "better" way of doing it, as that's the best.
Post the script your having issues with combat in, you may just have a delay where you dont want a delay.
$combat returns if your character is in "swinging arm mode" - if you have a non weapon in your primary hand (i.e. bard instrument) it will return false.
Always say what you want to say. Because those who mind, don't matter. And those who matter, don't mind.