This is an improved version of Netwatch that removes false positives. It works by pinging the target IP 5 times. If all 5 time out then the specified action is taken.
:local i 0; {:do {:set i ($i 1)} while (($i < 5)