home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / EUNION41.ZIP / UNION.PPE (.txt) < prev   
PCBoard Programming Language Executable  |  1994-08-14  |  7KB  |  308 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 1.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     String   STRING001
  30.     String   STRING002
  31.     String   STRING003
  32.     String   STRING004
  33.     String   STRING005
  34.     String   STRING006
  35.     String   STRING007
  36.  
  37. ;------------------------------------------------------------------------------
  38.  
  39.     STRING007 = Chr(27) + "[20C"
  40.     GetUser
  41.     Cls
  42.     INTEGER001 = 210 / 3
  43.     INTEGER001 = INTEGER001 / 35
  44.     INTEGER001 = INTEGER001 * 5
  45.     If (Exist(PPEPath() + "EUNION.DAT")) Then
  46.         FOpen 1, PPEPath() + "EUNION.DAT", 2, 0
  47.     Else
  48.         FCreate 1, PPEPath() + "EUNION.DAT", 2, 0
  49.         INTEGER004 = 1
  50.     Endif
  51.     FAppend 5, PPEPath() + "EUNION." + String(PcbNode()), 2, 0
  52.     If (INTEGER001 == 0) INTEGER001 = 30
  53.     PrintLn "@X04EASTERN UNION SEND @X08- @X09Send time to another user!"
  54.     PrintLn "@X0ACopyright (c) 1994, Wiz-Ware Software '94 / Brett Lucey"
  55.     PrintLn ""
  56.     PrintLn "This first and only TIME TRANSFERRING SYSTEM!"
  57.     PrintLn ""
  58.     PrintLn ""
  59.     PrintLn "@X09This is an @X84UNREGISTERED@X09 copy!!!"
  60.     PrintLn ""
  61.     Delay 110
  62.     FPutLn 5, ""
  63.     FPutLn 5, ""
  64.     FPutLn 5, "User entered: " + U_Name()
  65.     DispFile PPEPath() + "EUNION.ANS", 1
  66.     PrintLn "@X0ARegistered for use by: @X09THE WIZARD'S BBS"
  67.     PrintLn "@X09Please wait...  Checking for incoming wires to you..."
  68.     INTEGER009 = MinLeft()
  69.     AdjTime 2
  70.     INTEGER010 = MinLeft()
  71.     If (INTEGER009 == INTEGER010) Then
  72.         PrintLn "Because your time has been adjusted for an event, you cannot receive"
  73.         PrintLn "time."
  74.         FPutLn 5, "Event Time Adjustment has been done on user.  Cannot receieve time."
  75.         AdjTime -2
  76.     ElseIf (INTEGER004 == 1) Then
  77.         PrintLn "No wires to you."
  78.     Else
  79.         :LABEL001
  80.         FGet 1, STRING003
  81.         FGet 1, STRING004
  82.         FGet 1, INTEGER006
  83.         If ((STRING003 == "") && (STRING005 == 0)) Then
  84.             PrintLn "No wires to you."
  85.         ElseIf (STRING003 == "") Then
  86.             PrintLn "Search Done.  " + String(STRING005) + " wires in total."
  87.             PrintLn "Adding time...  (" + String(STRING006) + " minutes)"
  88.             FPutLn 5, "Found " + String(STRING005) + " wires for " + U_Name() + " totaling " + String(STRING006) + " minutes."
  89.             AdjTime STRING006
  90.         Else
  91.             If (STRING003 == U_Name()) Then
  92.                 PrintLn "Wire found:  Sent By: " + STRING004 + " for " + String(INTEGER006) + " minutes."
  93.                 FPutLn 5, "Wire found:  Sent By: " + STRING004 + " for " + String(INTEGER006) + " minutes."
  94.                 STRING005 = STRING005 + 1
  95.                 STRING006 = STRING006 + INTEGER006
  96.             Endif
  97.             INTEGER007 = INTEGER007 + 1
  98.             Goto LABEL001
  99.         Endif
  100.         If (INTEGER007 == 0) Goto LABEL002
  101.         FCreate 4, PPEPath() + "TEMP." + String(PcbNode()), 2, 0
  102.         FClose 1
  103.         FOpen 1, PPEPath() + "EUNION.DAT", 2, 0
  104.         For INTEGER008 = 1 To INTEGER007
  105.             FGet 1, STRING003
  106.             FGet 1, STRING004
  107.             FGet 1, INTEGER006
  108.             If (Upper(STRING003) == Upper(U_Name())) Continue
  109.             FPutLn 4, STRING003
  110.             FPutLn 4, STRING004
  111.             FPutLn 4, INTEGER006
  112.         Next
  113.         FClose 1
  114.         FClose 4
  115.         Delete PPEPath() + "EUNION.DAT"
  116.         Shell 1, STRING002, "REN ", PPEPath() + "TEMP." + String(PcbNode()) + " EUNION.DAT"
  117.         Delete PPEPath() + "TEMP." + String(PcbNode())
  118.     Endif
  119.     :LABEL002
  120.     Input "@X09Which user would you like to wire time to (CR TO ABORT!)@X0B", STRING001
  121.     If (STRING001 == "") Then
  122.         PrintLn ""
  123.         PrintLn "See you later then!!"
  124.     Else
  125.         If (U_RecNum(Upper(STRING001)) == -1) Then
  126.             PrintLn ""
  127.             PrintLn "@X8AThat user does not exist!  Did you make a typo?"
  128.             PrintLn ""
  129.             Goto LABEL002
  130.         Endif
  131.         PrintLn ""
  132.         :LABEL003
  133.         InputStr "How much time would you like to send to this user?", INTEGER002, 9, 2, "0123456789", 256
  134.         If (INTEGER002 == 0) Then
  135.             PrintLn "Eastern Union Transfer Aborted."
  136.             PrintLn "Come Back Soon!"
  137.         ElseIf (INTEGER002 < 0) Then
  138.             PrintLn "You can't use a negative number... DUH!!"
  139.         Else
  140.             If (INTEGER002 > INTEGER001) Then
  141.                 PrintLn "The maximum transfer is limited to " + String(INTEGER001) + " minutes in this"
  142.                 PrintLn "UNREGISTERED version.  Tell yur sysop to register this!!"
  143.                 Goto LABEL003
  144.             Endif
  145.             If (INTEGER002 > MinLeft() - 10) Then
  146.                 PrintLn "You don't have enough time to transfer that much!!"
  147.                 PrintLn "You must have at least 10 minutes after the transfer."
  148.                 Goto LABEL003
  149.             Endif
  150.             PrintLn "Please wait....  Wiring Time!"
  151.             :LABEL004
  152.             Delay 5
  153.             PrintLn "@X07ATDT 1-508-481-4693"
  154.             Delay 10
  155.             INTEGER005 = Random(9)
  156.             If (INTEGER005 < 8) Then
  157.                 Goto LABEL005
  158.             Endif
  159.             PrintLn "@X07<BUSY SIGNAL, REDIALING...>"
  160.             Delay 15
  161.             Goto LABEL004
  162.             :LABEL005
  163.             PrintLn "@X07<DETECTED RING>"
  164.             Delay 5
  165.             PrintLn "@X08Please wait...  Establishing Connection."
  166.             Delay 100
  167.             PrintLn "@X07CONNECT 14400/ARQ/V32/LAPM/V42BIS"
  168.             Print "Progress [..|..|..|..|..|..|..|..|..|..]@X09"
  169.             Backup 30
  170.             For INTEGER003 = 1 To 29
  171.                 Print "█"
  172.                 Delay 5
  173.             Next
  174.             PrintLn ""
  175.             PrintLn "@X07NO CARRIER"
  176.             PrintLn ""
  177.             PrintLn ""
  178.             PrintLn "@X09Time Successfully Transfered!"
  179.             GetUser
  180.             Shell 1, STRING002, "COPY ", PPEPath() + "EUNION.ANS " + PPEPath() + "MSG1.USR"
  181.             FAppend 2, PPEPath() + "MSG1.USR", 1, 0
  182.             FPutLn 2, ""
  183.             FPutLn 2, STRING007 + "@X09TELEGRAM RECIEVER: @X07" + Upper(STRING001)
  184.             FPutLn 2, STRING007 + "@X09TELEGRAM SENDER:   @X07" + U_Name()
  185.             FPutLn 2, ""
  186.             FPutLn 2, "       @X09This telegram has been sent by the EASTERN UNION (r) Automated"
  187.             FPutLn 2, "  telegram service to notify you that " + String(INTEGER002) + " minutes have been sent to you."
  188.             FPutLn 2, "  In order to retrieve this time, you must come to your local Eastern Union"
  189.             FPutLn 2, "  station by typing UNION.  Thank you and have a nice day!"
  190.             FPutLn 2, ""
  191.             FPutLn 2, Chr(27) + "[40C@X08-@X07-{@X0FEastern Union@X07}-@X08-@X07"
  192.             FClose 2
  193.             FAppend 1, PPEPath() + "EUNION.DAT", 2, 0
  194.             FPutLn 1, Upper(STRING001)
  195.             FPutLn 1, Upper(U_Name())
  196.             FPutLn 1, INTEGER002
  197.             FClose 1
  198.             FPutLn 5, "User send " + String(INTEGER002) + " minutes to " + STRING001
  199.             Message 0, Upper(STRING001), U_Name(), "Eastern Union Time Transfer", "R", 0, 0, 0, PPEPath() + "MSG1.USR"
  200.             Message 0, U_Name(), "Eastern Union", "Thank You", "R", 0, 0, 0, PPEPath() + "MSG.DAT"
  201.             AdjTime -INTEGER002
  202.             Delete PPEPath() + "MSG1.USR"
  203.         Endif
  204.     Endif
  205.     Wait
  206.     PrintLn 
  207.     PrintLn ""
  208.     PrintLn "@X0AThanks for checkin' out the latest Wiz-Ware product!"
  209.     PrintLn "To Get The Latest, See Us @"
  210.     PrintLn ""
  211.     PrintLn "                       @X09THE WIZARD'S BBS!"
  212.     PrintLn "                           [508]481-4693"
  213.     PrintLn ""
  214.     PrintLn "                         We can be reached at:"
  215.     PrintLn "                WIZARDS.BBS@CHANNEL1.COM on the Internet"
  216.     PrintLn "                    CSERV#71331,743 on Compuserve"
  217.     PrintLn "                        Relay Net Site #5378"
  218.     PrintLn ""
  219.     PrintLn "@X07Please wait...  Returning you to the @BOARDNAME@"
  220.     Wait
  221.     FPutLn 5, "User exited."
  222.     FClose 5
  223.  
  224. ;------------------------------------------------------------------------------
  225. ;
  226. ; Usage report (before postprocessing)
  227. ;
  228. ; ■ Statements used :
  229. ;
  230. ;    1       Cls
  231. ;    2       Wait
  232. ;    33      Goto 
  233. ;    16      Let 
  234. ;    2       Print 
  235. ;    55      PrintLn 
  236. ;    18      If 
  237. ;    1       DispFile 
  238. ;    1       Input 
  239. ;    2       FCreate 
  240. ;    2       FOpen 
  241. ;    3       FAppend 
  242. ;    6       FClose 
  243. ;    6       FGet 
  244. ;    24      FPutLn 
  245. ;    2       GetUser
  246. ;    3       Delete 
  247. ;    4       AdjTime 
  248. ;    1       InputStr 
  249. ;    7       Delay 
  250. ;    2       Shell 
  251. ;    1       Backup 
  252. ;    2       Message 
  253. ;
  254. ;
  255. ; ■ Functions used :
  256. ;
  257. ;    3       -
  258. ;    1       *
  259. ;    2       /
  260. ;    60      +
  261. ;    1       -
  262. ;    12      ==
  263. ;    4       <
  264. ;    2       <=
  265. ;    2       >
  266. ;    4       >=
  267. ;    15      !
  268. ;    5       &&
  269. ;    2       ||
  270. ;    7       Upper()
  271. ;    2       Chr()
  272. ;    1       Random()
  273. ;    8       U_Name()
  274. ;    13      String()
  275. ;    17      PPEPath()
  276. ;    4       PcbNode()
  277. ;    3       MinLeft()
  278. ;    1       Exist()
  279. ;    1       U_RecNum()
  280. ;
  281. ;------------------------------------------------------------------------------
  282. ;
  283. ; Analysis flags : AS
  284. ;
  285. ; A - Adjust online time remaining ■ 5
  286. ;     Program modify the amount of online time remaining, this may
  287. ;     be a way to bypass time limits
  288. ;     ■ Search for : ADJTIME
  289. ;
  290. ; S - Shell to DOS ■ 5
  291. ;     This may be normal if the PPE need to execute an external command,
  292. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  293. ;     or usefull (sorting, maintenance,...). Check!
  294. ;     ■ Search for : SHELL
  295. ;
  296. ;------------------------------------------------------------------------------
  297. ;
  298. ; Postprocessing report
  299. ;
  300. ;    2       For/Next
  301. ;    0       While/EndWhile
  302. ;    13      If/Then or If/Then/Else
  303. ;    0       Select Case
  304. ;
  305. ;------------------------------------------------------------------------------
  306. ;                 AEGiS Corp - Break the routines, code against the machines!
  307. ;------------------------------------------------------------------------------
  308.