paste this on terminal and after that you can add function to the script inside netwatch events, but do not change what already is inside.
/tool netwatch
add comment=pppoe-out1 down-script=":local ipx [/ip address get [find where interface=pppoe-out1] address]\r\
\n:local ip [:pick \$ipx -1 [:find \$ipx \"/\" -1]]\r\
\n/tool netwatch\r\
\n:local idwatch [find where comment=pppoe-out1]\r\
\n:if (\$ip != [get \$idwatch host]) do={\r\
\n set \$idwatch host=\$ip\r\
\n}\r\
\n" host=1.1.1.1 up-script=":local ipx [/ip address get [find where interface=pppoe-out1] address]\r\
\n:local ip [:pick \$ipx -1 [:find \$ipx \"/\" -1]]\r\
\n/tool netwatch\r\
\n:local idwatch [find where comment=pppoe-out1]\r\
\n:if (\$ip != [get \$idwatch host]) do={\r\
\n set \$idwatch host=\$ip\r\
\n}\r\
\n"