Custombind with Params

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

Moderator: MacroQuest Developers

JP5
a lesser mummy
a lesser mummy
Posts: 70
Joined: Tue Jul 06, 2004 10:32 pm

Custombind with Params

Post by JP5 » Tue Nov 23, 2004 11:11 pm

If anyone has been having trouble with a custombind that has a MQ2 Param, most likely a toggle, I have a fix. Encountered the problem making a twitch macro.

Problem:
/custombind set Toggle ${If[${Toggle}==1,0,1]}
Will be parsed as
/custombind set Toggle 0 (or 1, but usually 0 is the default of integers)
therefore taking away the ability to toggle.

Solution:
/noparse /custombind set Toggle ${If[${Toggle}==1,0,1]}

Pretty sure this works, although I haven't tested.

User avatar
fice
a hill giant
a hill giant
Posts: 187
Joined: Thu Jul 17, 2003 3:28 pm

Post by fice » Wed Nov 24, 2004 3:20 am

a_druid_00 mentions this on his raid druid package :P

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 » Wed Nov 24, 2004 7:34 am

I just toggle between 1 and 2 instead of 1 and 0, /shrug. I do it because they're called from an array tho.
[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]