Help convert this /if statement please

For questions regarding conversion of scripts from the old, parm style to the new MQ2Data format. Conversion questions only!

Moderator: MacroQuest Developers

Azum
a hill giant
a hill giant
Posts: 229
Joined: Wed Jun 04, 2003 5:04 am

Help convert this /if statement please

Post by Azum » Sun May 02, 2004 7:16 pm

Code: Select all

/if "$char(buff,@loop,spellid)"!~"@Param0" /next loop
Part of a bufftime macro, basically if the spellname doesnt match the parameter passed to the macro (i.e. /mac bufftime kazad) it should skip to the next buff until it finds it.. (My understanding of it anyway)

I've tried:

Code: Select all

/if ($String[${Me.Buff[${i}].Name}].NotEqual[${Param0}])
and various other things, but all are giving me an error.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Sun May 02, 2004 7:45 pm

Assuming you are using ${i} as your buff index and you make sure you are passing a parameter to that sub.

Try:

Code: Select all

/if (!${Me.Buff[${i}].Name.Equal[${Param0}]}) Do Whatever.

Azum
a hill giant
a hill giant
Posts: 229
Joined: Wed Jun 04, 2003 5:04 am

Post by Azum » Sun May 02, 2004 7:58 pm

That doesn't give me an error, but it doesn't do what it's supposed to either. Macro is posted here:

http://macroquest2.com/phpBB2/viewtopic ... 8117#48117

bardomatic
a ghoul
a ghoul
Posts: 131
Joined: Thu Apr 29, 2004 12:09 am

Post by bardomatic » Mon May 03, 2004 11:55 am

maybe try

Code: Select all

/if (!${String[${Me.Buff[${loop}.ID}].Find[${Param0}]}) /next loop