; For 1.38 ver

Var Num
var q
IF INIT THEN {
if not q then { q = 1 NUM = ( TIME + RND 500 + RND 500 + RND 500 ) } endif
} ELSEIF LOSTTRACK and ( Num == GETENTVAR "NUM_TH" ) then {
SetEntVar "NUM_TH" 0
SetEntVar "ZZZConf" 0
} ELSE {
if Tgtconf > GETENTVAR "ZZZconf" then {
SetEntVar "ZZZConf" Tgtconf
SetEntVar "NUM_TH" Num } endif
if num == GETENTVAR "NUM_TH" then {
SetEntVar "ZZZConf" Tgtconf
SetEntVar "TRNG" TGTRNG
SetEntVar "TALT" TGTALT
SetEntVar "homing" 1
if tgtrng > 4050 then { SETPRIORITY 251 intercept } else { SETPRIORITY 252 TerminalHome } endif
} endif
if GETENTVAR "Fvkl" then {
SetEntVar "Fvkl" 0
enable
drop
} endif
} ENDIF