Expect: Block of lines should be executed only if access succeeds

Hello
I'm using expect to create a script. I want some lines to be executed only if the telnet succeeds to the target host. Kindly check the code that i created. The problem i'm facing that while execting the script, the lines after login seems to be ignored. The password is not sent and also the below lines.

send "telnet x.x.x.x\r"
expect {
"login:" {send "root\r"}
 expect "Password:" {send "xxxxx\r"}
  expect "root@*n*s*#" {send "/usr/local/NTP/scripts/ntp_supervision.sh -test\r"}
   expect "root@*n*s*#" {send "scp /usr/local/NTP/sup/time_difference 172.16.33.1:/tmp/time_difference_OMCPstandby\r"}
    expect "root@*n*s*#" {send " ntpq -p > /tmp/ntp_out_OMCPstandby\r"}
     expect "root@*n*s*#" {send "scp /tmp/ntp_out_OMCPstandby 172.16.33.1:/tmp/ntp_out_OMCPstandby\r"}
    
}

Everyone at the UNIX and Linux Forums gives their best effort to reply to all questions in a timely manner. For this reason, posting questions with subjects like "Urgent!" or "Emergency" and demanding a fast reply are not permitted in the regular forums.

For members who want a higher visibility to their questions, we suggest you post in the Emergency UNIX and Linux Support Forum. This forum is given a higher priority than our regular forums.

Posting a new question in the Emergency UNIX and Linux Support Forum requires forum Bits. We monitor this forum to help people with emergencies, but we do not not guarantee response time or best answers. However, we will treat your post with a higher priority and give our best efforts to help you.

If you have posted a question in the regular forum with a subject "Urgent" "Emergency" or similar idea, we will, more-than-likely, close your thread and post this reply, redirecting you to the proper forum.

Of course, you can always post a descriptive subject text, remove words like "Urgent" etc. (from your subject and post) and post in the regular forums at any time.

Thank you.

The UNIX and Linux Forums

Did anyone find the cause of the problem?...