Help with very simple macro

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

bene0019
decaying skeleton
decaying skeleton
Posts: 3
Joined: Sat Nov 20, 2004 10:09 pm

Help with very simple macro

Post by bene0019 » Sat Dec 11, 2004 2:15 pm

I'm attempting to write a very simple macro that will automatically kick my target if I'm close enough. I can't even get the following to work

Thanks for any help

Code: Select all

Sub Main
:StartLoop


/if (${Me.AbilityReady["Kick"]}) {
/doability "Kick"
/echo Kicking
}

/goto :StartLoop
/return
[/code]

Neolesh
a hill giant
a hill giant
Posts: 231
Joined: Mon Aug 23, 2004 11:15 am

Post by Neolesh » Sat Dec 11, 2004 8:05 pm

This is what I wrote when I want to do this. I wrote it when I was still learning this and haven't cleaned it up yet. I'm sure you can tho :)

Code: Select all

Sub Main

  /echo The Battle Macro is on!

  :Start

  /doevents

  /if (${Me.Combat} && ${Me.AbilityReady["kick"]} && !${Me.Stunned}) /doability "kick"
  /if (${Me.Casting.ID}) {
    :castingwait
     /if (${Me.Casting.ID}) /goto :castingwait
     /delay 1
  }

 /goto :Start

/return

bam
a ghoul
a ghoul
Posts: 149
Joined: Thu May 13, 2004 11:53 pm

Post by bam » Sun Dec 12, 2004 12:01 am

hrm, not really into the whole macro thing. but the only difference I can see is

Code: Select all

Kick
vs

Code: Select all

kick
which very well could be a problem as macro code seems to be very case sensitive.

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Mon Dec 13, 2004 1:22 am

Code: Select all

/if (${Me.AbilityReady[Kick]}) /doability ${Me.Ability[Kick]}
Try that, kill the "'s around the string. Oh and dumb thing but make sure that kick is on a hotkey on the combat abilities.

User avatar
Fluffy
a ghoul
a ghoul
Posts: 81
Joined: Sun Aug 22, 2004 5:08 pm

Post by Fluffy » Mon Dec 13, 2004 1:51 am

Zeus wrote:

Code: Select all

/if (${Me.AbilityReady[Kick]}) /doability ${Me.Ability[Kick]}
Try that, kill the "'s around the string. Oh and dumb thing but make sure that kick is on a hotkey on the combat abilities.
There is no real need to have it hotkeyed.. But I usually have it up to make sure that it is going off anyway..

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Dec 13, 2004 6:42 am

pretty sure that Kick has to be capitalized. If that doesn't correct it I will work on it when I get home.. I know I have a kick sub in a couple macros I can pull out for you.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Mon Dec 13, 2004 8:58 am

It doesn't need to be on a hotkey page. But, it does need to be hotkeyed on your abilities window. Try foraging or Taunting without a hotkey on your ability page.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Mon Dec 13, 2004 11:07 am

There is no real need to have it hotkeyed.. But I usually have it up to make sure that it is going off anyway..
What A_Druid_00 said :)

User avatar
Night Hawk
a grimling bloodguard
a grimling bloodguard
Posts: 590
Joined: Fri Aug 13, 2004 4:56 pm

Post by Night Hawk » Mon Dec 13, 2004 3:00 pm

Code: Select all

Sub Main
   :Loop
    /if (${Me.Combat}&&${Me.AbilityReady["Kick"]}&&!${Me.Casting.ID}&&${Target.ID}&&!${Me.Stunned}) /doability "Kick"
   /goto :Loop
/return

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Tue Dec 14, 2004 1:10 am

lacks a range check :P

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Tue Dec 14, 2004 5:02 am

If you want to do it in a macro, these examples should help.

However, I would suggest donating a few bucks to the devs and downloading MQ2Combat from the VIP section. It will Kick/Taunt/Bash/etc for you, turn off attack on enrage, stick to your targets, automatically accept invites, and maybe a couple other things. You can turn some or all of these features off if you dont want them, but I find most of it useful. It will also do all of this "in the background" without affecting any other macros you may want to run.

This is what I use to spam all my abilities, and it works quite well for me. It takes a little bit more effort to install a plugin the first time, but there is a post that walks you all through it.

Good luck.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Tue Dec 14, 2004 6:23 am

Or if for some reason you can't donate to get into the VIP section this plugin does a nice job spamming skills.
http://macroquest2.com/phpBB2/viewtopic.php?t=9079

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Tue Dec 14, 2004 6:49 am

Autoskills is godly
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]