"there is no IF ELSE statement in imacros – Bestmacros Oct 31 '13 at 8:01"
=> Indeed, but "You have to use JavaScript scripting." is incorrect...! You can achieve some Conditional Behaviour like in this Case in pure '.iim':
SET !ERRORIGNORE YES
SET !TIMEOUT_STEP 0
IMAGESEARCH POS=1 IMAGE=IMAGE1.png CONFIDENCE=65
SET ClickAmount EVAL("var y='{{!IMAGEY}}'; var z; if(y>0){z=1;} else{z=0;}; z;")
TAG POS={{ClickAmount}} TYPE=INPUT:TEXT ATTR=ID:bet-amount CONTENT=0.01
TAG POS={{ClickAmount}} TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt
IMAGESEARCH POS=1 IMAGE=IMAGE2.png CONFIDENCE=65
SET ClickMultiplier EVAL("var y='{{!IMAGEY}}', a='{{ClickAmount}}'; var z; if(a==1){z=0;} else if(y>0){z=1;} else{z=0;}; z;")
TAG POS={{ClickMultiplier}} TYPE=BUTTON:SUBMIT ATTR=ID:bet-multiplier
TAG POS={{ClickMultiplier}} TYPE=BUTTON:SUBMIT ATTR=ID:bet-bt
=> All the 'IF/ELSE' Logic in one single '.iim' Macro, very similar to @OP's original Script, and will work directly in iMB or IE, instead of using 4 Scripts requiring a main '.js' Script that will only work in FF...!
(Not tested, I've never used 'IMAGESEARCH' as I only use the free Add-on (with FF), according to the Wiki, '!IMAGEX' and '!IMAGEY' are supposed to hold the Coordinates if the Image is found and I suppose valid Coordinates must be >0, at least for '!IMAGEY'. The '!IMAGEX' and '!IMAGEY' Variables may need to be reset to 'NULL' before the 2nd 'IMAGESEARCH' if it doesn't occur automatically... (I cannot test...))