It seems that nested /if parsing have been changed, and are bugged atm? Not sure when this changed, but it worked differently before the DX9 patch. Havent tried it before the 20040330 version, and there this issued occured. I am running with both MQ2DATATYPES and MQ2PARAMS enabled.
The following is a modified piece from a macro Im working on, thats been changes slightly so it can run by itself.
Code: Select all
| *** Defines for DurSpells array
#define DurSpellName 0
#define DurItemName 1
#define DurCastNext 2
#define DurMaxHealth 3
Sub Main
/declare DurSpells array2
/varset DurSpells(0,DurSpellName) "Tempest Wrath"
/varset DurSpells(0,DurItemName) "Blade of the Tempest"
/varset DurSpells(0,DurMaxHealth) 0
/varset DurSpells(1,DurSpellName) "Swarming Death"
/varset DurSpells(1,DurMaxHealth) 16
/varset DurSpells(2,DurSpellName) "E'ci's Frosty Breath"
/varset DurSpells(2,DurMaxHealth) 8
/call TestEvent
/return
Sub TestEvent
/declare i local
/declare Para0 local
/varset Para0 "Your Swarming Death spell has worn off."
/for i 0 to 9
/if "@DurSpells(@i,DurSpellName)"~~"UNDEFINED" /return
/echo Checking spell (@i)
[color=red]/if "@Para0"~~"@DurSpells(@i,DurSpellName)" [/color]{
[color=red]/echo Spell (@i) matched![/color]
/if n ${Target.PctHPs}>@DurSpells(@i,DurMaxHealth) {
[color=red]/varset DurSpells(@i,DurCastNext) TRUE[/color]
/echo @DurSpells(@i,DurSpellName) faded, and will be renewed.
} else {
/echo @DurSpells(@i,DurSpellName) faded, but will not be renewed.
}
}
/next i
/returnAm I using the nesting incorrectly, or is it bugged?
This is still an issue with .zip from March 31 2004 08:46:39.
EDIT: If running this as a test, target yourself and have more than 16% of your HPs, otherwise you will not match the comparison made for target HPs.


