bash.mac

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

bash.mac

Post by ieatacid » Sun May 09, 2004 4:57 pm

Someone asked for the updated version of this a while back. Changed it a bit and added auto-face target.

Code: Select all

|bash.mac -- 5.08.2004
|
|for the <auto-face> parameter 1=on 0=off
|
|/mac bash                  (taunt, bash and autoface) -- default
|/mac bash <auto-face> 0    (don't taunt) 
|/mac bash <auto-face> 1    (only taunt)
|/mac bash <auto-face> 2    (only disarm)
|
|example: /mac bash 1 1 will auto-face target and only taunt

#event NoShield "You need to equip a shield in order to BASH"

Sub Main
   /declare face int local

   /echo ${Macro.Name} Started....
   /varset face ${Param0}
   /if (${Defined[Param1]}) {
      /if (${Param1.Equal[0]}) {
      /echo Taunt OFF
      /echo Bash ON
      /goto :LoopBash
      }
      /if (${Param1.Equal[1]}) {
      /echo Taunt ON
      /echo Bash OFF
      /goto :LoopTaunt
      }
      /if (${Param1.Equal[2]}) {
      /echo Taunt OFF
      /echo Bash OFF
      /goto :LoopDisarm
      }
   } else {
   /varset face 1
   /echo Taunt ON
   /echo Bash ON
   /goto :LoopBoth
   }

:LoopBoth
   /doevents
   /if (${Me.Combat}) {
      /if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
         /if (${face}==1) /face nolook
         /if (${Me.Casting.ID}) /goto :LoopBoth
         /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) /doability "Taunt"
         /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) /doability "Bash"
         /if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
      }
   }
   /delay 5
   /goto :LoopBoth

:LoopBash
   /doevents
   /if (${Me.Combat}) {
      /if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
         /face nolook
         /if (${Me.Casting.ID}) /goto :LoopBash
         /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) /doability "Bash"
         /if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
      }
   }
   /delay 5
   /goto :LoopBash

:LoopTaunt
   /if (${Me.Combat}) {
      /if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
         /face nolook
         /if (${Me.Casting.ID}) /goto :LoopTaunt
         /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) /doability "Taunt"
         /if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
      }
   }
   /delay 5
   /goto :LoopTaunt

:LoopDisarm
   /if (${Me.Combat}) {
      /if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
         /face nolook
         /if (${Me.Casting.ID}) /goto LoopDisarm
         /if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
      }
   }
   /delay 5
   /goto :LoopDisarm
/return

Sub Event_NoShield
   /echo No shield. Exiting.
   /end
/return
Last edited by ieatacid on Tue Dec 28, 2004 4:19 pm, edited 2 times in total.

User avatar
KentyMac
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sat Sep 11, 2004 1:28 am
Location: Auburn, AL
Contact:

Post by KentyMac » Fri Sep 17, 2004 6:56 pm

I tried to alter this to use Slam for my Ogre warrior so he can keep dual wielding. I changed every occurence of Bash -> Slam and removed the Shield check. But it still doesn't seem to be working. I start it in combat and it will say:
slam.mac Started...
Taunt ON
Slam ON
and then it never actually taunts of slams.

My warrior is level 28 so does not yet have Disarm but from what I can tell it shouldn't matter the default only taunts & slams anyway.

Here is the code as I altered it. (Board likes to remove my formatting spaces for some reason, sorry about that.)
|slam.mac -- 5.08.2004
|
|for the <auto-face> parameter 1=on 0=off
|
|/mac slam (taunt, slam and autoface) -- default
|/mac slam <auto-face> 0 (don't taunt)
|/mac slam <auto-face> 1 (only taunt)
|/mac slam <auto-face> 2 (only disarm)
|
|example: /mac slam 1 1 will auto-face target and only taunt

Sub Main
/declare face int local

/echo slam.mac Started....
/varset face ${Param0}
/if (${Defined[Param1]}) {
/if (${Param1.Equal[0]}) {
/echo Taunt OFF
/echo Slam ON
/goto :LoopSlam
}
/if (${Param1.Equal[1]}) {
/echo Taunt ON
/echo Slam OFF
/goto :LoopTaunt
}
/if (${Param1.Equal[2]}) {
/echo Taunt OFF
/echo Slam OFF
/goto :LoopDisarm
}
} else {
/varset face 1
/echo Taunt ON
/echo Slam ON
/goto :LoopBoth
}

:LoopBoth
/doevents
/if (${Me.Combat}) {
/if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
/if (${face}==1) /face nolook
/if (${Me.Casting.ID}) /goto :LoopBoth
/if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) /doability "Taunt"
/if (${Target.Distance}<=17 && ${Me.AbilityReady[Slam]}) /doability "Slam"
/if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
}
}
/delay 5
/goto :LoopBoth

:LoopSlam
/doevents
/if (${Me.Combat}) {
/if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
/face nolook
/if (${Me.Casting.ID}) /goto :LoopSlam
/if (${Target.Distance}<=17 && ${Me.AbilityReady[Slam]}) /doability "Slam"
/if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
}
}
/delay 5
/goto :LoopSlam

:LoopTaunt
/if (${Me.Combat}) {
/if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
/face nolook
/if (${Me.Casting.ID}) /goto :LoopTaunt
/if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) /doability "Taunt"
/if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
}
}
/delay 5
/goto :LoopTaunt

:LoopDisarm
/if (${Me.Combat}) {
/if (${Target.ID} && ${Target.Type.Equal[NPC]}) {
/face nolook
/if (${Me.Casting.ID}) /goto LoopDisarm
/if (${Target.Distance}<15 && ${Me.AbilityReady[Disarm]}) /doability "Disarm"
}
}
/delay 5
/goto :LoopDisarm
/return
I'm new to macros so thanks for your patience & help!

KentyMac

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Fri Sep 17, 2004 7:40 pm

If you add

Code: Select all

(${String[${InvSlot[offhand].Item.Type}].Equal["Shield"]})
into the /if check the ability is ready for bash then you dont have to bother with events.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
KentyMac
a lesser mummy
a lesser mummy
Posts: 44
Joined: Sat Sep 11, 2004 1:28 am
Location: Auburn, AL
Contact:

Post by KentyMac » Fri Sep 17, 2004 10:06 pm

Fippy wrote:If you add

Code: Select all

(${String[${InvSlot[offhand].Item.Type}].Equal["Shield"]})
into the /if check the ability is ready for bash then you dont have to bother with events.
Was this a suggestin for the original post or to answer my question?

KentyMac

Sunkist
orc pawn
orc pawn
Posts: 16
Joined: Thu Sep 09, 2004 10:31 am

Post by Sunkist » Sat Oct 09, 2004 12:52 pm

/bump, I would like to know how to change it to work with slam as well.

Ultra
orc pawn
orc pawn
Posts: 24
Joined: Tue Jun 08, 2004 10:42 pm
Location: Pittsburgh
Contact:

Post by Ultra » Tue Dec 28, 2004 12:59 pm

What are the chances of having this updated? I tried running it, and it gave me some odd errors.. I'll run it again, and get the errors I received.. (just woke up, and honestly don't remember).

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 28, 2004 1:05 pm

Could you possibly be more vague? I'm almost able to help you based on the information provided, and that just won't do.

Here's a hint though,

Code: Select all

<
and

Code: Select all

>
are not valid operators in the MacroQuest 2 language.
[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]

Ultra
orc pawn
orc pawn
Posts: 24
Joined: Tue Jun 08, 2004 10:42 pm
Location: Pittsburgh
Contact:

Post by Ultra » Tue Dec 28, 2004 1:12 pm

Yeah.. I'm dumb.. didn't even notice all that.. thanks for pointing that out.. that was exactly the problem.. :-P