Caps on Y-Direction movement?

int weight = 20;
y = ((weight -1)*y + player_box.y-60)/weight;
Is there a way to re-script this so it will only move between y600 and y4000? I'm trying not to use collision-events if not needed.
y = ((weight -1)*y + player_box.y-60)/weight;
Is there a way to re-script this so it will only move between y600 and y4000? I'm trying not to use collision-events if not needed.