try just reversing the order here
alias f8 {

scon -a windows

if ($timer(deop_and_part)) .timerdeop_and_part off

}

to

alias f8 {

if ($timer(deop_and_part)) .timerdeop_and_part off

scon -a windows

}

it looks like it turned on a timer, then checked to see if the timer was on a shut it off