home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PCBOARD / SKCHAT10.ZIP / SKCHAT.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-03-16  |  5KB  |  313 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 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Integer  INTEGER001
  21.     Integer  INTEGER002
  22.     Integer  INTEGER003
  23.     Integer  INTEGER004
  24.     Integer  INTEGER005
  25.     Integer  INTEGER006
  26.     Integer  INTEGER007
  27.     Integer  INTEGER008
  28.     String   TSTRING001(100)
  29.     String   TSTRING002(100,20)
  30.     String   TSTRING003(50)
  31.     String   TSTRING004(20)
  32.     String   STRING005
  33.     String   STRING006
  34.     String   STRING007
  35.     String   STRING008
  36.  
  37. ;------------------------------------------------------------------------------
  38.  
  39.     BOOLEAN001 = 0
  40.     GetUser
  41.     INTEGER003 = 0
  42.     INTEGER002 = 0
  43.     INTEGER008 = 0
  44.     If (MinLeft() < 5) Then
  45.         PrintLn 
  46.         PrintLn "Sorry @FIRST@, not enough time remaining to chat with Sy Kopath."
  47.         PrintLn 
  48.         End
  49.     Endif
  50.     If (Exist(PPEPath() + "SKCHAT.DAT")) Goto LABEL001
  51.     Log "SKCHAT.DAT File Not Found!", 0
  52.     PrintLn 
  53.     PrintLn "Error in SkChat setup! Please notify your Sysop."
  54.     PrintLn 
  55.     End
  56.     :LABEL001
  57.     Log "Entered SKCHAT at " + Left(Time(), 5), 0
  58.     Cls
  59.     Print "@X0F"
  60.     STRING008 = "Gerry Schechter"
  61.     STRING005 = "Sy Kopath Chat v1.0 - (C) 1994 - " + STRING008
  62.     PrintLn Space((80 - Len(STRING005)) / 2) + STRING005
  63.     Print "@X0E"
  64.     If (BOOLEAN001) Then
  65.         STRING005 = "Registered to: " + ReadLine(PCBDat(), 94)
  66.         STRING007 = ReadLine(PCBDat(), 94)
  67.         PrintLn Space((80 - Len(STRING005)) / 2) + STRING005
  68.         FClose -1
  69.         GetToken INTEGER005
  70.         If (INTEGER005 == 0) Then
  71.             INTEGER005 = 300
  72.         Else
  73.             INTEGER005 = INTEGER005 * 60
  74.         Endif
  75.     Else
  76.         Delay 10
  77.         STRING007 = "UNREGISTERED VERSION"
  78.         STRING005 = "Registered to: " + STRING007
  79.         PrintLn Space((80 - Len(STRING005)) / 2) + STRING005
  80.         Delay 10
  81.         INTEGER005 = 300
  82.     Endif
  83.     INTEGER001 = Time()
  84.     If (BOOLEAN001) Goto LABEL003
  85.     If ((Left(STRING007, 1) <> "U") || (Right(STRING007, 1) <> "N")) Then
  86.         :LABEL002
  87.         PrintLn "@BEEP@ @X0C"
  88.         STRING005 = "Unauthorized Modification Of SKCHAT!"
  89.         PrintLn Space((80 - Len(STRING005)) / 2) + STRING005
  90.         Print Chr(7)
  91.         Log "Unauthorized Modification Of SKCHAT!", 0
  92.         Delay 20
  93.     Else
  94.         :LABEL003
  95.         DefColor
  96.         PrintLn 
  97.         Print "Paging Sy Kopath. One moment please"
  98.         For INTEGER006 = 1 To 100
  99.             TSTRING001(INTEGER006) = ""
  100.         Next
  101.         Print "."
  102.         For INTEGER006 = 1 To 50
  103.             TSTRING003(INTEGER006) = ""
  104.         Next
  105.         For INTEGER006 = 1 To 20
  106.             TSTRING004(INTEGER006) = ""
  107.         Next
  108.         If ((Left(STRING008, 1) <> "G") || (Right(STRING008, 1) <> "r")) Goto LABEL002
  109.         If (!BOOLEAN001 && (Mid(STRING007, 2, 1) <> "N")) Goto LABEL002
  110.         If (!BOOLEAN001 && (Mid(STRING007, 5, 1) <> "G")) Goto LABEL002
  111.         :LABEL004
  112.         Inc INTEGER002
  113.         STRING005 = ""
  114.         STRING005 = ReadLine(PPEPath() + "SKCHAT.DAT", INTEGER002)
  115.         If (STRING005 == "") Then
  116.             FClose -1
  117.             PrintLn 
  118.         Else
  119.             If (INTEGER002 % 25 == 0) Print "."
  120.             If (Left(STRING005, 1) == ";") Goto LABEL004
  121.             If (Left(STRING005, 1) == "@") Then
  122.                 STRING006 = "@"
  123.                 INTEGER004 = 1
  124.                 Goto LABEL004
  125.             Endif
  126.             If (Left(STRING005, 1) == "$") Then
  127.                 STRING006 = "$"
  128.                 INTEGER004 = 1
  129.                 Inc INTEGER003
  130.                 TSTRING001(INTEGER003) = Right(STRING005, Len(STRING005) - 1)
  131.                 TSTRING001(INTEGER003) = Upper(TSTRING001(INTEGER003))
  132.                 Goto LABEL004
  133.             Endif
  134.             If (Left(STRING005, 1) == "!") Then
  135.                 STRING006 = "!"
  136.                 INTEGER004 = 1
  137.                 Goto LABEL004
  138.             Endif
  139.             If (STRING006 == "@") Then
  140.                 TSTRING004(INTEGER004) = STRING005
  141.                 Inc INTEGER004
  142.                 Goto LABEL004
  143.             Endif
  144.             If (STRING006 == "$") Then
  145.                 TSTRING002(INTEGER003, INTEGER004) = STRING005
  146.                 Inc INTEGER004
  147.                 Goto LABEL004
  148.             Endif
  149.             If (STRING006 == "!") Then
  150.                 TSTRING003(INTEGER004) = STRING005
  151.                 Inc INTEGER004
  152.             Endif
  153.             Goto LABEL004
  154.         Endif
  155.         PrintLn "@POFF@"
  156.         :LABEL005
  157.         INTEGER006 = Random(19) + 1
  158.         If (TSTRING004(INTEGER006) == "") Goto LABEL005
  159.         Print "Sy Kopath > "
  160.         Delay 2
  161.         PrintLn TSTRING004(INTEGER006)
  162.         :LABEL006
  163.         PrintLn 
  164.         Print "@FIRST@ > "
  165.         STRING006 = ""
  166.         :LABEL007
  167.         STRING005 = ""
  168.         STRING005 = Inkey()
  169.         If (STRING005 == "") Goto LABEL007
  170.         Print STRING005
  171.         If (STRING005 == Chr(8)) Then
  172.             Print " "
  173.             STRING006 = Left(STRING006, Len(STRING006) - 1)
  174.             If (GetX() > Len(Left(U_Name(), InStr(U_Name(), " ") - 1)) + 4) Backup 1
  175.             Goto LABEL007
  176.         Endif
  177.         STRING005 = Upper(STRING005)
  178.         STRING006 = STRING006 + STRING005
  179.         If (STRING005 <> Chr(13)) Goto LABEL007
  180.         If ((STRING005 == Chr(13)) && (STRING006 == Chr(13))) Then
  181.             Inc INTEGER008
  182.             If (INTEGER008 > 3) Goto LABEL010
  183.         Else
  184.             INTEGER008 = 0
  185.         Endif
  186.         PrintLn 
  187.         PrintLn 
  188.         STRING006 = Left(STRING006, Len(STRING006) - 1)
  189.         STRING006 = Upper(STRING006)
  190.         If (((STRING006 == "Q") || (STRING006 == "G")) || (STRING006 == "X")) Goto LABEL010
  191.         If ((Time() - INTEGER001 > INTEGER005) || (MinLeft() < 5)) Then
  192.             PrintLn "Sy Kopath > I gotta go now. Let's chat again tomorrow."
  193.         Else
  194.             Print "Sy Kopath > "
  195.             For INTEGER006 = 1 To 100
  196.                 If (InStr(STRING006, TSTRING001(INTEGER006)) <> 0) Break
  197.             Next
  198.             :LABEL008
  199.             If (INTEGER006 == 101) Then
  200.                 INTEGER007 = Random(49) + 1
  201.                 If (TSTRING003(INTEGER007) == "") Goto LABEL008
  202.                 PrintLn TSTRING003(INTEGER007)
  203.                 Goto LABEL006
  204.             Endif
  205.             :LABEL009
  206.             INTEGER007 = Random(19) + 1
  207.             If (TSTRING002(INTEGER006, INTEGER007) == "") Goto LABEL009
  208.             PrintLn TSTRING002(INTEGER006, INTEGER007)
  209.             Goto LABEL006
  210.         Endif
  211.         :LABEL010
  212.         PrintLn 
  213.         PrintLn 
  214.         PrintLn "Nice chatting with you @FIRST@."
  215.         PrintLn 
  216.         If (BOOLEAN001) Then
  217.             PrintLn 
  218.             PrintLn "Returning you to ", STRING007, "."
  219.         Else
  220.             Delay 20
  221.             PrintLn "@BEEP@"
  222.             PrintLn "If you enjoyed this program, please ask your Sysop to register it!"
  223.             Delay 20
  224.         Endif
  225.     Endif
  226.     Log "Exited SKCHAT at " + Left(Time(), 5), 0
  227.     PrintLn "@PON@"
  228.     End
  229.     STRING005 = "Sy Kopath Chat v1.0 - (C) 1994 - Gerry Schechter"
  230.  
  231. ;------------------------------------------------------------------------------
  232. ;
  233. ; Usage report (before postprocessing)
  234. ;
  235. ; ■ Statements used :
  236. ;
  237. ;    3       End
  238. ;    1       Cls
  239. ;    54      Goto 
  240. ;    52      Let 
  241. ;    11      Print 
  242. ;    30      PrintLn 
  243. ;    36      If 
  244. ;    2       FClose 
  245. ;    1       GetUser
  246. ;    1       DefColor
  247. ;    4       Log 
  248. ;    6       Delay 
  249. ;    6       Inc 
  250. ;    1       GetToken 
  251. ;    1       Backup 
  252. ;
  253. ;
  254. ; ■ Functions used :
  255. ;
  256. ;    2       -
  257. ;    1       *
  258. ;    4       /
  259. ;    1       %
  260. ;    20      +
  261. ;    9       -
  262. ;    21      ==
  263. ;    8       <>
  264. ;    6       <
  265. ;    4       <=
  266. ;    3       >
  267. ;    8       >=
  268. ;    24      !
  269. ;    11      &&
  270. ;    9       ||
  271. ;    8       Len(
  272. ;    3       Upper()
  273. ;    2       Mid()
  274. ;    11      Left()
  275. ;    3       Right()
  276. ;    4       Space()
  277. ;    5       Chr()
  278. ;    2       InStr()
  279. ;    3       Random()
  280. ;    4       Time()
  281. ;    2       U_Name()
  282. ;    1       Inkey()
  283. ;    2       PCBDat()
  284. ;    2       PPEPath()
  285. ;    3       ReadLine()
  286. ;    2       MinLeft()
  287. ;    1       Exist()
  288. ;    1       GetX()
  289. ;
  290. ;------------------------------------------------------------------------------
  291. ;
  292. ; Analysis flags : d
  293. ;
  294. ; d - Access PCBOARD.DAT ■ 2
  295. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  296. ;     for many PPE so they can find various informations on the system
  297. ;     (system paths, max number of lines in messages, ...) but it may also
  298. ;     be a way to gather vital informations.
  299. ;     ■ Search for : PCBDAT()
  300. ;
  301. ;------------------------------------------------------------------------------
  302. ;
  303. ; Postprocessing report
  304. ;
  305. ;    4       For/Next
  306. ;    0       While/EndWhile
  307. ;    16      If/Then or If/Then/Else
  308. ;    0       Select Case
  309. ;
  310. ;------------------------------------------------------------------------------
  311. ;                 AEGiS Corp - Break the routines, code against the machines!
  312. ;------------------------------------------------------------------------------
  313.