*** This script translates slope and height amounts to opposite surfaces of selected sectors applying linear transform.

// Parameter list begins
mov r97 0 // Z-offset
mov r98 -32768 // Slope multiplier (32768 is 1:1)
mov r99 1 // 0 - translate from ceiling to floor, 1 - invert direction
// Parameter list ends
~~~ Default parameters:
~~~ mov r97 32768 // Z-offset
~~~ mov r98 -8192 // Slope multiplier (32768 is 1:1)
~~~ mov r99 0 // 0 - translate from ceiling to floor, 1 - invert direction
mov r00 -1
for each selected sector r00
  if r99 != 0
    getsector r00 floorz r01
    mul r01 r98
    div r01 32768
    add r01 r97
    setsector r00 ceilingz r01
    getsector r00 floorheinum r01
    mul r01 r98
    div r01 32768
    setsector r00 ceilingheinum r01
  else
    getsector r00 ceilingz r01
    mul r01 r98
    div r01 32768
    add r01 r97
    setsector r00 floorz r01
    getsector r00 ceilingheinum r01
    mul r01 r98
    div r01 32768
    setsector r00 floorheinum r01
  endif
  updatesectorslope r00
continue