Obtain as for IPIP dynamic state the IP

I am a pppoe to connect to go into, the IP is dynamic, another part is a fixed IP of, my script is as follows


:set new1 [/ip add  get [/ip add find interface="pppoe-out1" dynamic=yes] address]
:set new [:pick $new1 0 [:find $new1 "/"]]
:set old [/inter ipip get [find name="ipip1"] local-address]
:if ($new!=$old) do={
    /inter ipip set [find name="ipip1"] local-address=$new
    }

How does the script of another part write!! :frowning:

You can get what IP is used by current user from /ppp active menu