Page 1 of 1

bash.mac

Posted: Sun May 09, 2004 4:57 pm
by ieatacid
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

Posted: Fri Sep 17, 2004 6:56 pm
by KentyMac
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

Posted: Fri Sep 17, 2004 7:40 pm
by Fippy
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.

Posted: Fri Sep 17, 2004 10:06 pm
by KentyMac
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

Posted: Sat Oct 09, 2004 12:52 pm
by Sunkist
/bump, I would like to know how to change it to work with slam as well.

Posted: Tue Dec 28, 2004 12:59 pm
by Ultra
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).

Posted: Tue Dec 28, 2004 1:05 pm
by A_Druid_00
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.

Posted: Tue Dec 28, 2004 1:12 pm
by Ultra
Yeah.. I'm dumb.. didn't even notice all that.. thanks for pointing that out.. that was exactly the problem.. :-P