need help about a script

Read some topic, the perfect solution to my problem.http://forum.mikrotik.com/t/how-to-get-a-regular-ip-for-myisp-adsl/101077/1

:local oldip [/ip firewall address-list get [find list="xxxxxip"] address];
:local newip [/ip address get [find interface="adsl"] address];
:local newip [:pick $newip 0 [:find $newip "/"]];

:if ($newip != $oldip) do={    
    /ip firewall nat remove [find comment~"^upnp.*"];
    :put "ip address $old changed to $newip";
    /ip firewall address-list set [find list="xxxxxip"] address=$newip
:delay 2s
    /ip upnp set enabled=no
:delay 3s
    /ip upnp set enabled=yes
:delay 3s
    :put "Sending e-mail.";
 /tool e-mail send \
        to="xxx@xxx.com" \
        subject=("$[/system identity get name] xxxxx IP address change") \
        body=("xxxxx IP address has just been changed:\n\nOld: " . $oldip . "\nNew: " . $newip);
}

Although the mail can remind me ip address changes, but in the end want to achieve the effect is fixed Internet dial-up from the IP address, the following script how to change the adsl link ip can change, continue dialing until the ip The address is the same as before, and dialing stops. That would be great, if you add the appropriate judgments, to get results?

/interface pppoe-client disable adsl
:delay 1s
/interface pppoe-client enable adsl

I will use these statements, but do not know how to join the judgment to stop dialing.


Please forgive my English, I am from China. These are all from the Google translation help.

:question:

helpme