Re: [Code]

From: Aaron Throckmorton (throck@nfinity.com)
Date: 01/11/99


Anthony Benjamin wrote:
>
> I was wondering if there was anyway to write a reboot script or
> something similar for Windows 95, I can't quite get it to reboot or use

Here is what I use for an autorun script.  I used a combination of a
script that was posted previously on the list and the one that comes
with stock circle.

Any chance of getting this added to the distribution, George/Jeremy?

Aaron Throckmorton

@echo off
rem
rem CircleMUD 3.0 autorun script
rem Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson
rem Copyright (c) 1996 The Trustees of The Johns Hopkins University
rem All Rights Reserved
rem See license.doc for more information
rem
rem
#####################################################################
rem
rem This script can be used to run CircleMUD over and over again (i.e.,
have it
rem automatically reboot if it crashes).  It will run the game, and copy
some
rem of the more useful information from the system logs to the 'log'
directory
rem for safe keeping.
rem
rem You can control the operation of this script by creating and
deleting files
rem in Circle's root directory, either manually or by using the
'shutdown'
rem command from within the MUD.
rem
rem Creating a file called .fastboot makes the script wait only 5
seconds
rem between reboot attempts instead of the usual 60.  If you want a
quick
rem reboot, use the "shutdown reboot" command from within the MUD.
rem
rem Creating a file called .killscript makes the script terminate (i.e.,
stop
rem rebooting the MUD).  If you want to shut down the MUD and make it
stay
rem shut down, use the "shutdown die" command from within the MUD.
rem
rem Finally, if a file called pause exists, the script will not reboot
the MUD
rem again until pause is removed.  This is useful if you want to turn
the MUD
rem off for a couple of minutes and then bring it back up without
killing the
rem script.  Type "shutdown pause" from within the MUD to activate this
feature.

SETLOCAL

rem The port on which to run the MUD
SET PORT=4000

rem Default flags to pass to the MUD server (see admin.txt for a
description
rem of all flags).
SET FLAGS = -q

rem
############################################################################

:START
cd log
echo Renaming system logs
echo Deleting log6.txt
del log6.txt
echo Renaming log5.txt to log6.txt
ren log5.txt log6.txt
echo Renaming log4.txt to log5.txt
ren log4.txt log5.txt
echo Renaming log3.txt to log4.txt
ren log3.txt log4.txt
echo Renaming log2.txt to log3.txt
ren log2.txt log3.txt
echo Renaming log1.txt to log2.txt
ren log1.txt log2.txt
echo Renaming log.txt to log1.txt
ren log.txt log1.txt
cd ..
echo.
echo
**********************************************************************
echo Starting game
echo Running circle.exe $FLAGS $PORT
echo
**********************************************************************
echo.
circle.exe %FLAGS% %PORT% %1

if exist .pause goto PAUSE
if exist .fastboot goto FASTBOOT
if exist .killscript goto KILLSCRIPT

echo.
echo Rebooting in 60 seconds.
echo.
choice /n /cb /t,60>nul
goto START

:PAUSE
del .pause
echo ***************
echo * GAME PAUSED *
echo ***************
echo Press enter to reboot.
pause > nul
goto START

:FASTBOOT
del .fastboot
echo.
echo Rebooting in 5 seconds.
echo.
choice /n /cb /t,5>nul
goto START

:KILLSCRIPT
del .killscript
echo ***************
echo * GAME KILLED *
echo ***************
goto END

:END


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST