home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / circle2.zip / autorun.cmd < prev    next >
OS/2 REXX Batch file  |  1994-02-16  |  2KB  |  71 lines

  1. /* CircleMUD 2.0 autorun script
  2.  * Originally by Fred C. Merkel
  3.  * Copyright (c) 1993 The Trustees of The Johns Hopkins University
  4.  * All Rights Reserved
  5.  * See license.doc for more information
  6.  *
  7.  * If .fastboot exists, the script will sleep for only 5 seconds between
  8.  * reboot attempts.  If .killscript exists, the script commit suicide (and
  9.  * remove .killscript).  If pause exists, the script will repeatedly sleep for
  10.  *  60 seconds and will not restart the mud until pause is removed.
  11.  */
  12.  
  13. PORT=4000
  14. FLAGS=''
  15.  
  16. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  17. call SysLoadFuncs
  18.  
  19. Do While 1=1
  20.   Say "autoscript starting game "DATE()
  21.   "echo autoscript starting game "DATE()" >> syslog"
  22.  
  23.   "bin\circle" FLAGS PORT ">>& syslog"
  24.  
  25.   'find "self-delete" syslog >> log\delete'
  26.   'find "death trap" syslog >> log\dts'
  27.   'find "killed" syslog >> log\rip'
  28.   'find "Running" syslog >> log\restarts'
  29.   'find "advanced" syslog >> log\levels'
  30.   'find "equipment lost" syslog >> log\rentgone'
  31.   'find "usage" syslog >> log\usage'
  32.   'find "new player" syslog >> log\newplayers'
  33.   'find "SYSERR" syslog >> log\errors'
  34.   'find "(GC)" syslog >> log\godcmds'
  35.   'find "Bad PW" syslog >> log\badpws'
  36.  
  37.   "del log\syslog.1 >&nul"
  38.   "move log\syslog.2 log\syslog.1 >&nul"
  39.   "move log\syslog.3 log\syslog.2 >&nul"
  40.   "move log\syslog.4 log\syslog.3 >&nul"
  41.   "move log\syslog.5 log\syslog.4 >&nul"
  42.   "move log\syslog.6 log\syslog.5 >&nul"
  43.   "move syslog       log\syslog.6 >&nul"
  44.   Call Charout syslog
  45.  
  46.   Do while stream("pause","c","query exists")<>""
  47.     Say "Pausing..."
  48.     Call SysSleep(10)
  49.   end
  50.  
  51.   if (stream("fastboot","c","query exists")="") then do
  52.     Say "Waiting 40 seconds to reboot"
  53.     Call SysSleep(40)
  54.   end
  55.   else do
  56.     "del fastboot"
  57.     Say "Waiting 5 seconds to reboot"
  58.     Call SysSleep(5)
  59.   end
  60.  
  61.   if (stream("killscr","c","query exists")<>"") then do
  62.     Say "Exiting autorun"
  63.     "echo autoscript killed "DATE() ">> syslog"
  64.     "del killscr"
  65.     exit
  66.   end
  67.  
  68. end
  69.  
  70.  
  71.