i prefere the variable approach a lot better:
NPC Code:
if (playery=49){playery--;
this.varup=1;
this.vardown=0;
}
while(#v(this.varup=1)){
playery--;
}
if(playery=11){
playery++;
this.varup=0;
this.vardown=1;
}
while(#v(this.down=1)){
playery++;
}
that may work ....