home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / zmodem / pips05.arc / PIPS05.T < prev    next >
Text File  |  1988-10-29  |  9KB  |  279 lines

  1.  
  2.  :
  3.  : pips05.T - Pips Is a Pcpursuit Script (for ZCOMM), version 0.05
  4.  :
  5.  : This script was written by:
  6.  :
  7.   : Eric Larson
  8.   : 2902 Falls Road
  9.   : Marcellus, NY 13108
  10.  :
  11.  : Copyright 1987, 1988 by Eric Larson
  12.  :
  13. : Beginning of Configuration Area of pips.t
  14. :
  15. number:         :pipsnum.t is a text file containing your Telenet phone number
  16.   setc menu "%PIPS\&pipsnum.t"
  17.   while "!c&&L<5" menu
  18.   ena -8n
  19.   goto dialed
  20. :
  21. bbs:    setc menu "%PIPS\&pipslog.t"     :\file with your custom logon routines
  22.    menu                                  :\and your PCP name & password
  23.    goto resume
  24. :
  25. :
  26. setmenu:     setc menu "%PIPS\&pipslink.t"            :\path to pipslink
  27.    goto callmenu
  28. :
  29. file
  30.   setc menu "%PIPS\&pipsfile.t"            :\path to pipsfile.t
  31.   menu
  32.   return
  33. :
  34. hangup  bye
  35. :       put "ATH1M0S0=0\r"       :takes modem off hook..for sysops
  36. :                                :non-sysops should comment out the put command
  37. :End of configuration area
  38. :
  39. :Initialization
  40. :
  41. pcp     cls;
  42.    set answerback "\21"
  43.    set s9 "None"
  44.    set s8 "0"
  45.    ena -i
  46. :fkey initialization
  47.    set fa1 "@gosub file"       :pipsfile file transfer menu
  48.    set fa2 "@cd %PIPSDL"
  49.    set fa3 "@accept s2 Receive-File: rc %PIPSDL%s2"
  50.    set fa4 "@echo Receive-File-Batch:; rb"
  51.    set fa5 "@accept s2 Receive-File-WXmodem: rw %PIPSDL%s2"
  52.    set fa6 "@echo CIS-B-enabled; ena -c"
  53.    set fa7 "@accept s2 Receive-File-Overthruster: ro %PIPSDL%s2"
  54.    set fa8 "@Receive-File-Telink: rt"
  55.    set fc1 "@accept s1 Send-Z-File: sz %s1"
  56.    set fc2 "@accept s1 Send-Y-File: sb %s1"
  57.    set fc3 "@accept s1 Send-1kX-File: sx -k %s1"
  58.    set fc4 "@accept s1 Send-X-File: sx %s1"
  59.    set fc5 "@accept s1 Send-T-File: st %s1"
  60.   set n7 "SET? 1:0,2:0,3:126,4:2,5:1,6:1,7:8,9:0,10:0,12:1,0:0,57:1,63:0"
  61.    set fc6 "@accept s1 Send-K-File: send %s1"
  62.    lput "Copyright 1987, 1988 by Eric Larson pips version 0.05"
  63. pcpr:                   :Re-Entry Point for Dialing Q
  64.    sleep 3
  65.    set s3 "0"
  66. loop:   cls; set s7 "0"; set s1 ""
  67.    if !is8,1; set s4 ""; set s5 ""
  68.         goback setmenu
  69. callmenu:  menu           :User picks the BBS's he wants
  70.  
  71.   if is4,& set s9 "None"; goback loop              :Forget city
  72.   if is4,> gosub hangup; goback loop
  73.   if is4,@ set s7 0; goto on
  74.   if is4,# close return
  75.   if is4,! goback edit
  76.   pat 1 "PAR"
  77.   if is4,* gosub hangup close return
  78.   if is4,^ put "\003\004"; sleep 20; put "\003\004"; goback loop
  79.   if is4,? goto manual;           :manual entry of AC, #
  80.   if is4,~ set s9 "2"; goback loop  :Don't disconnect city!
  81.   if is4,+ goto pcpq
  82.   goto skipman
  83.  
  84. manual: accept s4 "Enter Area Code/Outdial Speed, i.e. /mabos/12 or system name :"
  85.         accept s5 "Enter Local Phone number or -1 :"
  86.         goto skipman
  87.  
  88. pcpq:  :build an outdial q for PCP operations
  89.   lput "\Ek"
  90.   accept s0 "BBS code? [Enter Ends List] \EK"
  91.   set s8 "1"
  92.   if %s0 queue add "sets s4 %s0; gosub pcpr"
  93.   if %s0 goback pcpq
  94. q:
  95.   queue run
  96.   set s8 "0"
  97.   goback loop
  98.  
  99. skipman:
  100.   if "Js5,123456789" gosub dialup   :a BBS was selected
  101.   if is8,1 if is1,a return          :did the human abort the call?
  102.   if !is8,1 if is1,a goback loop
  103.   if "Js5,123456789" goto on
  104.   lput "\007Not Implemented\007"; goback loop
  105.  
  106. on:
  107.   if !is7,0 goback bbs :Log on to a BBS
  108. resume:
  109.   pat :reset all patterns
  110.   pH0
  111.   if !c&&!is8,1 goback loop
  112.   if !c&&is8,1 return
  113.   if is3,0 ena -8g
  114.   if is8,1 queue delete
  115.   t -s
  116.   ena -8n
  117.   set s3 "0"
  118.   pat 1i "@"
  119.   if !is5,-1 goto res1                 :Determine status of direct connect
  120.   put "\r"; wait -f2
  121.   if !1 gosub hangup
  122. res1:   ife !is8,1 goback loop; return       :Finished with this BBS
  123.  
  124. dialup                                       :Start of Telenet dialing routine
  125. retry:  cls; pat
  126.   setc f10 %n2
  127.   if c goto skiptnet
  128. tnet:   pat                                  :TELENET dialup routine
  129. nocar:  :Call local Telenet Number
  130.     goback number
  131. dialed:
  132.   if !c Echo "\r\nTELENET Dialing Failure, Try Another Number\r\n"; goto ebell
  133.   set s9 "1"                           :sets disconnect flag to 1
  134.   pat 1$ "="
  135.   pat 2$ "@"
  136.   sleep 15
  137.   ife S>1800 put "@"
  138.   sleep 5
  139.   put "D"
  140.   sleep 5
  141.   put "\r"
  142.   wait -f4 :tnet
  143.   if 1 put "D1\r"; wait -f2
  144.   if 2 goto skiptnet
  145.   sleep 15
  146.   ife S>1800 put "@";
  147.   sleep 5
  148.   put "D"
  149.   sleep 5
  150.   put "\r"
  151.   wait -f4 :tnet
  152.   if 1 put "D1\r"; wait -f2
  153.   if n gosub hangup; goback nocar
  154.  
  155. skiptnet:  if !c goback retry
  156.   if Is9,s4 goto skipcity                       :disconnect city?
  157.   if is9,1; goto skipcity
  158.   if is9,2; goto localloop
  159.   set s9 "1"
  160.   pat
  161.   pat 1 "DISCONNECTED"; pat 2 "NOT"; pat 3 "*"; pat 4 "@"
  162.   put "\r"
  163.   if 3 put "i\r"; wait -f3
  164.   if 4 goto skipcity
  165.   break
  166.   put "\r@\rD\r"
  167.   wait -f3
  168.   if n gosub hangup
  169. skipcity:
  170.   sleep 10                                   :give it time to hang up
  171.   if !c goback retry
  172.   if Is9,s4 goto localloop                   :goto bbs dial if correct city
  173.   put "\r"
  174.   pat 4i "@"
  175.   wait -F5 :retry
  176.   while "c&&!4&&L<3" lput "\007" wait -F5
  177.   if !c goback retry
  178.   if !4 gosub hangup; goback retry           :didn't get @, escape hatch
  179.   pat; pat 1i "@"; pat 3 "BUSY"; pat 4 "NOT"
  180.   pat 5i "CONNECT"; pat 6 "PAR"; pat 7 "OK"
  181.   cls
  182. cityloop: if !c lput "\007"; goback retry
  183.   if dc lput "\E[40;1;31m"
  184.   pH1;
  185.   if is8,0 acceptl1 s1 "\E[1;1H\E[2JType a to abort call "
  186.   if is8,1 acceptl1 s1 "\E[1;1H\E[2JType a to remove this call from list, b to abort queue "
  187.   if dc lput ""
  188.   lput "\r\n"
  189.   if is8,0 if is1,a return
  190.   if is8,1 if is1,a queue delete; return
  191.   if is8,1 if is1,b queue clear; set s1 "a"; return
  192.   cls
  193.   if !is5,-1 goto sk1
  194.   put "C %s4,%n3,%n4\r" wait -f6                              :PCP name
  195. sk1:  if is5,-1 goto sk2                                  :Direct connect mode
  196.   put "C D%s4,%n3,%n4\r" wait -f6
  197. sk2:  if !c goback retry
  198.   if "!5&&is8,1" set s1 "a"; return
  199.   if !5 goback cityloop
  200.   if !3&&!5 goback retry
  201.   if is5,-1 set s9 "None"; goto fin  :Direct?? All done!!
  202. localloop:
  203.   if Is9,s4 goto noast
  204. escape:
  205.   pat
  206.   pat 1 "@"; pat 2 "PAR"
  207.   while "!1&&L<3" break put "@\r" wait -f3
  208.   if !1 gosub hangup; goback retry
  209.   put "%n7\r"
  210.   wait -f3 : escape/set
  211.   if !2 goback escape
  212.   sets s9 "%s4";                        :Set the city code for next time through
  213.   put "CONT\r\n"
  214. noast:
  215.   pat
  216.   pat 1 "MANUAL"; pat 2i "*"; pat 3i "ANSWER TONE"; pat 4i "BUSY!"; pat 5i "OK"
  217.   pat 6 "RING\r\n"; pat 7 "LING..."; pat 8 "NO DIAL TONE"; pat 9 "IDLE"
  218.   pat 10i "GING...";
  219.   wait -f3
  220.   if 2&&is6,1 put "I\r" wait -f3
  221.   if !2 put "ATZ\r"; wait -f5
  222.   if 5 goto hayesmode
  223.   if 1||2 if is6,1 sleep 10; put "I\r"; wait -f3    :Was it in RV mode?
  224.   if 1&&is6,0 sleep 10; put "\r"; wait -f3; goto nomnp
  225.   if 2&&is6,0 goto nomnp
  226.   while "!9&&L<3" put "I\r" wait -f3
  227.   if !9 set s9 "None"; goback retry
  228.   while "!5&&L<3" put "ATZ\r" wait -f4
  229.   if !5 set s9 "None"; goback retry
  230. hayesmode:
  231.   if is6,0 goto nomnp
  232.   put "AT*E1\r"; wait -f4
  233.   while "!5&&L<3" put "AT*E1\r" wait -f4
  234.   if !5 set s9 "None"; goback retry
  235. nomnp:
  236.   while "!2&&L<3" put "\005\r" wait -f3
  237.   if 6 set s9 "None"; goback retry
  238.   if !c goback retry
  239.   if n lput "Frozen Outdial \007"; set s9 "None"; goback skiptnet
  240. callbbs: if !c goback retry
  241.   if n lput "\007 RVTalk Failure \007"; gosub hangup; set s9 "None"; goback retry
  242.   if !2 goback noast
  243.   if dc lput "\E[40;1;31m"
  244.   pH1
  245.   if is8,0 acceptl1 s1 "\E[1;1H\E[2JType a to abort call "
  246.   if is8,1 acceptl1 s1 "\E[1;1H\E[2JType a to remove this call from list, b to abort entire list "
  247.   if dc lput ""
  248.   lput "\r\n"
  249.   if is8,0 if is1,a return
  250.   if is8,1 if is1,a queue delete; return
  251.   if is8,1 if is1,b queue clear; set s1 "a"; return
  252.   cls
  253.   put "D%s5\r"; wait -f10             :Dial the BBS and wait for a response
  254.   if 2 goback callbbs
  255.   if 8||6 set s9 "None"; goback retry
  256.   if !7 goback noast
  257.   wait -f40
  258. rvtalk:
  259.   if 2||4 if is8,1 set s1 "a"; return
  260.   if 2 goback callbbs                      :got *, ready for retry
  261.   if 3 goto fin
  262.   if 4 wait -f2; goback callbbs                  :BUSY!
  263.   if 7||10 wait -f20; goback rvtalk
  264.   if 8 set s9 "None"; goback retry               :Broken outdial modem
  265.   if !n goback localloop
  266.   lput "\007Pat Failure"; goback localloop
  267.  
  268. fin:
  269.    echo "Connected, hit any key to continue"
  270.    pH2; set s1 ""
  271.    while !k lput "\007\007" sleep 20
  272.    acceptl1 s1 ""
  273.    return
  274.  
  275. ebell:  echo "Failure dialing local Telenet access number"
  276.   lput "\007\007"
  277.   sleep 20
  278.   return
  279.