Можно конечно ещё заморочиться.
SUB (m-move_s, $MOVE_END_X, $MOVE_END_Y, $MOVE_SPEED)
$MOVE_WAVE = 10//длина волны
$MOVE_AMPL = 30 //максимальная амплитуда
$MOVE_Start_X = $_xmouse
$MOVE_Start_Y = $_ymouse
$MOVE_X = $MOVE_Start_X
$MOVE_Y = $MOVE_Start_Y
$dist = DIST($MOVE_END_X,$MOVE_END_Y,$MOVE_Start_X,$MOVE_Start_Y)
$MOVE_SPEEDVAR = INT((SQRT($dist))/$MOVE_SPEED)
IF($MOVE_SPEEDVAR < 1)
$MOVE_SPEEDVAR = 1
END_IF
$MOVE_step=($dist-1)/$MOVE_SPEEDVAR
$MOVE_X_step = ($MOVE_END_X-$MOVE_Start_X)/$MOVE_step
$MOVE_Y_step = ($MOVE_END_Y-$MOVE_Start_Y)/$MOVE_step
IF($MOVE_END_X-$MOVE_Start_X > 0)
$MOVE_X_X0 = $MOVE_END_X-$MOVE_Start_X
else
$MOVE_X_X0 = $MOVE_Start_X - $MOVE_END_X
END_IF
IF($MOVE_END_Y-$MOVE_Start_Y > 0)
$MOVE_Y_Y0 = $MOVE_END_Y-$MOVE_Start_Y
else
$MOVE_Y_Y0 = $MOVE_Start_Y - $MOVE_END_Y
END_IF
$RAND=0
IF($MOVE_X_X0 > $MOVE_Y_Y0)
FOR($MOVE_i=0, $MOVE_i<INT($MOVE_step))
IF($RAND < 0)
$RAND_mod=(-1)*$RAND
else
$RAND_mod=$RAND
END_IF
IF(INT($MOVE_step)-$MOVE_i > $RAND_mod)
IF($WAVE>$MOVE_WAVE)
IF(($RAND < $MOVE_AMPL)&($RAND > $MOVE_AMPL*(-1)))
$STEP=rnd(-1,1)
$RAND=$RAND+$STEP
ELSE
IF($RAND = $MOVE_AMPL)
$STEP=rnd(-1,0)
$RAND=$RAND+$STEP
else
$STEP=rnd(0,1)
$RAND=$RAND+$STEP
END_IF
END_IF
$WAVE=0
else
inc($WAVE)
END_IF
ELSE
IF($RAND < INT($MOVE_step)-$MOVE_i)
$STEP=1
$RAND=$RAND+$STEP
ELSE
$STEP=-1
$RAND=$RAND+$STEP
END_IF
END_IF
$MOVE_X = $MOVE_X + $MOVE_X_step
$MOVE_Y = $MOVE_Y + $MOVE_Y_step
MOVE(ROUND($MOVE_X,0), ROUND($MOVE_Y,0)+$RAND)
WAITMS(1)
END_CYC
ELSE
FOR($MOVE_i=0, $MOVE_i<INT($MOVE_step))
IF($RAND < 0)
$RAND_mod=-$RAND
else
$RAND_mod=$RAND
END_IF
IF(INT($MOVE_step)-$MOVE_i > $RAND_mod)
IF($WAVE>$MOVE_WAVE)
IF(($RAND < $MOVE_AMPL)&($RAND > $MOVE_AMPL*(-1)))
$STEP=rnd(-1,1)
$RAND=$RAND+$STEP
ELSE
IF($RAND = $MOVE_AMPL)
$STEP=rnd(-1,0)
$RAND=$RAND+$STEP
else
$STEP=rnd(0,1)
$RAND=$RAND+$STEP
END_IF
END_IF
$WAVE=0
else
inc($WAVE)
END_IF
ELSE
IF($RAND < INT($MOVE_step)-$MOVE_i)
$STEP=1
$RAND=$RAND+$STEP
ELSE
$STEP=-1
$RAND=$RAND+$STEP
END_IF
END_IF
$MOVE_X = $MOVE_X + $MOVE_X_step
$MOVE_Y = $MOVE_Y + $MOVE_Y_step
MOVE(ROUND($MOVE_X,0)+$RAND, ROUND($MOVE_Y,0))
WAITMS(1)
END_CYC
END_IF
MOVE($MOVE_END_X,$MOVE_END_Y)
END_SUB
SUB (m-move2, $MOVE_E_X, $MOVE_E_Y)
$raznx = ABS($_xmouse - $MOVE_E_X)
$razny = ABS($_ymouse - $MOVE_E_Y)
FOR($iter_move=20, $iter_move > 0, RND(-19,-6))
$procx = INT($raznx/$iter_move)
$procy = INT($razny/$iter_move)
$ttx = $MOVE_E_X + RND(0,$procx)*RNDFROM(-1,1)
$tty = $MOVE_E_Y + RND(0,$procy)*RNDFROM(-1,1)
IF($ttx < 1)
$ttx = RND(5,$procx)
ELSE
IF($ttx > ($_xmax-3))
$ttx = $_xmax - RND(5,$procx)
END_IF
END_IF
IF($tty < 1)
$tty = RND(5,$procy)
ELSE
IF($tty > ($_ymax-3))
$tty = $_ymax - RND(5,$procy)
END_IF
END_IF
IF($iter_move=20)
$SPEED = RND(16,20)
ELSE
$SPEED = 50
END_IF
m-move_s($ttx,$tty,$SPEED)
END_CYC
WAITMS(RND(50,300))
m-move_s($MOVE_E_X, $MOVE_E_Y,0)
END_SUB
m-move2(150, 150)
WAITMS(500)
m-move2(1020, 370)
HALT