You don't have a lot of options here.
-> Either use a timer to check for that condition every second, something like /timer 0 1 updatecheck
-> Find every place where %var might be changed and put your code or a call to your alias behind it
It's impossible to wait in an alias until something else happens and then continue from that place in the alias. You'll have to save the status in your alias yourself and restore it when you're able to continue...
Busy waiting (while (%var != 1) { } ) will not work, like you already noticed. mIRc has only one thread executing, and if it's busy doing empty while loops, anything else (like changing the %var in the test) has to wait until the loop is done...