The quick and dirty method would be to use two triggers:
#TR {(%w) looks about wildly for an exit!} {#VAR prey %1}
#TR {{@prey} leaves (%w).} {%1;kill @prey; #VAR prey ""}
But that might cause problems if something flees from someone else in the room and you follow it. A safer way is to create an alias:
#AL k {#VAR prey %1; kill %1}
#TR {{@prey} looks about wildly for an exit!} {#VAR mobfled 1}
#TR {{@prey} leaves (%w).} {#IF @mobfled {#VAR mobfled 0; %1; kill @prey}}
#TR {You have KILLED {@prey}} {#VAR prey ""}
Troubadour