Page 1 of 2
Simple Fight-Kick Macro
Posted: Sun Jun 13, 2004 12:10 pm
by Drumstix42
I started making this macro, and tried using events, and then I found a much way to do it, blah blah.
The point is....
-If your attack is on, it will continue to kick as long as you have a target, your kick is ready to use, and your not casting a spell.
-If your attack is off, it'll wait until the next fight
Pretty simple. Can be easily added to for more skills I'm sure:
Code: Select all
|-- groupinfo.mac
|-- by Drumstix42
|-- 10-05-2004
|----------------------------------------------------
|-- Lets Kick it!
Sub Main
/echo Auto-Kicking while Attacking
/call Combat
/return
Sub Combat
/echo Lets Fight...
:WaitLoop
/if (!${Me.Combat}) {
/echo Waiting for another fight...
/delay 60s ${Me.Combat}
/goto :WaitLoop
}
/echo Fighting -- ${Target.CleanName}
:CombatLoop
/if (${Me.Combat}) {
/delay 10s ${Me.AbilityReady["Kick"]}
/if (${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}&&!${Me.Stunned}) /doability "Kick"
}
/if (${Me.Combat}) /goto :CombatLoop
/goto :WaitLoop
/return
Enjoy.
Posted: Sat Jun 26, 2004 11:56 am
by kaatok
First things first, im an utter beginner here i dont know the first thing about code or c++ or anything im just following guides and trying to pick it up as i go along, so forgive me my ignorance.
I use this macro, i love it take great joy from the simple things, like, not having to press a button all the time. I just got Feral swipe and was looking to incluse roughly the same code in this macro to add auto swipe.
Now again i have no clue but im guessing i would do this
Code: Select all
|-- groupinfo.mac
|-- by Drumstix42
|-- 10-05-2004
|----------------------------------------------------
|-- Lets Kick it!
Sub Main
/echo Auto-Kicking while Attacking
/call Combat
/return
Sub Combat
/echo Lets Fight...
:WaitLoop
/if (!${Me.Combat}) {
/echo Waiting for another fight...
/delay 60s ${Me.Combat}
/goto :WaitLoop
}
/echo Fighting -- ${Target.CleanName}
:CombatLoop
/if (${Me.Combat}) {
/delay 10s ${Me.AbilityReady["Kick"]}
/if (${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}) /doability "Kick"
}
***added code here***
/if (${Me.Combat}) {
/delay[b] 60s [/b]${Me.AbilityReady["[b]Feral Swipe[/b]"]}
/if (${Me.AbilityReady["[b]Feral Swipe[/b]"]}&&!${Me.Casting.ID}&&${Target.ID}) /doability "[b]Feral Swipe[/b]"
}
***finished***
/goto :WaitLoop
/return
Again im just trying to have an educated guess, but could anyone gimme a yes or no? Ive added in bold letters the change to the code i have done just basically changing kick to feral swipe and 10s to 60s.
I gotta start this book i got of 'learn c++ in 21 days'
Thank you for any help.[/code]
Posted: Sat Jun 26, 2004 8:50 pm
by Drumstix42
See if I can help ya out a bit here.
Lets take is step by step.
First, lets take this block:
Code: Select all
/if (${Me.Combat}) {
/delay 10s ${Me.AbilityReady["Kick"]}
/if (${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}) /doability "Kick"
}
The code how it stands now just waits for Kick to be ready to use, then kicks. We can eitehr just a line in before that /delay, or replace it.
Here's my suggestion for adding a line to active the Feral Swipe (since it's an AA, and not really an ability per-say).
Get the SpellCast.inc (an include file) and put it in your macro folder:
http://macroquest2.com/phpBB2/viewtopic.php?t=6748
Add this code in blue:
Code: Select all
|-- groupinfo.mac
|-- by Drumstix42
|-- 10-05-2004
|----------------------------------------------------
|-- Lets Kick it!
[color=cyan]#include SpellCast.inc[/color]
Sub Main
/echo Auto-Kicking while Attacking
/call Combat
/return
Then, add this line before our /delay
Code: Select all
/if (${Me.Combat}) {
[color=cyan]/call Cast "Feral Swipe" activate[/color]
/delay 10s ${Me.AbilityReady["Kick"]}
/if (${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}) {
/doability "Kick"
}
}
The only difference from that and replacing the /delay line is:
Lets say Feral Swipe pops up while waiting for kick to pop, it won't do the Feral Swipe until after the next kick. Honestly, that's the least of anyone's worries I'm sure.
Another option could be this:
Code: Select all
/if (${Me.Combat}) {
/if (!${Me.Casting.ID}&&${Target.ID}) /call Cast "Feral Swipe" activate
/delay 10s ${Me.AbilityReady["Kick"]}
/if (${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}) {
/doability "Kick"
}
}
... to make sure your not casting, and you have a target.
There's tons of way to customize it really. Just giving you options.
Auto-Beg
Posted: Sat Jun 26, 2004 10:34 pm
by Kambic
I thought I'd change that to make it Auto Beg (just trying to practice my macro coding).
All I did was change every reference to Kick over to Begging, and added commands to turn off attack and turn it back on and beg in between. Unfortunately (although the macro works), it locks up the client for me*.
Here's my code:
Code: Select all
Sub Main
/echo Auto-Begging while Attacking
/call Combat
/return
Sub Combat
/echo Lets Beg...
:WaitLoop
/if (!${Me.Combat}) {
/echo Waiting for another fight...
/delay 60s ${Me.Combat}
/goto :WaitLoop
}
/echo Begging -- ${Target.CleanName}
:CombatLoop
/if (${Me.Combat}) {
/delay 10s ${Me.AbilityReady["Begging"]}
/if (${Me.AbilityReady["Begging"]}&&!${Me.Casting.ID}&&${Target.ID}) {
/attack off
/doability "Begging"
/attack on
}
}
/if (${Me.Combat}) /goto :CombatLoop
/goto :WaitLoop
/return
*Yes I've been to F-H and I know there are other solutions to this problem, but I want my macro to work.
The macro runs, it attemps to beg but it locks the client (no spells or hotkeys, only game supplied menus). I assume the problem is turning attack on and off, what is the proper solution? I've tried writing this several different ways, sub routines, different combinations of /if and /goto, etc. but all of them lock me up. I thought I'd be able to clone this code yet it still did it.
Another avenue I've considered is changing #turbo, but I don't understand it much and did not fiddle with it.
Posted: Sun Jun 27, 2004 2:42 am
by Me.Name
How about this...
My warrior "taunts" and "kicks" (of course a warrior wouldn't need the casting check), so...
Code: Select all
| macro name: tank.mac
Sub Main
:loop
/if (${Me.Combat}&&${Target.ID}&&!${Me.Casting.ID}) {
/if (${Me.AbilityReady["Taunt"]}) /doability "Taunt"
/if (${Me.AbilityReady["Kick"]}) /doability "Kick"
}
/goto :loop
/return
You would need to stop it with a "/endmacro" command though.
I'll try this soon and post findings.
edit: fixed typo
update: Works for me but needs a check for stun. As it is now if you are stunned and an ability is ready, this macro goes nuts trying to do ability.
Re: Auto-Beg
Posted: Sun Jun 27, 2004 5:03 pm
by Drumstix42
Aye, does need a stun check, was gonna post that, forgot tho.
As for:
Kambic wrote:I thought I'd change that to make it Auto Beg (just trying to practice my macro coding).
All I did was change every reference to Kick over to Begging, and added commands to turn off attack and turn it back on and beg in between. Unfortunately (although the macro works), it locks up the client for me*.
Here's my code:
Code: Select all
Sub Main
/echo Auto-Begging while Attacking
/call Combat
/return
Sub Combat
/echo Lets Beg...
:WaitLoop
/if (!${Me.Combat}) {
/echo Waiting for another fight...
/delay 60s ${Me.Combat}
/goto :WaitLoop
}
/echo Begging -- ${Target.CleanName}
:CombatLoop
/if (${Me.Combat}) {
/delay 10s ${Me.AbilityReady["Begging"]}
/if (${Me.AbilityReady["Begging"]}&&!${Me.Casting.ID}&&${Target.ID}) {
/attack off
/doability "Begging"
/attack on
}
}
/if (${Me.Combat}) /goto :CombatLoop
/goto :WaitLoop
/return
Heh, your biggest problem is:
${Me.Combat}
I don't think you can even Beg while your attack is on.
Posted: Sun Jun 27, 2004 5:07 pm
by Drumstix42
For begging (untested) use this:
Code: Select all
|-- Begging.mac
Sub Main
/echo Auto-Begging
/call Beg
/return
Sub Beg
/echo Lets Beg...
:WaitLoop
/if (!${Target.ID}) {
/echo Waiting for another target to beg from...
/delay 60s ${Target.ID}
/goto :WaitLoop
}
/echo Begging from -- ${Target.CleanName}
:BegLoop
/if (${Target.ID}) {
/delay 10s ${Me.AbilityReady["Begging"]}
/if (${Target.ID}) /doability "Begging"
}
/if (${Target.ID}) /goto :BegLoop
/goto :WaitLoop
/return
Posted: Mon Jun 28, 2004 1:26 am
by Kambic
I don't think you can even Beg while your attack is on.
Right, and you can't. That's why I added the /attack on and the /attack off around the /doability "Begging" command. I believe something in there may be locking up the client.
The macro runs fine, don't get me wrong. My problem isn't the macro itself, but why the macro is locking up my client.
My goal is to have a macro where in normal combat, my guy will switch off attack, beg (or pick pocket, or sneak, or whatever non-combat skill I want), and then switch attack back on, all automatically (well we are macro'ing after all). And preferably, without locking up my client :)
Posted: Mon Jun 28, 2004 3:18 am
by Me.Name
Try this -
Code: Select all
Sub Main
/echo Auto taunt and kick macro started
:loop
/if (${Me.Combat}&&${Target.ID}&&!${Me.Stunned}&&!${Me.Casting.ID}) {
/if (${Me.AbilityReady["Taunt"]}) /doability "Taunt"
/if (${Me.AbilityReady["Kick"]}) /doability "Kick"
/face
/if (${Target.Distance}>${Target.MaxRangeTo}) /keypress forward hold
/if (${Target.Distance}<10) /keypress forward
}
/if (!${Me.Sitting}) /goto :loop
/return
Added:
04-06-27 Check for stun
04-06-28 Fixed typo. Added auto-follow code to keep within melee range of fleeing mobs. Macro now ends when you sit.
OK! No more posting code for me without trying it first!
Bad macroer, bad!
Posted: Mon Jun 28, 2004 5:04 am
by Fuergrissa
This works for begging
Code: Select all
/if (${Me.AbilityReady[begging]}) {
/attack off
/face fast nolook
/delay 1
/doability "begging"
/attack on
}
Plugin...
Posted: Fri Jul 02, 2004 5:00 pm
by Stubs
Ok I have been struggling to learn how to code macros and plugins... I am terrible at it...could anyone help me out with a plugin version of this macro? I have the macro running with an addition.
ADDED:
/if (${Me.AbilityReady[disarm]}) {
/doability "disarm"
Replaced kick with bash as I have no kick ability.
Posted: Sat Jul 03, 2004 8:24 am
by DumbStruck
Seemes like a good lil macro .. but why not add a follow (stick to mob) routine ? What good is kick and attack if mob isnt there hehe since your automating the kick may as well do a stick.
I will try to cut up another macro to see if i can get a follow routine in there for my use hehe
Posted: Sat Jul 03, 2004 4:44 pm
by Drumstix42
DumbStruck wrote:Seemes like a good lil macro .. but why not add a follow (stick to mob) routine ? What good is kick and attack if mob isnt there hehe since your automating the kick may as well do a stick.
I will try to cut up another macro to see if i can get a follow routine in there for my use hehe
If you wanna stick, you go ande code it to stick.
I must say in "EVERY" macro I see that has to do with combat, people always wanna stick. It's really not that hard to code if you really wanted it. But I honestly suggest go using a Plugin. Then you DON"T have to code it every macro you use. My best suggestion is MoveUtils.
Posted: Sat Jul 03, 2004 5:56 pm
by Me.Name
DumbStruck wrote:Seemes like a good lil macro .. but why not add a follow (stick to mob) routine ? What good is kick and attack if mob isnt there hehe since your automating the kick may as well do a stick.
Did you try mine? It is posted in this thread.
Drumstix42 is right though. A plugin would be a better way to go. Why re-invent the wheel when the pros already have a better one.

Posted: Sat Jul 03, 2004 8:38 pm
by DumbStruck
some reason i can never get the plugins to work ..