diff --git a/src/doors/timeport/GNUmakefile b/src/doors/timeport/GNUmakefile new file mode 100644 index 0000000000000000000000000000000000000000..be2cacaf3d4cca74f9c77df887281d5f7db70fdf --- /dev/null +++ b/src/doors/timeport/GNUmakefile @@ -0,0 +1,94 @@ +VER := 1.2 +CFLAGS += -Wall +STRIP := + +ifdef DEBUG + CFLAGS += -g -Wshadow -Wcast-align -Wconversion -Wredundant-decls +else + CFLAGS += -O2 + STRIP += strip +endif + +ifdef SEPOS + OS := $(shell uname | tr "[ A-Z]" "[\-a-z]") + LIBPREFIX := ./libs.$(OS)/ + BINSUFFIX := .$(OS) +else + LIBPREFIX := ./ +endif + +BINARIES := timeport$(BINSUFFIX) tp-event$(BINSUFFIX) makemod$(BINSUFFIX) outside$(BINSUFFIX) \ + badtimes$(BINSUFFIX) stoneage$(BINSUFFIX) twenties$(BINSUFFIX) install$(BINSUFFIX) + +ifdef STATIC + REQLIBS := $(LIBPREFIX)tplib.o $(LIBPREFIX)doors.o + LIBS := $(LIBPREFIX)tplib.o $(LIBPREFIX)doors.o +else + REQLIBS := $(LIBPREFIX)libtp.so + LIBS := -ltp + CFLAGS += -L$(LIBPREFIX) + BINARIES += $(LIBPREFIX)libtp.so + LFLAGS += -Xlinker -rpath + LFLAGS += -Xlinker $(LIBPREFIX) +endif + +ifeq ($(OS),netbsd) + CURSLIB := -lncurses + CFLAGS += -I/usr/pkg/include -L/usr/pkg/lib +else + CURSLIB := -lcurses +endif + +all: ${BINARIES} ${STRIP} + +install$(BINSUFFIX): install.c + gcc ${CFLAGS} -o install$(BINSUFFIX) install.c $(CURSLIB) + +twenties$(BINSUFFIX): ${REQLIBS} twenties.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o twenties$(BINSUFFIX) twenties.c + +makemod$(BINSUFFIX): ${REQLIBS} makemod.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o makemod$(BINSUFFIX) makemod.c + +stoneage$(BINSUFFIX): ${REQLIBS} stoneage.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o stoneage$(BINSUFFIX) stoneage.c + +timeport$(BINSUFFIX): ${REQLIBS} timeport.c timeport.h + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o timeport$(BINSUFFIX) timeport.c + +tp-event$(BINSUFFIX): ${REQLIBS} tp-event.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o tp-event$(BINSUFFIX) tp-event.c + +outside$(BINSUFFIX): ${REQLIBS} outside.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o outside$(BINSUFFIX) outside.c + +badtimes$(BINSUFFIX): ${REQLIBS} badtimes.c + gcc ${CFLAGS} ${LFLAGS} $(LIBS) -o badtimes$(BINSUFFIX) badtimes.c + +$(LIBPREFIX)tplib.o: tplib.c tplib.h doors.h $(LIBPREFIX) + gcc -c ${CFLAGS} -o $(LIBPREFIX)tplib.o tplib.c + +$(LIBPREFIX)doors.o: doors.c doors.h tplib.h $(LIBPREFIX) + gcc ${CFLAGS} -o $(LIBPREFIX)doors.o -c doors.c + +$(LIBPREFIX)libtp.so: $(LIBPREFIX)tplib.o $(LIBPREFIX)doors.o $(LIBPREFIX) + gcc $(CFLAGS) -shared -o $(LIBPREFIX)libtp.so.$(VER) $(LIBPREFIX)tplib.o $(LIBPREFIX)doors.o + @cd $(LIBPREFIX) && ln -fs libtp.so.$(VER) libtp.so + +$(LIBPREFIX): + mkdir $(LIBPREFIX) + +clean: + rm \ + $(LIBPREFIX)doors.o \ + $(LIBPREFIX)tplib.o \ + timeport$(BINSUFFIX) \ + tp-event$(BINSUFFIX) \ + outside$(BINSUFFIX) \ + makemod$(BINSUFFIX) \ + badtimes$(BINSUFFIX) \ + $(LIBPREFIX)libtp.so \ + $(LIBPREFIX)libtp.so.$(VER) + +strip: + strip ${BINARIES} diff --git a/src/doors/timeport/README.now b/src/doors/timeport/README.now new file mode 100644 index 0000000000000000000000000000000000000000..5f824155f13b235b3491ccd8bfb51f819fa83842 --- /dev/null +++ b/src/doors/timeport/README.now @@ -0,0 +1,6 @@ +In this FREEWARE version, the reg. codes are: +Line 1: Your name +Line 2: Your BBS name + +Put in whatever you like as lone as it's more than +1 char long diff --git a/src/doors/timeport/badtimes.c b/src/doors/timeport/badtimes.c new file mode 100644 index 0000000000000000000000000000000000000000..1b6f0d25915c4830d575c0b35ad1b5dede3ac7f9 --- /dev/null +++ b/src/doors/timeport/badtimes.c @@ -0,0 +1,273 @@ +#include <signal.h> +#include <sys/time.h> +#include <stdlib.h> + +#include "doors.h" +#include "tplib.h" + +short Room; +void ShowRoom(long l); +short GetResponse(long l); + +void SaveTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%ld\r\n",MinsLeft); + fprintf(file,"%ld\r\n",SecsLeft); + fclose(file); +} + +void Quitter(void) +{ + SaveTime(); + ExitGame(); +} + +void LessTime(int sig) +{ + SecsLeft = SecsLeft - 1; + if(SecsLeft < 0) + { + SecsLeft = 59; + MinsLeft = MinsLeft - 1; + } + if(PlayingNow <= 0) + return; + if(MinsLeft < 1) + { + Oprint("`%\r\n\r\n"); + Oprint("Your time is up, man!\r\n"); + Quitter(); + exit(0); + } +} + +void LoadTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[256]; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"r",LOCK_SH); + readline(line,sizeof(line), file); + RTrim(line); + MinsLeft=atoi(line); + readline(line,sizeof(line), file); + RTrim(line); + SecsLeft=atoi(line); + fclose(file); +} + +int main(int argc, char **argv) +{ + struct itimerval it; + int x; + short a; + + ParseCmdLine(argc,argv); + srandomdev(); + + strcpy(Alias, "Who is it?"); + StatsIn = 0; + Playercount = 0; + ReadLinkTo(); // 'initialize the modem + ReadConfig(); // 'get default configuartion information + LoadTime(); + + signal(SIGALRM, LessTime); + it.it_interval.tv_sec=1; + it.it_interval.tv_usec=1; + it.it_value.tv_sec=1; + it.it_value.tv_usec=1; + setitimer(ITIMER_REAL, &it, NULL); + + ChatEnabled = 0; + + PlayingNow = 1; + + // 'Is this a new player? + IsHeNew(Alias); + LoadGame(); + NotAgain[12]='+'; + StatsIn = 1; + SaveGame(); + OpenInventory(); + + Ocls(); + // 'set opening "variables" + for(x=1;x<argc;x++) + { + if(argv[x][0]=='R') + { + Room=atoi(argv[x]+1); + break; + } + } + + if(Room < 1 || Room > MaxBadTimes) + Quitter(); + + // '**** begin the REPEATER code + x=1; + while(1) + { + if(x) + { + Ocls(); + ShowRoom(Room); + } + a = GetResponse(Room); + SaveGame(); + if(Hit<1) + { + NotAgain[1]='^'; + Oprint("\r\n`6 Searing pain tortures you as your life ends!\r\n"); + Paus(2); + Quitter(); + } + + if(a==-2) + { + x=0; + continue; + } + if(a==-1) + { + x=1; + continue; + } + if(a==101) + { + Quitter(); + continue; + } + if(a>=1 && a<=99) + { + Room=a; + x=1; + continue; + } + Oprint("`@The command you typed is invalid. Read the menu.\r\n"); + x=0; + } + return(0); +} + +short GetResponse(long l) +{ + short t,a; + char str[256]; + char v[2]; + + t = 0; + GetCommand(v); + Oprint("\r\n"); + // 'Figure out what section to switch to based upon 'L' room and v$ response + + if(v[0] == '?') + return(-1); + if(v[0]=='I' && l != 1) + { + Inventory(); + return(-1); + } + if(v[0]=='V') + { + ViewStats(); + return(-1); + } + if(v[0]=='X') // 'toggle ansi/ascii + { + if(NotAgain[14]==' ') + NotAgain[14]='|'; + else + NotAgain[14]=' '; + return(-1); + } + + if(v[0]=='G') + { + sprintf(str,"`$%s`! awoke to find %s in a dangerous place.",Alias,sex[0]=='M'?"himself":"herself"); + WriteNews(str, 0); + a = TalkToPress(); + if(a == 0) + { + sprintf(str,"`3%s`3 quickly Time Phased back to the Hanger.",Alias); + WriteNews(str, 1); + } + t = 101; + } + return(t); +} + +void SaveGame(void) +{ + if(Hit<0) + Hit=0; + if(StatsIn > 0) + SaveStats(Alias, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, ExeLine, ComLine, LineRest); +} + +void ShowRoom(long l) +{ + + // 'code to print "headers" + Oprint("`!T`3ime `!P`3ort `8Version `7"); + Oprint(Version); + Oprint(" -- `7Location: "); + + Oprint("`%You Have No Clue Whatsoever\r\n"); + + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + + strcpy(Prompt, "G"); + + if(l == 1) + { + Oprint("`2 You are standing in a large, open field. From every direction, hundreds\r\n"); + Oprint("`2 upon hundreds of screaming, sword-wielding Scotts are converging on you.\r\n"); + } + + if(l == 2) + { + Oprint("`2 You are standing in the center of a busy intersection. Cars are zipping\r\n"); + Oprint("`2 past you rapidly. A bus is even headed straight at you!\r\n"); + } + + if(l == 3) + { + Oprint("`2 The ground is hundreds of meters below you, and it seems to be spinning\r\n"); + Oprint("`2 up towards you. You look up and see a plane and several men in the door\r\n"); + Oprint("`2 sneering as you fall towards the ground.\r\n"); + } + + if(l == 4) + { + Oprint("`2 You're on a tall bridge over a rushing river. When you hear a very loud\r\n"); + Oprint("`2 whistling sound, you look down and see train tracks. The train is coming\r\n"); + Oprint("`2 straight at you and you have nowhere to run.\r\n"); + } + + if(l == 5) + { + Oprint("`2 You are standing against a cold brick wall, wearing a blindfold. You are\r\n"); + Oprint("`2 just able to peek under the black material to see six men with rifles,\r\n"); + Oprint("`2 and they're aimed straight at you. A cigarette falls from your lips.\r\n"); + } + + Oprint("`2 You blink several times, but it's really happening. It's not a dream.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%G`8)`@et the H*** out of here! "); + Oprint("`7 (`!?`8)`3Re-List menu options\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); +} + +void UseItem(long c, short b) // 'c=1-8 item number, b=the item code (1-???) +{ + Oprint("`2 You find no use for that item here at this time.\r\n"); +} diff --git a/src/doors/timeport/bas.bat b/src/doors/timeport/bas.bat new file mode 100644 index 0000000000000000000000000000000000000000..0cb1e5bbf19cb83eccdaf1f22fda2a6a5c0299af --- /dev/null +++ b/src/doors/timeport/bas.bat @@ -0,0 +1,11 @@ +@echo off +REM +REM For creating a single EXE file... pass it the source file name in the +REM form: +REM BAS [filename] +REM where [filename] is something like TIMEPORT(.bas) or whatever +REM +REM For BC7 users, QBSERPDQ may need changed to BC7SER instead. +REM +LH bc /E /W /O /T /C:512 %1,,; +LH link %1 qbserpdq coding,,,c:\qb\bcom45.lib; diff --git a/src/doors/timeport/buttons.ans b/src/doors/timeport/buttons.ans new file mode 100644 index 0000000000000000000000000000000000000000..0ea477166b7575d30228c47397f75b45058653fa --- /dev/null +++ b/src/doors/timeport/buttons.ans @@ -0,0 +1,13 @@ +[0;37;40m[31m[1;12H ÚÄ¿[1;27HÚÄ¿[2;5HÚÄÄÄÄÄÄÄÁÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[3;5H³[1;30m[3;7H°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[0;31;40m[3;51H³[35m[3;54HYou decide to try pressing[31m[4;5H³[1;30m[4;7H°°°°°°°°°°°°°°°° +[4;23H°°°°°°°°°°°°°°°°°°°°°°°°°°°[0;31;40m[4;51H³[35m[4;54Hthe 4 buttons one at a[31m[5;5H³[1;30m[5;7H°°°°°°[31m1[30m°°°°°°°°°[31m2[30m°°°°°°°°°[31m3[30m°°°°°°°°°[31m4[30m°°°°°°[0;31;40m[5;51H³[35m[5;54Htime. What sequence will +[31m[6;5H³[1;30m[6;7H°°°[0;32;40mÜ[1mÜÜÜÜÜ[0;32;40mÜ[1;30m °°[0;31;40mÜ[1mÜÜÜÜÜ[0;31;40mÜ[1;30m °°[0;36;40mÜ[1mÜÜÜÜÜ[0;36;40mÜ[1;30m °°[0;35;40mÜ[1mÜÜÜÜÜ[0;35;40mÜ[1;30m °°[0;31;40m[6;51H³[35m[6;54Hyou try to press?[31m[7;1HÚ +[7;2H[1mÂ[0;31;40mÄÄ´[1;30m[7;7H°°°[32mÛ[0;30;42m°°°[37m [1;30;40mÛ °°[31mÛ[0;30;41m°°°[37m [1;30;40mÛ °°[36mÛ[0;30;46m°°°[37m [1;30;40mÛ °°[35mÛ[0;30;45m°°°[37m [1;30;40mÛ °°[0;31;40m[7;51HÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[1m +[7;80H[0;31;40m¿[8;1HÀ[1mÁ[0;31;40mÄÄ´[1;30m[8;7H°°°[32mÛ[0;30;42m°° [37m [1;32m°[30;40mÛ °°[31mÛ[0;30;41m°° [37m [1;31m°[30;40mÛ °°[36mÛ[0;30;46m°°[37m [1;36m°[30;40mÛ °°[35mÛ[0;30;45m°°[37m [1;35m°[30;40mÛ °°[0;31;40m +[8;51HÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[1mÁ[0;31;40mÙ[9;5H³[1;30m[9;7H°°°[32mÛ[0;30;42m° [1;32m°°[30;40mÛ °°[31mÛ[0;30;41m° [37m [1;31m°°[30;40mÛ °°[36mÛ[0;30;46m°[37m [1;36m°°[30;40mÛ °°[35mÛ[0;30;45m°[37m [1;35m°°[30;40mÛ °° +[0;31;40m[9;51H³[10;5H³[1;30m[10;7H°°°[0;32;40mß[1;30mßßßßß[0;37;40mß[1;30m °°[0;31;40mß[1;30mßßßßß[0;37;40mß[1;30m °°[0;36;40mß[1;30mßßßßß[0;37;40mß[1;30m °°[0;35;40mß[1;30mßßßßß[0;37;40mß[1;30m °°[0;31;40m[10;51H³[1;34m[10;53H +[10;53HType a Sequence: [37;41m [0;31;40m[11;5H³[1;30m[11;7H°°° [0;32;40m¯[1;30m [0;32;40m®[1;30m °° [0;31;40m¯[1;30m [0;31;40m®[1;30m °° [0;36;40m¯[1;30m [0;36;40m®[1;30m °° [0;35;40m¯[1;30m [0;35;40m®[1;30m °° +[0;31;40m[11;51H³[12;1HÚ[1mÂ[0;31;40mÄÄ´[1;30m[12;7H°°° °° °° °° °°[0;31;40m[12;51HÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[1mÂ[0;31;40m¿[13;1HÀ[1mÁ[0;31;40mÄÄ´[1;32m [30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[32m +[13;51H[0;31;40mÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[1mÁ[0;31;40mÙ[14;5HÀÄÄÄÄÄÄÄÂÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[15;13H³[15;15H³[15;27H³[15;29H³[16;13H³[16;15H³[16;27H³[16;29H³[37m[16;34HHint: [1;30mThe sequence will remain the same, +[0;31;40m[17;13H³[17;15H³[17;27H³[17;29H³[1;30m[17;40Hallowing you to solve the correct[0;31;40m[18;13H³[18;15H³[18;27H³[18;29H³[1;30m[18;40Hsequence, until you guess correctly,[0;31;40m[19;13H³[19;15H³[19;27H³[19;29H³[1;30m[19;40Ha +[19;41Ht which time it will change.[0;31;40m[20;13HÀÄÙ[20;27HÀÄÙ[20;1H[0m + diff --git a/src/doors/timeport/create.bat b/src/doors/timeport/create.bat new file mode 100644 index 0000000000000000000000000000000000000000..6efcb8940e8cc65c5a05a78ecc7d50671c5fd502 --- /dev/null +++ b/src/doors/timeport/create.bat @@ -0,0 +1,49 @@ +@echo off +REM +REM Creates all the Time Port executables +REM +@ECHO ---------------------- +@ECHO Compiling CODING.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 coding,,; +REM No need to link "coding" it just needs to be an OBJ. +@ECHO ---------------------- +@ECHO Compiling TIMEPORT.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 TIMEPORT,,; +LH link TIMEPORT qbserpdq coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling INSTALL.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 INSTALL,,; +LH link INSTALL coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling BADTIMES.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 BADTIMES,,; +LH link BADTIMES qbserpdq coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling MAKEMOD.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 MAKEMOD,,; +LH link MAKEMOD coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling OUTSIDE.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 OUTSIDE,,; +LH link OUTSIDE qbserpdq coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling TWENTIES.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 TWENTIES,,; +LH link TWENTIES qbserpdq coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling STONEAGE.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 STONEAGE,,; +LH link STONEAGE qbserpdq coding,,,c:\qb\bcom45.lib; +@ECHO ---------------------- +@ECHO Compiling TP-EVENT.BAS +@ECHO ---------------------- +LH bc /E /W /O /T /C:512 TP-EVENT,,; +LH link TP-EVENT qbserpdq coding,,,c:\qb\bcom45.lib; diff --git a/src/doors/timeport/doors.c b/src/doors/timeport/doors.c new file mode 100644 index 0000000000000000000000000000000000000000..e5a09d56c964a6d1c6577b010d8ce675b7a72229 --- /dev/null +++ b/src/doors/timeport/doors.c @@ -0,0 +1,876 @@ +#include <ctype.h> +#include <signal.h> +#include <stdlib.h> + +#include <string.h> +#include <termios.h> +#include <time.h> +#include <unistd.h> +#include <sys/types.h> +#include <sys/time.h> + +#include "doors.h" +#include "tplib.h" + +// COMMON SHARED MinsLeft AS LONG, SecsLeft AS LONG, Rvects AS INTEGER, Parity% +long MinsLeft; +long SecsLeft; +short Rvects; +short Parity; +// COMMON SHARED OldBg AS INTEGER, OldFg AS INTEGER, StatsIn AS INTEGER +short OldBg; +short OldFg; +short StatsIn; +// COMMON SHARED PortNum AS INTEGER, OldTime AS LONG, Rate&, Length% +short PortNum; +long OldTime; +long Rate; +long KeepRate; +short Length; +// COMMON SHARED ret$, NewColor$, GraphMode AS INTEGER, HS%, IRQ%, Port% +#define ret "\r\n" +char NewColor[16]; +short GraphMode; +short HS; +short IRQ; +short Port; +// COMMON SHARED NodeNum AS INTEGER +short NodeNum; +// COMMON SHARED PlayingNow AS INTEGER, ChatEnabled AS INTEGER, FossAct%, DBits% +// ' when PlayingNow is set to 1 (by code) then the status +// ' line begins to be displayed after every Ocls +short PlayingNow=0; +short ChatEnabled=0; +short FossAct; +short DBits; +// COMMON SHARED Oldx1 AS INTEGER, Oldx2 AS INTEGER, Oldx3 AS INTEGER +short Oldx1=0; +short Oldx2=0; +short Oldx3=0; + +int CarrierLost=0; + +struct termios origterm; + +void ParseCmdLine(int argc, char **argv) +{ + int x; + + NodeNum=-1; + for(x=1;x<argc;x++) + { + if(argv[x][0]=='N') + { + NodeNum=atoi(argv[x]+1); + break; + } + } + + if(NodeNum==-1) + { + Ocls(); + SetColor(15,0,0); + Oprint("Note: You must now pass a node number to Time Port, in the\n"); + Oprint(" form Nx. such as TIMEPORT N0 (for a single-node bbs) or\n"); + Oprint(" TIMEPORT N1, TIMEPORT N2, TIMEPORT N3, TIMEPORT N18 and\n"); + Oprint(" so on. Read the .docs for info on setting this up.\n\n\n"); + exit(1); + } +} + +void CloseComm(void) +{ + tcsetattr(0, TCSANOW, &origterm); +} + + +void AnsPrint(char *a) +{ +} +/* Local stuff... don't need it. */ +/* + int xz; + char hot[2]={0,0}; + Yuk$ = "" + + for(xz=1; x<=strlen(a); x++) + { + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + hot[0]=a[xz-1]; + IF hot$ = CHR$(8) THEN ntt = POS(n) - 1: IF ntt < 1 THEN ntt = 1 + IF hot$ = CHR$(8) THEN LOCATE CSRLIN, ntt: RETURN + IF hot$ = CHR$(27) THEN Esc = 1: Yuk$ = CHR$(27): RETURN + IF Esc THEN IF (hot$ >= "A" AND hot$ <= "Z") OR (hot$ >= "a" AND hot$ <= "z") THEN GOSUB ANSI: Esc = 0: Yuk$ = "": RETURN + IF Esc THEN Yuk$ = Yuk$ + hot$: RETURN + PRINT hot$; + RETURN + } +} + +'**************************************************************************** +REM Ansi-Translation routines: call to print very few ansi-escape codes +REM supports H, m, and J (LOCATE, COLOR, and CLS); +'**************************************************************************** + +ANSI: +Esc = 0 +REM deduce the ansi code! +p1 = -1: p2 = -1: p3 = -1: p4 = -1 + +IF hot$ = "J" THEN CLS : Yuk$ = "": RETURN + +IF hot$ <> "m" THEN GOTO NotM + +p1 = -1: p2 = -1: p3 = -1: p4 = -1 +IF hot$ = "m" THEN p1 = VAL(MID$(Yuk$, 3, 2)) +nul1 = 0: nul2 = 0: nul3 = 0 +nul1 = INSTR(Yuk$, ";") +IF nul1 THEN p2 = VAL(MID$(Yuk$, nul1 + 1, 2)) ELSE GOTO tzer +nul2 = INSTR(nul1 + 1, Yuk$, ";") +IF nul2 THEN p3 = VAL(MID$(Yuk$, nul2 + 1, 2)) ELSE GOTO tzer +tzer: +n = 0: t = 0 + +x1 = -1: x2 = -1: x3 = -1: x4 = -1 +IF p1 = 0 OR p1 = 1 THEN x1 = p1 ELSE IF p1 >= 30 AND p1 < 40 THEN x2 = p1 ELSE IF p1 >= 40 THEN x3 = p1 +IF p2 = 0 OR p2 = 1 THEN x1 = p2 ELSE IF p2 >= 30 AND p2 < 40 THEN x2 = p2 ELSE IF p2 >= 40 THEN x3 = p2 +IF p3 = 0 OR p3 = 1 THEN x1 = p3 ELSE IF p3 >= 30 AND p3 < 40 THEN x2 = p3 ELSE IF p3 >= 40 THEN x3 = p3 + +IF x3 = -1 AND x2 = -1 AND x1 >= 0 THEN x2 = Oldx2: x3 = Oldx3 +IF x1 = -1 THEN x1 = Oldx1 'dupj +IF x1 = 0 AND x2 = 0 AND x3 = 0 THEN COLOR 7, 0: Oldx1 = x1: Oldx2 = x2: Oldx3 = x3: RETURN +IF x1 = 0 THEN IF x2 = 30 THEN t = 0 ELSE IF x2 = 31 THEN t = 4 ELSE IF x2 = 32 THEN t = 2 ELSE IF x2 = 33 THEN t = 6 ELSE IF x2 = 34 THEN t = 1 ELSE IF x2 = 35 THEN t = 5 ELSE IF x2 = 36 THEN t = 3 ELSE IF x2 = 37 THEN t = 7 +IF x1 = 1 THEN IF x2 = 30 THEN t = 8 ELSE IF x2 = 31 THEN t = 12 ELSE IF x2 = 32 THEN t = 10 ELSE IF x2 = 33 THEN t = 14 ELSE IF x2 = 34 THEN t = 9 ELSE IF x2 = 35 THEN t = 13 ELSE IF x2 = 36 THEN t = 11 ELSE IF x2 = 37 THEN t = 15 +IF x3 = 40 THEN n = 0 ELSE IF x3 = 41 THEN n = 4 ELSE IF x3 = 42 THEN n = 2 ELSE IF x3 = 43 THEN n = 6 ELSE IF x3 = 44 THEN n = 1 ELSE IF x3 = 45 THEN n = 5 ELSE IF x3 = 46 THEN n = 3 ELSE IF x3 = 47 THEN n = 7 +grk: +IF x3 >= 0 AND x2 >= 0 THEN COLOR t, n: OldFg = t: OldBg = n +IF x2 >= 0 AND x3 < 0 THEN COLOR t: OldFg = t +IF x3 >= 0 AND x2 < 0 THEN COLOR , n: OldBg = n +Oldx1 = x1 +Oldx2 = x2 +Oldx3 = x3 + +Yuk$ = "": RETURN + +NotM: +IF UCASE$(hot$) <> "F" AND UCASE$(hot$) <> "H" THEN GOTO NotF +x1 = VAL(MID$(Yuk$, 3, 2)) +x2 = VAL(MID$(Yuk$, INSTR(4, Yuk$, ";") + 1, 2)) +LOCATE x1, x2 +RETURN + +NotF: +IF hot$ = "A" OR hot$ = "B" OR hot$ = "C" OR hot$ = "D" THEN v = VAL(MID$(Yuk$, INSTR(Yuk$, "[") + 1, 1)) ELSE GOTO NotA +a = CSRLIN: b = POS(n) +IF hot$ = "A" THEN LOCATE a - v, b: RETURN +IF hot$ = "B" THEN LOCATE a + v, b: RETURN +IF hot$ = "C" THEN LOCATE a, b + v: RETURN +IF hot$ = "D" AND b >= 3 THEN LOCATE a, b - v: RETURN +RETURN + +NotA: +RETURN + +END SUB +*/ + +void DisplayText(char *a) +{ + FILE *file; + char path[MAXPATHLEN]; + char line[1024]; + + sprintf(path,"%s%s",DatPath,a); + file=SharedOpen(path,"r",LOCK_SH); + while(!feof(file)) + { + readline(line, sizeof(line), file); + RTrim(line); + if(line[0]=='*') + { + Oprint("\r\n"); + PressAnyKey(); + Ocls(); + } + else + { + Oprint(line); + Oprint("\r\n"); + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + } + } + fclose(file); +} + +void DisplayTitle(char *a) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[1024]; + + sprintf(path,"%s%s",DatPath,a); + file=SharedOpen(path,"r",LOCK_SH); + while(!feof(file)) + { + readline(line, sizeof(line), file); + Oprint(line); + Oprint("\r\n"); + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + } + fclose(file); +} + +void ExitGame(void) +{ +// 'Final Commands before ending-- no saving is done +// 'because routine should already do it if need be. + + +// 'CarrierDetect 1 ' <-- Re-enable carrier detection. Carrier had +// ' better be true or UEVENT willl occur on +// ' next Transmit + + SaveGame(); +// TIMER OFF + if(PortNum && Rvects) + CloseComm(); + exit(0); +} + +void GotHUP(int sig) +{ + CarrierLost=1; +} + +void InitPort(void) +{ + struct termios newterm; + tcgetattr(0, &origterm); + memcpy(&newterm, &origterm, sizeof(newterm)); + cfmakeraw(&newterm); + tcsetattr(0, TCSANOW, &newterm); + signal(SIGHUP, GotHUP); + setvbuf(stdout, NULL, _IONBF, 0); +/* + OpenComm(Port, IRQ, Length, Parity, DBits, Rate, HS, FossAct +IF Port% > 0 AND IRQ% <> 6484 AND FossAct% = 1 THEN + PRINT " SYSOP: Fossil was not initialized correctly." + END +END IF +*/ +} + +char *KbIn (char *dest, long Lmax) +{ + time_t start; + fd_set readfds; + struct timeval timeout; + char inch[2]={0,0}; + int v; + + start=time(NULL); + timeout.tv_sec=0; + timeout.tv_usec=0; + while(1) + { + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + FD_ZERO(&readfds); + FD_SET(0,&readfds); + if(select(1, &readfds, NULL, NULL, &timeout)>0) + { + fread(inch, 1, 1, stdin); + } + else + break; + } + + Oprint("Þ\b"); // '³=179 + + timeout.tv_sec=1; + timeout.tv_usec=0; + + dest[0]=0; + while(1) + { + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + FD_ZERO(&readfds); + FD_SET(0,&readfds); + if(select(1, &readfds, NULL, NULL, &timeout)>0) + { + fread(inch, 1, 1, stdin); + if(inch[0]=='\b') + { + v = strlen(dest); + if(v>0) + { + Oprint(" \b\b \bÞ\b"); + dest[v-1]=0; + } + } + if(inch[0]=='\n' || inch[0]=='\r') + { + Oprint(" \b"); + return(dest); + } + if(toupper(inch[0]) > '\x1f') + { + write(0,inch, 1); + strcat(dest,inch); + Oprint("Þ\b"); + } + if(strlen(dest)>=Lmax) + { + Oprint(" \b"); + return(dest); + } + } + else + { + if(time(NULL)-start >= 120) + { + ExitGame(); // 'close the communications and end program + } + } + } +} + +void Ocls(void) +{ + SetColor(7, 0, 0); + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + Oprint("\e[2J\e[1;1H"); +/* Status line --- unneeded */ +/* IF PlayingNow > 0 THEN + 'now, code to display status line + LOCATE 25, 1 + t$ = LTRIM$(STR$(SecsLeft)): IF LEN(t$) < 2 THEN t$ = "0" + t$ + q$ = Pad$(LTRIM$(STR$(MinsLeft)) + ":" + t$, 9) + COLOR 9, 1 + PRINT "Û²±° "; + COLOR 10, 1 + PRINT Pad$(RemoveColor$(Alias$), 16); + COLOR 0, 1: PRINT "³ "; + COLOR 10, 1: PRINT Pad$(User$, 22); + COLOR 0, 1: PRINT " ³ "; + COLOR 11, 1: PRINT "Mins: " + q$; + COLOR 0, 1: PRINT " ³ "; + COLOR 14, 1: PRINT "^T = Chat "; + COLOR 9, 1: PRINT "°±²Û"; + Position 1, 1 + COLOR 7, 0 + END IF */ +} + +void Oprint(char *instr) +{ + char *str; + char a[256]; + + strcpy(a,instr); + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + for(str=a;*str;str++) + { + if(str[0]=='`') + { + str++; + switch(str[0]) + { + case '0': + SetColor(10, 0, 0); + break; + case '1': + SetColor(1, 0, 0); + break; + case '2': + SetColor(2, 0, 0); + break; + case '3': + SetColor(3, 0, 0); + break; + case '4': + SetColor(4, 0, 0); + break; + case '5': + SetColor(5, 0, 0); + break; + case '6': + SetColor(6, 0, 0); + break; + case '7': + SetColor(7, 0, 0); + break; + case '8': + SetColor(8, 0, 0); + break; + case '9': + SetColor(9, 0, 0); + break; + case '!': + SetColor(11, 0, 0); + break; + case '@': + SetColor(12, 0, 0); + break; + case '#': + SetColor(13, 0, 0); + break; + case '$': + SetColor(14, 0, 0); + break; + case '%': + SetColor(15, 0, 0); + break; + default: + write(0,"`",1); + } + } + else + write(0,str,1); + } +} + +char *Owait(char *dest) +{ + time_t start; + fd_set readfds; + struct timeval timeout; + + timeout.tv_sec=0; + timeout.tv_usec=0; + while(1) + { + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + FD_ZERO(&readfds); + FD_SET(0,&readfds); + if(select(1, &readfds, NULL, NULL, &timeout)>0) + { + fread(dest, 1, 1, stdin); + } + else + break; + } + + dest[0]=0; + dest[1]=0; + start=time(NULL); + + timeout.tv_sec=1; + timeout.tv_usec=0; + while(1) + { + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + FD_ZERO(&readfds); + FD_SET(0,&readfds); + if(select(1, &readfds, NULL, NULL, &timeout)>0) + { + fread(dest, 1, 1, stdin); + return(dest); + } + else + { + if(time(NULL)-start >= 120) + { + ExitGame(); // 'close the communications and end program + } + } + } +} + +char *PickRandom(char *dest, char *a) +{ + FILE *file; + char path[MAXPATHLEN]; + char line[1024]; + int x; + int y; + + sprintf(path,"%s%s",DatPath,a); + file=SharedOpen(path, "r", LOCK_SH); + readline(line, sizeof(line), file); + RTrim(line); + y=random()%atoi(line)+1; + for(x=1;x<=y;x++) + { + readline(dest, 256, file); + RTrim(dest); + } + fclose(file); + return(dest); +} + +void Position (short x, short y) +{ + char code[12]; + + if(x < 1 || y < 1 || x > 80 || y > 24) + return; + sprintf(code,"\e[%d;%dH",y,x); + + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + + Oprint(code); +} + +void PressAnyKey(void) +{ + char inch[2]; + Oprint(" `1-`9-`3-`!-Press any key to continue-`3-`9-`1-"); + Owait(inch); + Oprint("`7\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\r\n"); +} + +void UCase(char *str) +{ + char *p; + + for(p=str;*p;p++) + { + *p=toupper(*p); + } +} + +void ReadLinkTo(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char a[256]; + char b[256]; + char e[256]; + char f[256]; + char i[256]; + char s[256]; + char g[256]; + char h[256]; + char ii[256]; + char Jj[256]; + char aia[256]; + char Fas[256]; + char buf[256]; + char y[256]; + char o1[256]; + char o2[256]; + char o3[256]; + char c[256]; + char *istr; + char str[256]; + short B1; + short b2; + short b3; + short E1; + short e2; + short e3; + short f1; + short f2; + short f3; + short i1; + short I2; + short i3; + short s1; + short s2; + short s3; + short x; + + IRQ = 0; + Rate = 0; + Port = 0; + + strcpy(Bad, "Unknown"); + if(NodeNum == 0) + strcpy(path,"linkto.bbs"); + else + sprintf(path,"linkto.%d",NodeNum); + + file=SharedOpen(path, "r", LOCK_SH); + strcpy(Bad, "Not all 10 lines in LINKTO"); + readline(a, 256, file); + RTrim(a); + readline(b, 256, file); + RTrim(b); + readline(e, 256, file); + RTrim(e); + readline(f, 256, file); + RTrim(f); + readline(i, 256, file); + RTrim(i); + readline(s, 256, file); + RTrim(s); + readline(g, 256, file); + RTrim(g); + readline(h, 256, file); + RTrim(h); + readline(ii, 256, file); + RTrim(ii); + readline(Jj, 256, file); + RTrim(Jj); + readline(aia, 256, file); + RTrim(aia); + readline(Fas, 256, file); + RTrim(Fas); + + FossAct = atoi(Fas); + Rvects = atoi(aia); + HS = atoi(ii); + fclose(file); + B1 = atoi(Mid(buf, b, 1, 2)); + b2 = atoi(Mid(buf, b, 4, 2)); + b3 = atoi(Mid(buf, b, 7, 2)); + + E1 = atoi(Mid(buf, e, 1, 2)); + e2 = atoi(Mid(buf, e, 4, 2)); + e3 = atoi(Mid(buf, e, 7, 2)); + + f1 = atoi(Mid(buf, f, 1, 2)); + f2 = atoi(Mid(buf, f, 4, 2)); + f3 = atoi(Mid(buf, f, 7, 2)); + + i1 = atoi(Mid(buf, i, 1, 2)); + I2 = atoi(Mid(buf, i, 4, 2)); + i3 = atoi(Mid(buf, i, 7, 2)); + istr=i+9; + + s1 = atoi(Mid(buf, s, 1, 2)); + s2 = atoi(Mid(buf, s, 4, 2)); + s3 = atoi(Mid(buf, s, 7, 2)); + + strcpy(Bad, "L:2"); + UCase(g); + Mid(o1, g, 1, 1); + Mid(o2, g, 2, 1); + Mid(o3, g, 3, 1); + if(o1[0]=='E') + Parity = 2; + else if (o1[0] == 'O') + Parity = 1; + else + Parity = 0; + if(o2[0] == '7') + Length = 7; + else + Length = 8; + + DBits = atoi(o3); + + IRQ = atoi(h); + + sprintf(Bad, "Where's %s Door file?", a); + + file=SharedOpen(a, "r", LOCK_SH); + sprintf(Bad, "ErrPars %s.",a); + for(x = 1; x<= B1; x++) + readline(buf, sizeof(buf), file); + RTrim(buf); + Mid(y, buf, b2, b3); + strcpy(User, y); + strcpy(str, a); + UCase(str); + if(strstr(str,"DORINFO")!=NULL) + { + readline(c, sizeof(c), file); + RTrim(c); + strcat(User," "); + strcat(User, c); + } + fclose(file); + + file=SharedOpen(a, "r", LOCK_SH); + for(x=1; x<=E1; x++) + readline(buf, sizeof(buf), file); + RTrim(buf); + Mid(y, buf, e2, e3); + Port = atoi(y); + fclose(file); + + file=SharedOpen(a, "r", LOCK_SH); + if (f1>0 && f2>0 && f3>0) + { + for(x=1; x<=f1; x++) + readline(buf, sizeof(buf), file); + RTrim(buf); + Mid(y, buf, f2, f3); + MinsLeft = atoi(y); + SecsLeft = 30; + } + else + { + MinsLeft = 15; + SecsLeft = 30; + } + fclose(file); + + GraphMode = -1; + file=SharedOpen(a, "r", LOCK_SH); + if (i1 > 0 && I2 > 0 && i3 > 0) + { + GraphMode = 0; + for(x=1; x<=i1; x++) + readline(buf, sizeof(buf), file); + RTrim(buf); + Mid(c, buf, I2, i3); + if(!strcasecmp(c, istr)) + GraphMode = 1; + } + fclose(file); + + file=SharedOpen(a, "r", LOCK_SH); + for(x = 1; x <= s1; x++) + readline(buf, sizeof(buf), file); + RTrim(buf); + Mid(y, buf, s2, s3); + Rate = atoi(y); + KeepRate = Rate; + fclose(file); + + if(atoi(Jj) == 1 && FossAct == 0) + Rate = 0; + + if(FossAct == 1) + { + if(Rate > 19200) + Rate = 38400; + else if (Rate > 9600) + Rate = 19200; + else if (Rate > 4800) + Rate = 9600; + else if (Rate > 2400) + Rate = 4800; + else if (Rate > 1200) + Rate = 2400; + else if (Rate > 300) + Rate = 1200; + else if (Rate > 0) + Rate = 300; + else + Rate = 0; + } + + RTrim(User); + + InitPort(); + + PortNum = Port; + + OldTime = time(NULL); +} + +void SetColor(short f, short b, short oeo) +{ + short Fg = 0; + short Bg = 0; + short Rg = -1; + + if(f == 1) + Fg = 4; + if (f == 2) Fg = 2; + if (f == 3) Fg = 6; + if (f == 4) Fg = 1; + if (f == 5) Fg = 5; + if (f == 6) Fg = 3; + if (f == 7) Fg = 7; + if (f == 8) Fg = 8; + if (f == 9) Fg = 12; + if (f == 10) Fg = 10; + if (f == 11) Fg = 14; + if (f == 12) Fg = 9; + if (f == 13) Fg = 13; + if (f == 14) Fg = 11; + if (f == 15) Fg = 15; + if (b == 1) Bg = 4; + if (b == 2) Bg = 2; + if (b == 3) Bg = 6; + if (b == 4) Bg = 1; + if (b == 5) Bg = 5; + if (b == 6) Bg = 3; + if (b == 7) Bg = 7; + +/* '*** specify a -1 to omit that field + '0=black, 1=red, 2=green, 3=brown + '4-blue, 5=mag, 6=cyan, 7=gray + '----------------------------------- + 'although these are translated from standard */ + + if (Fg >= 0 && Fg <= 7) + { + Rg = 0; + Fg = 30 + Fg; + } + if (Fg >= 8 && Fg <= 15) + { + Rg = 1; + Fg = 30 + Fg - 8; + } + if (Bg >= 0 && Bg <= 7) + Bg = 40 + Bg; + if (Bg >= 8 && Bg <= 15) + Bg = 40 + Bg - 8; + + if(Rg>=0 && Fg>0 && Bg>0) + sprintf(NewColor,"\e[%hd;%hd;%hdm",Rg,Fg,Bg); + else if (Rg>=0 && Fg>0) + sprintf(NewColor,"\e[%hd;%hdm",Rg,Fg); + else if (Fg>0 && Bg>0) + sprintf(NewColor,"\e[%hd;%hdm",Fg,Bg); + else if (Rg>=0 && Bg>0) + sprintf(NewColor,"\e[%hd;%hdm",Rg,Bg); + else if (Rg>=0) + sprintf(NewColor,"\e[%hdm",Rg); + else if (Fg>0) + sprintf(NewColor,"\e[%hdm",Fg); + else if (Bg>0) + sprintf(NewColor,"\e[%hdm",Bg); + + if(PortNum && CarrierLost) + { + ExitGame(); + exit(1); + } + if(!oeo) + Oprint(NewColor); +} + +void Paus(long x) +{ + struct timeval ti; + ti.tv_sec=x; + ti.tv_usec=0; + select(0,NULL,NULL,NULL,&ti); +} diff --git a/src/doors/timeport/doors.h b/src/doors/timeport/doors.h new file mode 100644 index 0000000000000000000000000000000000000000..571706845aa694188e9ffe553f7d33d31ff0033c --- /dev/null +++ b/src/doors/timeport/doors.h @@ -0,0 +1,53 @@ +void ParseCmdLine(int argc, char **argv); +void AnsPrint(char *a); +void DisplayText(char *a); +void DisplayTitle(char *a); +void ExitGame(void); +void InitPort(void); +char *KbIn(char *dest, long Lmax); +void Ocls(void); +void Oprint(char *a); +char *Owait(char *dest); +char *PickRandom(char *dest, char *a); +void Position (short x, short y); +void PressAnyKey(void); +void UCase(char *str); +void ReadLinkTo(void); +void SetColor(short f, short b, short oeo); +void Paus(long x); + +// COMMON SHARED MinsLeft AS LONG, SecsLeft AS LONG, Rvects AS INTEGER, Parity% +extern long MinsLeft; +extern long SecsLeft; +extern short Rvects; +extern short Parity; +// COMMON SHARED OldBg AS INTEGER, OldFg AS INTEGER, StatsIn AS INTEGER +extern short OldBg; +extern short OldFg; +extern short StatsIn; +// COMMON SHARED PortNum AS INTEGER, OldTime AS LONG, Rate&, Length% +extern short PortNum; +extern long OldTime; +extern long Rate; +extern long KeepRate; +extern short Length; +// COMMON SHARED ret$, NewColor$, GraphMode AS INTEGER, HS%, IRQ%, Port% +#define ret "\r\n" +extern char NewColor[16]; +extern short GraphMode; +extern short HS; +extern short IRQ; +extern short Port; +// COMMON SHARED NodeNum AS INTEGER +extern short NodeNum; +// COMMON SHARED PlayingNow AS INTEGER, ChatEnabled AS INTEGER, FossAct%, DBits% +// ' when PlayingNow is set to 1 (by code) then the status +// ' line begins to be displayed after every Ocls +extern short PlayingNow; +extern short ChatEnabled; +extern short FossAct; +extern short DBits; +// COMMON SHARED Oldx1 AS INTEGER, Oldx2 AS INTEGER, Oldx3 AS INTEGER +extern short Oldx1; +extern short Oldx2; +extern short Oldx3; diff --git a/src/doors/timeport/ending1.ans b/src/doors/timeport/ending1.ans new file mode 100644 index 0000000000000000000000000000000000000000..8c29c238bc2c14c8b83f51b895e0274c116fbe09 --- /dev/null +++ b/src/doors/timeport/ending1.ans @@ -0,0 +1,9 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;36HThe room is very dark, but you can see[3;75H3[1;37m[4;1HÛ[30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Û[0;33;40m[4;36Hbeings hovering in the darkness. In [1;37m[5;1HÛ[30m°° +[5;4H°°°°[31m°°[30m°°°°°°[31m°°[30m°°°°°°[31m°°[30m°°°°°°°Û[0;33;40m[5;36Hvoices that seem to be inside your head,[1;37m[6;1HÛ[30m°°°°°[31m°[0;31;40m°±[1m°[30m°°°°[31m°[0;31;40m°°[1m°[30m°°°°[31m°[0;31;40m°[35m°[1;31m°[30m°°°°°° +[6;33HÛ[0;33;40m[6;36Hthey speak in unison. "Your Time is at[1;37m[7;1HÛ[30m°°°°[31m°[0;31;40m°±[35m°[31m°[1m°[30m°°[31m°[0;31;40m°[35m°[31m°±[1m°[30m°°[31m°[0;31;40m°±°[35m°[1;31m°[30m°°°°°Û[0;33;40m [7;36Han end," they say. +[7;56H"Thank you for your[1;37m[8;1HÛ[30m°°°°[31m°[0;31;40m±[35m°[31m°±[1m°[30m°°[31m°[0;35;40m°[31m°±°[1m°[30m°°[31m°[0;31;40m±±°[35m°[1;31m°[30m°°°°°Û[0;33;40m [8;36Hhelp in testing the Chaos Threshold. In[1;37m[9;1HÛ +[9;2H[0;33;40m°°°°[1;31m°[0;31;40m±[35m°[31m°±[1m°[0;33;40m°°[1;31m°[0;31;40m±[35m°[31m°±[1m°[0;33;40m°°[1;31m°[0;31;40m±°°[35m°[1;31m°[0;33;40m°°°°°[1;30mÛ[0;33;40m [9;36Ha few more years, we will know precisely[1;37m[10;1HÛ +[10;2H[0;33;40m°°°°°[1;31m°[0;35;40m°[31m±[1m°[0;33;40m°°°°[1;31m°[0;31;40m°[35m°[1;31m°[0;33;40m°°°°[1;31m°[0;31;40m°[35m°[1;31m°[0;33;40m°°°°°°[1;30mÛ[0;33;40m [10;36Hwhat happens when the fabric of Time[1;37m[11;1HÛ[0;33;40m°°° +[11;5H°°°[1;31m°°[0;33;40m°°°°°°[1;31m°°[0;33;40m°°°°°°[1;31m°°[0;33;40m°°°°°°°[1;30mÛ[0;33;40m[11;36Hunravels from a result of continual Time[1;37m[12;1HÛ[0;33;40m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[0;33;40m[12;36Htampering. Your pa +[12;55Hrticipation in this[1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[13;36Hexciting experiment will be duly noted."[14;1H You are then told that you are allowed one final use of the Time Portal,[15;2Hand that you are free to retu +[15;31Hrn to your own time and live your life in[16;2Hpeace. After thinking about it, you feel used and insignificant.[18;1H[0m diff --git a/src/doors/timeport/ending2.ans b/src/doors/timeport/ending2.ans new file mode 100644 index 0000000000000000000000000000000000000000..857ea67c4038c9b157fc6156bca14c8b248ced6b --- /dev/null +++ b/src/doors/timeport/ending2.ans @@ -0,0 +1,9 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;36HSilence dominates for several seconds. [1;37m[4;1HÛ[30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°Û[0;33;40m[4;36HYou don't know what to say to these[1;37m[5;1HÛ[30m°°°°°°[31m°° +[5;10H[30m°°°°°°[31m°°[30m°°°°°°[31m°°[30m°°°°°°°Û[0;33;40m[5;36Hfaceless Beings of Time that. You were[1;37m[6;1HÛ[30m°°°°°[31m°[0;31;40m°±[1m°[30m°°°°[31m°[0;31;40m°°[1m°[30m°°°°[31m°[0;31;40m°[35m°[1;31m°[30m°°°°°°Û[0;33;40m +[6;36Hjust a part of an experiment, designed to[1;37m[7;1HÛ[30m°°°°[31m°[0;31;40m°±[35m°[31m°[1m°[30m°°[31m°[0;31;40m°[35m°[31m°±[1m°[30m°°[31m°[0;31;40m°±°[35m°[1;31m°[30m°°°°°Û[0;33;40m [7;36Hdestroy Time itself. The beings ass +[7;72Hure[1;37m[8;1HÛ[30m°°°°[31m°[0;31;40m±[35m°[31m°±[1m°[30m°°[31m°[0;35;40m°[31m°±°[1m°[30m°°[31m°[0;31;40m±±°[35m°[1;31m°[30m°°°°°Û[0;33;40m [8;36Hyou that once Time begins to disintigrate,[1;37m[9;1HÛ[0;33;40m°°°°[1;31m° +[9;7H[0;31;40m±[35m°[31m°±[1m°[0;33;40m°°[1;31m°[0;31;40m±[35m°[31m°±[1m°[0;33;40m°°[1;31m°[0;31;40m±°°[35m°[1;31m°[0;33;40m°°°°°[1;30mÛ[0;33;40m [9;36Hthey will themselves travel to the past[1;37m[10;1HÛ[0;33;40m°°°°°[1;31m° +[10;8H[0;35;40m°[31m±[1m°[0;33;40m°°°°[1;31m°[0;31;40m°[35m°[1;31m°[0;33;40m°°°°[1;31m°[0;31;40m°[35m°[1;31m°[0;33;40m°°°°°°[1;30mÛ[0;33;40m and put a stop to it all before it ever[1;37m[11;1HÛ[0;33;40m°°°°°°[1;31m°°[0;33;40m°°°°° +[11;15H°[1;31m°°[0;33;40m°°°°°°[1;31m°°[0;33;40m°°°°°°°[1;30mÛ[0;33;40m [11;36Hstarts, restoring time and getting their[1;37m[12;1HÛ[0;33;40m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[0;33;40m[12;36Htest results all in one valliant effort. +[1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[13;36HIt doesn't make you fell any better.[14;1HYou return to the Hanger and stare at the Time Portal for a long time. Then[15;1Hyou decide that the Old Man on the mountain had the right +[15;58H idea. Instead of[16;1Hgoing to your own time, you decide to find your own mountain in the Stone[17;1HAge, and live the rest of your life in seclusion.[20;1H[0m diff --git a/src/doors/timeport/flying.ans b/src/doors/timeport/flying.ans new file mode 100644 index 0000000000000000000000000000000000000000..8cb0840fb61413de295fb5d4c5bc7c9fa8926c15 --- /dev/null +++ b/src/doors/timeport/flying.ans @@ -0,0 +1,6 @@ +[0;37;40m[1m[1;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[1;30HYou soar from the mountain top in a fashion that[1;37m[2;1HÛ[0;34;40m°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[0;33;40m[2;30Hmuch resembles hang-gliding. As the wind begins[1;37m[3;1HÛ +[3;2H[0;34;40m±±±±±±±±±±±±±±±±±±±±±±±±±[1;30mÛ[0;33;40m[3;30Hto pick up, you realize that you might plummet[1;37m[4;1HÛ[0;34;40m²²²²²²²²²²²²²²²²²²²²²²²²²[1;30mÛ[0;33;40m[4;30Hto the ground[4;44Hif you don't do some fancy moves[1;37m[5;1HÛ +[5;2H[0;30;44m [1;37mÜÜÜÜ[31m [0;37;44m [1;31m [0;30;44m [32m [1;30;40mÛ[0;33;40m [5;30Hand get back on course. You decide to alter[1;37m[6;1HÛ[0;30;44m [1;37mÛÛÛÛÛÛÛÛÛÛ[0;30;44m [1;40mÛ[0;33;40m [6;30Hyou +[6;33Hr direction four times. What moves will you[1;37m[7;1HÛ[0;30;44m [1;31m [0;30;44m [1;31m [37mßßßßß[0;30;44m [1;37mÜÜÜÜ[0;30;44m [1;40mÛ[0;33;40m [7;30Htry? Use N,S,E,W for the directions. You can[1;37m[8;1HÛ[0;30;44m +[8;3H [1;31m [0;30;44m [1;37mßÛÛÛÛ[0;30;44m [1;40mÛ[0;33;40m [8;30Hrepeat directions also, such as NEWN or SSSW or[1;37m[9;1HÛ[0;30;44m [1;31m [0;30;44m [1;31m [0;30;44m [1;31m [0;30;44m [1;31m [0;30;44m +[9;26H [1;40mÛ[0;33;40m[9;30HNWES or SSSS or WNSW... you get the idea...[9;74HIf[1;37m[10;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[10;30Hyou aren't right, you'll probably crash.[14;1H[0m diff --git a/src/doors/timeport/install.c b/src/doors/timeport/install.c new file mode 100644 index 0000000000000000000000000000000000000000..42a27824fdfda9fb849b63f1adf498d79168f111 --- /dev/null +++ b/src/doors/timeport/install.c @@ -0,0 +1,1510 @@ +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <glob.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <unistd.h> +#include <sys/time.h> +#ifdef __NetBSD__ + #include <ncurses.h> +#else + #include <curses.h> +#endif + +char Aee[256]; +char Bee[256]; +char Cee[256]; +char Dee[256]; +char Fee[256]; +char Jee[256]; +char Pdd[256]; +short NodeNum; +char b1[256]; +char c1[256]; +char d1[256]; +char e1[256]; +char f1[256]; + +char *GetWord(char *dest, char *Pro,char *Def); +void Menu1(void); +void Menu2(void); +void Menu3(void); +void Perf(char *a); +void ResetGame(void); +void ViewEdit(void); +void waiter(void); +void WasCreated(void); +void WhyRegister(void); + +void RTrim(char *str) +{ + char *p; + + if(!*str) + return; + for(p=str+strlen(str)-1;(isspace(*p) || !*p) && p>=str; p--) + { + *p=0; + } +} + +void readline(char *dest, size_t size, FILE *file) +{ + char *p; + + if(fgets(dest,size,file)!=dest) + dest[0]=0; + + for(p=dest;*p;p++) + { + if(*p=='\r' || *p=='\n') + { + *p=0; + break; + } + } +} + +void UCase(char *str) +{ + char *p; + + for(p=str;*p;p++) + { + *p=toupper(*p); + } +} + +void COLOR(fg, bg) +{ + int pair; + + if(fg>7) + { + attrset(A_BOLD); + fg-=8; + } + else + attrset(A_NORMAL); + + pair=(bg<<4)|fg; + if(pair==7) + pair=0; + else if(pair==0) + pair=7; + color_set(pair,NULL); +} + +void LOCATE(xpos, ypos) +{ + xpos--; + ypos--; + move(xpos,ypos); +} + +void PRINT(char *str) +{ + char *p; + int y,x; + int maxy,maxx; + + getmaxyx(stdscr,maxy,maxx); + for(p=str;*p;p++) + { + switch(*p) + { + case '\n': + getyx(stdscr,y,x); + if(y+1==maxy) + { + y--; + scrl(1); + } + move(y+1,x); + break; + case '\r': + getyx(stdscr,y,x); + move(y,0); + break; + case 0: + refresh(); + return; + default: + addch(*p); + } + } + refresh(); +} + +void INKEY(char *str) +{ + str[0]=getch(); + str[1]=0; +} + +short curses_color(short color) +{ + switch(color) + { + case 0 : + return(COLOR_BLACK); + case 1 : + return(COLOR_BLUE); + case 2 : + return(COLOR_GREEN); + case 3 : + return(COLOR_CYAN); + case 4 : + return(COLOR_RED); + case 5 : + return(COLOR_MAGENTA); + case 6 : + return(COLOR_YELLOW); + case 7 : + return(COLOR_WHITE); + case 8 : + return(COLOR_BLACK); + case 9 : + return(COLOR_BLUE); + case 10 : + return(COLOR_GREEN); + case 11 : + return(COLOR_CYAN); + case 12 : + return(COLOR_RED); + case 13 : + return(COLOR_MAGENTA); + case 14 : + return(COLOR_YELLOW); + case 15 : + return(COLOR_WHITE); + } + return(0); +} + +char *input_line(char *dest,int maxlen) +{ + int ch; + int inspos=0; + int xpos,ypos; + int xstart,ystart; + int started=0; + char buf[256]; + int j; + + memset(dest+strlen(dest),0,maxlen-strlen(dest)); + memset(buf,0,sizeof(buf)); + strcpy(buf,dest); + getyx(stdscr,ystart,xstart); + xpos=xstart; + ypos=ystart; + inspos=1; + move(ystart,xstart); + PRINT(dest); + move(ypos,xpos); + while(1) + { + ch=getch(); + switch(ch) + { + case KEY_LEFT: + if(inspos>1) + { + xpos--; + inspos--; + } + started=1; + break; + case KEY_RIGHT: + if(inspos<=strlen(dest)) + { + xpos++; + inspos++; + } + started=1; + break; + case KEY_BACKSPACE: + if(!started) + { + for(j=0; j<strlen(dest); j++) + PRINT(" "); + memset(buf,0,sizeof(buf)); + memset(dest,0,sizeof(maxlen)); + inspos=1; + } + if(inspos>1) + { + sprintf(buf,"%*.*s%s",inspos-2,inspos-2,dest,dest+inspos-1); + inspos--; + xpos--; + } + started=1; + break; + case KEY_HOME: + xpos=xstart; + inspos=1; + started=1; + break; + case KEY_END: + xpos=xstart+strlen(dest); + inspos=strlen(dest)+1; + started=1; + break; + case KEY_DC: + if(!started) + { + for(j=0; j<strlen(dest); j++) + PRINT(" "); + memset(buf,0,sizeof(buf)); + memset(dest,0,sizeof(maxlen)); + inspos=1; + } + if(inspos<=strlen(dest)) + { + sprintf(buf,"%*s%s",inspos-1,dest,dest+inspos); + } + started=1; + break; + case '\n': + case '\r': + PRINT("\r\n"); + return(dest); + default: + if(ch>=' ' && ch<='~') + { + if(!started) + { + for(j=0; j<strlen(dest); j++) + PRINT(" "); + memset(buf,0,sizeof(buf)); + memset(dest,0,sizeof(maxlen)); + inspos=1; + } + sprintf(buf,"%*.*s%c%s",inspos-1,inspos-1,dest,ch,dest+inspos-1); + inspos++; + xpos++; + started=1; + } + break; + } + strcpy(dest,buf); + move(ystart,xstart); + PRINT(dest); + PRINT(" "); + move(ypos,xpos); + refresh(); + } +} + +int main(int argc, char **argv) +{ + char a[256]; + int bg,fg,pair; + + FILE *file; + file=fopen("tp1.cfg", "r"); + if(file==NULL) + { + file=fopen("tp1.cfg","w"); + fputs("Time Port: A BBS Door Game\r\n", file); + fputs("Written by Mike Snyder\r\n",file); + } + else + { + readline(a, sizeof(a), file); + readline(a, sizeof(a), file); + } + fclose(file); + strcpy(Pdd," "); + + /* Init. Curses */ + initscr(); + start_color(); + cbreak(); + noecho(); + nonl(); + keypad(stdscr, TRUE); + scrollok(stdscr,TRUE); + raw(); + halfdelay(1); + + /* Set up color pairs */ + for(bg=0;bg<8;bg++) { + for(fg=0;fg<8;fg++) { + pair=(bg<<4)|fg; + if(pair==7) + pair=0; + else if(pair==0) + pair=7; + init_pair(pair,curses_color(fg),curses_color(bg)); + } + } + + + Menu1(); + clear(); + refresh(); + endwin(); + return(0); +} + +char *Center(char *dest, char *a) +{ + int sp, len, x; + len=strlen(a); + if(len>80) + len=80; + sp=(80 - len) / 2; + for(x=0; x<sp; x++) + { + dest[x]=' '; + dest[x+1]=0; + } + strcat(dest, a); + dest[80]=0; + return(dest); +} + +void EnterRegis(void) +{ + char a[256]; + char b[256]; + char t[256]; + char u[256]; + FILE *file; + int regis; + + LOCATE(16, 10); + COLOR(2, 0); + PRINT("Are you ready to enter your Registration Codes? "); + COLOR(10, 0); + PRINT("(Y/N)\r\n"); + a[0]=0; + while(a[0]!='Y') + { + INKEY(a); + a[0] = toupper(a[0]); + if(a[0] == 'N') + return; + } + + file=fopen("tp1,cfg","w"); + + GetWord(a,"Registration Line 1\r\n: ", "0"); + fputs(a, file); + fputs("\r\n",file); + + GetWord(b,"Registration Line 2\r\n: ", "0"); + fputs(b, file); + fputs("\r\n",file); + fclose(file); + + regis = 1; + strcpy(t,a); + strcpy(u,b); + if(strlen(t) <= 1) + regis = 0; + if(strlen(u) <= 1) + regis = 0; + + COLOR(14, 0); + if(regis == 0) + PRINT(" The Registration codes you entered are NOT valid!"); + if(regis == 1) + { + PRINT(" Thank you for Registering Time Port, "); + PRINT(t); + PRINT("."); + } + PRINT("\r\n"); + COLOR(11,0); + COLOR(3,0); + + waiter(); +} + +void GetDefaults(void) +{ + COLOR(12,0); + PRINT(" Modem Setup: Express in Parity,Databits,StopBits order\r\n"); + GetWord(Aee,"Your Modem SETUP?", "N81"); + + COLOR(12,0); + PRINT(" IRQ: If your IRQ is standard for the port, (0) will work\r\n"); + GetWord(Bee, "Your IRQ (0 is default, or 2 through 7)", "0"); + + COLOR(12,0); + PRINT(" Handshaking: if the default (3) causes trouble, try other values\r\n"); + GetWord(Cee,"Handshaking: 0=None, 1=XON/XOFF, 2=RTS/CTS, 3=Both", "3"); + + COLOR(12,0); + PRINT(" Locked Port: Select (1) if your Com Port is locked, (0) otherwise\r\n"); + GetWord(Dee,"Locked Com Port? 0=NO, 1=YES", "1"); + + COLOR(12,0); + PRINT(" Vectors: Choose (1) right now. DO NOT choose 0 unless nothing else works\r\n"); + GetWord(Fee,"Release Vectors upon Exit? 1=Yes, 0=No", "1"); + + COLOR(12,0); + PRINT(" Fossil: Choose (1) if a Fossil driver will be in use\r\n"); + PRINT(" If Time Port refuses to use your Fossil, or if you\r\n"); + COLOR(12,0); + PRINT(" have lockup-problems, try changing this value to (0)\r\n"); + GetWord(Jee,"FOSSIL driver in use? 0=NO, 1=YES", "0"); +} + +char *GetDrop(char *dest, char *a) +{ + char str[256]; + + sprintf(str, "Path to Drop File %s",a); + GetWord(dest,str,"./"); + if(dest[strlen(dest)-1]!='/') + { + COLOR(4,0); + PRINT(" -=-=- "); + COLOR(12,0); + PRINT("Paths almost always end with a '\' symbol. Add it now? "); + COLOR(14,0); + PRINT("(Y/N)"); + str[0]=0; + str[1]=0; + while(str[0]!='Y' && str[0] !='N') + { + INKEY(str); + UCase(str); + if(str[0]=='Y') + { + strcat(dest,"/"); + } + } + } + return(dest); +} + +int GetKey(int x, int Y) +{ + struct timeval n; + struct timeval n2; + int c = 1; + int Max; + int g = 14; + int a, De; + + Max=x; + gettimeofday(&n,NULL); + while(1) + { + gettimeofday(&n2,NULL); + if((n2.tv_sec - n.tv_sec)*10+(n2.tv_usec - n.tv_usec/100000) > 1) + { + switch(g) + { + case 14: + g=10; + break; + case 13: + g=14; + break; + case 12: + g=13; + break; + default: + g=12; + } + } + LOCATE(Y + c, strlen(Pdd)); + COLOR(0,0); + addch(' '); + LOCATE(Y + c, strlen(Pdd) - 1); + COLOR(g,0); + PRINT("$"); + a=getch(); + if(a == '\n' || a == '\r' || a == 32) + { + return(c); + } + De=a-64; + if(De >= 1 && De <= x) + { + return(De); + } + switch (a) + { + case KEY_UP: + LOCATE(Y + c, strlen(Pdd) - 1); + PRINT(" "); + c = c - 1; + if(c<1) + c=Max; + break; + case KEY_DOWN: + LOCATE(Y + c, strlen(Pdd) - 1); + PRINT(" "); + c = c + 1; + if(c>Max) + c=1; + break; + case KEY_PPAGE: + case KEY_HOME: + LOCATE(Y + c, strlen(Pdd) - 1); + PRINT(" "); + c = 1; + break; + case KEY_NPAGE: + case KEY_END: + LOCATE(Y + c, strlen(Pdd) - 1); + PRINT(" "); + c = Max; + break; + case 27: + return(0); + } + } +} + +void GetLinkNums(char *a) +{ + char b[256]; + + strcpy(b,a); + UCase(b); + if(strstr(b, "CALLINFO")!=NULL) + { + strcpy(b1, "01 01 25"); + strcpy(c1, "29 04 02"); + strcpy(d1, "05 01 06"); + strcpy(e1, "06 01 05 COLOR"); + strcpy(f1, "31 01 08"); + } + + if(strstr(b, "CHAIN.TXT")!=NULL) + { + strcpy(b1, "02 01 25"); + strcpy(c1, "21 01 2"); + strcpy(d1, "00 00 0"); + strcpy(e1, "14 01 01 1"); + strcpy(f1, "20 01 07"); + } + + if(strstr(b, "DOOR.SYS")!=NULL) + { + strcpy(b1, "10 01 25"); + strcpy(c1, "01 04 02"); + strcpy(d1, "19 01 06"); + strcpy(e1, "20 01 02 GR"); + strcpy(f1, "02 01 07"); + } + + if(strstr(b, "DORINFO")!=NULL) + { + strcpy(b1, "07 01 25"); + strcpy(c1, "04 04 02"); + strcpy(d1, "12 01 06"); + strcpy(e1, "10 01 01 1"); + strcpy(f1, "05 01 07"); + } + +} + +char *GetWord(char *dest, char *Pro,char *Def) +{ + COLOR(3,0); + PRINT(Pro); + PRINT(" ["); + COLOR(11,0); + PRINT(Def); + COLOR(3); + PRINT("]: "); + strcpy(dest,Def); + /* This should be better! */ + input_line(dest,80); + if(strlen(dest)==0) + strcpy(dest,Def); + return(dest); +} + +void MakeGap(void) +{ + char Cv[256]; + FILE *file; + + file=fopen("linkto.bbs", "w"); + LOCATE(19, 1); + GetDrop(Cv,"door.sys"); + fprintf(file,"%sdoor.sys\r\n",Cv); + fputs("10 01 25\r\n",file); + fputs("01 04 02\r\n",file); + fputs("19 01 06\r\n",file); + fputs("20 01 02 GR\r\n",file); + fputs("02 01 07\r\n",file); + + GetDefaults(); + + fputs(Aee,file); + fputs("\r\n",file); + fputs(Bee,file); + fputs("\r\n",file); + fputs(Cee,file); + fputs("\r\n",file); + fputs(Dee,file); + fputs("\r\n",file); + fputs(Fee,file); + fputs("\r\n",file); + fputs(Jee,file); + fputs("\r\n",file); + fclose(file); + + WasCreated(); +} + +void MakeRbbs(void) +{ + char Cv[256]; + FILE *file; + + file=fopen("linkto.bbs", "w"); + LOCATE(19, 1); + GetDrop(Cv,"dorinfo1.def"); + fprintf(file,"%sdorinfo1.def\r\n",Cv); + fputs("07 01 25\r\n",file); + fputs("04 04 02\r\n",file); + fputs("12 01 06\r\n",file); + fputs("10 01 01 1\r\n",file); + fputs("05 01 07\r\n",file); + + GetDefaults(); + + fputs(Aee,file); + fputs("\r\n",file); + fputs(Bee,file); + fputs("\r\n",file); + fputs(Cee,file); + fputs("\r\n",file); + fputs(Dee,file); + fputs("\r\n",file); + fputs(Fee,file); + fputs("\r\n",file); + fputs(Jee,file); + fputs("\r\n",file); + fclose(file); + + WasCreated(); +} + +void makeWeather(void) +{ + char a[256]; + FILE *file; + + endwin(); + system("makemod"); + refresh(); + + PRINT("\r\n"); + COLOR(14, 0); + PRINT(" Reset the Player Talk file? (MUST do this the 1st time) "); + COLOR(12, 0); + PRINT("(Y/N)"); + a[0]=0; + a[1]=0; + while(a[0]!='Y' && a[0]!='N') + { + INKEY(a); + UCase(a); + } + if(a[0]=='N') + PRINT("\r\n"); + else + { + file=fopen("convers.txt","w"); + fprintf(file,"%-80.80s","`%Somebody `7asks:"); + fprintf(file,"%-80.80s","`3We all agree, then, that we haven't been told the whole story?"); + fprintf(file,"%-80.80s","`%Somebody else `7replies:"); + fprintf(file,"%-80.80s","`3Without a doubt. Why would the bunch of us be uprooted from our own"); + fprintf(file,"%-80.80s","`%Somebody else `7adds:"); + fprintf(file,"%-80.80s","`3times? And have any of you even seen one of our hosts?"); + fprintf(file,"%-80.80s","`%Somebody `7replies:"); + fprintf(file,"%-80.80s","`3No... Only their voices when I first arrived. Anybody else?"); + fprintf(file,"%-80.80s","`%Someone else `7asks:"); + fprintf(file,"%-80.80s","`3Same here. And why are we being trusted to use this Time Portal?"); + fprintf(file,"%-80.80s","`%Someone `7replies:"); + fprintf(file,"%-80.80s","`3When I arrived, I was told not to trust anyone. So why would our Hosts"); + fprintf(file,"%-80.80s","`%Someone `7adds:"); + fprintf(file,"%-80.80s","`3allow the possibility of some serious temporal damage if not all of us"); + fprintf(file,"%-80.80s","`%Someone `7adds:"); + fprintf(file,"%-80.80s","`3are trustworthy? And what are we expected to do for them?"); + fclose(file); + PRINT(" CONVERS.TXT created\r\n"); + } + PRINT("\r\n"); + waiter(); +} + +void MakeWildcat(void) +{ + char Cv[256]; + FILE *file; + + file=fopen("linkto.bbs", "w"); + LOCATE(19, 1); + GetDrop(Cv,"callinfo.bbs"); + fprintf(file,"%scallinfo.bbs\r\n",Cv); + fputs("01 01 25\r\n",file); + fputs("29 04 02\r\n",file); + fputs("05 01 06\r\n",file); + fputs("06 01 05 COLOR\r\n",file); + fputs("31 01 08\r\n",file); + + GetDefaults(); + + fputs(Aee,file); + fputs("\r\n",file); + fputs(Bee,file); + fputs("\r\n",file); + fputs(Cee,file); + fputs("\r\n",file); + fputs(Dee,file); + fputs("\r\n",file); + fputs(Fee,file); + fputs("\r\n",file); + fputs(Jee,file); + fputs("\r\n",file); + fclose(file); + + WasCreated(); +} + +void MakeWwiv(void) +{ + char Cv[256]; + FILE *file; + + file=fopen("linkto.bbs", "w"); + LOCATE(19, 1); + GetDrop(Cv,"chain.txt"); + fprintf(file,"%schain.txt\r\n",Cv); + fputs("02 01 25",file); + fputs("21 01 2",file); + fputs("00 00 0",file); + fputs("14 01 01 1",file); + fputs("20 01 07",file); + + GetDefaults(); + + fputs(Aee,file); + fputs("\r\n",file); + fputs(Bee,file); + fputs("\r\n",file); + fputs(Cee,file); + fputs("\r\n",file); + fputs(Dee,file); + fputs("\r\n",file); + fputs(Fee,file); + fputs("\r\n",file); + fputs(Jee,file); + fputs("\r\n",file); + fclose(file); + + WasCreated(); +} + +void Menu1(void) +{ + char str[256]; + int d; + int ch; + + while(1) + { + COLOR(15, 0); + clear(); + PRINT("\r\n\r\n"); + PRINT(Center(str,"TIME PORT: Written by Mike Snyder")); + PRINT("\r\n"); + COLOR(14, 0); + PRINT(Center(str,"Configuration Menu")); + PRINT("\r\n"); + COLOR(8, 0); + PRINT(Center(str,"Use the UP and DOWN arrows to select and press [enter]")); + PRINT("\r\n"); + COLOR(7, 0); + PRINT(Center(str,"User the [ESC] escape key to exit from a menu")); + PRINT("\r\n\r\n\r\n"); + + PRINT(Pdd); Perf("(A)"); COLOR(8,0); PRINT(" Enter your Time Port REGISTRATION Code\r\n"); + PRINT(Pdd); Perf("(B)"); COLOR(15,0); PRINT(" Setup SETUP.CFG main configuration\r\n"); + PRINT(Pdd); Perf("(C)"); COLOR(15,0); PRINT(" Create LINKTO.BBS to recognize BBS\r\n"); + PRINT(Pdd); Perf("(D)"); COLOR(15,0); PRINT(" Setup other NODES for Time Port\r\n"); + PRINT(Pdd); Perf("(E)"); COLOR(7,0); PRINT(" Create .DAT and .TXT mandatory files\r\n"); + PRINT(Pdd); Perf("(F)"); COLOR(7,0); PRINT(" Reset the Player files - Start Over\r\n"); + PRINT(Pdd); Perf("(G)"); COLOR(8,0); PRINT(" Why should I spend $15 to register?\r\n"); + d = GetKey(7, 8); + switch (d) + { + case 0: + return; + case 2: + Menu3(); + break; + case 5: + clear(); + makeWeather(); + break; + case 3: + Menu2(); + break; + case 6: + PRINT("\r\n\r\n"); + COLOR(12, 0); + LOCATE(16, 1); + PRINT(" Are you POSITIVE you want to reset the game? (Y/N)"); + ch=ERR; + while(ch==ERR) + ch=getch(); + if(toupper(ch=='Y')) + ResetGame(); + break; + case 7: + WhyRegister(); + break; + case 4: + ViewEdit(); + break; + case 1: + EnterRegis(); + break; + } + } +} + +void Menu2(void) +{ + int d; + char str[256]; + + clear(); + PRINT("\r\n\r\n"); + PRINT(Center(str,"TIME PORT: Written by Mike Snyder")); + PRINT("\r\n"); + COLOR(14, 0); + PRINT(Center(str,"LINKTO.BBS Creation Menu")); + PRINT("\r\n"); + COLOR(8, 0); + PRINT(Center(str,"Use the UP and DOWN arrows to select and press [enter]")); + PRINT("\r\n"); + COLOR(10, 0); + PRINT("\r\n"); + PRINT(Center(str,"If your door file format is listed here, you will not need to worry")); + PRINT("\r\n"); + PRINT(Center(str,"about the format of the LINKTO.BBS file. This will be done for you.")); + PRINT("\r\n\r\n\r\n"); + + PRINT(Pdd); Perf("(A)"); COLOR(14,0); PRINT(" Link to WILDCAT door (Callinfo.Bbs)\r\n"); + PRINT(Pdd); Perf("(B)"); COLOR(14,0); PRINT(" Link to WWIV door (Chain.Txt)\r\n"); + PRINT(Pdd); Perf("(C)"); COLOR(14,0); PRINT(" Link to RBBS door (Dorinfo1.Def)\r\n"); + PRINT(Pdd); Perf("(D)"); COLOR(14,0); PRINT(" Link to Gap door (Door.Sys)\r\n"); + d = GetKey(4, 10); + + switch(d) + { + case 1: + MakeWildcat(); + return; + case 2: + MakeWwiv(); + return; + case 3: + MakeRbbs(); + return; + case 4: + MakeGap(); + return; + } + return; +} + +void Menu3(void) +{ + char str[256]; + char a[256]; + int d,t; + FILE *file; + FILE *file2; + + clear(); + COLOR(13, 0); + while(1) + { + clear(); + PRINT("\r\n\r\n"); + PRINT(Center(str,"TIME PORT: Written by Mike Snyder")); + PRINT("\r\n"); + COLOR(14, 0); + PRINT(Center(str,"SETUP.CFG Creation Menu")); + PRINT("\r\n"); + COLOR(8, 0); + PRINT(Center(str,"Use the UP and DOWN arrows to select and press [enter]")); + PRINT("\r\n"); + COLOR(4, 0); + + PRINT("\r\n\r\n"); + + PRINT(Pdd); Perf("(A)"); COLOR(14,0); PRINT(" Continue with creation of SETUP.CFG\r\n"); + d = GetKey(1, 7); + + if(d == 1) + break; + if(d == 0) + return; + } + + PRINT("\r\n\r\n"); + file=fopen("setup.cfg","w"); + + PRINT("\r\n"); + GetWord(a,"Path and name of Today's News", "./todays.txt"); + fprintf(file,"%-80.80s",a); + t = 0; + file2=fopen(a,"a"); + fclose(file2); + file2=fopen(a,"r"); + if(feof(file2)) + t=1; + fclose(file2); + if(t) + { + file2=fopen(a,"w"); + fputs("`%Time Port `7was installed on this system!\r\n\r\n",file2); + fclose(file2); + } + + PRINT("\r\n"); + GetWord(a,"Path and name of Yesterday's News", "./yester.txt"); + fprintf(file,"%-80.80s",a); + t = 0; + file2=fopen(a,"a"); + fclose(file2); + file2=fopen(a,"r"); + if(feof(file2)) + t=1; + fclose(file2); + if(t) + { + file2=fopen(a,"w"); + fputs("`4It was a bleak time indeed, before Time Port came to this system.\r\n\r\n",file2); + fclose(file2); + } + + PRINT("\r\n"); + GetWord(a,"Fights (turns) per day (10 - 25)", "20"); + if(atoi(a) < 10) + strcpy(a,"10"); + else if(atoi(a) > 25) + strcpy(a,"25"); + fprintf(file,"%-80.80s",a); + + PRINT("\r\n"); + GetWord(a,"Player Fights per day (1 - 3)", "1"); + if(atoi(a)<1) + strcpy(a,"1"); + else if(atoi(a)>3) + strcpy(a,"3"); + fprintf(file,"%-80.80s",a); +/* This was after the put command... perhaps this was broken? + PRINT #1, a$ */ + + PRINT("\r\n"); + GetWord(a,"Path to master node TIMEPORT directory", "/user/local/timeport/"); + + if(a[strlen(a)-1]!='/') + { + COLOR(4,0); + PRINT(" -=-=- "); + COLOR(12,0); + PRINT("Paths almost always end with a '\' symbol. Add it now? "); + COLOR(14,0); + PRINT("(Y/N)"); + str[0]=0; + str[1]=0; + while(str[0]!='Y' && str[0] !='N') + { + INKEY(str); + UCase(str); + if(toupper(str[0])=='Y') + { + strcat(a,"/"); + } + } + } + + fprintf(file,"%-80.80s",a); + fclose(file); + +} + +void Perf(char *a) +{ + COLOR(15,0); + addch(a[0]); + COLOR(12,0); + addch(a[1]); + COLOR(15,0); + addch(a[2]); +} + +void ResetGame(void) +{ + glob_t pglob; + int j; + + if(!glob("mail.*",GLOB_NOSORT,NULL,&pglob)) + { + for(j=0;j<pglob.gl_pathc;j++) + { + unlink(pglob.gl_pathv[j]); + } + } + globfree(&pglob); + if(!glob("invent.*",GLOB_NOSORT,NULL,&pglob)) + { + for(j=0;j<pglob.gl_pathc;j++) + { + unlink(pglob.gl_pathv[j]); + } + } + unlink("players.dat"); + unlink("namelist.dat"); + PRINT("\r\n"); + COLOR(5, 0); + PRINT(" Okay, boss, the deed was done!"); + sleep(2); +} + +void ViewEdit(void) +{ + char a1[256]; + char cc[256]; + char op[256]; + char Az1[256]; + char Az2[256]; + char Ptt1[256]; + char Ptt2[256]; + char Ro1[81]; + char Ro2[81]; + char Ro3[81]; + char Ro4[81]; + char Ro5[81]; + char str[256]; + char Cmd[256]; + char o[256]; + char *p; + int b,NodeNum,d; + FILE *file; + + clear(); + COLOR(2,0); + PRINT(" Okay, now comes an important part, which you can skip if you just have\r\n"); + PRINT(" a single-node BBS. The setup files for node 0 are LINKTO.BBS and\r\n"); + PRINT(" SETUP.CFG. Other nodes will have LINKTO.x and SETUP.x such\r\n"); + PRINT(" as LINKTO.4 and SETUP.4 for node #4. (Note: There will be NO\r\n"); + PRINT(" SETUP.0 or LINKTO.0, as the 0-node files are named .CFG and .BBS)\r\n"); + PRINT(" You also must call TIMEPORT with an Nx command, TIMEPORT N0 or\r\n"); + PRINT(" TIMEPORT N1 or TIMEPORT N18 and so on...\r\n"); + PRINT("\r\n"); + PRINT(" You can load any available node setup files now, and edit them if you\r\n"); + PRINT(" need, then save them as either the same node config, or another node\r\n"); + PRINT(" config. In this manner, you can rapidly duplicate your setup files\r\n"); + PRINT(" for each node, and change anything you need to for the configuration\r\n"); + PRINT(" of each node.\r\n"); + PRINT("\r\n"); + COLOR(12,0); + PRINT(" View/Edit configuration of which existing Node? (0-99): "); + op[0]=0; + input_line(op,sizeof(op)); + if(strlen(op) > 3) + return; + b = atoi(op); + if(b > 99 || b < 0) + return; + if(b) + { + sprintf(Az1,"linkto.%d",b); + sprintf(Az2,"setup.%d",b); + } + else + { + strcpy(Az1,"linktp.bbs"); + strcpy(Az2,"setup.cfg"); + } + + NodeNum = b; + +Chinky: + clear(); + + file=fopen(Az1,"r"); + readline(a1,sizeof(a1),file); // 'Path and name of drop file + readline(b1,sizeof(b1),file); + readline(c1,sizeof(c1),file); + readline(d1,sizeof(d1),file); + readline(e1,sizeof(e1),file); + readline(f1,sizeof(f1),file); + readline(Aee,sizeof(Aee),file); // 'n81 + readline(Bee,sizeof(Bee),file); // 'IRQ + readline(Cee,sizeof(Cee),file); // 'handshaking + readline(Dee,sizeof(Dee),file); // 'Locked? + readline(Fee,sizeof(Fee),file); // 'Vector release? + readline(Jee,sizeof(Jee),file); // 'Fossil + fclose(file); + + strcpy(Ptt1,a1); + p=strrchr(Ptt1,'/'); + if(p==NULL) + { + strcpy(Ptt2,Ptt1); + strcpy(Ptt1,"./"); + } + else + { + strcpy(Ptt2,p+1); + *(p+1)=0; + } + + file=fopen(Az2,"r"); + fread(Ro1,80,1,file); + Ro1[80]=0; + RTrim(Ro1); + fread(Ro2,80,1,file); + Ro2[80]=0; + RTrim(Ro2); + fread(Ro3,80,1,file); + Ro3[80]=0; + RTrim(Ro3); + fread(Ro4,80,1,file); + Ro4[80]=0; + RTrim(Ro4); + fread(Ro5,80,1,file); + Ro5[80]=0; + RTrim(Ro5); + fclose(file); + + clear(); // 'now display this info + COLOR(14,0); PRINT("------- "); COLOR(10,0); + sprintf(str,"NODE %d",NodeNum); + PRINT(str); + COLOR(14,0); + PRINT("-------\r\n\r\n"); + + COLOR(11,0); PRINT(" 1) "); COLOR(9,0); PRINT("Name and Path to TODAY'S news file:\r\n"); + COLOR(12,0); PRINT(" "); PRINT(Ro1); PRINT("\r\n"); + COLOR(11,0); PRINT(" 2) "); COLOR(9,0); PRINT("Name and Path to YESTERDAY'S news file:\r\n"); + COLOR(12,0); PRINT(" "); PRINT(Ro2); PRINT("\r\n"); + COLOR(11,0); PRINT(" 3) "); COLOR(9,0); PRINT("Maximum Mutant Fights per day (10-25): "); + COLOR(12,0); PRINT(Ro3); PRINT("\r\n"); + COLOR(11,0); PRINT(" 4) "); COLOR(9,0); PRINT("Maximum Player Fights per day (1-3): "); + COLOR(12,0); PRINT(Ro4); PRINT("\r\n"); + COLOR(11,0); PRINT(" 5) "); COLOR(9,0); PRINT("Full Path to MASTER T- Port Directory:\r\n"); + COLOR(12,0); PRINT(" "); PRINT(Ro5); PRINT("\r\n"); + COLOR(11,0); PRINT(" 6) "); COLOR(9,0); PRINT("Name of DROP file: "); + COLOR(12,0); PRINT(Ptt2); PRINT("\r\n"); + COLOR(11,0); PRINT(" 7) "); COLOR(9,0); PRINT("Path to the DROP file:\r\n"); + COLOR(12,0); PRINT(" "); PRINT(Ptt1); PRINT("\r\n"); + COLOR(11,0); PRINT(" 8) "); COLOR(9,0); PRINT("Modem Setup (such as N81, E71, etc...): "); + COLOR(12,0); PRINT(Aee); PRINT("\r\n"); + COLOR(11,0); PRINT(" 9) "); COLOR(9,0); PRINT("Handshaking (0=none,1=XON,XOFF,2=RTS,CTS,3=Both): "); + COLOR(12,0); PRINT(Cee); PRINT("\r\n"); + COLOR(11,0); PRINT("10) "); COLOR(9,0); PRINT("IRQ for this node (0=default for the port): "); + COLOR(12,0); PRINT(Bee); PRINT("\r\n"); + COLOR(11,0); PRINT("11) "); COLOR(9,0); PRINT("Com Port Locked or Speed pre-set? (1=Yes, 0=No): "); + COLOR(12,0); PRINT(Dee); PRINT("\r\n"); + COLOR(11,0); PRINT("12) "); COLOR(9,0); PRINT("Release Vectors upon Exit (1=Yes, 0=No) Note: Probably YES: "); + COLOR(12,0); PRINT(Fee); PRINT("\r\n"); + COLOR(11,0); PRINT("13) "); COLOR(9,0); PRINT("FOSSIL driver will be in use? (1=Yes, 0=No): "); + COLOR(12,0); PRINT(Jee); PRINT("\r\n"); + PRINT("\r\n"); + + LOCATE(21, 1); COLOR(15,0); + PRINT("1-13 "); + COLOR(10,0); + PRINT("= Change Option, "); + COLOR(15,0); PRINT("S "); + COLOR(10,0); PRINT("= Save as Node#, "); + COLOR(15,0); PRINT("L "); + COLOR(10,0); PRINT("= Load existing Node# "); + COLOR(15,0); PRINT("Q "); + COLOR(10,0); PRINT("= Quit/Abort\r\n"); + +Billz: + LOCATE(23, 1); COLOR(14,0); PRINT(" -==> "); + LOCATE(23, 7); Cmd[0]=0; input_line(Cmd,sizeof(Cmd)); + if(strlen(Cmd) > 3) + goto Billz; + d = atoi(Cmd); + UCase(Cmd); + if(d >= 1 && d <= 13) // 'change an option + { + COLOR(12,0); + if(d == 1) + { + LOCATE(4, 5); + strcpy(o, Ro1); + input_line(Ro1,sizeof(Ro1)); + if(Ro1[0] == 0) + strcpy(Ro1, o); + } + if(d == 2) + { + LOCATE(6, 5); + strcpy(o, Ro2); + input_line(Ro2,sizeof(Ro2)); + if(Ro2[0] == 0) + strcpy(Ro2, o); + } + if(d == 3) + { + LOCATE(7, 44); + strcpy(o, Ro3); + input_line(Ro3,sizeof(Ro3)); + if(Ro3[0] == 0) + strcpy(Ro3, o); + LOCATE(7, 44); + if(atoi(Ro3)<10) + strcpy(Ro3,"10 "); + if(atoi(Ro3) > 25) + strcpy(Ro3, "25 "); + PRINT(Ro3); + } + if(d == 4) + { + LOCATE(8, 42); + strcpy(o, Ro4); + input_line(Ro4,sizeof(Ro4)); + if(Ro4[0] == 0) + strcpy(Ro4, o); + LOCATE(8, 42); + if(atoi(Ro4) < 1) + strcpy(Ro4, "1 "); + if(atoi(Ro4) > 3) + strcpy(Ro4, "3 "); + PRINT(Ro4); + PRINT("\r\n"); + } + if(d== 5) + { + LOCATE(10, 5); + strcpy(o, Ro5); + input_line(Ro5,sizeof(Ro5)); + if(Ro5[0] == 0) + strcpy(Ro5, o); + } + if(d== 6) + { + LOCATE(11, 24); + strcpy(o, Ptt2); + input_line(Ptt2,sizeof(Ptt2)); + if(Ptt2[0] == 0) + strcpy(Ptt2, o); + } + if(d== 7) + { + LOCATE(13, 5); + strcpy(o, Ptt1); + input_line(Ptt1,sizeof(Ptt1)); + if(Ptt1[0] == 0) + strcpy(Ptt1, o); + } + if(d== 8) + { + LOCATE(14, 45); + strcpy(o, Aee); + input_line(Aee,sizeof(Aee)); + if(Aee[0] == 0) + strcpy(Aee, o); + } + if(d== 9) + { + LOCATE(15, 55); + strcpy(o, Cee); + input_line(Cee,sizeof(Cee)); + if(Cee[0] == 0) + strcpy(Cee, o); + } + if(d== 10) + { + LOCATE(16, 49); + strcpy(o, Bee); + input_line(Bee,sizeof(Bee)); + if(Bee[0] == 0) + strcpy(Bee, o); + } + if(d== 11) + { + LOCATE(17, 54); + strcpy(o, Dee); + input_line(Dee,sizeof(Dee)); + if(Dee[0] == 0) + strcpy(Dee, o); + } + if(d== 12) + { + LOCATE(18, 65); + strcpy(o, Fee); + input_line(Fee,sizeof(Fee)); + if(Fee[0] == 0) + strcpy(Fee, o); + } + if(d== 12) + { + LOCATE(19, 50); + strcpy(o, Jee); + input_line(Jee,sizeof(Jee)); + if(Jee[0] == 0) + strcpy(Jee, o); + } + goto Billz; + } + if(Cmd[0]=='Q') + return; + + if(Cmd[0]=='L') + { + LOCATE(23, 1); + PRINT(" View/Edit configuration of which existing Node? (0-99): "); + op[0]=0; + input_line(op,sizeof(op)); + if(strlen(op)>2) + return; + b = atoi(op); + if(b > 99 || b < 0) + return; + if(b) + { + sprintf(Az1,"linkto.%d",b); + sprintf(Az2,"setup.%d",b); + } + else + { + strcpy(Az1,"linktp.bbs"); + strcpy(Az2,"setup.cfg"); + } + NodeNum = b; + goto Chinky; + } + + + if(Cmd[0]=='S') // 'save to a node + { + LOCATE(23, 1); + COLOR(13,0); PRINT("Save this information as which Node? (0-99) <enter> alone = cancel: "); + COLOR(12,0); cc[0]=0; input_line(cc,strlen(cc)); + if(strlen(cc)>2) + goto Billz; + if(cc[0]==0) + goto Billz; + d = atoi(cc); + if(d < 0 || d > 99) + goto Billz; + if(d) + { + sprintf(Az1,"linkto.%d",d); + sprintf(Az2,"setup.%d",d); + } + else + { + strcpy(Az1,"linktp.bbs"); + strcpy(Az2,"setup.cfg"); + } + GetLinkNums(Ptt2); + file=fopen(Az1,"w"); + fprintf(file,"%s%s\r\n",Ptt1,Ptt2); // 'Path and name of drop file + fprintf(file,"%s\r\n", b1); + fprintf(file,"%s\r\n", c1); + fprintf(file,"%s\r\n", d1); + fprintf(file,"%s\r\n", e1); + fprintf(file,"%s\r\n", f1); + fprintf(file,"%s\r\n", Aee); // 'n81 + fprintf(file,"%s\r\n", Bee); // 'handshaking + fprintf(file,"%s\r\n", Cee); // 'IRQ + fprintf(file,"%s\r\n", Dee); // 'Locked? + fprintf(file,"%s\r\n", Fee); // 'Vector release? + fprintf(file,"%s\r\n", Jee); // 'Fossil + fclose(file); + file=fopen(Az2,"w"); + fprintf(file,"%-80.80s",Ro1); + fprintf(file,"%-80.80s",Ro2); + fprintf(file,"%-80.80s",Ro3); + fprintf(file,"%-80.80s",Ro4); + fprintf(file,"%-80.80s",Ro5); + fclose(file); + NodeNum = d; + goto Chinky; + } +} + +void waiter(void) +{ + char str[256]; + int key; + +/* FOR x = 1 TO 15 + a$ = INKEY$ + NEXT*/ + + COLOR(12, 0); + PRINT(Center(str,"Press <enter> to continue")); + PRINT("\r\n"); + + while(1) + { + key=getch(); + if(key == '\n' || key =='\r') + return; + } +} + +void WasCreated(void) +{ + COLOR(14,0); + PRINT(" A new LINKTO.BBS has now been created.\r\n"); + waiter(); +} + +void WhyRegister(void) +{ + char str[256]; + + clear(); + COLOR(12,0); + PRINT("\r\n"); + PRINT(Center(str,"Why Should I, or anyone else, register Time Port?")); + PRINT("\r\n\r\n\r\n"); + COLOR(15,0); PRINT(" 1) "); + COLOR(11,0); PRINT("Only registered users receive Time Port tech support from HCI\r\n"); + COLOR(15,0); PRINT(" 2) "); + COLOR(11,0); PRINT("Players can only reach Skill Level 5 when unregistered\r\n"); + COLOR(15,0); PRINT(" 3) "); + COLOR(11,0); PRINT("When the highest Skill Level is just 5, the game is unwinnable\r\n"); + COLOR(15,0); PRINT(" 4) "); + COLOR(11,0); PRINT("After registered, Players get a 10% return on stashed money\r\n"); + COLOR(15,0); PRINT(" 5) "); + COLOR(11,0); PRINT("The cost of registration is cheap: Just $15...\r\n"); + COLOR(15,0); PRINT(" 6) "); + COLOR(11,0); PRINT("Time Port will be updated frequently... new stuff, new modules..\r\n"); + COLOR(15,0); PRINT(" 7) "); + COLOR(11,0); PRINT("Just register once, you'll be registered for EVERY new version\r\n"); + COLOR(15,0); PRINT(" 8) "); + COLOR(11,0); PRINT("Everyone can see your name as 'Registered To.'\r\n"); + COLOR(15,0); PRINT(" 9) "); + COLOR(11,0); PRINT("In a registered game, players can change their names.\r\n"); + COLOR(15,0); PRINT(" 10) "); + COLOR(11,0); PRINT("Players can put hits out on other players... a very cool option.\r\n"); + COLOR(15,0); PRINT(" 11) "); + COLOR(11,0); PRINT("Most importantly, the players will appreciate your kindness\r\n"); + PRINT("\r\n"); + + COLOR(9,0); waiter(); +} diff --git a/src/doors/timeport/instruct.doc b/src/doors/timeport/instruct.doc new file mode 100644 index 0000000000000000000000000000000000000000..282bf0a9aeee40eeadea2bd5e39c955b65a7db81 --- /dev/null +++ b/src/doors/timeport/instruct.doc @@ -0,0 +1,28 @@ +`0 First of all, I'm not an artist. So if my Room screens bug you or you +`0 would just rather not see them, the global command "X" during the game +`0 will toggle the room ANSI's on and off. + +`2 The story is simple. You were minding your own business one day and +`2 suddenly found yourself in the distant future, in a Hanger where you +`2 could travel to the past. You aren't alone, many other recruits are +`2 here also. + +* +`2 The object of the game is to survive and progress. This is really very +`2 self-explanatory. You can kill mutants to gain money and experience, and +`2 you can even kill each other. + +`2 Be sure to use the [I]nventory global command. This is how you heal +`2 yourself, once you buy a Health Crystal. As this game expands, your +`2 inventory will become increasingly important as the amount of items you +`2 have access to will increase. + +* +`3 Note: This game is "complete" in the fact that aside from any bugs that +`3 might exist, you should be able to win the game (after your Sysop sends +`3 the Registration fee). However, I hope to expand it very soon, add more +`3 features and options, then begin on IGM's (whole new time periods). In +`3 addition to the Times built-in, an Unregistered Time Port will support up +`3 to 3 more IGM's. When registered, the game will read up to 26 of them. + +* diff --git a/src/doors/timeport/makemod.c b/src/doors/timeport/makemod.c new file mode 100644 index 0000000000000000000000000000000000000000..97eeb43587b406da39647aa8f7d3063d8ce5b98a --- /dev/null +++ b/src/doors/timeport/makemod.c @@ -0,0 +1,184 @@ +#include <string.h> +#include "doors.h" +#include "tplib.h" + +# // ' ***** MakeMod Module ***** +int main(int argc, char **argv) +{ + FILE *file; + + Ocls(); + SetColor(13, 0, 0); + Oprint(" ------------------\r\n"); + Oprint(" MAKEMOD.EXE Active\r\n"); + Oprint(" Building DataFiles\r\n"); + Oprint(" ------------------\r\n"); + + file=SharedOpen("items.dat","w",LOCK_EX); + +/* + '***************************** DATA DEFINITIONS ********************** + 'Description(20) + 'Buy Cost(8) + 'Num(3) + '.2345678901234567890.2345678.01.345.7890123456789 +*/ + fputs("Healing Crystal 5 1 ",file); + fputs("Sturdy Stick 100 2 ",file); + fputs("Nylon String 100 3 ",file); + fputs("Sharp, Bent Nail 100 4 ",file); + fputs("Fishing Pole 0 5 ",file); + fputs("Fresh Fish 0 6 ",file); + fputs("Shovel 5000 7 ",file); + fputs("Lock Picks 2000 8 ",file); + fputs("Diamond 250000 9 ",file); + fputs("Huge Board 0 10 ",file); + fputs("Long Feather 0 11 ",file); + fputs("Light Fabric 0 12 ",file); + fputs("Huge Wings 0 13 ",file); + SetColor(12, 0,0); + fclose(file); + Oprint(" -- ITEMS.DAT --\r\n"); + + + file=SharedOpen("deaths.txt","w",LOCK_EX); + fputs("22\r\n",file); + fputs("`$*1 yells out in anguish!\r\n",file); + fputs("`$*2 is very pleased with the outcome.\r\n",file); + fputs("`$*1 dies without uttering a word.\r\n",file); + fputs("`@'I bet you want to be just like me,' says *2 to *1.\r\n",file); + fputs("`@'It wasn't even a challenge,' comments *2.\r\n",file); + fputs("`#'*1 is so weak,' taunts *2.\r\n",file); + fputs("`#'Let's fight again when you aren't such a wimp!' states *2.\r\n",file); + fputs("`#*1 tries to trip *2 on the way to the ground.\r\n",file); + fputs("`#'Yes, I'm a sore loser,' states *1. 'I'll have my revenge!'\r\n",file); + fputs("`@*2 almost feels guilty... but gets over it quickly.\r\n",file); + fputs("`@'It was my pleasure, *1,' says *2 smugly.\r\n",file); + fputs("`4'You'll pay for that, *2,' grunts *1.\r\n",file); + fputs("`4'You cheated somehow, *2,' says *1 in denial.\r\n",file); + fputs("`4'Life isn't very fair,' *1 comments.\r\n",file); + fputs("`@*2 kicks *1 again for good measure\r\n",file); + fputs("`2*2 laughs at *1's unfortunate demise.\r\n",file); + fputs("`6*1 is in shock; 'I thought I was the best!'\r\n",file); + fputs("`4'I almost had you,' says *1 to *2\r\n",file); + fputs("`5*1 is humiliated; `#'Don't ever come near me again, *2!'\r\n",file); + fputs("`5'I feel pretty worthless right now,' *1 comments.\r\n",file); + fputs("`2'I was having such a great day before this!' grunts *1.\r\n",file); + fputs("`2'You should be ashamed for that, *2,' *1 whines.\r\n",file); + fclose(file); + Oprint(" -- DEATHS.TXT --\r\n"); + + file=SharedOpen("daily.txt","w",LOCK_EX); + fputs("9\r\n",file); + fputs("`@A temporal shockwave came from a 1943 Bermuda Triangle accident.\r\n",file); + fputs("`@The autograph of Christopher Columbus was obtained today.\r\n",file); + fputs("`@A Time Traveler introduced Small Pox to the Aztecs, but was killed by Cortez.\r\n",file); + fputs("`@A Traveler went to Ancient Greece last week but has yet to return.\r\n",file); + fputs("`@Two Time Travelers were killed by dinosaurs eons ago, today.\r\n",file); + fputs("`@Airplane designs were smuggled to the Wright Brothers today.\r\n",file); + fputs("`@Zagala Benvora killed a Time Traver during WW4 today.\r\n",file); + fputs("`@A Time Traveler inspired King Henry to start a school for sailors today.\r\n",file); + fputs("`0Evidence that aliens built the Egyptian Pyramids was uncovered today.\r\n",file); + fclose(file); + Oprint(" -- DAILY.TXT --\r\n"); + + file=SharedOpen("mutants.1","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Brown-Eyed Blob\r\n",file); + fputs("Jhengo Warrior\r\n",file); + fputs("Mutant Bird\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.1 --\r\n"); + + file=SharedOpen("mutants.2","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Green-Eyed Blob\r\n",file); + fputs("Mutant Rat\r\n",file); + fputs("Toy Cyborg\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.2 --\r\n"); + + file=SharedOpen("mutants.3","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Blue-Eyed Blob\r\n",file); + fputs("Six-Toed Blob\r\n",file); + fputs("Deformo\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.3 --\r\n"); + + file=SharedOpen("mutants.4","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Flying Phantom\r\n",file); + fputs("Golden Robot\r\n",file); + fputs("Deformo's Twin\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.4 --\r\n"); + + file=SharedOpen("mutants.5","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Two-Headed Rat\r\n",file); + fputs("Slobbering Fool\r\n",file); + fputs("White Specter\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.5 --\r\n"); + + file=SharedOpen("mutants.6","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Twisted Tarzan\r\n",file); + fputs("Radioactive Child\r\n",file); + fputs("Two-Headed Dog\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.6 --\r\n"); + + file=SharedOpen("mutants.7","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Radioactive Mutant\r\n",file); + fputs("Two-Headed Chimp\r\n",file); + fputs("Power Thrower\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.7 --\r\n"); + + file=SharedOpen("mutants.8","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Mutated Maggot\r\n",file); + fputs("Mutated Worm\r\n",file); + fputs("Two-Headed Beast\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.8 --\r\n"); + + file=SharedOpen("mutants.9","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Evil-Eyed Cyborg\r\n",file); + fputs("Cyclops Cyborg\r\n",file); + fputs("Radioactive Blog\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.9 --\r\n"); + + file=SharedOpen("mutants.10","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Mutant Roach\r\n",file); + fputs("Mutant Punk Rocker\r\n",file); + fputs("Mutant Repairman\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.10 --\r\n"); + + file=SharedOpen("mutants.11","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Mutated Disease\r\n",file); + fputs("Mutated Cyborg\r\n",file); + fputs("Siamese Mutants\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.11 --\r\n"); + + file=SharedOpen("mutants.12","w",LOCK_EX); + fputs("3\r\n",file); + fputs("Ultimate Demon\r\n",file); + fputs("Super Mutant\r\n",file); + fputs("Living Paradox\r\n",file); + fclose(file); + Oprint(" -- MUTANTS.12 --\r\n"); + return(0); +} + +void UseItem(long c,short b) {} +void SaveGame(void) {} diff --git a/src/doors/timeport/outside.c b/src/doors/timeport/outside.c new file mode 100644 index 0000000000000000000000000000000000000000..1da9fb5206f1a8eb5d4b93a6e893e94554749bf9 --- /dev/null +++ b/src/doors/timeport/outside.c @@ -0,0 +1,817 @@ +#include <sys/time.h> +#include <stdlib.h> +#include <signal.h> +#include "doors.h" +#include "tplib.h" + +short Room; +char MonsterName[256]; +short Mhp; +short Monlev1, Monlev2, Monlev3; +short MaxTitleScreens; +short IsDead; + +short GetResponse(long l); +void ShowRoom(long l); + +void SaveTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%ld\r\n",MinsLeft); + fprintf(file,"%ld\r\n",SecsLeft); + fclose(file); +} + +void Quitter(void) +{ + SaveTime(); + ExitGame(); +} + +void LessTime(int sig) +{ + SecsLeft = SecsLeft - 1; + if(SecsLeft < 0) + { + SecsLeft = 59; + MinsLeft = MinsLeft - 1; + } + if(PlayingNow <= 0) + return; + if(MinsLeft < 1) + { + Oprint("`%\r\n\r\n"); + Oprint("Your time is up, man!\r\n"); + Quitter(); + exit(0); + } +} + +void LoadTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[256]; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"r",LOCK_SH); + readline(line,sizeof(line), file); + RTrim(line); + MinsLeft=atoi(line); + readline(line,sizeof(line), file); + RTrim(line); + SecsLeft=atoi(line); + fclose(file); +} + +int main(int argc, char **argv) +{ + struct itimerval it; + int x; + short a; + + ParseCmdLine(argc,argv); + srandomdev(); + MaxTitleScreens = 7; + + strcpy(Alias, "Who is it?"); + StatsIn = 0; + Playercount = 0; + ReadLinkTo(); // 'initialize the modem + ReadConfig(); // 'get default configuartion information + LoadTime(); + + signal(SIGALRM, LessTime); + it.it_interval.tv_sec=1; + it.it_interval.tv_usec=1; + it.it_value.tv_sec=1; + it.it_value.tv_usec=1; + setitimer(ITIMER_REAL, &it, NULL); + + IsDead = 0; + ChatEnabled = 0; + + PlayingNow = 1; + + // 'Is this a new player? + IsHeNew(Alias); + LoadGame(); + NotAgain[12]='+'; + StatsIn = 1; + SaveGame(); + OpenInventory(); + + Ocls(); + // 'set opening "variables" + for(x=1;x<argc;x++) + { + if(argv[x][0]=='R') + { + Room=atoi(argv[x]+1); + break; + } + } + if(Room != 4) + Quitter(); + + // '**** begin the REPEATER code + x=1; + while(1) + { + if(x) + { + Ocls(); + ShowRoom(Room); + } + a = GetResponse(Room); + SaveGame(); + if(Hit < 1) + { + NotAgain[1] = '^'; + Oprint("\r\n`6 Searing pain tortures you as your life ends!\r\n"); + Paus(2); + Quitter(); + } + if(a == -2) + { + x=0; + continue; + } + if(a == -1) + { + x=1; + continue; + } + if(a==101) + Quitter(); + if(a >= 1 && a<= 99) + { + Room=a; + x=1; + continue; + } + Oprint("`@The command you typed is invalid. Read the menu.\r\n"); + x=0; + } + Quitter(); + return(0); +} + +short GetResponse(long l) +{ + long Ap1, pp1, x1, x2, gg1, Gld, Ap2, Va; + float Arf, Ar2, d, b; + short a, c, Tx; + int t; + char str[256]; + char str2[256]; + char v[2]; + short B1,Tmp,Pet; + char b2[4], b3[4], b4, b5[5]; + + t = 0; + if(l == 8) + { + sprintf(str,"`8:`7:`%%:`5 The `@%s`5 Has`# %d`5 Hit Points at level`# %d`5.\r\n",MonsterName, Mhp, Monlev3); + Oprint(str); + } + GetCommand(v); + v[1]=0; + Oprint("\r\n"); + // 'Figure out what section to switch to based upon 'L' room and v$ response + + if(v[0]=='?') + return(-1); + if(v[0]=='I' && l != 8 && l != 13 && l != 14) + { + Inventory(); + return(-1); + } + if(v[0]=='V') + { + ViewStats(); + return(-1); + } + if(v[0] == 'X') // 'toggle ansi/ascii + { + if(NotAgain[14]==' ') + NotAgain[14] = '|'; + else + NotAgain[14]=' '; + return(-1); + } + + if(l==4) + { + if(v[0]=='R') + t = 101; + if(v[0]=='S') + t = 7; + if(v[0]=='L') + { + if(ClosFight <= 0) + { + Oprint("You have no Hours remaining...\r\n"); + return(-2); + } + else + { + t = 8; + Monlev3 = 0; + ClosFight--; + Monlev1 = random()%Level+random()%3; + Monlev2 = Monlev1 + random()%3 -1; + if(random()%2 == 1) + { + Monlev1 = Level; + Monlev2 = Level; + } + if(Level <= 2) + { + Monlev1 = Level; + Monlev2 = Level; + } + if(Monlev1 < 1) + Monlev1 = 1; + else + if(Monlev1 > 12) + Monlev1 = 12; + if(Monlev2 < 1) + Monlev2 = 1; + else + if(Monlev2 > 12) + Monlev2 = 12; + sprintf(str,"mutants.%d",Monlev1); + PickRandom(MonsterName,str); + Mhp = GetMonHp(Monlev1, .25, 1); + Monlev3 = Monlev1; + } + } + } + + if(l == 7) + { + if(v[0]=='N') + t = 4; + if(v[0]=='S') + t = 9; + if(v[0] == 'E') // 'examine the water + { + if(NotAgain[4]==' ') + { + Oprint("`2 Don't worry about the water now. Try again tomorrow.\r\n"); + return(-2); + } + NotAgain[4]='('; + if((random()%7+1)!=3) + { + Oprint("`@ You see your reflection. "); + Oprint(sex[0]=='M'?"Quite a handsome fellow, you decide.":"Quite a gorgeous woman, you decide."); + return(-2); + } + // 'otherwise... okay, you got something to happen. + Oprint("`0 The water flickers, flashes, and you feel the day grow longer.\r\n"); + ClosFight += random()%3+3; + t = -2; + } + } + + if(l == 9) + { + if(v[0] == 'N') + t = 7; + if(v[0] == 'D') + t = 10; + if(v[0] == 'W') + t = 11; + if(v[0] == 'O') + t = 12; + if(v[0]=='E') + { + if(Level < 12) + { + Oprint("`@ You are not yet prepared to enter that building. But you will be one day.\r\n"); + return(-2); + } + if(Exp < 12000000) + { + Oprint("`2 The door budges a little, but the voices of the hosts warn you to gain\r\n"); + Oprint("`2 a bit more experience before you will be ready to return home.\r\n"); + return(-2); + } + // 'Otherwiese, you can go in + Ocls(); + DisplayTitle("ending11.ans"); + B1=PlayKill; + Mid(b2, NotAgain, 7, 3); + Mid(b3, NotAgain, 16, 3); + b4=NotAgain[10]; + strcpy(b5,CurCode); + InitPlayer(); + NotAgain[12]='Y'; + PlayKill = B1; + NotAgain[6]=b2[0]; + NotAgain[7]=b2[1]; + NotAgain[8]=b2[2]; + NotAgain[15]=b3[0]; + NotAgain[16]=b3[1]; + NotAgain[17]=b3[2]; + strcpy(CurCode,b5); + b4++; + if(b4>'9') + b4='1'; + NotAgain[10]=b4; + SaveGame(); + sprintf(str,"`%%%s `%%Was allowed to return home today after meeting the Hosts.",Alias); + WriteNews(str, 1); + PressAnyKey(); + Ocls(); + DisplayTitle("ending2.ans"); + PressAnyKey(); + Ocls(); + DisplayText("ending.txt"); + t = 101; + } + } + + if(l == 8) // 'fighting one of the monsters + { + if(v[0]=='R') + { + Oprint("\r\n`6 In fear of your life, you make your retreat from the group of mutants.\r\n\r\n"); + PressAnyKey(); + t = 4; + } + if(v[0]=='A') + { + Arf = .5; + Ar2 = 1; + b = .7; + d = .5; + a = Level - Monlev3 + 1; + if(a < 0) + a = 0; + c = Monlev3 - Level + 1; + if(c < 0) + c = 0; + Ap1 = WeaponAdd[WepNum(Weapon)]; + gg1 = GetValue(DefenseAdd[Monlev2], Arf, Ar2); + b = b + (.5 * a); + Ap1 = Ap1 * b; + d = d + (.5 * c); + gg1 = gg1 * d; + x1 = GetHitLev(Ap1, gg1, .75, 1); +// ' ^Pwp ^Mdf + if(Weapon == '0') + x1 = x1 / 2; + b = 1; + d = 1; + a = Level - Monlev3 + 1; + if(a < 0) + a = 0; + c = Monlev3 - Level + 1; + if(c < 0) + c = 0; + Ap2 = DefenseAdd[WepNum(Defense)]; + pp1 = GetValue(WeaponAdd[Monlev1], Arf, Ar2); + b = b + (.5 * a); + Ap2 = Ap2 * b; + d = d + (.5 * c); + pp1 = pp1 * d; + x2 = GetHitLev(pp1, Ap2, .75, 1); +// ' ^Mwp ^Pdf + if(x1 <= 0) + { + Oprint("`8:`7:`%: `2You Miss `0"); + Oprint(MonsterName); + Oprint("`2 Completely!\r\n"); + } + if(x1 > 0) + { + sprintf(str,"\r\n`8:`7:`%%: `2You attack %s For `@%ld`2 damage!\r\n",MonsterName,x1); + Oprint(str); + } + Mhp = Mhp - x1; + t = -2; + if(Mhp <= 0) + { + Oprint("`8:`7:`%: `2You have killed "); + Oprint(MonsterName); + Oprint(" `4!!!\r\n\r\n"); + if(Monlev1 < 0) + Monlev1 = 0; + if(Monlev1 > 12) + Monlev1 = 12; + Gld = GetValue(GoldFromEach[Monlev1], .9, 1); + pp1 = GetValue(ExpFromEach[Monlev1], .8, 1); + sprintf(str,"`6You find`$ %ld`6 Morph Credits.\r\n",Gld); + Oprint(str); + sprintf(str,"`6You gain`$ %ld`6 Experience.\r\n",pp1); + Oprint(str); + Money += Gld; + Exp += pp1; + t = 4; + PressAnyKey(); + } + if(Mhp > 0) + { + if(x2 <= 0) + { + Oprint("`0"); + Oprint(MonsterName); + Oprint(" What is this line?\r\n"); + } + if(x2 > 0) + { + sprintf(str,"`8:`7:`%%: `0%s`2 hits you for`@ %ld`2 damage!\r\n",MonsterName,x2); + Oprint(str); + Hit -= x2; + if(Hit < 1) // 'player has been killed + { + Oprint("\r\n"); + Oprint("`5 You have been `#killed `5by "); + Oprint(MonsterName); + Oprint(".\r\n"); + Oprint("`2 10% experience lost\r\n"); + Oprint("`2 Half of On-hand Morph Credits lost.\r\n"); + sprintf(str,"`!%s `3was killed by `!%s", Alias, MonsterName); + WriteNews(str, 0); + Gld = Money / 2; + pp1 = Exp / 10; // 'you lose 10% of your experience if you lose + Money -= Gld; + if(Money < 0) + Money = 0; + Exp -= pp1; + Tmp = Level; + Pet = FindTheLevel(Exp); + if(Pet <= Level) + Level = Pet; + if(Level < Tmp) + { + sprintf(str,"`0%s`2 was knocked`0 DOWN`2 to level %d!",Alias, Level); + WriteNews(str, 0); + } + PickRandom(str, "deaths.txt"); + d = TalkToPress(); + if(d == 0) + { + FixTheString(str2,str,Alias,MonsterName); + WriteNews(str2, 1); + } + } + // 'Exit from this loop and if Player is dead... it exits + } + } + } + } + + if(l == 11) + { + if(v[0] == 'B') + t = 14; + if(v[0] == 'R') + t = 9; + if(v[0] == 'S' && Weapon == '0') + { + Oprint("`@ You don't have a weapon to sell.\r\n"); + t = -2; + } + if(v[0] == 'S' && Weapon != '0') + { + t = -2; + Oprint("`@ 'I can pay you half of what it's worth to me,' Bleep says.\r\n"); + Tx = WepNum(Weapon); + Va = WepCost[Tx] / 2; + sprintf(str,"`4He offers you %ld Morph Credits for your %s. Accept? (Y/N) ",Va, WepName[Tx]); + Oprint(str); + SetColor(12, 0, 0); + Owait(str); + UCase(str); + Oprint("\r\n"); + if(str[0]=='Y') + { + sprintf(str,"`!'Here are %ld Morph Credits,' says Bleep.\r\n",Va); + Oprint(str); + Money+= Va; + Weapon = '0'; + } + else + Oprint("`2 You decide to keep your weapon.\r\n"); + } + } + + if(l == 10) + { + if(v[0]=='B') + t=13; + if(v[0]=='R') + t=9; + if(v[0] == 'S' && Defense == '0') + { + Oprint("`@ You don't have a Defense right now..."); + t = -2; + } + if(v[0] == 'S' && Defense != '0') + { + t = -2; + Oprint("\r\n\r\n"); + Oprint("`@ 'I am willing to pay you half for your Defensive item... Agreed?'\r\n"); + Tx = WepNum(Defense); + Va = WepCost[Tx] / 2; + sprintf(str,"`4He offers you %ld Morph Credits for your %s. Accept? (Y/N) ",Va,DefName[Tx]); + Oprint(str); + SetColor(12, 0, 0); + Owait(str); + UCase(str); + Oprint("\r\n"); + if(str[0] == 'Y') + { + sprintf(str,"`!'Here are %ld Morth Credits,' says Bleep.\r\n",Va); + Oprint(str); + Money += Va; + Defense = '0'; + } + else + Oprint("`2 You decide to keep your Defense\r\n"); + } + } + + + if(l == 13 || l == 14) + { + if(v[0] == 'Q' && l == 13) + return(10); + if(v[0] == 'Q' && l == 14) + return(11); + if(v[0] < 'A' || v[0] > 'L') + return(0); + pp1 = WepCost[WepNum(v[0])]; + gg1 = Money; + if(pp1 > gg1) + { + if(l == 13) + Oprint("`6 'You can't afford it' says Blip\r\n"); + if(l == 14) + Oprint("`6 'You can't afford it' says Bleep\r\n"); + return(-2); + } + if(l == 13 && Defense != '0') + { + Oprint("`6 You already have a defense.\r\n"); + return(-2); + } + if(l == 14 && Weapon != '0') + { + Oprint("`6 You already have a weapon.\r\n"); + return(-2); + } + if(l == 14) + Weapon = v[0]; + else + Defense = v[0]; + Oprint("`! 'Sincere Thanks,' says "); + Oprint(l==14?"Bleep":"Blip"); + Oprint(" as you pay for it.\r\n\r\n"); + gg1 = gg1 - pp1; + Money = gg1; + PressAnyKey(); + if(l == 13) + t = 10; + else + t = 11; + } + + if(l == 12) + { + t = BuyStuff(v, "`2 Fred shakes his metal head and reminds you not to waste his time."); + if(t == -99) + t = 9; // 'that's the code for "exit from this room." :) + } + return(t); +} + +void ListWeps(short e) +{ + int x; + char str[256]; + strcpy(Prompt, "ABCDEFGHIJKLQ"); + for(x=1;x<=12;x++) + { + sprintf(str,"`7 (`!%c`8) ",64+x); + Oprint(str); + sprintf(str,"`@%8ld:",WepCost[x]); + Oprint(str); + if(e == 1) + sprintf(str,"`0 %s\r\n",WepName[x]); + else + sprintf(str,"`0 %s\r\n",DefName[x]); + Oprint(str); + } +} + +void SaveGame(void) +{ + // 'put any "save the game" data into this routine + if(Hit < 0) + Hit=0; + if(StatsIn > 0) + SaveStats(Alias, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, ExeLine, ComLine, LineRest); +} + +void ShowRoom(long l) +{ + char str[256]; + + // 'code to print "headers" + Oprint("`!T`3ime `!P`3ort `8Version `7"); + Oprint(Version); + Oprint(" -- `7Location: "); + if(l == 4) + Oprint("`%Outside the Hanger\r\n"); + if(l == 7) + Oprint("`%Near a Tall Building\r\n"); + if(l == 8) + Oprint("`%Fighting Mutants\r\n"); + if(l == 9) + Oprint("`%With the Robots\r\n"); + if(l == 10) + Oprint("`%Talking to Blip\r\n"); + if(l == 11) + Oprint("`%Talking to Bleep\r\n"); + if(l == 12) + Oprint("`%Buying from Fred\r\n"); + if(l == 13) + Oprint("`%Buying from Blip\r\n"); + if(l == 14) + Oprint("`%Buying from Bleep\r\n"); + + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l != 13 && l != 14) + { + sprintf(str, "room%ld.%s", l, NotAgain[14]==' '?"ans":"asc"); + DisplayTitle(str); + } + + if(l == 4) // 'outside the hanger + { + strcpy(Prompt, "RLS"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%R`8)`@eturn to the Hanger "); + Oprint("`7 (`!L`8)`3ook around a while\r\n"); + Oprint("`7 (`!S`8)`3outh, away from the Hanger "); + } + + if(l == 7) // 'outside a building + { + strcpy(Prompt, "SEN"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%N`8)`@orth, toward the hanger "); + Oprint("`7 (`!E`8)`3xamine the water\r\n"); + Oprint("`7 (`!S`8)`3outh, closer to the building "); + } + + if(l == 9) // 'outside with Blip, Bleep, and Bloop + { + strcpy(Prompt, "WESDN"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%N`8)`@orth, away from the building "); + Oprint("`7 (`!W`8)`3eapons with Bleep\r\n"); + Oprint("`7 (`!D`8)`3efenses with Blip "); + Oprint("`7 (`!O`8)`3ther Items with Fred\r\n"); + Oprint("`7 (`!E`8)`3nter the building "); + } + + if(l == 8) //'fighting mutants + { + strcpy(Prompt, "RA"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`!A`8)`3ttack the Mutant "); + Oprint("`7 (`%R`8)`@un from the Attacker "); + sprintf(str,"`6 (`2%d`6 Hours remaining)\r\n",ClosFight); + Oprint(str); + } + + if(l == 10 || l == 11) //'Talking to Blip the Defense dealer (Bloop) + { + strcpy(Prompt, "BSR"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l == 10) + Oprint("`7 (`!B`8)`3uy a Defense `7 (`!S`8)`3ell your Defense `7 (`%R`8)`@eturn\r\n"); + if(l == 11) + Oprint("`7 (`!B`8)`3uy a Weapon `7 (`!S`8)`3ell your Weapon `7 (`%R`8)`@eturn\r\n"); + } + + if(l == 13) + { + Oprint("`5 Blip motions toward an obscure area around the building to show you\r\n"); + Oprint("`5 the array of defensive items he has for sale.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + ListWeps(0); + } + + if(l == 14) + { + Oprint("`5 Bleep prompts you to follow him to a little spot around the building\r\n"); + Oprint("`5 where he proudly displaces his selection of weapons.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + ListWeps(1); + } + + if(l == 12) + { + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + sprintf(str,"1 %c ",LineRest[0]); + LoadItems(str); + strcpy(Prompt, "210"); + ListItems(1); + } + + if(l != 8 && l != 12 && l != 10 && l != 11 && l != 12 && l != 13 && l != 14) + Oprint("`7 (`$?`8)`3Re-List menu options\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l != 8) + { + sprintf(str,"`2 You have `0%ld`2 Morph Credits on hand, and `0%ld`2 in the Time Bank.\r\n",Money,Stash); + Oprint(str); + } +} + +void UseItem(long c, short b) // 'c=1-8 item number, b=the item code (1-???) +{ + long x1; + int x; + char str[256]; + + if(b == 13) + { + Oprint("`0 You can't fly from here..."); + return; + } + + if(b == 7) // 'trying to use a shovel + { + if(LineRest[11]!=' ') + { + Oprint("`2 You've already tried to dig today. Try again tomorrow.\r\n"); + return; + } + LineRest[11]='?'; + if(random()%2) + { + Oprint("`2 You dig here but don't find anything worth while.\r\n"); + return; + } + x = random()%3+1; + if(x == 1) + { + Oprint("`0 You dig for a while, and unearth a Long Board\r\n"); + SaveInvItem(c, "Long Board", 0, 10); + } + if(x == 2) + { + Oprint("`0 Your digging turns up a Huge Feather.\r\n"); + SaveInvItem(c, "Huge Feather", 0, 11); + } + if(x == 3) + { + Oprint("`0 You dig around and find some Light Fabric.\r\n"); + SaveInvItem(c, "Light Fabric", 0, 12); + } + Oprint("`2 You discard the shovel and keep your newfound treasure.\r\n"); + return; + } + + if(inv[c][2] == 5 && Room == 7) // 'you have the fishing pole & use it + { + Oprint("`2 You cast out into the murky pool of water and hope to catch a fish.\r\n"); + if(NotAgain[11]!=' ') + { + Oprint("`2 You get a few nibbles, but aren't able to catch anything.\r\n"); + return; + } + NotAgain[11]='@'; + x = random()%4+1; + if(x != 1) // 'catch some money + { + x1 = GetValue(GoldFromEach[Level] * 3, .25, .75); + sprintf(str,"`0 You snag a credit disc worth %ld Morph Credits!\r\n",x1); + Oprint(str); + Money += x1; + return; + } + Oprint("`! You feel a strong tug on the line, and you pull out a large, frisky fish.\r\n"); + Oprint("`3 Unfortunately, in the struggle to hold on to the fish, you loose your pole.\r\n"); + SaveInvItem(c, "Fresh Fish", 0, 6); + sprintf(str,"`@%s`6 caught a fish in a pool outside the Hanger.",Alias); + WriteNews(str, 1); + return; + } + Oprint("`2 You find no use for that item here at this time.\r\n"); + + // 'SaveInvItem c%, "-------------------", 0, 0 +} + diff --git a/src/doors/timeport/outside.h b/src/doors/timeport/outside.h new file mode 100644 index 0000000000000000000000000000000000000000..8d1c8b69c3fce7bea45c73efd06983e3c419a92f --- /dev/null +++ b/src/doors/timeport/outside.h @@ -0,0 +1 @@ + diff --git a/src/doors/timeport/room1.ans b/src/doors/timeport/room1.ans new file mode 100644 index 0000000000000000000000000000000000000000..adbddcbf627355e67a834fe986297895c587520a --- /dev/null +++ b/src/doors/timeport/room1.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;30HYou are standing in a huge building. dust is [1;37m[4;1HÛ[34;46m²²²²²²²²²²²²²²²²²²²²²²²²²[30;40mÛ[0;33;40m[4;30Hdrifting through the air and settling on the [1;37m[5;1HÛ +[5;2H[34;46m°°°°°°°°°°°°°°°°°°°°°°°°°[30;40mÛ[0;33;40m[5;30Hempty floor. The building reminds you of a[1;37m[6;1HÛ[0;36;40m°±²[1;34;46mß[33mU[34mßßßßßßßßßßßßßßßßß[0;36;40m²±°[1;30mÛ[0;33;40m[6;30Hwarehouse, with small windows high on the +[6;71H walls.[1;37m[7;1HÛ[0;36;40m°±²ÛÛ[31;46mÜ[1;37m [0;31;46mÜ[1;37m º[31mÛ[44m [46mÛ[37mº [0;36;40m²±°[1;30mÛ[0;33;40m Against one wall of the rectangular room is a[1;37m[8;1HÛ[0;36;40m°±²[1;30;46m [37mÚÄ¿[30m [37mÚÄ¿ +[8;14H[30m [37mº[31;41mÝ[37m³[35mß[37m³[31mÞ[37;46mº [0;36;40m²±°[1;30mÛ[0;33;40m line of upright capsules, each with an iced-over[1;37m[9;1HÛ[0;36;40m°±²[31;46m [1;37m³[36m°[30m³[37m ³[36m°[30m³[37m º[31;41mÝ[37m³[35mÜ +[9;20H[37m³[31mÞ[37;46mº[30m [0;36;40m²±°[1;30mÛ[0;33;40m portal through which the suspended faces of [1;37m[10;1HÛ[0;36;40m°±²[31;46m [1;37m³[36m±[30m³[37m ³[36m±[30m³[37m º[31mÛ[44m [46mÛ[37mº[30m [0;36;40m²±°[1;30mÛ +[10;28H[0;33;40m frozen people are visible. At the other end, a[1;37m[11;1HÛ[34;46m°°°°°°°°°°°°°°°°°°°°°°°°°[30;40mÛ[0;33;40m[11;30Hblue and red machine (the time portal itself)[1;37m[12;1HÛ[34;46m²²²²²²²²²²²²²²²²²²²²²²²²²[30;40mÛ +[0;33;40m[12;30Hsits, awaiting for activation... awaiting to [1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[13;30Hrelease the power of Time Travel.[14;1H[0m diff --git a/src/doors/timeport/room1.asc b/src/doors/timeport/room1.asc new file mode 100644 index 0000000000000000000000000000000000000000..5d71bc62d8727f30b7480eb5e3112369e5d2b8dc --- /dev/null +++ b/src/doors/timeport/room1.asc @@ -0,0 +1,7 @@ + `6You are standing in a huge building. Dust is drifting through the air + and settling on the empty floor. The building reminds you of a warehouse, + with small windows high on the walls. Against one wall of the rectangular + room is a line of upright capsules, each with an iced-over portal through + which the faces of frozen people are visible. At the other end, a blue + and red machine (the time portal itself) sits, awaiting for activation... + awaiting to release the power of Time Travel. diff --git a/src/doors/timeport/room10.ans b/src/doors/timeport/room10.ans new file mode 100644 index 0000000000000000000000000000000000000000..68fdeb01c8ed496266818ecc68baca19ed30cd1d --- /dev/null +++ b/src/doors/timeport/room10.ans @@ -0,0 +1,2 @@ +[0;37;40m[36m[3;1H [37m[3;6HÜÜÜÜÜ[36m[3;13H [1;30;47m[4;2H°[4;5H°°[0;31;47mþ [33m [31mþ[33m [1;30m[4;14H°[0;33;40m[4;17H"My name is *bl* *blp* *bllp* BLIP" blurts the robot. [1;30;47m[5;2H°°[0;33;47m [34mÜ[1;32m +[5;9H[0;30;47m^[34mÜ[31m [33m [40m[5;17H"I have an assortment of defensive items to show you."[1;30;47m[6;3H°[6;5H°°[32m [0;34;47mßß[33m [1;30m[6;13H°[0;33;40m [37m[6;38H [7;1H[0m diff --git a/src/doors/timeport/room10.asc b/src/doors/timeport/room10.asc new file mode 100644 index 0000000000000000000000000000000000000000..c0d53107c58ae6a436b47b472af4b6b97453d656 --- /dev/null +++ b/src/doors/timeport/room10.asc @@ -0,0 +1,2 @@ + `6"My name is *bl* *blp* *bllp* BLIP" blurts the robot. "I have an + assortment of defensive items to show you." diff --git a/src/doors/timeport/room11.ans b/src/doors/timeport/room11.ans new file mode 100644 index 0000000000000000000000000000000000000000..695f368138ebf46e9eb930b0e819cefbeab90940 --- /dev/null +++ b/src/doors/timeport/room11.ans @@ -0,0 +1,2 @@ +[0;37;40m[1;32;47m[3;6H [0;37;40mÜ[1;32;47m [30m[4;4H°°°[31;41mÜ[0;33;47m [1;31;41mÜ[0;33;47m [40m[4;15H"Greetings. I am known as Bleep. If you plan on killing[1;30;47m[5;4H°[5;6H°[0;36;47m [34m Ü [33m[5;12H [40m[5;16Hany +[5;19Hone, I'm your man... er, that is, I'm your robot."[1;30;47m[6;6H°[0;34;47mßß [33m [7;1H[0m diff --git a/src/doors/timeport/room11.asc b/src/doors/timeport/room11.asc new file mode 100644 index 0000000000000000000000000000000000000000..734c98a303c2a5a12c3e2a72fdfa423d61abf443 --- /dev/null +++ b/src/doors/timeport/room11.asc @@ -0,0 +1,2 @@ + `6"Greetings. I am known as Bleep. If you plan on killing anyone, I'm + your man... er, that is, I'm your robot." diff --git a/src/doors/timeport/room12.ans b/src/doors/timeport/room12.ans new file mode 100644 index 0000000000000000000000000000000000000000..aedb2fdbafe45df5c3580e60916f121d08fa87ea --- /dev/null +++ b/src/doors/timeport/room12.ans @@ -0,0 +1,3 @@ +[0;37;40m[3;4Hô[3;6HÜÜÜÜ[3;11Hô[33m[3;14HThe littlest robot announces himself as Fred, after which Blip[37m[4;4HÝ[1;30;47m°°[0;30;47m_[1;32m [0;30;47m_[33m [37;40mÞ[33m[4;14Hammends "they call him 'Fast Freddie.'" Fred whacks him an +[4;73Hd[1;30;47m[5;4H°[0;33;47m [1;31;40mÝ[0;33;47m [1;31;40mÝ[0;33;47m [40m[5;14Hencourages him to mind his own business for a few moments.[6;4H [1;30;47m°°[0;34;47mÄÄÄ[33m [37;40m [33m[6;14H"Look over the stuff I have," Fred tells +[6;55Hyou... "Interested?"[7;1H[0m diff --git a/src/doors/timeport/room12.asc b/src/doors/timeport/room12.asc new file mode 100644 index 0000000000000000000000000000000000000000..cd6554c5d8fe79faf9550b5686edc4eb89282074 --- /dev/null +++ b/src/doors/timeport/room12.asc @@ -0,0 +1,4 @@ + `6The littlest robot announces himself as Fred, after which Blip amends + "They call him 'Fast Freddie.'" Fred whacks him and encourages him to + mind his own business for a few moments. "Look over the stuff I have," + Fred tells you... "Interested?" diff --git a/src/doors/timeport/room13.ans b/src/doors/timeport/room13.ans new file mode 100644 index 0000000000000000000000000000000000000000..b37c636f44f7f95b828cab64bd0d4e29d3cc98a9 --- /dev/null +++ b/src/doors/timeport/room13.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;30HAtop the mountain is a small wooden hut, oddly[1;37m[4;1HÛ[0;34;40m°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[0;33;40m[4;30Hmisplaced for this era in history. However, [1;37m[5;1HÛ +[5;2H[0;34;40m±±±±±±±±±±±±±±±±±[33m°±[34m±±±±±±[1;30mÛ[0;33;40m[5;30Han old man with a long gray beard emerges from[1;37m[6;1HÛ[0;34;40m²²²²²²²²²²²²²²²²[33m°[37;43m [33;40m²[34m²²²²²[1;30mÛ[0;33;40m[6;30Hthe hut, adjusts his spectacles +[6;61H, and smiles at[1;37m[7;1HÛ[0;37;44m [1;31m [0;37;44m [1;31m [0;37;44m [33;40m°[37;43m [33;40m²[37;44m [32m [1;30;40mÛ[0;33;40m [7;30Hyou. "Welcome to my mountain," he greets you.[1;37m[8;1HÛ[0;37;44m [33mÞÜ +[8;9HÛÜÜ[37m [33;40m°[37;43m [33;40m [37;43m [33;40m²[37;44m [1;30;40mÛ[0;33;40m [8;30H"Wouldn't happen to have a fresh fish on you[1;37m[9;1HÛ[0;37;44m [1;30;40m²±²±[47m²[40m±²²[0;37;40m°±[1;30;47m²[0;37;40m°[1;30m²² +[9;19H[0;37;40m°[1;30m²[47m²[40m²²[47m²[0;37;44m [1;30;40mÛ[0;33;40m [9;30Hwould you?" he asks. "I just love a good fish[1;37m[10;1HÛ[0;37;44m [1;30;40m±±²²±[0;37;40m±[1;30m²²[0;37;40m°±°[1;30m²²[0;37;40m±°[1;30m²[0;37;40m±[1;30m +[10;20H²²[0;37;40m±±[1;30;47m²[0;37;40m°±[1;30mÛ[0;33;40m [10;30Hfilet, but these prehistoric fish are way too[1;37m[11;1HÛ[30m²±²±±²±[0;37;40m°±[1;30m²²[0;37;40m±[1;30m²[0;37;40m±[1;30m²[0;37;40m°[1;30m²²[0;37;40m°[1;30m²[0;37;40m± +[11;23H[1;30m²[0;37;40m°±[1;30;47m²[40mÛ[0;33;40m[11;30Htough to catch. Or maybe you want to hear my[1;37m[12;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[12;30Hstory, eh?" You decide not to attack him. :)[13;1H[0m diff --git a/src/doors/timeport/room13.asc b/src/doors/timeport/room13.asc new file mode 100644 index 0000000000000000000000000000000000000000..5d75cb8bec543e5df16052e8d1f0a2a8d2d42749 --- /dev/null +++ b/src/doors/timeport/room13.asc @@ -0,0 +1,7 @@ + `6Atop the mountain is a small wooden hut, oddly misplaced for this era + in history. However, an old man with a long gray beard emerges from the + hut, adjusts his spectacles, and smiles at you. "Welcome to my mountain," + he greets you. "Wouldn't happen to have a fresh fish on you would you?" + he asks. "I just love a good fish filet, but these prehistoric fish are + way too tough to catch. Or maybe you want to hear my story, eh?" You + decide not to attack him. :) diff --git a/src/doors/timeport/room14.ans b/src/doors/timeport/room14.ans new file mode 100644 index 0000000000000000000000000000000000000000..fe753a5a1e700e11c29b89bf730d244737f43885 --- /dev/null +++ b/src/doors/timeport/room14.ans @@ -0,0 +1,3 @@ +[0;37;40m[31;41m[3;1H [37;40m²±[1;30m²±[0;31;40m°[1;30m°°²²°°°°[0;31;40m²²[1;30m°²²°°°[0;33;40m²²[1;30m°°°°°[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m Using your TCCL, you activate the Time [31;41m[4;1H [37;40m²±[1;30m²± +[4;6H[0;31;40m°[1;30m°°°°°²²°°°°°°[0;33;40m²²[1;30m°°°°²²°°[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m Portal. Images of times drift along [31;41m[5;1H [37;40m²±[1;30m²±[0;31;40m°[1;30m°²²°°°°°[0;33;40m²²[1;30m°°°°°²²°°°°°° +[5;30H[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m the void created by the Time Portal. [6;1H[0m diff --git a/src/doors/timeport/room14.asc b/src/doors/timeport/room14.asc new file mode 100644 index 0000000000000000000000000000000000000000..2f0503b64631d598b460df0b169f70d87ab9b645 --- /dev/null +++ b/src/doors/timeport/room14.asc @@ -0,0 +1,2 @@ + `6Using your TCCL, you activate the Time Portal. Images of times drift + along the void created by the Time Portal. diff --git a/src/doors/timeport/room15.ans b/src/doors/timeport/room15.ans new file mode 100644 index 0000000000000000000000000000000000000000..903fb89692cca0912884babafd9a204ef15d1e4d --- /dev/null +++ b/src/doors/timeport/room15.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[4;3H.[0;37;40m[4;6H [1m[4;9Hú[4;12H.[0;37;40m[4;14Hù[1m[4;16Hù[4;19Hú[4;21H.[0;37;40m[4;23H [1m[4;25Hú[4;27Hú[0;37;40m[4;29H [1m[4;31Hú[30m[4;33HÛ[0;33;40m[4;36HYo +[4;38Hu materialize behind a group of men [1;37m[5;1HÛ[5;3Hú[5;8H.[5;10Hù[0;37;40m[5;15Hù[1m[5;18Hù[5;20H.[5;22Hú[5;26Hù[5;28Hú[5;31H.[30m[5;33HÛ[0;33;40m[5;36Hdressed in dark coats, and instantly[1;37m[6;1HÛú[0;37;40m[6;4H°[6;6H +[6;6H°[1m[6;10Hú[0;37;40m[6;12H°°[1mù[0;37;40m[6;16H°°[1m[6;20Hú[0;37;40m[6;23H°[1m[6;25H.[6;28Hú[0;37;40m°[1;33m²[30m[6;33HÛ[0;33;40m[6;36Hrealize that you are dressed the same[1;37m[7;1HÛ[0;37;40m[7;4H°[1;33m²[0;37;40m°° +[7;9H°°[7;12H°°[7;16H°[1;33m²[0;37;40m°[7;21H°[7;23H°[7;25H°°[1;33m[7;29H²[0;37;40m°[1m[7;32Hú[30mÛ[0;33;40m [7;36Hway. The group of you are on a small[1;37m[8;1HÛ[0;37;40m°°°°±°°[1;33m²[0;37;40m°°°[1;33m²[0;37;40m°±°°±°°°° +[8;23H[1;33m²[0;37;40m°[1;33m²[0;37;40m°°°°°[1;33m²[0;37;40m°[1;30mÛ[0;33;40m [8;36Hisland, and the New York skyline is[1;37m[9;1HÛ[0;37;40m°±°°°°°°°±°°°°°°°°°°°°°°°°°°±°°[1;30mÛ[0;33;40m [9;36Hvisible in the distance, against the[1;37m +[10;1HÛ[0;34;40m°°°°°°±±±²²²²±±°±±²²²²±±±°°°°°°[1;30mÛ[0;33;40m [10;36Hblack night sky. The men are talking[1;37m[11;1HÛ[0;34;40m°°°°±±±²²²[32m²±°²±±²°±²±[34m²²²±±±°°°°[1;30mÛ[0;33;40m[11;36Habout "hitting" someone, and you[1;37m[12;1HÛ +[12;2H[0;34;40m°°±±±²²²[32m²²±°²°²±°²°±±²±[34m²²²±±±°°[1;30mÛ[0;33;40m[12;36Hquietly join in to hear more of it.[1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[14;1H[0m diff --git a/src/doors/timeport/room15.asc b/src/doors/timeport/room15.asc new file mode 100644 index 0000000000000000000000000000000000000000..9846f67d88c9094a554e7d08f05c2ee70c3b55e0 --- /dev/null +++ b/src/doors/timeport/room15.asc @@ -0,0 +1,5 @@ + `6You materialize behind a group of men dressed in dark coats, and + instantly realize that you are dressed the same way. The group of + you are on a small island, and the New York skyline is visible in the + distance, against the black night sky. The men are talking about + "hitting" someone, and you quietly join in to hear more of it. diff --git a/src/doors/timeport/room16.ans b/src/doors/timeport/room16.ans new file mode 100644 index 0000000000000000000000000000000000000000..0352773d94611d1496714416e53d9014f2d80f63 --- /dev/null +++ b/src/doors/timeport/room16.ans @@ -0,0 +1,8 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;36HYou are standing in the town square of[1;37m[4;1HÛ[0;33;44m [1;37mì[0;33;44m [1;37mì[0;33;44m [1;30;40mÛ[0;33;40m[4;36Ha little town called Bre +[4;60Httville. People[1;37m[5;1HÛ[0;33;44m [1;37mì[0;33;44m [1;37mì[0;33;44m [40m°°°°°°°°°[44m [1;30;40mÛ[0;33;40m[5;36Hare walking around as they go about their[1;37m[6;1HÛ[0;33;44m [40m°°°°°°°°°°°°[44m [1;31;43m +[6;20H°[0;37;43m [33;40m²°°[44m [1;37mì[0;33;44m [1;30;40mÛ[0;33;40m[6;36Hdaily activities. You have to step out[1;37m[7;1HÛ[0;33;44m [1;31;43m°[0;37;43m [30mSaloon[37m [33;40m²°°[44m [1;31;43m°ÍÍÍÍÍÍ[0;33;40m²°°[44m +[7;33H[1;30;40mÛ[0;33;40m [7;36Hof the way several times as people on[1;37m[8;1HÛ[0;33;44m [1;31;43m°ÍÍÍÍÍÍÍÍÍ[0;33;40m²°°[44m [1;31;43m°[0;33;40m [1;43m [0;33;40m ²°°[44m [1;30;40mÛ[0;33;40m [8;36Hhorses trot by. Of the sever +[8;65Hal buildings[1;37m[9;1HÛ[0;33;44m [1;31;43m°[0;37;43m [33;40m [37;43m [33;40m²°°[44m [1;31;43m°[0;37;43m [33;40m²°°[44m [1;30;40mÛ[0;33;40m [9;36Hyou see, the Saloon seems to be the most[1;37m[10;1HÛ[0;33;42m +[10;4H[1;31;43m°[0;37;43m [30;40m [33m [30m [37;43m [33;40m²°°[32m²²²[1;31;43m°[0;30;43mÞ[1;31;40m²²²[0;30;43mÝ[37m [33;40m²°°[32m²²²[1;30mÛ[0;33;40m popular. A shady looking character[1;37m[11;1HÛ[0;33;47m [1;31;43m° +[11;5H[0;37;43m [33;40m² ²[37;43m [33;40m²°[37m²²²[33;47m [1;31;43m°[0;30;43mÞ[1;31;40m²²²[0;30;43mÝ[37m [33;40m²°[37m²²²[33;47m [1;30;40mÛ[0;33;40m[11;36Hstanding outside the Saloon offers to[1;37m[12;1HÛ[0;33;47m +[12;16H [1;30;40mÛ[0;33;40m[12;36Hprovide his handywork services to you.[1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[13;36HHe tells you that he can "make things."[14;1H[0m diff --git a/src/doors/timeport/room16.asc b/src/doors/timeport/room16.asc new file mode 100644 index 0000000000000000000000000000000000000000..b02165b1235644bc6771adde9f7e30788f777a37 --- /dev/null +++ b/src/doors/timeport/room16.asc @@ -0,0 +1,6 @@ + `6You are standing in the town square of a little town called Brettville. + People are walking around as they go about their daily activities. You + have to step out of the way several times as people on horses trot by. + Of the several buildings you see, the Saloon seems to be the most popular. + A shady looking character standing outside the saloon offers to provide + his handywork services to you. He tells you that he can "make things." diff --git a/src/doors/timeport/room17.ans b/src/doors/timeport/room17.ans new file mode 100644 index 0000000000000000000000000000000000000000..b80e196a55b0b68a64c7f7fba9c103e3221672c4 --- /dev/null +++ b/src/doors/timeport/room17.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[0;33;40m°°°²²²²°°°°°°°²²²²°°°°°°°°°°°°°[1;30mÛ[0;33;40m[4;36HYou walk into the saloon and look the [1;37m[5;1HÛ[0;33;40m°°°²²±²°°°°°°°²²±²°°°°°°°°°°°°°[1;30mÛ[0;33;40m[5;36H +[5;36Hplace over carefully. You see several[1;37m[6;1HÛ[0;33;40m°°°²²²²°°°°°°°²²²²°°°°°°°°°°°°°[1;30mÛ[0;33;40m[6;36Htables, and a bar where an old man [1;37m[7;1HÛ[43mÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ[0;37;43mÍÍÍÍÍÍÍÍÍ[1mÉ[0;37;43mÍ[1;30m»ÍÍÍÍ[40mÛ +[7;34H[0;33;40m [7;36His busy serving drinks to an already[1;37m[8;1HÛ[0;30;43m°°° [37mÜ [1;34mÜ[0;37;43m [1;36mÛ[0;37;43m [1;32m Ü[0;37;43m [1;31mÛ[0;37;43m Ü[30m °°[1;37mÉ[0;37;43mÍ[1;30m»[31m [30;40mÛ[0;33;40m [8;36Hdru +[8;39Hnk bunch of fellows. A stairway[1;37m[9;1HÛ[0;30;43m°°° [47m°[1;31mÜ[0;31;47mÜÜ [1mÜ[0;31;47mÜÜ [1mÜ[0;31;47mÜÜ[1;30m [31mÜ[0;31;47mÜÜ[30m°[43m °°°[1;37mÉ[0;37;43mÍ[1;30m»[31m [30;40mÛ[0;33;40m [9;36Hgoes up the wall behi +[9;57Hnd the bar, to a[1;37m[10;1HÛ[0;30;43m°°° [47m°[31m [1;41mÝ[0;31;47m [1;41mÝ[0;31;47m [1;41mÝ[0;31;47m [1m [41mÝ[0;31;47m [30m°[43m °°°°[1;37mÉ[0;37;43mÍ[1;30m»[31m [30;40mÛ[0;33;40m balcony where 2 doors are visible. +[10;71HThe[1;37m[11;1HÛ[0;30;43m°°[33;45mßß[37mßß[1;31mß[0;37;45mßßß[1;31mß[0;37;45mßßß[1;31mß[0;37;45mßßß[1;31mß[0;37;45mßß[33mßß[30;43m°°°°°[1;37mÉ[0;37;43mÍ[1;30m»[40mÛ[0;33;40m[11;36HBartender is busy cleaning the bar and +[1;37m[12;1HÛ[0;33;40m±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±[1;30mÛ[0;33;40m[12;36Hserving the patrons. [1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[14;1H[0m diff --git a/src/doors/timeport/room17.asc b/src/doors/timeport/room17.asc new file mode 100644 index 0000000000000000000000000000000000000000..2f2e1c61d86fb8dda0323408783960982a4984bc --- /dev/null +++ b/src/doors/timeport/room17.asc @@ -0,0 +1,5 @@ + `6You walk into the saloon and look the place over carefully. You see + several tables, and a bar where an old man is busy serving drinks to an + already drunk bunch of fellows. A stairway goes up the wall behind the + bar, to a balcony where 2 doors are visible. The bartender is busy + cleaning the bar and serving the patrons. diff --git a/src/doors/timeport/room18.ans b/src/doors/timeport/room18.ans new file mode 100644 index 0000000000000000000000000000000000000000..2630aa2726adc6d5f7de36546db51f1509451ca0 --- /dev/null +++ b/src/doors/timeport/room18.ans @@ -0,0 +1,5 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[0;30;43mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[1;40mÛ[37m[5;1HÛ[0;33;40m °°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[37m[6;1HÛ[0;33;40m ²²²²²²²²²°°°°°°°°²²²²²²²²²°°[1;30mÛ[0;33;40m[6;36HT +[6;37Hhe bartender doesn't seem to notice as[1;37m[7;1HÛ[0;33;40m °Û[30;43mÞ[33;40m²²²²²²²°°°°°°°°Û[30;43mÞ[33;40m²²²²²²²°°[1;30mÛ[0;33;40m [7;36Hyou walk up the stairs to the two doors[1;37m[8;1HÛ[0;33;40m °°²²²²[30;43mÞ[33;40m ²°°°° +[8;18H°°°°²²²²[30;43mÞ[33;40m ²°°[1;30mÛ[0;33;40m [8;36Halong the balcony. You try opening both[1;37m[9;1HÛ[0;33;40m °²²²²²²²²²°°°°°°°°²²²²²²²²²°°[1;30mÛ[0;33;40m [9;36Hof them, but they are locked really well.[1;37m[10;1HÛ[0;33;40m +[10;4H°Û[30;43mÞ[33;40m²²²²²²² °°°°Û[30;43mÞ[33;40m²²²²²²²°°[1;30mÛ[0;33;40m [1;37m[11;1HÛ[0;33;40m °Û[30;43mÞ[33;40m²²²²²²² °Û[30;43mÞ[33;40m²²²²²²² [1;30mÛ[37m[12;1HÛ[0;37;43mÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[1;30;40mÛ +[37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[14;1H[0m diff --git a/src/doors/timeport/room18.asc b/src/doors/timeport/room18.asc new file mode 100644 index 0000000000000000000000000000000000000000..b77a89cd0ebf81fe739a52c2dba3cdb81854c9d1 --- /dev/null +++ b/src/doors/timeport/room18.asc @@ -0,0 +1,3 @@ + `6The bartender doesn't seem to notice as you walk up the stairs to the + two doors along the balcony. You try opening both of them, but they are + locked really well. diff --git a/src/doors/timeport/room19.ans b/src/doors/timeport/room19.ans new file mode 100644 index 0000000000000000000000000000000000000000..390faf127a28b929ea9b4911b645e5d47f92ef90 --- /dev/null +++ b/src/doors/timeport/room19.ans @@ -0,0 +1,6 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[0;33;40m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[37m[5;1HÛ[0;33;40m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[1;30mÛ[0;33;40m[5;36HDale's General Store is a well-kept[5;72Hlittle[1;37m[6;1HÛ +[6;2H[0;33;40m±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±[1;30mÛ[0;33;40m[6;36Hbusiness. Dale looks up from sweeping the[1;37m[7;1HÛ[0;33;40m±±±±±±±±±±±±±±±±±±±±±±±±[31m°°°°°°[33m±[1;30mÛ[0;33;40m[7;36Hfloor and greets you. "Howdy," says Dale[1;37m +[8;1HÛ[0;33;40m±±±[36m²²±±±[30;46m [36;40m±±[30;46m [36;40m±±[30;46m [36;40m±±±°°[33m±±±[31m±±±±[30;43mo[31;40m±[33m±[1;30mÛ[0;33;40m[8;36Hwith a smile. "Don't remember seein' you[1;37m[9;1HÛ[0;33;40m±±±[36m²²[30;46m [1;36mDale' +[9;13Hs Store[0;30;46m [36;40m°°[33m±±±[31m±±±±±±[33m±[1;30mÛ[0;33;40m[9;36H'round these parts before. What kin'I[1;37m[10;1HÛ[0;33;40m±±±[36m²²±±±[30;46m [36;40m±±[30;46m [36;40m±±[30;46m [36;40m±±±°°[33m±±±[31m²²²²²²[33m± +[10;33H[1;30mÛ[0;33;40m[10;36Hhelp ya with?" Maybe Dale has something[1;37m[11;1HÛ[0;33;40m²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²[1;30mÛ[0;33;40m[11;36Hfor sale that you might find a use for.[1;37m[12;1HÛ[0;33;40m²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² +[12;33H[1;30mÛ[37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[14;1H[0m diff --git a/src/doors/timeport/room19.asc b/src/doors/timeport/room19.asc new file mode 100644 index 0000000000000000000000000000000000000000..5ad29686f4d2456869544c4ee716d71323186824 --- /dev/null +++ b/src/doors/timeport/room19.asc @@ -0,0 +1,4 @@ + `6Dale's General Store is a well-kep little business. Dale looks up from + sweeping the floor and greets you. "Howdy," says Dale with a smile. + "Don't remember seein' you 'round these parts before. What kin'I help + ya with?" Maybe Dale has something for sale that you might find a use for. diff --git a/src/doors/timeport/room2.ans b/src/doors/timeport/room2.ans new file mode 100644 index 0000000000000000000000000000000000000000..de3c7436142682030331bd9fb08a13bc65c3e158 --- /dev/null +++ b/src/doors/timeport/room2.ans @@ -0,0 +1,5 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[36;47m [0;30;47mÜ[34mÜÜ[1;36m [0;30;47mÜ[34mÜÜ[1;36m [0;30;47mÜ[34mÜÜ[1;36m [30mÜÜÜÜÜÜÜÜÜ[36m [30;40mÛ[32mÜÜÜÜÜÜÜÜÜ[4;42H [37m[5;1HÛ[36;47m [0;30;47mß[34mßß[1;36m +[5;8H[0;30;47mß[34mßß[1;36m [0;30;47mß[34mßß[1;36m [30;41mÛ[37m - -- [47mÛ[36m [30;40mÛ[0;32;40mÛÛÛÛÛÛÛÛÛ[1mÛììììéììììéììììéììììéìììéììììéììììéìììì[37m[6;1HÛ[36;47m [0;34;40m [47mÛÛ[1;36m [0;34;40m [47mÛÛ[1;36m [0;34;40m [47m +[6;13HÛÛ[1;36m [30;41mÛ[37m -- -- [47mÛ[36m [30;40mÛ[32mßßßßßßßßß[37m[7;1HÛ[36;47m [0;30;47mÜÜ[34mÜÜÜÜÜÜÜÜÜ[1;36m [30;41mÛ[37m --- [47mÛ[36m [30;40mÛ[0;33;40m [7;39HYou tap a short sequence of keys on [1;37m[8;1HÛ[36;47m +[8;2H [0;30;47mßß[34mßßßßßßßßß[1;36m [30mß[37mßßßßßßßß[36m [30;40mÛ[0;33;40m [8;39Hyour Time Control Computer Linker[8;73H(or[1;37m[9;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m [9;39HTCCL) and the red screen shows a menu.[10;28H +[10;1H[0m diff --git a/src/doors/timeport/room2.asc b/src/doors/timeport/room2.asc new file mode 100644 index 0000000000000000000000000000000000000000..454a262fad7d0978bb5553f72205b6d3fc7599b7 --- /dev/null +++ b/src/doors/timeport/room2.asc @@ -0,0 +1,2 @@ + `6You tap a short sequence of keys on your Time Control Computer Linker + (or TCCL) and the red screen shows a menu. diff --git a/src/doors/timeport/room20.ans b/src/doors/timeport/room20.ans new file mode 100644 index 0000000000000000000000000000000000000000..7e6e488b3169a67108c6338d75288181a83fc38d --- /dev/null +++ b/src/doors/timeport/room20.ans @@ -0,0 +1,3 @@ +[0;37;40m[34m[3;4H [30;43mß[33;40m²±±°°[30;43mß[33;40m [3;14HDale notices that you're interested in the merchandise, so[3;73Hhe[34m[4;3H [37m [33m±[37;43mÜÜÜÜÜ[33;40m°[37m [33m[4;14Htakes a position near the front counter, smiles, +[4;63Hand volunteers[34m[5;3H [37m [43mÞ[33;47m [34mß[33m [34mß[33m [37;43mÝ[40m [33m[5;14Hto sell you whatever you need -- if you can afford it. You[6;4H [47m [31mßßß[34m [33;40m [37m [33m[6;14Hjust nod and look at what he has t +[6;48Ho offer.[7;1H[0m diff --git a/src/doors/timeport/room20.asc b/src/doors/timeport/room20.asc new file mode 100644 index 0000000000000000000000000000000000000000..25d787765550a5c8d04fd06d22c4a52d413b0d4d --- /dev/null +++ b/src/doors/timeport/room20.asc @@ -0,0 +1,4 @@ + `6Dale notices that you're interested in the merchandise, so he takes a + position near the front counter, smiles, and volunteers to sell you whatever + you need -- if you can afford it. You just nod and look at what he has to + offer. diff --git a/src/doors/timeport/room3.ans b/src/doors/timeport/room3.ans new file mode 100644 index 0000000000000000000000000000000000000000..b3fff73cf04fa72b75bdcb07c346c7a79589481e --- /dev/null +++ b/src/doors/timeport/room3.ans @@ -0,0 +1,3 @@ +[0;37;40m[31;41m[3;1H [37;40m²±[1;30m²±[0;31;40m°[1;30m°°[0;34;47mßß[1;30;40m°°°°°°°[0;31;47mßß[1;30;40m°°°°°°°°°°[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m Using your TCCL, you activate the Time [31;41m[4;1H [37;40m²±[1;30m²± +[4;6H[0;31;40m°[1;30m°°°°°[0;32;41mÜÜ[1;30;40m°°°°°°°°°°°°[0;32;44mÜÜ[1;30;40m°°[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m Portal. Images of times drift along [31;41m[5;1H [37;40m²±[1;30m²±[0;31;40m°[1;30m°[0;34;43mßß[1;30;40m°° +[5;12H°°°°°°°°°°[0;34;47mßß[1;30;40m°°°°°°[0;31;40m°[1;30m±²[0;37;40m±²[31;41m [33;40m the void created by the Time Portal. [6;1H[0m diff --git a/src/doors/timeport/room3.asc b/src/doors/timeport/room3.asc new file mode 100644 index 0000000000000000000000000000000000000000..2f0503b64631d598b460df0b169f70d87ab9b645 --- /dev/null +++ b/src/doors/timeport/room3.asc @@ -0,0 +1,2 @@ + `6Using your TCCL, you activate the Time Portal. Images of times drift + along the void created by the Time Portal. diff --git a/src/doors/timeport/room4.ans b/src/doors/timeport/room4.ans new file mode 100644 index 0000000000000000000000000000000000000000..132997928a2bb1f194d51972259023a82dabe2b6 --- /dev/null +++ b/src/doors/timeport/room4.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;30HOutside the hanger, you find a world in waste.[1;37m[4;1HÛ[41m ì ì [30;40mÛ[0;33;40m[4;30Hthe sky is a dull red, and the ground is cold[1;37m[5;1HÛ[41m ì +[5;7H ì [30;40m°°[37;41m [30;40mÛ[0;33;40m[5;30Hand dry. A chilling wind blows, and unearthly[1;37m[6;1HÛ[41m [30;40m°°°[0;37;40m°[1;30m°[37;41m ì [30;40mÛ[0;33;40m[6;30Hnoises fill the air. A few plants, +[6;66Hthough dead[1;37m[7;1HÛ[0;33;41m [1;30;40m°°[0;37;40m°[33;41m [32m´[33m [1;30;40m°°°°°[0;37;40m°[1;30m°°[0;33;41m [1;30;40mÛ[0;33;40m [7;30Hin appearance, dot the area that might have[1;37m[8;1HÛ[0;32;41m³[33m +[8;4H[1;30;40m±±±±±[0;33;41m [32mÃ[33m [1;30;40m±±±±±±±±±±[0;33;41m [32mà ³[1;30;40mÛ[0;33;40m [8;30Honce been a highway. You wonder about what[1;37m[9;1HÛ[30m°°°[0;37;40m°[1;30m±±[0;33;40m°[1;30m±[0;33;40m°°[1;30m±²±²±±²°°°°°° +[9;25H[0;33;40m°°[1;30mÛ[0;33;40m [9;30Hsort of disaster caused this kind of absolute [1;37m[10;1HÛ[30m±²[0;33;40m°°°[1;30m±±°°°°±°[0;37;40m°[1;30m°°±[0;33;40m°°°°[1;30m²±°²Û[0;33;40m [10;30Hdamage to the world you remember. No war did +[1;37m[11;1HÛ[30m°°²±°°°²[0;33;40m°[1;30m±[0;33;40m°[1;30m°²[0;33;40m°°°[1;30m²°°°°±[0;37;40m°[1;30m°°Û[0;33;40m[11;30Hthis. It was something else altogether, you[1;37m[12;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[12;30Hdecide. The +[12;43Hthought of it chills your soul.[13;1H[0m diff --git a/src/doors/timeport/room4.asc b/src/doors/timeport/room4.asc new file mode 100644 index 0000000000000000000000000000000000000000..95ed12e257a0de37e83243a2dc74df2352d5e410 --- /dev/null +++ b/src/doors/timeport/room4.asc @@ -0,0 +1,7 @@ + `6Outside the hanger, you find a world in waste. The sky is a dull red, + and the ground is cold and dry. A chilling wind blows, and unearthly + noises fill the air. A few plants, though dead in appearance, dot the + area that might have once been a highway. You wonder what sort of + disaster caused this kind of absolute damage to the world you remember. + No war did this. It was something else altogether, you decide. The + thought of it chills your soul. diff --git a/src/doors/timeport/room5.ans b/src/doors/timeport/room5.ans new file mode 100644 index 0000000000000000000000000000000000000000..1a559fc817dd97ba958a96d4749dbe8e62a16222 --- /dev/null +++ b/src/doors/timeport/room5.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;38HYou are in a dark, square room with[3;74Ha[1;37m[4;1HÛ[30m²²²²²²³ [4;18HÚ[0;37;40mÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[1;30m[4;35HÛ[0;33;40m[4;38Hwindow on the wall, and four colored +[1;37m[5;1HÛ[30m²²²²±±³ 1 2[5;14H3[5;16H4[5;18H³[0;31;41m [37;40m³[1;30m[5;35HÛ[0;33;40m[5;38Hbuttons beside it. Immediately you[5;74H [1;37m[6;1HÛ[30m²²±±°°³[32m[6;10HÜ[31m[6;12HÜ[36m[6;14HÜ[35m[6;16HÜ[30m[6;18H³ +[6;19H[0;31;41m [1;30;40m±±[0;31;41m [1;30;40m²[0;31;41m [37;40m³[1;30m[6;35HÛ[0;33;40m hear the voices of other people, quite[1;37m[7;1HÛ[30m±±°°[7;8H³[7;18H³[0;33;40m±[1;30m°±°°±[0;33;40m±[1;30m°²[0;33;40m±[1;30m°° +[7;31H[0;33;40m±[1;30m°[0;37;40m³[1;30m[7;35HÛ[0;33;40m[7;38Ha few other people, in fact. "This is[1;37m[8;1HÛ[30m°°[8;8H³[8;18H³±°²²²°°[0;33;40m±[1;30m°±±±°[0;33;40m±[37m³[1;30m[8;35HÛ[0;33;40m[8;38Hthe Discussion Chamber," somebo +[8;69Hdy says [1;37m[9;1HÛ[30m [9;8H³[9;18HÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[9;35HÛ[0;33;40m[9;38Hto you. "They can't monitor us in[1;37m[10;1HÛ[30m[10;8H³[10;35HÛ[0;33;40m[10;38Hhere... too much feedback from the[1;37m[11;1HÛ[30m[11;7HÚÅ +[11;20HÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÛ[0;33;40m[11;38Hcircuitry that controls those four [1;37m[12;1HÛ[30m ÚÂÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÛ[0;33;40m[12;38Hbuttons." You try to find faces in[1;37m[13;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m +[13;38Hthe darkness, but they are too vague.[14;1H[0m diff --git a/src/doors/timeport/room5.asc b/src/doors/timeport/room5.asc new file mode 100644 index 0000000000000000000000000000000000000000..60e2351b0ac4be2c13a382c70ab51b2c1ef30bc1 --- /dev/null +++ b/src/doors/timeport/room5.asc @@ -0,0 +1,6 @@ + `6You are in a dark, square room with a window on the wall, and four + colored buttons beside it. Immediately you hear the voices of other + people, quite a few other people, in fact. "This is the Discussion + Chamber," somebody says to you. "They can't monitor us in here... + too much feedback from the circuitry that controls those four buttons." + You try to find faces in the darkness, but they are too vague. diff --git a/src/doors/timeport/room6.ans b/src/doors/timeport/room6.ans new file mode 100644 index 0000000000000000000000000000000000000000..edfdb0567e4ca041437e91f21217784c9021f0e0 --- /dev/null +++ b/src/doors/timeport/room6.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[0;37;44m ì [1;30;40mÛ[0;33;40m[4;30HYou have materialized by a mountain in a vast[1;37m[5;1HÛ[0;37;44m ì ì [1;40m²°²±°[0;37;44m ì[1;30;40mÛ[0;33;40m +[5;30Hgreen plain. From the looks of it, you would[1;37m[6;1HÛ[0;37;44m ì [1;40m²²±°[0;37;40m²[1m²²[0;37;44m [1;30;40mÛ[0;33;40m[6;30Hnot have guessed that you are over 385,000 [1;37m[7;1HÛ[0;37;44m [32mÌ[33mÞ[37m [32m +[7;8H· [37m [32mÉ[37m [40m°[1m²[0;37;40m²±[1m²²[0;37;40m±[1m±²[0;37;40m±²[32;44m [1;30;40mÛ[0;33;40m [7;30Hyears in the past. The most striking feature[1;37m[8;1HÛ[0;37;42m [33mÞ[37m [33mÞ[37m [40m±[1;30m±[0;37;40m±°±² +[8;19H[1;30m±±[0;37;40m±²[1;30m²[0;37;40m²±²[1;30mÛ[0;33;40m [8;30Hof the area is the crowd of people with you[1;37m[9;1HÛ[0;37;42m [33mÞ[37m [33mÝ[37m [40m²[1;30m±[0;37;40m±[1;30m²[0;37;40m±²[1;30m±[0;37;40m°[1;30m² +[9;21H[0;37;40m°±[1;30m±[0;37;40m±[1;30m±²Û[0;33;40m [9;30Hat the base of the mountain. You recognize[1;37m[10;1HÛ[0;37;42m [33mÞ[37m [40m²±[1;30m²[0;37;40m°±[1;30m±±²±[0;37;40m±[1;30m°±²°°²°Û[0;33;40m [10;30Hthem all as other +[10;48Hrecruits from the future.[1;37m[11;1HÛ[0;33;42mÞ[37m [1;30;40m²[0;37;40m±[1;30m²±[0;37;40m±[1;30m²°²±±°±°²±°²±Û[0;33;40m[11;30HYour primal urge, in this place, is to kill![1;37m[12;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß +[13;1H[0m diff --git a/src/doors/timeport/room6.asc b/src/doors/timeport/room6.asc new file mode 100644 index 0000000000000000000000000000000000000000..8930c9539daeaf452d5659d0001eafc2b89c7e17 --- /dev/null +++ b/src/doors/timeport/room6.asc @@ -0,0 +1,6 @@ + `6You have materialized by a mountain in a vast green plain. From the + looks of it, you would not have guessed that you are over 385,000 years + in the past. The most striking feature of the area is the crowd of + people with you at the base of the mountain. You recognize them all + as other recruits from the future. Your primal urge, in this place, is + to kill! diff --git a/src/doors/timeport/room7.ans b/src/doors/timeport/room7.ans new file mode 100644 index 0000000000000000000000000000000000000000..9d6f3eddcb87c366264b570b2177919cfe971988 --- /dev/null +++ b/src/doors/timeport/room7.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;33;40m[3;35HYou stray farther from the Hanger area, [1;37m[4;1HÛ[41m ì ì [0;30;41mÒ[1;37m [30;40mÛ[0;33;40m[4;35Hand eventually find a calmer area where a +[1;37m[5;1HÛ[41m ì [30;40m°°[37;41m [0;30;41mÆ[1;47mÛßß[46mß[44mß[0;30;41m;[1;37m [30;40mÛ[0;33;40m[5;35Hmurky pool of water and a tall, sleek,[1;37m[6;1HÛ[41m [32mÃ[37m [30;40m°°[0;33;40m°[37m°[1;30m° +[6;21H[37;41m [0;30;41mÆ[1;47mÛßß[46mß[44mß[37;41m ì[30;40mÛ[0;33;40m[6;35Hmetal building are visible. You can still[1;37m[7;1HÛ[0;33;41m [32mÂ[33m [1;37mì[0;33;41m [1;37m [32m´[30;40m°°°[0;33;40m°[1;30m°[0;37;40m°[1;30m°° +[7;21H[0;33;41m [30mÆ[1;47mÛßß[46mß[44mß[0;33;41m [1;30;40mÛ[0;33;40m[7;35Hhear the shrieks of rage from the mutants[1;37m[8;1HÛ[41m [0;32;41mÆ[1;37m [0;33;41m [1;30;40m°²±°±±±²°±±²±[37;41m [30;47mÛßß[46mß[44mß[0;33;41m [32m +[8;29Hà ³[1;30;40mÛ[0;33;40m[8;35Hand freaks outside the hanger. A cold[1;37m[9;1HÛ[30m°±[0;33;40m°[1;30m°±°[0;33;40m°[1;30m²[0;37;40m°[33m°[1;30m±[0;33;40m°[1;30m±[0;33;40m°[1;30m²±²±²±±°²²±±°°[0;33;40m°°[1;30mÛ[0;33;40m[9;35Hbre +[9;38Heze causes you to shiver. Shaking away[1;37m[10;1HÛ[0;34;40m²²²±±±±°°°°[33m°°°°[1;30m°±°[0;37;40m°[1;30m°°[0;33;40m°[1;30m°²²±±°°²Û[0;33;40m[10;35Ha feeling of uncertainty and mild paranoia,[1;37m[11;1HÛ[0;34;40m²²²²±±±±±±°°°°°° +[11;18H[1;30m°²[0;33;40m°°°[1;30m²[0;33;40m°[1;30m°²²±±°°Û[0;33;40m[11;35Hyou trudge up an incline for a better view[1;37m[12;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß[0;33;40m[12;35Hof the sleek building in the distance.[13;1H[0m diff --git a/src/doors/timeport/room7.asc b/src/doors/timeport/room7.asc new file mode 100644 index 0000000000000000000000000000000000000000..9ee28eba775f80c2d6ced4571fdf7337a7397655 --- /dev/null +++ b/src/doors/timeport/room7.asc @@ -0,0 +1,6 @@ + `6You stray farther from the Hanger area, and eventually find a calmer + area where a murky pool of water and a tall, sleek metal building are + visible. You can still hear the shrieks of rage from the mutants and + freaks outside the hanger. A cold breeze causes you to shiver. + Shaking away a feeling of uncertainty and mild paranoia, you trudge + up an incline for a better view of the sleek building in the distance. diff --git a/src/doors/timeport/room8.ans b/src/doors/timeport/room8.ans new file mode 100644 index 0000000000000000000000000000000000000000..255a303e6e2079cd7b8804d9c5c0586058a5e1b5 --- /dev/null +++ b/src/doors/timeport/room8.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[4;1HÛ[0;37;41m [1m..[0;37;41m [1m [0;37;41m [1m..[0;37;41m [31;40m° [1;37;41m..[30;40mÛ[37m[5;1HÛ[0;37;41m [1m [0;37;41m [1m.. [0;37;41m [31;40m [1;37m.[0;31;40m +[5;17H[1;37m.[0;31;40m [37;41m [1m..[0;31;40m ° [1;30mÛ[0;33;40m[5;30HYou wait for just a moment. In that instant,[1;37m[6;1HÛ[0;31;40m °[37;41m [31;40mß°[1;30m [0;31;40mß[37;41m [1m..[0;37;41m [31;40mß[37;41m [31;40mßß +[6;20H[37;41m [31;40mß[37;41m [31;40m [37;41m [1;30;40mÛ[0;33;40m[6;30Hdozens of shrieks and screams fill the air as[1;37m[7;1HÛù[0;31;40m [1;37mù[0;37;41m [31;40mÝ[1;37mù[0;31;40m [1;37mù[0;31;40m Þ[37;41m [31;40mß ° ° ß +[7;23H[37;41m [31;40m° [1;30mÛ[0;33;40m [7;30Ha group of raging mutants converge on you from[1;37m[8;1HÛ[0;31;40m° [37;41m [31;40mßßß °ßßß[37;41m [1;40mù[0;31;40m [1;37mù[0;31;40m [37;41m [1m [0;37;41m [31;40m °[1;30mÛ +[8;28H[0;33;40m [8;30Hall directions. They aren't blocking your[1;37m[9;1HÛ[41m..[0;37;41m [31;40mÜ[37;41m [31;40m ° [37;41m [31;40mÜßßß °ßßß[37;41m [31;40m [1;30mÛ[0;33;40m [9;30Hescape, however. One of the freaks steps[1;37m +[10;1HÛ[0;37;41m [31;40m ° [1;30m±±±±±[0;37;41m [1m..[0;37;41m [31;40m ° [37;41m [1;30;40m²²²[0;31;40m [1;30mÛ[0;33;40m [10;30Hforward and readies himself for an attack.[1;37m[11;1HÛ[30m°°±±±±±±±±±±±±±°°°²²²²²²°Û[37m[12;1Hß[30mßß +[12;4Hßßßßßßßßßßßßßßßßßßßßßßßß[13;1H[0m diff --git a/src/doors/timeport/room8.asc b/src/doors/timeport/room8.asc new file mode 100644 index 0000000000000000000000000000000000000000..8ecabecdf6a739fee46d11cff80af8aee3037801 --- /dev/null +++ b/src/doors/timeport/room8.asc @@ -0,0 +1,4 @@ + `6You wait for just a moment. In that instant, dozens of shrieks and + screams fill the air as a group of raging mutants converge on your from + all directions. They aren't blocking your escape, however. On of the + freaks steps forward and readies himself for an attack. diff --git a/src/doors/timeport/room9.ans b/src/doors/timeport/room9.ans new file mode 100644 index 0000000000000000000000000000000000000000..859bef0be109fd52b5c3e4daef1d3018d98d6c85 --- /dev/null +++ b/src/doors/timeport/room9.ans @@ -0,0 +1,7 @@ +[0;37;40m[1m[3;1HÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[0;36;40m[3;30H [1;37m[4;1HÛ[41m ì [0;30;41mÆ[1mÛ[47mÛßßßß[46mßß[44mßß[41m [37m [0;32;41m [1;30;40mÛ[0;33;40m[4;30HYou wander up to the sleek building, and out[1;37m[5;1HÛ[30m +[5;2H²[37;41m ì [0;32;41m [30mÆ[1mÛ[47mÛ [46m [44m [0;30;41m;[1m [0;32;41m [1;30;40mÛ[0;33;40m[5;30Hof nowhere appear three odd robots. They have[1;37m[6;1HÛ[30m°±°[0;33;40m±[1;37;41m [0;30;41mÆ[1mÛ[47mÛßßßß[46mßß +[6;19H[44mßß[41m [37m ì [0;32;41m [1;30;40mÛ[0;33;40m[6;30Hlarge metallic grins, and introduce themselves[1;37m[7;1HÛ[30m°[0;33;40m±[1;30m±²°[0;33;41m [1;37mì[0;33;41m [30mÆ[1mÛ[47mÛ [46m [44m [41m [0;33;41m [32m [33m +[7;27H[1;30;40mÛ[0;33;40m[7;30Hat Blip, Bleep, and Fred. Fred nudges his[1;37m[8;1HÛ[0;33;40m°[1;30m²°[0;33;40m°[1;30m°²°[41m ÛÛ[47mßßßß[46mßß[44mßß[41m [0;33;41m [32m´[33m [1;30;40mÛ[0;33;40m[8;30Hcompanions, and lifts his synt +[8;60Hhetic eyebrows.[1;37m[9;1HÛ[30m°±[0;33;40m°[1;30m°±°[0;33;40m°[1;30m²[0;37;40m°[1;30;41mÛÛ[47m [46m [44m [0;33;41m [32m³[33m [32mà [33m [1;30;40mÛ[0;33;40m[9;30HAfter a brief exchange of words, Blip tells[1;37m[10;1HÛ +[10;2H[0;33;40m°°[1;30m±[0;33;40m°[1;30m±[0;33;40m°[1;30m±±°°°°°°°°°°°°±±°°²Û[0;33;40m[10;30Hyou that they'll sell to you if you want.[1;37m[11;1HÛ[0;33;40m°°°[1;30m±[0;33;40m°[1;30m±[0;33;40m°[1;30m±[0;33;40m°[1;30m±±°°°°°°°°°°°±°°Û +[37m[12;1Hß[30mßßßßßßßßßßßßßßßßßßßßßßßßßß[13;1H[0m diff --git a/src/doors/timeport/room9.asc b/src/doors/timeport/room9.asc new file mode 100644 index 0000000000000000000000000000000000000000..637df213f407e1f81c8915d4a331b4f7767e76bd --- /dev/null +++ b/src/doors/timeport/room9.asc @@ -0,0 +1,5 @@ + `6You wander up to the sleek building, and out of nowhere appear three + odd robots. They have large metallic grins, and introduce themselves + as Blip, Bleep, and Fred. Fred nudges his companions, and lifts his + synthetic eyebrows. After a brief exchange of words, Blip tells you + that they'll sell to you if you want. diff --git a/src/doors/timeport/shuttle.ans b/src/doors/timeport/shuttle.ans new file mode 100644 index 0000000000000000000000000000000000000000..ef1b69e0c8e0a47fb32aed7a0da9a216d6bd13ff --- /dev/null +++ b/src/doors/timeport/shuttle.ans @@ -0,0 +1,10 @@ +[0;37;40m[1;33m[2;31HÜÜÜ[44mßßßßßßßß[40mÜÜÜ [3;24HÜÜÜÜÜ[44mßß[34m°°[33m [37mßß[33m [0;30;44m°°[1;33mßß[40mÜÜÜÜÜ[0;37;40m[3;61H [3;71H [33m[4;7HÜÜ[37;43m - - - -[30m [37m- - -[30m °°[1;33;40m Û[34;44m°°°°[33m +[4;42H [0;30;44m°°°°[1;33;40mÛ [0;30;43m°° [37m- - - -Þ±Ý- - - -Þ±Ý[33m [1;37;47m [0;33;40m[5;3HÜ[37;43m [30m [37m [30m°°°[1;33;40m Û[34;44m°°°[33m Time Port [0;30;44m°°°[1;33;40mÛ [0;30;43m°°°[37m |Þ±Ý +[5;65H |Þ±Ý [1;47m[5;79H [0;37;43m[6;1H [33;40mß[37;43m [33;40mß[37;43m [33;40mß[37;43m [33;40mß[37;43m [33;40mß[37;43m [33;40mß[37;43m [30m°°°[1;33;40m Û[34;44m°[37mÜ [33m [0;30;44m [1;33m [37mÜ +[6;47H[0;30;44m°[1;33;40mÛ [0;30;43m°°°[37m |Þ±Ý |Þ±Ý [40mÜÜÜÜ[1;47m[6;80H [0;37;43m[7;1H [33;40mÜ[37;43m [33;40mÜ[37;43m [33;40mÜ[37;43m [30m [33;40mÜ[37;43m [33;40mÜ[37;43m [33;40mÜ[37;43m [30m°°°[1;33;40m Û +[7;28H[34;44m°[37mß [33m [31mPre-Play[33m [37mß[0;30;44m°[1;33;40mÛ [0;30;43m°°°[37m |Þ±Ý |Þ±Ý [40mßßßß[1;47m[7;80H [0;33;40m[8;3Hß[37;43m [30m [37m [30m [37m [30m°°°[1;33;40m Û[34;44m°°°[33m +[8;36H[31mMENU[33m [0;30;44m°°°[1;33;40mÛ [0;30;43m°°°[37m |Þ±Ý |Þ±Ý [1;47m[8;79H [0;33;40m[9;7Hßß[37;43m - - - - - - -[30m °°[1;33;40m Û[34;44m°°°°[33m [0;30;44m [1;33m [0;30;44m°°°°[1;33;40mÛ [0;30;43m°° +[9;53H[37m- - - -Þ±Ý- - - -Þ±Ý[33m [1;37;47m [33;40m[10;24Hßßßßß[44mÜÜ[34m°°[33m [34m [37mÜÜ[33m [0;30;44m°°°[1;33mÜÜ[40mßßßßß[0;37;40m[10;61H [10;71H [1;33m[11;31Hßßß[44mÜÜÜÜÜÜÜÜ[40mßßß[0;37;40m[13;27HÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +[13;46HÄÄ¿[14;27H³[14;29H([1;32mB[30m)[0;32;40megin Playing[1;30m[14;48H³[0;37;40m[15;27H³[15;29H([1;32mQ[30m)[0;32;40muit Back to BBS[1;30m[15;48H³[0;37;40m[16;27H³[16;29H([1;32mI[30m)[0;32;40mnstructions[1;30m[16;48H³[0;37;40m +[17;27H³[17;29H([1;32mD[30m)[0;32;40maily News[1;30m[17;48H³[37m [0;37;40m[18;27H³[18;29H([1;32mY[30m)[0;32;40mesterday's News[1;30m[18;48H³[37m [0;37;40m[19;27H³[19;29H([1;32mL[30m)[0;32;40mist Players[1;30m[19;48H³[37m +[0;37;40m[20;27H³[20;29H([1;32mV[30m)[0;32;40miew Your Stats[1;30m[20;48H³[37m [0;37;40m[21;27HÀ[1;30mÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[37m [21;1H[0m diff --git a/src/doors/timeport/source.doc b/src/doors/timeport/source.doc new file mode 100644 index 0000000000000000000000000000000000000000..57214948dbda04fdb0724b25ee7d23468336259f --- /dev/null +++ b/src/doors/timeport/source.doc @@ -0,0 +1,46 @@ +Here it is, the Time Port source code -- everything you should need to compile +Time Port. You'll want to get the TPORT11A.ZIP file as well, which contains +the original files (Ansi's, docs, and so forth). Then, you should be able +to use this source code to re-compile new EXE's (I'd keep them in a separate +directory from the original TPORT11A stuff) to replace the originals. + +NOTE: You also need QuickBASIC 4.5 and Jeff Sumberg's QBSerial library +(although I included the necessary QBSER .OBJ file for compiling). + +I've released this source code in the hopes that other BBS door authors +(or would-be authors) can find good use for it. I've received lots of +email over the years asking for help -- I simply don't have time to be +everybody's personal tutor, although I wish I did. Instead of providing +small snippets of code (which I may also do in the future), I'm releasing +source to a large, complete, working, RPG/Adventure door game! Time Port +was based on the Lunatix source code -- so much of it is IDENTICAL to +Lunatix 4.xx, including the player load/save, COLOR CODE routines, and +so forth. And in case you're wondering, NO, I will *not* be releasing the +source code to Lunatix... at least not for many many... MANY years. :) + +Even if you don't want to modify & re-compile Time Port, there should be +a wealth of good routines here for creating your own BBS door game. If you +use it (and ESPECIALLY if you use a lot of it) please give credit to me for +the original program from which your work is based. I'd also appreciate +a mention on any web pages that you display files for download that were +based upon this source code. :) + +You'll notice that many of the source files duplicate the work of the others. +This is because they're all "stand-alone" modules... or IGM's. Even though +they're a necessary part of they game, the entire Time Port structure is +strung together as a series of IGM's... Outside, Twenties, Stoneage, etc... +each one is an IGM... you may even be able to use them as examples to create +NEW time port IGM's!!! + +The "CREATE.BAT" file is used to compile all the Time Port QB files. You +might need to alter it to show the path to your QuickBASIC compile/link +files (LINK.EXE, BC.EXE, BCOM45.LIB). For my setup, BC.EXE and LINK.EXE +are in the path, and BCOM45.LIB is in my C:\QB\ directory, so CREATE.BAT +is set up this way. + +The "BAS.BAT" can be used to compile a single program. Pass it the BASIC +program name to compile, such as "BAS TWENTIES" or "BAS STONEAGE" to +compile/link a single Time Port file. + +2-27-98 +Mike Snyder diff --git a/src/doors/timeport/stoneage.c b/src/doors/timeport/stoneage.c new file mode 100644 index 0000000000000000000000000000000000000000..2fbe50cebab18bba06c30773f850a972657cf1d7 --- /dev/null +++ b/src/doors/timeport/stoneage.c @@ -0,0 +1,725 @@ +#include <sys/time.h> +#include <stdlib.h> +#include <string.h> +#include <signal.h> +#include "doors.h" +#include "tplib.h" + +short Room; +char MonsterName[256]; +short mhp; +short MonLev1, MonLev2, MonLev3; + +void ShowRoom(long l); +short GetResponse(long l); + +void SaveTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%ld\r\n",MinsLeft); + fprintf(file,"%ld\r\n",SecsLeft); + fclose(file); +} + +void Quitter(void) +{ + SaveTime(); + ExitGame(); +} + +void LessTime(int sig) +{ + SecsLeft = SecsLeft - 1; + if(SecsLeft < 0) + { + SecsLeft = 59; + MinsLeft = MinsLeft - 1; + } + if(PlayingNow <= 0) + return; + if(MinsLeft < 1) + { + Oprint("`%\r\n\r\n"); + Oprint("Your time is up, man!\r\n"); + Quitter(); + exit(0); + } +} + +void LoadTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[256]; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"r",LOCK_SH); + readline(line,sizeof(line), file); + RTrim(line); + MinsLeft=atoi(line); + readline(line,sizeof(line), file); + RTrim(line); + SecsLeft=atoi(line); + fclose(file); +} + +int main(int argc, char **argv) +{ + struct itimerval it; + int x; + short a; + + ParseCmdLine(argc,argv); + srandomdev(); + + strcpy(Alias, "Who is it?"); + StatsIn = 0; + Playercount = 0; + ReadLinkTo(); // 'initialize the modem + ReadConfig(); // 'get default configuartion information + LoadTime(); + + signal(SIGALRM, LessTime); + it.it_interval.tv_sec=1; + it.it_interval.tv_usec=1; + it.it_value.tv_sec=1; + it.it_value.tv_usec=1; + setitimer(ITIMER_REAL, &it, NULL); + + ChatEnabled = 0; + + PlayingNow = 1; + + // 'Is this a new player? + IsHeNew(Alias); + LoadGame(); + NotAgain[12]='+'; + StatsIn = 1; + SaveGame(); + OpenInventory(); + + Ocls(); + // 'set opening "variables" + for(x=1;x<argc;x++) + { + if(argv[x][0]=='R') + { + Room=atoi(argv[x]+1); + break; + } + } + + if(Room != 6) + Quitter(); + + // '**** begin the REPEATER code + x=1; + while(1) + { + if(x) + { + Ocls(); + ShowRoom(Room); + } + a = GetResponse(Room); + SaveGame(); + if(Hit<1) + { + NotAgain[1]='^'; + Oprint("\r\n`6 Searing pain tortures you as your life ends!\r\n"); + Paus(2); + Quitter(); + } + + if(a==-2) + { + x=0; + continue; + } + if(a==-1) + { + x=1; + continue; + } + if(a==101) + { + Quitter(); + continue; + } + if(a>=1 && a<=99) + { + Room=a; + x=1; + continue; + } + Oprint("`@The command you typed is invalid. Read the menu.\r\n"); + x=0; + } + return(0); +} + +char *Mprompt(char *dest) +{ + Oprint("`$ ---> "); + MakeInputArea(16); + SetColor(11, 4, 0); + KbIn(dest,15); + Oprint("`7\r\n\r\n"); + return(dest); +} + +void SaveOtherPlayer(void) +{ + SaveStrStats(ch1, ch1, ch2, ch3, ch4, ch5, Ch6, Ch7, Ch8, Ch9, Ch10, Ch11, Ch12, Ch13, Ch14, Ch15, Ch16, ch17, ChRest); +} + +short GetResponse(long l) +{ + long Ap1, pp1, x1, x2, x4; + long gg1, Gld, Ap2; + float Arf, Ar2, b, d; + short t,a,c; + char str[256]; + char v[2]; + char bstr[16]; + char cstr[256]; + char astr[256]; + int x, Tmp, Pet; + + t = 0; + if(l == 1) + { + sprintf(str,"`8:`7:`%%: `@%s`5 Has`# %d`5 Hit Points at level`# %d`5.\r\n",MonsterName,mhp,MonLev3); + Oprint(str); + } + GetCommand(v); + Oprint("\r\n"); + // 'Figure out what section to switch to based upon 'L' room and v$ response + + if(v[0] == '?') + return(-1); + if(v[0]=='I' && l != 1) + { + Inventory(); + return(-1); + } + if(v[0]=='V') + { + ViewStats(); + return(-1); + } + if(v[0]=='X') // 'toggle ansi/ascii + { + if(NotAgain[14]==' ') + NotAgain[14]='|'; + else + NotAgain[14]=' '; + return(-1); + } + + if(l == 13) + { + if(v[0]=='C') + t = 6; + if(v[0]=='L') { + Ocls(); + sprintf(str,"oldman.%d",Level); + DisplayText(str); + t = -1; + } + if(v[0]=='G') { // 'Give the old man a fish + b = HasItem("6"); + if(b < 1) { // 'doesn't have a fish to give him + Oprint("`2 The old man sees that you don't have a fish to give him. 'If you bring one\r\n"); + Oprint("`2 to me,' he tells you, 'I'll help you *fix* someones TCCL.'\r\n"); + return(-2); + } + Oprint("`# 'Which Recruit's TCCL should I tamper with?' `5(Partial name is okay)\r\n"); + Mprompt(bstr); + RTrim(bstr); + if(strlen(bstr)<1) + return(-2); + FindName(cstr, bstr); + if(cstr[0] == 0) { // 'No matching name was found + Oprint("`0 'I have never met that person. Try another name.'\r\n"); + return(-2); + } + if(!strcasecmp(cstr,Alias)) + { + Oprint("\r\n`0 Leave your own TCCL alone.\r\n"); + return(-2); + } + OpenStats(cstr); // 'Load the other player's file right now.... + if(Ch6[12] != ' ') + { + Oprint("\r\n`0 'You should choose somebody else at this time.'\r\n"); + return(-2); + } + // 'Okay, mess up that player's TCCL + sprintf(str,"\r\n`@ 'Okay, when I see %s, I'll *fix* the TCCL. Leave it to me.\r\n",ch4[0]=='M'?"him":"her"); + Oprint(str); + x1 = GetValue(GoldFromEach[Level] * 4, .15, .95); + sprintf(str,"`6 Note: You also gained %ld experience for doing this.\r\n",x1); + Oprint(str); + Exp += x1; + x = random()%MaxBadTimes+1; + strcpy(ch17,"badtimes"); + sprintf(Ch16,"R%d N*",x); + SaveInvItem(b, "-------------------", 0, 0); + SaveOtherPlayer(); + t = -2; + } + } + + if(l== 6) { + if(v[0]=='C') + t = 13; + if(v[0]=='A') { // 'attack another recruit! + Oprint("`# Which Recruit do you wish to attack? `5(Partial name is okay)\r\n"); + Mprompt(bstr); + RTrim(bstr); + if(strlen(bstr)<1) + return(-2); + FindName(cstr, bstr); + if(cstr[0]==0) + { // 'No matching name was found + Oprint("`6 You can't find that person. Try another name.\r\n"); + return(-2); + } + if(!strcasecmp(cstr,Alias)) + { + Oprint("\r\n`0 You beat yourself up until another recruit shakes some sense into you.\r\n"); + return(-2); + } + OpenStats(cstr); // 'Load the other player's file right now.... + if(Level - atoi(Ch11) > 1) { + sprintf(str,"\r\n`@Seriously? %s`@ is too weak to fight you.\r\n",ch1); + Oprint(str); + return(-2); + } + if(Ch6[1]!=' ' || Ch6[12]!=' ') + { + sprintf(str,"\r\n`@ You scan the field for %s`@ but don't see %s.\r\n",ch1,ch4[0]=='M'?"him":"her"); + Oprint(str); + if(Ch6[1]!=' ') + sprintf(str," You conclude that %s`@ is already dead.\r\n",ch1); + else + sprintf(str," You conclude that %s`@ is in some other time.\r\n",ch1); + Oprint(str); + return(-2); + } + if(PlayFight < 1) { + Oprint("`@ You don't feel frisky enough to engage in battle again today.\r\n"); + return(-2); + } + sprintf(str,"`#%s `5carries %s`5 as a weapon.\r\n",ch1,Ch7[0]!='0'?WepName[WepNum(Ch7[0])]:"Nothing"); + Oprint (str); + Oprint("`# Do you really want to attack? `%(Y/n): "); + GetYesNo(str); + if(str[0]=='N') + { + sprintf(str,"`@ You decide to leave %s`@ alone for now.\r\n",ch1); + Oprint(str); + return(-2); + } + sprintf(str,"`%%%s`7 attacked you in the Stone Age.",Alias); + AddToMail(PlayerNum, str); + strcpy(MonsterName, ch1); + PlayFight--; + MonLev1 = WepNum(Ch7[0]); + MonLev2 = WepNum(Ch8[0]); + MonLev3 = atoi(Ch11); + mhp = atoi(Ch9); + t = 1; + } + if(v[0]=='*') + t = 101; + if(v[0]=='L') + { + ListPlayers(); + t = -1; + } + } + + if(l== 1) { // 'fighting one of the monsters + if(v[0]=='R') { + Oprint("\r\n`6 You make a quick and embarassing retreat from your opponent.\r\n\r\n"); + sprintf(str,"`%%%s`7 ran away in fear of being killed by you!",Alias); + AddToMail(PlayerNum, str); + AddToMail(PlayerNum, " "); + PressAnyKey(); + t = 6; + } + if(v[0]=='A') { + Arf = .95; + Ar2 = 1; + b = .7; + d = .5; + a = Level - MonLev3 + 1; + if(a < 0) + a = 0; + c = MonLev3 - Level + 1; + if(c < 0) + c = 0; + Ap1 = WeaponAdd[WepNum(Weapon)]; + gg1 = GetValue(DefenseAdd[MonLev2], Arf, Ar2); + b = b + (.5 * a); + Ap1 = Ap1 * b; + if(NotAgain[3]!=' ') // 'has Heat Bomb + { + sprintf(str,"`%% -- You use your Heat Bomb against %s --\r\n",ch1); + Oprint(str); + NotAgain[3]=' '; + Ap1 = Ap1 * (14 - Level); + } + d = d + (.5 * c); + gg1 = gg1 * d; + x1 = GetHitLev(Ap1, gg1, .25, .75); + // ' ^Pwp ^Mdf + if(Weapon == '0') + x1 = x1 / 2; + x1 = x1 * (random()%2+1); // 'player fight + b = 1; + d = 1; + a = Level - MonLev3 + 1; + if(a < 0) + a = 0; + c = MonLev3 - Level + 1; + if(c < 0) + c = 0; + Ap2 = DefenseAdd[WepNum(Defense)]; + pp1 = GetValue(WeaponAdd[MonLev1], Arf, Ar2); + b = b + (.5 * a); + Ap2 = Ap2 * b; + d = d + (.5 * c); + pp1 = pp1 * d; + x2 = GetHitLev(pp1, Ap2, .25, .75); + // ' ^Mwp ^Pdf + x2 = x2 * (random()%2 + 1); + if(x1 <= 0) + { + Oprint("`8:`7:`%: `2You Miss `0"); + Oprint(MonsterName); + Oprint("`2 Completely!\r\n"); + } + if(x1 > 0) + { + sprintf(str,"\r\n`8:`7:`%%: `2You attack %s For `@%ld`2 damage!\r\n",MonsterName,x1); + Oprint(str); + } + mhp = mhp - x1; + t = -2; + if(mhp <= 0) + { + Oprint("`8:`7:`%: `2You have killed "); + Oprint(MonsterName); + Oprint(" `4!!!\r\n\r\n"); + Gld = atoi(ch2) / 2; + x1 = atoi(ch3) / 10; + pp1 = atoi(Ch10) / 10; // 'you take 10% of Ch1$'s experience. + sprintf(str,"`6You find`$ %ld`6 Morph Credits.\r\n",Gld); + Oprint(str); + if(random()%4==1) + { + sprintf(str,"`6You steal`0 %ld`6 Morph Credits using %s`6's TCCL.\r\n",x1,ch1); + Oprint(str); + sprintf(ch3,"%ld",atoi(ch3)-x1); + Money += x1; + sprintf(str,"`@%ld Morph Credits were taken from your account!",x1); + AddToMail(PlayerNum, str); + } + sprintf(str,"`6You gain `$%ld`6 Experience.\r\n",pp1); + Oprint(str); + Money += Gld; + if(Money > 49999999) + Money = 49999999; + sprintf(ch2,"%ld",atoi(ch2)-Gld); + if(ch2[0]=='-') + strcpy(ch2,"0"); + Exp += pp1; + sprintf(Ch10,"%ld",atoi(Ch10)-pp1); + strcpy(Ch9,"0"); + PlayKill += 1; + Ch6[1]='^'; + x4=atoi(Mid(bstr,ChRest,2,8)); + if(x4 > 0) + { // 'there is a hit to be collected! + sprintf(str,"`6You collect`0 %ld`6 in Reward Money.\r\n",x4); + Oprint(str); + ChRest[1]='0'; + ChRest[2]=' '; + ChRest[3]=' '; + ChRest[4]=' '; + ChRest[5]=' '; + ChRest[6]=' '; + ChRest[7]=' '; + ChRest[8]=' '; + Money += x4; + } + sprintf(str,"`9%s has `$killed `9you!",Alias); + AddToMail(PlayerNum, str); + AddToMail(PlayerNum, " "); + Tmp = atoi(Ch11); + sprintf(astr,"%d",FindTheLevel(atoi(Ch10))); + if(atoi(astr) <= atoi(Ch11)) + strcpy(Ch11, astr); + SaveOtherPlayer(); + sprintf(str,"`%%%s `0Killed `7%s`0 in a player fight.",Alias, ch1); + WriteNews(str, 0); + if(x4 > 0) + { + sprintf(str,"`@Reward Money was paid to %s`@ for the Hit.",Alias); + WriteNews(str, 0); + } + if(atoi(Ch11) < Tmp) + { + sprintf(str,"`0%s`7 was knocked DOWN to level %s!",ch1,Ch11); + WriteNews(str, 0); + } + PickRandom(astr, "deaths.txt"); + d = TalkToPress(); + if(d == 0) + { + WriteNews(FixTheString(str, astr, MonsterName, Alias), 1); + } + t = 6; + PressAnyKey(); + } + if(mhp > 0) { + if(x2 <= 0) { + Oprint("`0"); + Oprint(MonsterName); + Oprint(" What is this line?\r\n"); + } + if(x2 > 0) { + sprintf(str,"`8:`7:`%%: `0%s`2 hits you for`@ %ld`2 damage!\r\n",MonsterName,x2); + Oprint(str); + Hit -= x2; + if(Hit < 1) + { // 'player has been killed + Oprint("\r\n"); + Oprint("`5 You have been `#killed `5by "); + Oprint(MonsterName); + Oprint(".\r\n"); + Oprint("`2 10% experience lost\r\n"); + Oprint("`2 Half of On-hand Morph Credits lost.\r\n"); + Gld = Money / 2; + pp1 = Exp / 10; // 'you lose 10% of your experience if you lose + Money -= Gld; + if(Money < 0) + Money = 0; + sprintf(ch2,"%ld",atoi(ch2)+Gld); + if(atoi(ch2) > 49999999) + strcpy(ch2, "49999999"); + Exp -= pp1; + Tmp = Level; + Pet = FindTheLevel(Exp); + if(Pet <= Level) + Level = Pet; + if(Level < Tmp) + { + sprintf(str,"`0%s`2 was knocked`0 DOWN`2 to level %d!",Alias,Level); + WriteNews(str, 0); + } + sprintf(Ch10,"%ld",atoi(Ch10)+pp1); + NotAgain[1]='^'; + sprintf(str,"`%%%s`7 broke into your room.\r\n",Alias); + AddToMail(PlayerNum, str); + sprintf(str,"`0You have killed `9%s`0 in self Defense!",Alias); + AddToMail(PlayerNum, str); + sprintf(str,"`0You took %ld Morph Credits from the dead corpse of %s.",Gld,Alias); + AddToMail(PlayerNum, str); + sprintf(str,"`0You gained %ld Experience points.",pp1); + AddToMail(PlayerNum, str); + AddToMail(PlayerNum, " "); + sprintf(Ch15,"%d",atoi(Ch15)+1); + SaveOtherPlayer(); + sprintf(str,"`%%%s `9Killed `7%s`9 in self-defense.",ch1,Alias); + WriteNews(str, 0); + PickRandom(astr, "deaths.txt"); + d = TalkToPress(); + if(d == 0) + { + WriteNews(FixTheString(str, astr, Alias, MonsterName), 1); + } + } + // 'Exit from this loop and if Player is dead... it exits + } + } + } + } + + return(t); +} + + +char *MakeFly(char *dest) +{ + int x,y; + + dest[0]=0; + for(x = 1; x<=4;x++) + { + y = random()%4+1; + if(y==1) + strcat(dest, "N"); + if(y==2) + strcat(dest, "E"); + if(y==3) + strcat(dest, "S"); + if(y==4) + strcat(dest, "W"); + } + return(dest); +} + +void SaveGame(void) +{ + // 'put any "save the game" data into this routine + if(Hit < 0) + Hit=0; + if(StatsIn > 0) + SaveStats(Alias, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, ExeLine, ComLine, LineRest); +} + +void ShowRoom(long l) +{ + char str[256]; + + // 'code to print "headers" + Oprint("`!T`3ime `!P`3ort `8Version `7"); + Oprint(Version); + Oprint(" -- `7Location: "); + + if(l== 6) + Oprint("`%Stone Age: By a Mountain\r\n"); + if(l== 1) + { + sprintf(str,"`%%Fighting Against %s\r\n",ch1); + Oprint(str); + } + if(l== 13) + Oprint("`%Old Man of the Mountain\r\n"); + + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l != 1) + { + sprintf(str,"room%ld.%s",l,NotAgain[14]!=' '?"asc":"ans"); + DisplayText(str); + } + + if(l== 6) { // 'Stone Age Mountain + strcpy(Prompt, "CAL*"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%*`8)`@Time Phase Back to the hanger "); + Oprint("`7 (`!A`8)`3ttack another recruit\r\n"); + Oprint("`7 (`!C`8)`3limb up the mountain "); + Oprint("`7 (`!L`8)`3ist Recruits using the TCCL\r\n"); + } + + if(l== 1) { + strcpy(Prompt, "RA"); + Oprint("`6 You rush towards "); + Oprint(ch1); + Oprint("`6 and prepare yourself for the attack.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`!A`8)`3ttack "); + Oprint(ch1); + Oprint("`7 (`%R`8)`@un away\r\n"); + } + + if(l== 13) { + strcpy(Prompt, "GLC"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`!L`8)`3isten to his Story "); + Oprint("`7 (`%C`8)`@limb Back Down the Mountain\r\n"); + Oprint("`7 (`!G`8)`3ive Him a Fish "); + } + + if(l != 1) + Oprint("`7 (`!?`8)`3Re-List menu options\r\n"); + + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l != 1) { + sprintf(str,"`2 You have `0%ld`2 Morph Credits on hand, and `0%ld`2 in the Time Bank.\r\n",Money,Stash); + Oprint(str); + } +} + +void UseItem (long c, short b) // 'c=1-8 item number, b=the item code (1-???) +{ + long xxx; + char str[256]; + char sstr[256]; + char astr[256]; + int Tot,x; + + if(b == 13) + { + if(Room != 13) { + Oprint("`0 You can't fly from here..."); + return; + } + if(LineRest[12] != ' ') + { + Oprint("`2 You already flew today... and look what that got you. Wait until tomorrow.\r\n"); + return; + } + LineRest[12]='%'; + Ocls(); + DisplayTitle("flying.ans"); + Mid(sstr, LineRest, 14, 4); + if(sstr[0]==' ') + { + MakeFly(sstr); + LineRest[13]=sstr[0]; + LineRest[14]=sstr[1]; + LineRest[15]=sstr[2]; + LineRest[16]=sstr[3]; + } + Oprint("`0 What directions will you fly? "); + MakeInputArea(5); + KbIn(astr,4); + UCase(astr); + Pad(str, astr, 4); + strcpy(astr,str); + Oprint("`7\r\n\r\n"); + Tot = 0; + for(x = 0; x<4;x++) + { + if(astr[x]==sstr[x]) + Tot++; + } + sprintf(str,"`$ You were able to fly for`@ %d%s\r\n",Tot,Tot==1?"`$ minute":"`$minutes"); + Oprint(str); + if(Tot < 4) { + Oprint("`6 After that, you plummet to the ground.\r\n"); + Room = 6; + KickOut = 1; + return; + } + // 'Total was good, now you get Morph Credits + xxx = GoldFromEach[Level] * 7; + Oprint("\r\n`0 The crisis passes and the wind stops tossing you around.\r\n"); + Oprint("`2 Great job. You land on the ground where several awe-struck spectators\r\n"); + sprintf(str,"`2 give you %ld Morph Credits for your outstanding performance.\r\n",xxx); + Oprint(str); + Money += xxx; + Room = 6; + KickOut = 1; + MakeFly(sstr); + LineRest[13]=sstr[0]; + LineRest[14]=sstr[1]; + LineRest[15]=sstr[2]; + LineRest[16]=sstr[3]; + return; + } + + Oprint("`2 You find no use for that item here at this time.\r\n"); + +// 'SaveInvItem c, "-------------------", 0, 0 +} diff --git a/src/doors/timeport/timeport.c b/src/doors/timeport/timeport.c new file mode 100644 index 0000000000000000000000000000000000000000..117797c51d96587f3fbb29012a373b9109d42e99 --- /dev/null +++ b/src/doors/timeport/timeport.c @@ -0,0 +1,1524 @@ +#include <ctype.h> +#include <signal.h> +#include <stdlib.h> +#include <string.h> +#include <unistd.h> +#include <sys/time.h> +#include <time.h> +#include "doors.h" +#include "tplib.h" +#include "timeport.h" + +short Room; +// char Quote[11][256]; +char OtherPlaces[27][256]; +char OtherDos[27][256]; +short OtherCount; +short MaxTitleScreens; +short IsDead; + +/* +'The Game: Struct +'Set ComLine$ to an 8-char prog name +'Set ExeLine$ to a command-line perameter +'Timeport will keep "shelling out" to that program until it detects that +'ComLine$ is null (no more chained IGM's) +*/ + +/* +'These portions of ChRest$ (LineRest$) are described below +'1-1 (1): Thing that Fred is selling today, hook, line, or pole +'2-9 (8): Amount of hit placed you at this time +'10-10 (1): Has tried to pick door lock today? +'11-11 (1): What Flirt number the player is on 1-5 +'12-12 (1): Has tried to dig today? +'13-13 (1): Has flown today? +'14-17 (4): 4-digit directions code. :) +*/ +void quitter(void) +{ + NotAgain[12] = ' '; + ExitGame(); +} + +void LessTime(int sig) +{ + SecsLeft = SecsLeft - 1; + if(SecsLeft < 0) + { + SecsLeft = 59; + MinsLeft = MinsLeft - 1; + } + if(PlayingNow <= 0) + return; + if(MinsLeft < 1) + { + Oprint("`%\r\n\r\n"); + Oprint("Your time is up, man!\r\n"); + quitter(); + exit(0); + } +} + +int main(int argc, char **argv) +{ + FILE *file; + char path[MAXPATHLEN]; + struct itimerval it; + char a[256]; + char b[256]; + char d[256]; + char p[256]; + char str[256]; + char k[256]; + time_t currtime; + short quick; + short begin; + char DATE[9]; + short A; + short t; + short DidList; + short DidView; + short DidNews; + + ParseCmdLine(argc,argv); + strcpy(Bad,"W2"); + srandomdev(); + MaxTitleScreens = 7; + strcpy(Alias, "Who is it?"); + StatsIn = 0; + Playercount = 0; + ReadLinkTo(); // 'initialize the modem + ReadConfig(); // 'get default configuartion information + + strcpy(Bad,"N3"); + + strcpy(Bad,"WX"); + + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path, "a", LOCK_SH); + fclose(file); + + if(GraphMode <= 0) + { + Oprint("\r\n\r\nANSI was not detected. if this is in `$C`!O`%L`@O`#R`7"); + Oprint(" you have ANSI. If it's garbage, you do not have ANSI.\r\n"); + Oprint("Do you have ANSI? "); + GetYesNo(path); + if(path[0] == 'N') + { + ExitGame(); + return(0); + } + } + + signal(SIGALRM, LessTime); + it.it_interval.tv_sec=1; + it.it_interval.tv_usec=1; + it.it_value.tv_sec=1; + it.it_value.tv_usec=1; + setitimer(ITIMER_REAL, &it, NULL); + + sprintf(path,"%sthedate.dat",DatPath); + file=SharedOpen(path, "a", LOCK_EX); + fwrite(" ", 1, 1, file); + fclose(file); + file=SharedOpen(path, "r", LOCK_SH); + readline(d, sizeof(d), file); + RTrim(d); + fclose(file); + currtime=time(NULL); + strftime(DATE, sizeof(DATE), "%D", localtime(&currtime)); + if(strcmp(d, DATE)) + { + sprintf(str, "%stp-event N*", DatPath); + MakeNode(k, str); + system(k); + k[0]=0; + } + InitPort(); + file=SharedOpen(path,"w", LOCK_EX); + fputs(DATE, file); + fclose(file); + IsDead = 0; + ChatEnabled = 0; + Playercount = 0; + MaximumPlayers = 50; + + sprintf(path,"%sigm.dat",DatPath); + file=SharedOpen(path, "a", LOCK_SH); // 'initialize IGM.DAT in case + fclose(file); + +/* +'************************************************************************* +' READ IN OTHER PLACES!!! -- From IGM.DAT +'************************************************************************* +*/ + file=SharedOpen(path,"r", LOCK_SH); + t = 0; + k[0]=0; + OtherCount = 0; + while(!feof(file) && OtherCount < 26) + { + readline(a,sizeof(a),file); + RTrim(a); + if(a[0]!=';' && strlen(a) > 0) + { + if(t == 1) + { + OtherCount++; + strcpy(OtherPlaces[OtherCount], p); + strcpy(OtherDos[OtherCount], a); + } + if(t == 0) + strcpy(p, a); + t = 1 - t; + } + } + fclose(file); + if(OtherCount > 3 && Regis == 0) + OtherCount = 3; + +/* +'*************************************************************************** +*/ + PlayingNow = 1; + +/* +'*** the following code is for the Master program: It gets the new player or +'locates old one. For "stub" this should be replaced by a read-from file +*/ + + ShowTitle(); // 'not necessary for "stub" operation +// 'show the copyright message screen here... :) + CountPlayers(); +// 'Is this a new player? + IsHeNew(Alias); + if(Alias[0]==0) + NewPlayer(); + strcpy(Bad, "N2"); + LoadGame(); + strcpy(Bad, "N7"); + NotAgain[12]='+'; + StatsIn = 1; + strcpy(Bad, "N6"); + SaveGame(); + strcpy(Bad, "N8"); + OpenInventory(); + +/* +'******* STATS ARE IN and game is ready to play. This should call the input +'routines, and so on. :) +*/ + +// 'insert "shuttle log-on here" + DidList = 0; + DidView = 0; + DidNews = 0; + + + quick=0; + begin=0; + while(!begin) + { + if(!quick) + { + Ocls(); + DisplayTitle("shuttle.ans"); + } + SetColor(14, 0, 0); + Position(73, 13); + Owait(str); + switch(toupper(str[0])) + { + case 'B': + begin=1; + break; + case 'Y': + Ocls(); + ReadNews(Yesterday); + quick=0; + break; + case 'D': + Ocls(); + ReadNews(Today); + DidNews = 1; + quick=0; + break; + case 'I': + Ocls(); + DisplayText("instruct.doc"); + quick=0; + break; + case 'L': + ListPlayers(); + DidList = 1; + quick=0; + break; + case 'V': + ViewStats(); + quick=0; + break; + case 'Q': + Ocls(); + NotAgain[12] = ' '; + ExitGame(); + return(0); + default: + quick=1; + } + } + + IsDead = 0; + NotAgain[9] = '0'; // '0 days since last play now.... + +// 'code to check the date (Ch12$) and if they can't play, let them know! + if(NotAgain[1] == '#') + { + NotAgain[1] = ' '; + Hit = PlayerHP[Level]; + } + if(!strcmp(lastplay, DATE) && NotAgain[1] != ' ') + { + // 'player is dead until tomorrow + IsDead = 1; + } + if(IsDead == 0) + { + strcpy(lastplay, DATE); + if(NotAgain[1] != ' ') + { + // 'this is refresh code, overwrite ch9$ + Hit = PlayerHP[Level]; + } + NotAgain[1]=' '; + } + + Ocls(); + ReadMail(OriginNumber); + if(DidNews == 0) + { + Ocls(); + ReadNews(Today); + } + // 'set opening "variables" + Room = 1; // 'start out in the Time Port Hanger + + if(IsDead > 0) + { + Oprint("\e\n`4 You have been killed today. You may play again tomorrow.\r\n"); // 'dupj + NotAgain[12] = ' '; + Paus(2); + quitter(); + return(0); + } + + // '**** begin the REPEATER code + SaveGame(); + + quick=0; + while(1) + { + if(!quick) + { + Ocls(); + RTrim(ComLine); + strcpy(b, ComLine); + if(strlen(b) > 0) + { + A = GetResponse(Room, 1); + Ocls(); + } + if(NotAgain[12] == ' ') + { + quitter(); + return(0); + } + ShowRoom(Room); + } + A = GetResponse(Room, 0); + SaveGame(); + if(NotAgain[12]==' ') + { + quitter(); + return(0); + } + if(Hit < 1) + { + NotAgain[1] = '^'; + Oprint("\r\n`4 You have been killed today. You may play again tomorrow.\r\n"); + Paus(2); + quitter(); + return(0); + } + switch(A) + { + case -2: + quick=1; + break; + case -1: + quick=0; + break; + case 101: + quitter(); + return(0); + default: + if(A>=1 && A<=99) + { + Room = A; + quick=0; + break; + } + else + Oprint("`@The command you typed is invalid. Read the menu.\r\n"); + } + } + return(0); +} + +/* +ErrorInGame: RESUME Err2 +Err2: ON ERROR GOTO ErrTrap2 +Oprint "SYSOP: An error was encountered in the game: TimePort code:" + Bad$ + ret$ +d = TIMER +DO WHILE ABS(TIMER - d) < 3: LOOP +GOTO quitter +*/ + +/* +ErrTrap2: PRINT + COLOR 15, 0 + PRINT " SYSOP: Recursive errors encounterd, program aborted!" + COLOR 7, 0 + Paus 3 + RESUME en +en: END +*/ + +void CountPlayers(void) +{ + // '**** GET RID of this routine in STUB operation! + // 'Count the Players + FILE *file; + char path[MAXPATHLEN]; + char a[256]; + char *x; + + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path, "r", LOCK_SH); + while(!feof(file)) + { + readline(a, sizeof(a), file); + RTrim(a); + x = strchr(a, '~'); + if(x==NULL) + x=a; + else + while(isspace(*(++x))); + OpenStats(x); + if(strlen(ch1) > 0) + Playercount++; + } + fclose(file); +} + +void FundTransfer(short x) +{ + long Am; + char a[256]; + char b[256]; + + sprintf(a,"`2 On Hand: `0%ld\r\n", Money); + Oprint(a); + sprintf(a,"`2 In Bank: `0%ld\r\n\r\n", Stash); + Oprint(a); + Oprint("`2 Deposit how much? "); + if(x != 0) + Oprint("`2 Withdraw how much? `3(Use `!1`3 for `!All`3) "); + MakeInputArea(9); + KbIn(b, 9); + Oprint("`7\r\n\r\n"); + Am = atoi(b); + if(Am == 1 && x == 0) + Am = Money; + if(Am == 1 && x != 0) + Am = Stash; + + if(Am <= 0) + { + Oprint("`6 A transfer of no money cannot take place. Sorry.\r\n"); + Oprint("\r\n"); + PressAnyKey(); + return; + } + + if(x == 0) + { + if(Am > Money) + { + Oprint("`3 You don't have that much money on-hand!\r\n"); + Oprint("\r\n"); + PressAnyKey(); + return; + } + Stash += Am; + Money -= Am; + Oprint("`! Fund Transfer completed: `3Deposit successful.\r\n"); + Oprint("\r\n"); + PressAnyKey(); + return; + } + + if(x != 0) + { + if(Am > Stash) + { + Oprint("`3 You don't have that much money in the bank!\r\n"); + Oprint("\r\n"); + PressAnyKey(); + return; + } + Money += Am; + Stash -= Am; + Oprint("`! Fund Transfer completed: `3Withdrawal successful.\r\n"); + Oprint("\r\n"); + PressAnyKey(); + return; + } +} + +void Pline(void) +{ + Oprint("`%----------------------------------------------------------------------------\r\n"); +} + +void SaveTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%ld\r\n",MinsLeft); + fprintf(file,"%ld\r\n",SecsLeft); + fclose(file); +} + +void LoadTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[256]; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"r",LOCK_SH); + readline(line,sizeof(line), file); + RTrim(line); + MinsLeft=atoi(line); + readline(line,sizeof(line), file); + RTrim(line); + SecsLeft=atoi(line); + fclose(file); +} + + +short GetResponse(short l, short g) +{ + char v[256]; + char tstr[256]; + short t; + short Shellout=0; + long x1,x2; + char str[256]; + char aa[74]; + char path[MAXPATHLEN]; + short d; + char Rr[256]; + char k[256]; + FILE *file; + char *O; + char a[MAXPATHLEN]; + short r; + + if(g==0) + { + t = 0; + + GetCommand(v); + + Oprint("\r\n"); // 'blank line before printing any messages after the user command + + // 'Figure out what section to switch to based upon 'L' room and v$ response + + switch(v[0]) + { + case '?': + return(-1); + case 'I': + Inventory(); + return(-1); + case 'V': + ViewStats(); + return(-1); + case 'X': + if(NotAgain[14]==' ') + NotAgain[14]='|'; + else + NotAgain[14]=' '; + return(-1); + } + if(l == 1) + { + switch(v[0]) + { + case 'S': + t=5; + break; + case 'G': + MakeNode(str,"outside N* R4"); + sprintf(a,"%s%s",DatPath,str); + Shellout=1; + break; + case '*': + t=101; + break; + case 'L': + t=2; + break; + case 'A': + t=14; + break; + } + } + + if(l==2) + { + switch(v[0]) + { + case 'C': + if(Regis == 0) + { + Oprint("`5 The TCCL hums and vibrates and squeaks and generally makes a huge amount\r\n"); + Oprint("`5 of noise. A message flashes violently on the screen, and as its behavior\r\n"); + Oprint("`5 calms a little, you see the following words:\r\n"); + Oprint("`# Name Changes Disabled: Time Port has not yet been registered for this BBS.\r\n"); + return(-2); + } + x1 = GoldFromEach[Level] * 5; + sprintf(str, "`2 A name change will require a payment of %ld Morph Credits.\r\n",x1); + Oprint(str); + Oprint("`2 This will be taken from your Bank balance. Change your name? (Y/n): "); + GetYesNo(tstr); + Oprint("\r\n"); + if(tstr[0] == 'N') + { + sprintf(str,"`2 You decide to continue using %s`2 as your name.\r\n",Alias); + Oprint(str); + return(-2); + } + if(x1 > Stash) + { + Oprint("`2 You Bank balance will not cover the charge to change your name.\r\n"); + return(-2); + } + Oprint("`2 What will your new name be? "); + MakeInputArea(16); + KbIn(aa,15); + Oprint("`2\r\n"); + if(strlen(aa) < 2) + { + Oprint("`2 The Time Control Computer retains your orginal name; No change made.\r\n"); + return(-2); + } + sprintf(str,"`2 Change your name to %s`2? (Y/n): ",aa); + Oprint(str); + GetYesNo(tstr); + Oprint("`2\r\n"); + if(tstr[0] == 'N') + { + Oprint("`2 The Time Control Computer retains your orginal name; No change made.\r\n"); + return(-2); + } + if(!strcasecmp(Alias, aa)) + { + sprintf(str,"`2 Your name is already %s`2.\r\n",Alias); + Oprint(str); + return(-2); + } + OpenStats(aa); + if(ch1[0]) + { + Oprint("`2 Somebody is already using that name. Better pick something else.\r\n"); + return(-2); + } + SaveStats(aa, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, guardname, BribeGuard, LineRest); + DelOldFromNameList(); + strcpy(Alias, aa); + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path, "a", LOCK_EX); + fprintf(file, "%s ~%s\r\n", User, Alias); + fclose(file); + sprintf(str,"`2 You are now known as %s`2.\r\n\r\n",Alias); + Oprint(str); + PressAnyKey(); + Stash -= x1; + return(-1); + case 'R': // 'Request an Update in Status + if(Level >= 12) + { + Oprint("`@ You have obtained the maximum status level!\r\n"); + return(-2); + } + Pline(); + Oprint("`# You key in a request for a review of your status. The TCCL responds:\r\n"); + x1 = Exp; + if(x1 > UpToNext[Level]) + { + if(Level >= 5 && Regis == 0) + { + Oprint("`! You are at Maximum Status for an Unregistered game of Time Port.\r\n"); + Pline(); + return(-2); + } + Level ++; + Hit = PlayerHP[Level]; + sprintf(str,"`!%s`3 was promoted to the Rank of `!%s`3 (%d) today.",Alias,Rank[Level],Level); + WriteNews(str, 1); + sprintf(str, "`! You've been promoted to Rank %d: %s!\r\n",Level,Rank[Level]); + Oprint(str); + Pline(); + return(-2); + } + else + { + x2 = UpToNext[Level] - x1; + sprintf(str,"`! A Promotion may be granted after obtaining`%% %ld`! more Experience.\r\n",x2); + Oprint(str); + Pline(); + return(-2); + } + break; + case 'Q': + t=1; + break; + case 'N': + Ocls(); + ReadNews(Today); + t = -1; + break; + case 'Y': + Ocls(); + ReadNews(Yesterday); + t=-1; + break; + case 'M': + d = WriteALetter(Alias, "", 0); + t = -2; + break; + case 'L': + ListPlayers(); + t = -1; + break; + case 'S': + Oprint("Write E-Mail to Who? (Name or partial search string): "); + MakeInputArea(16); + KbIn(Rr,15); + Oprint("`!\r\n"); + if(strlen(Rr) > 0) + { + FindName(k, Rr); + if(strlen(k) < 1) + { + Oprint("`@That wasn't found in the TimeTravel Rebellion listing.\r\n"); + return(-2); + } + if(!strcasecmp(Alias, ch1)) + { + Oprint("`@The TCC prohibits you from padding your own electronic mailbox.\r\n"); + return(-2); + } + d = WriteALetter(Alias, ch1, PlayerNum); + if(d > 0) + { + sprintf(str,"|A%-4d%s",OriginNumber,Alias); + AddToMail(PlayerNum, str); + } + } + t = -2; + break; + case 'W': + FundTransfer(1); + t = -1; + break; + case 'D': + FundTransfer(0); + t = -1; + break; + } + } + + if(l == 3) + { + if(v[0]=='0') + return(14); + r = v[0] - 64; + if(r <= 0 || r > OtherCount) + t = 3; + else + { + MakeNode(a, OtherDos[r]); + Shellout=1; + } + } + + if(l == 14) + { + switch(v[0]) + { + case '0': + t = 1; + break; + case '1': + t = 3; + break; + case '2': + MakeNode(str,"stoneage N* R6"); + sprintf(a,"%s%s",DatPath,str); + Shellout=1; + break; + case '3': + MakeNode(str,"twenties N* R15"); + sprintf(a,"%s%s",DatPath,str); + Shellout=1; + break; + case '4': + MakeNode(str,"twenties N* R16"); + sprintf(a,"%s%s",DatPath,str); + Shellout=1; + break; + } + } + + if(l == 5) + { + switch(v[0]) + { + case 'R': + t=1; + break; + case 'T': + t=6; + break; + case 'P': + if(NotAgain[0]!=' ') + { + Oprint("`@ You have already tried to press the buttons today. Wait until tomorrow.\r\n"); + return(-2); + } + TypeCode(); + t = -1; + } + } + + if(l == 6) + { + if(v[0]=='R') + t=5; + if(v[0]=='1' || v[0]=='2' || v[0]=='3' || v[0]=='4') + { + Oprint(" `2What do you wish to say in this conversation?\r\n"); + Oprint("`8->"); + MakeInputArea(74); + KbIn(aa,73); + Oprint("`5\r\n"); + if(strlen(aa)<3) + { + Oprint(" `2That's not going to be good enough. Better say more, or nothing at all.\r\n"); + return(-2); + } + if(v[0]=='1') + O = "says"; + if(v[0]=='2') + O = "adds"; + if(v[0]=='3') + O = "replies"; + if(v[0]=='4') + O = "asks"; + else + O = "is a hacker freak!"; + sprintf(str,"`%%%s`! %s",Alias,O); + WriteTherapy(aa, str); + t = 5; + } + } + if(!Shellout) + return(t); + } + while(1) + { + if(Shellout) + { + NotAgain[12]='+'; + SaveGame(); + SaveTime(); + system(a); + InitPort(); + LoadTime(); + LoadGame(); + OpenInventory(); + } + // 'now, see if they've shelled to yet ANOTHER IGM! + RTrim(ComLine); + if(strlen(ComLine)<1) + return(-1); + if(NotAgain[12] == ' ') + return(0); + strcpy(ComLine," "); + SaveGame(); + sprintf(str, "%s %s", ComLine, ExeLine); + MakeNode(a, str); + NotAgain[12] = '+'; + Shellout=1; + } +} + +void MakeNewCode(void) +{ + int x1, x2, x3, x4; + CurCode[0]=0; + + + do + { + x1 = random()%4+1; + x2 = random()%4+1; + x3 = random()%4+1; + x4 = random()%4+1; + } while(x1 == x2 || x1 == x3 || x1 == x4 || x2 == x3 || x2 == x4 || x3 == x4); + sprintf(CurCode,"%1d%1d%1d%1d",x1,x2,x3,x4); +} + +void NewPlayer() +{ + char str[256]; + char a[2]; + char path[MAXPATHLEN]; + FILE *file; + + // '**** GET RID of this for STUB operation + Ocls(); + Position(1, 4); + + if(Playercount >= MaximumPlayers) + { + // 'beef this up a little ToDo + Oprint("The game is full!\r\n"); + PressAnyKey(); + ExitGame(); + } + + Oprint("`#\"Welcome to the 26th Century.\"\r\n\r\n"); + Oprint("`3 Rule 1: Don't ask how you got here. Not yet, anyway.\r\n"); + Oprint("`3 Rule 2: Don't ask why you're here. We will tell you that.\r\n"); + Oprint("`3 Rule 3: Don't ask who we are. You will find out in time.\r\n"); + + Alias[0]=0; + while(!Alias[0]) + { + strcpy(Bad, "A2"); + Oprint("\r\n`7(If you know how to use color codes, you can put color in your name)\r\n"); + Oprint("\r\n`@By what name will you be know? `4(ENTER alone to quit): "); + MakeInputArea(16); + SetColor(15, 4, 0); + KbIn(Alias, 15); + RTrim(Alias); + Oprint("`7\r\n\r\n"); + if(strlen(Alias) < 1 || (toupper(Alias[0])=='X' && Alias[1]==0)) + ExitGame(); + + strcpy(Bad, "A3"); + if(Alias[0]) + Alias[0]=toupper(Alias[0]); + RTrim(Alias); + sprintf(str,"`#%s? `#Is This Correct (Y/N) \b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b",Alias); + Oprint(str); + GetYesNo(str); + if(str[0]=='N') + { + Alias[0]=0; + continue; + } +/* This didn't work in the original code (no a$ variable existed) *shrug* + IF INSTR(a$, "FUCK") OR INSTR(a$, "CRAP") OR INSTR(a$, "DAMN") OR INSTR(a$, "SHIT") THEN + Oprint "`# You can't use that in your name!\r\n" + GOTO Again + } +*/ + + OpenStats(Alias); + if(ch1[0]) + { + strcpy(Bad, "A1"); + Position(10, 20); + Oprint("`%Somebody already has that name!\r\n"); + Alias[0]=0; + continue; + } + sprintf(path,"%snamelist.dat", DatPath); + file=SharedOpen(path,"a",LOCK_EX); + sprintf(str,"%s ~%s\r\n", User, Alias); + fputs(str,file); + fclose(file); + a[0]=0; + } + + while(!a[0]) + { + Oprint("\r\n`@Are you (`$M`@)ale or (`$F`@)emale? "); + a[0]=0; + while(!a[0]) + { + Owait(a); + UCase(a); + if(a[0] != 'M' && a[0] != 'F') + a[0]=0; + } + Oprint("\r\n"); + strcpy(sex,a); + sprintf(str,"You are %s? `#(Y/N)",a[0]=='M'?"Male":"Female"); + Oprint(str); + GetYesNo(a); + if(a[0]=='N') + a[0]=0; + } + //'Create initial entry in the PLAYERS.DAT file" + OpenStats("DELETED2"); // 'seach for any "deleted" slots + sprintf(str,"%-*.*s",RecLen,RecLen,Alias); + sprintf(path,"%splayers.dat",DatPath); + file=SharedOpen(path,"r+",LOCK_EX); + fseek(file, RecLen*(FirstAvail-1), SEEK_SET); + fwrite(str, RecLen, 1, file); + fclose(file); + + InitPlayer(); + MakeNewCode(); + + StatsIn = 1; + SaveGame(); + StatsIn = 0; + sprintf(str,"`4Another outsider, `@%s`4 was recruited today.",Alias); + WriteNews(str, 1); +} + +char *Prefix (char *dest, char *a, int l) +{ + sprintf(dest,"%*.*s",l,l,a); + return(dest); +} + +void ReadMail(short t) +{ + // '**** GET RID of this (as needed) for a STUB program + short v; + // 'MCI Mail Codes + // '|A1 Sombody > 4 as account num, 15 as from$ + // '|B > |B plus 2 spaces, begin quotable section + // '|C > |C End quotable section + + short BeginQuote = 0; + short LinesQuoted = 0; + char path[MAXPATHLEN]; + char str[256]; + FILE *file; + int c; + char aa[256]; + char from[16]; + int x; + int d; + char Quote[11][256]; + + sprintf(path,"%smail.%d",DatPath,t); + file=SharedOpen(path,"a",LOCK_EX); + fclose(file); + c = 4; + file=SharedOpen(path,"r",LOCK_SH); + Oprint(BarBar); + Oprint("`% The `$TCCL `%begins to download your mail\r\n"); + Oprint(BarBar); + Oprint("\r\n"); + if(feof(file)) + Oprint("`3 Your electronic mailbox is empty.\r\n\r\n\r\n"); + + while(!feof(file)) + { + readline(aa, sizeof(aa), file); + RTrim(aa); + if(aa[0]=='|') + { + // 'translate the translation code + switch(toupper(aa[1])) + { + case 'B': + BeginQuote = 1; + break; + case 'C': + BeginQuote = 0; + break; + case 'A': + sscanf(aa,"%*2c%4hd%15c",&v,from); + Oprint("`$ Do you wish to write back? `6(Y/N): "); + c = 0; + GetYesNo(str); + if(str[0]=='Y') + { + Oprint("`$ Quote that message? `6(Y/N): "); + GetYesNo(str); + if(str[0]=='Y') + { + for(x=1;x<=LinesQuoted;x++) + { + if(x == 1) + { + AddToMail(v, "`3Retro-quoter engaged: In response to `!your `3comments below:"); + } + sprintf(str,"`3=ð> `2%1.75s",Quote[x]); + AddToMail(v, str); + } + } + else + Oprint("\r\n"); + d = WriteALetter(Alias, from, v); + if(d > 0) + { + sprintf(str,"|A%4d%-15.15s",OriginNumber,Alias); + AddToMail(v, str); + } + BeginQuote = 0; + LinesQuoted = 0; + } + else + Oprint("\r\n"); + + } + aa[0]=0; + } + if(BeginQuote > 0 && aa[0] && LinesQuoted <= 10) + { + LinesQuoted++; + strcpy(Quote[LinesQuoted],aa); + } + Oprint(aa); + Oprint("\r\n"); + c++; + if(c > 20) + { + PressAnyKey(); + Oprint("\r\n"); + c = 0; + } + } + PressAnyKey(); + Oprint("\r\n"); + fclose(file); + unlink(path); +} + +void ReadNews(char *a) +{ + FILE *file; + char str[256]; + int d; + + Oprint(BarBar); + Oprint("`% The `$TCCL `%downloads the news file\r\n"); + Oprint(BarBar); + Oprint("\r\n"); + + file=SharedOpen(a,"a",LOCK_EX); + fclose(file); + d = 4; + if(IsDead > 0) + d = d + 3; + file=SharedOpen(a,"r",LOCK_SH); + while(!feof(file)) + { + readline(str, sizeof(str), file); + RTrim(str); + Oprint(str); + Oprint("\r\n"); + d = d + 1; + if(d > 20) + { + PressAnyKey(); + Oprint("\r\n"); + d = 0; + } + } + fclose(file); + if(d > 0) + { + PressAnyKey(); + Ocls(); + } +} + +void SaveGame(void) +{ + // 'put any "save the game" data into this routine + if(Hit < 0) + Hit=0; + if(StatsIn > 0) + SaveStats(Alias, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, ExeLine, ComLine, LineRest); +} + + +void Barr(void) +{ + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); +} + +void ShortIntro(void) +{ + Barr(); + Oprint("`!Time Port `#Version `5"); + Oprint(Version); + Oprint(" "); + Oprint("`1No dedication yet, until I decide on one. :)\r\n"); + Barr(); + Oprint("`! Time Port is Shareware, Copyright (C) 1995 by HCI & Mike Snyder.\r\n"); + Oprint("`3 The latest version of Time Port is available on Orion's Realm BBS.\r\n"); + Oprint("`3 Just log on to 405-924-7939. You'll also find the latest Lunatix.\r\n"); + Barr(); + Oprint("`5 Time Port offers several global commands. These are available:\r\n"); + Barr(); + Oprint("`7 (`$V`8)`@iew your stats `7 (`$I`8)`@nventory list and change\r\n"); + Oprint("`7 (`$X`8)`@Ansi Room toggle `7 (`$?`8)`@Re-show the current room\r\n"); + Barr(); + if(Regis) + { + Oprint("`5 Time Port is `#REGISTERED `5to `#"); + Oprint(RegisterTo1); + Oprint(" `5of `#"); + Oprint(RegisterTo2); + Oprint("\r\n"); + } + else + { + Oprint("`5 Time Port has not yet been registered for this BBS. If you'd like to\r\n"); + Oprint("`5 advance above Rank 5, get 10% interest daily on money in the bank,\r\n"); + Oprint("`5 have access to more than 3 IGM's, place hits on other players, and\r\n"); + Oprint("`5 best of all to WIN the game, then please encourage your Sysop to\r\n"); + Oprint("`5 register. You could even help out.\r\n"); + } + Barr(); + + Oprint("\r\n\r\n"); + PressAnyKey(); + Ocls(); +} + +void ShowRoom(long l) +{ + char str[256]; + FILE *file; + char path[MAXPATHLEN]; + int x; + int pp; + + // 'code to print "headers" + // 'l=4 is now in the OUTSIDE Module! + + if(l != 6) + { + Oprint("`!T`3ime `!P`3ort `8Version `7"); + Oprint(Version); + Oprint(" -- `7Location: "); + if(l == 1) + Oprint("`%Time Port Hangar\r\n"); + if(l == 2) + Oprint("`%Time Control Computer\r\n"); + if(l == 14) + Oprint("`%Time Portal Choice\r\n"); + if(l == 3) + Oprint("`%Other Eras in Time\r\n"); + if(l == 5) + Oprint("`%Discussion Chamber\r\n"); + } + + Oprint(BarBar); + + sprintf(Bad, "NRM"); + if(l != 6) + { + sprintf(str,"room%ld.%s",l,NotAgain[14]==' '?"ans":"asc"); + DisplayTitle(str); + } + sprintf(Bad, "ANM"); + + if(l == 1) // 'in the hanger + { + strcpy(Prompt, "*EGAL"); + Oprint(BarBar); + Oprint("`7 (`!A`8)`3ctivate the Time Port "); + Oprint("`7 (`!S`8)`3tep through a narrow door\r\n"); + Oprint("`7 (`!L`8)`3ink to Time Control Computer "); + Oprint("`7 (`!E`8)`3xamine a HyberCapsule\r\n"); + Oprint("`7 (`!G`8)`3o Outside the Hanger\r\n"); + Oprint("`7 (`%*`8)`@Exit back to the BBS "); + } + + if(l == 5) // 'Discussion Chamber + { + strcpy(Prompt, "TPR"); + Oprint(BarBar); + Oprint("`7 (`!T`8)`3alk to the Other People "); + Oprint("`7 (`!P`8)`3ush the Buttons\r\n"); + Oprint("`7 (`%R`8)`@eturn to the Main Area "); + } + + if(l == 6) // 'Talking to the Discussion People + { + strcpy(Prompt, "1234R"); + sprintf(path,"%sconvers.txt",DatPath); + file=SharedOpen(path,"r",LOCK_SH); + for(x=1;x<=16;x++) + { + str[0]=0; + fread(str, 80, 1, file); + str[78]=0; + Oprint(str); + Oprint("\r\n"); + } + fclose(file); + Oprint(BarBar); + Oprint("`7 (`!1`8)`3Say `7 (`!2`8)`3Add `7 (`!3`8)`3Reply `7 (`!4`8)`3Ask `7 (`%R`8)`@eturn\r\n"); + } + + if(l == 2) + { + strcpy(Prompt, "MNYLSDWQ"); + Oprint(BarBar); + Oprint("`7 (`!M`8)`3ake an announcement on TCC "); + Oprint("`7 (`!N`8)`3ews and reports today\r\n"); + Oprint("`7 (`!Y`8)`3esterday's news and reports "); + Oprint("`7 (`!L`8)`3ist the TimeTravel Rebellion\r\n"); + Oprint("`7 (`%Q`8)`@uit connection to the TCC "); + Oprint("`7 (`!S`8)`3end private E-Mail\r\n"); + Oprint("`7 (`!D`8)`3eposit Morph Credits into Bank"); + Oprint("`7 (`!W`8)`3ithdraw Morph Credits\r\n"); + Oprint("`7 (`!R`8)`3equest an Update in Status "); + Oprint("`7 (`!C`8)`3hange your name\r\n"); + } + + if(l == 3) + { + // 'read IGM file and print other choices first + Oprint(BarBar); + pp = 0; + strcpy(Prompt, "0"); + for(x=1; x<=OtherCount; x++) + { + strcpy(str,"`7 (`!0`8)`3 "); + str[7]=64+x; + strcat(str,OtherPlaces[x]); + Oprint(str); + Prompt[x]=64 + x; + Prompt[x+1]=0; + if(pp == 0) + Oprint("\e[255D\e[40C"); // Move to column 40 of current line + else + Oprint("\r\n"); + pp = 1 - pp; + } + Oprint("`7 (`%0`8)`@ None of these\r\n"); + } + + if(l == 14) // 'In the Defaulting time periods + { + strcpy(Prompt, "43210"); + Oprint(BarBar); + Oprint("`7 (`%0`8)`@ Disengage the Time Portal "); + Oprint("`7 (`!1`8)`3 Other Eras in Time\r\n"); + Oprint("`7 (`!2`8)`3 The `7Stone `3Age (`2385,000 BC`3) "); + Oprint("`7 (`!3`8)`3 New York, `21924 AD\r\n"); + Oprint("`7 (`!4`8)`3 California, `21874 AD\r\n"); + } + + if(l != 3 && l != 14 && l != 6) + Oprint("`7 (`!?`8)`3Re-List menu options\r\n"); + Oprint(BarBar); + sprintf(str,"`2 You have `0%ld`2 Morph Credits on hand, and `0%ld`2 in the Time Bank.\r\n",Money,Stash); + Oprint(str); +} + +void ShowTitle(void) +{ + char ke[16]; + int p; + + p=(random()%MaxTitleScreens)+1; + sprintf(ke,"title%d.ans",p); + Ocls(); + DisplayTitle(ke); + Owait(ke); + Ocls(); + ShortIntro(); +} + +void TypeCode(void) +{ + char g[5]; + int Gd; + int x; + int Tt; + char numb[4]; + + Ocls(); + DisplayTitle("buttons.ans"); + + Position(70, 10); + SetColor(11, 4, 0); + + KbIn(g,4); + Oprint("`7\r\n"); + + Gd = 0; + for(x = 1; x<=4; x++) + { + if(g[x-1]<'1' || g[x-1]>'4') + Gd=1; + } + if(g[0]==g[1] || g[0]==g[2] || g[0]==g[3] || g[1]==g[2] || g[1]==g[3] || g[2]==g[3]) + Gd=1; + + if(Gd) + { + Position(1, 22); + Oprint("`2 The sequence your tried was invalid. You must type 1,2,3,4 once each.\r\n"); + PressAnyKey(); + return; + } + + Tt = 0; + + for(x = 0; x<4; x++) + { + if(CurCode[x]==g[x]) + Tt++; + } + + if(Tt) + { + Position(10 * Tt + 2, 11); + Oprint("`%-=-"); + } + Position(1, 22); + NotAgain[0]='&'; + if(Tt < 4) + Oprint(" `@The sequence you tried was incorrect.\r\n"); + else + { // 'you got it right... something happens now.. but what??? + Oprint("`% The buttons reset, and a panel swooshes open and drops a Heat Bomb.\r\n"); + Oprint("`7 You pick it up carefully to use against another Time Traveler.\r\n\r\n"); + NotAgain[3]='@'; // 'Now has a Heat Bomb + MakeNewCode(); + // MID$(NotAgain$, 16, 3) = LEFT$(LTRIM$(STR$(VAL(MID$(NotAgain$, 16, 3)) + 1)), 3) + numb[3]=0; + numb[0]=NotAgain[15]; + numb[1]=NotAgain[16]; + numb[2]=NotAgain[17]; + x=atoi(numb); + x++; + sprintf(numb,"%-3d",x); + NotAgain[15]=numb[0]; + NotAgain[16]=numb[1]; + NotAgain[17]=numb[2]; + } + PressAnyKey(); +} + +void UseItem(long c,short b) +{ + Oprint("`2 You find no use for that item here at this time.\r\n"); + // 'SaveInvItem c, "-------------------", 0, 0 +} + +short WriteALetter(char *From, char *To, short Vx) // 'Vx is destination account number +{ + char e[256]; + int Treks; + char str[256]; + + RTrim(To); + Treks = 0; + Oprint("`@What do you wish to say. Remember to press <enter> on a line to quit.\r\n"); + while(1) + { + MakeInputArea(74); + KbIn(e,73); + Oprint("`9\r\n"); + if(strlen(e) < 1) + { + if(Treks > 0) + { + if(Vx > 0) + { + Oprint("\r\n`#"); + Oprint(To); + Oprint("`# Will get your letter."); + Oprint("\r\n"); + AddToMail(Vx, "|C "); + } + if(Vx == 0) + { + Oprint("`@The TCCL hums as your message is posted on the TCC Net.\r\n"); + WriteNews("", 1); + } + } + return(Treks); + } + if(Treks == 0) + { + Treks = 1; + if(Vx > 0) + { + sprintf(str,"`%%%s`! wrote you a letter:`3",From); + AddToMail(Vx, str); + AddToMail(Vx, "|B "); + } + if(Vx == 0) + { + sprintf(str,"`%%%s Announces:`3",From); + WriteNews(str, 0); + } + } + if(Vx > 0 && strlen(e) > 0) + AddToMail(Vx, e); + if(Vx == 0 && strlen(e) > 0) + WriteNews(e, 0); + } +} + +void WriteTherapy(char *a, char *n) +{ + FILE *file; + char path[MAXPATHLEN]; + int x; + char buf[80]; + + sprintf(path,"%sconvers.txt",DatPath); + file=SharedOpen(path, "r+", LOCK_EX); + for(x=3;x<=16;x++) + { + fseek(file,80*(x-1),SEEK_SET); + buf[0]=0; + fread(buf, 80, 1, file); + fseek(file,80*(x-3),SEEK_SET); + fwrite(buf, 80, 1, file); + } + fseek(file,80*(14),SEEK_SET); + fwrite(n,80,1,file); + snprintf(buf,80,"`3%s",a); + fwrite(buf,80,1,file); + fclose(file); +} diff --git a/src/doors/timeport/timeport.h b/src/doors/timeport/timeport.h new file mode 100644 index 0000000000000000000000000000000000000000..e6b2534f8745ee3eccc7ffdf485ab74980994ee8 --- /dev/null +++ b/src/doors/timeport/timeport.h @@ -0,0 +1,12 @@ +void CountPlayers(void); +void FundTransfer(short x); +short GetResponse(short l, short g); +void WriteTherapy(char *a, char *n); +void NewPlayer(); +void ReadMail(short t); +void ReadNews(char *a); +void ShowRoom(long l); +void ShowTitle(void); +void TypeCode(void); +short WriteALetter(char *From, char *To, short Vx); +void UseItem(long c,short b); diff --git a/src/doors/timeport/title1.ans b/src/doors/timeport/title1.ans new file mode 100644 index 0000000000000000000000000000000000000000..582aa4f86643327c7ed18b4edbd154e63697abaa --- /dev/null +++ b/src/doors/timeport/title1.ans @@ -0,0 +1,23 @@ +[0;37;40m[1;1H ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ [2;1H ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ [3;1HÅÅ[1;30mÅÅ[37;41mÛßßßßßßßßßßßß[47mß[30;40mÅÅ[37;41mÛßßßß +[3;26Hßßßßßßßß[47mß[30;40mÅÅ[37;41mÛßß[47mß[0;37;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛßß[47mß[30;40mÅÅ[37;41mÛßßßßßßßßßßßß[47mß[0;37;40mÅÅÅÅ[4;1HÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßßßß[37;41m [31;47mßßßß [1;30;40mÅÅ[37;41mÛ[0;31;47mßßßß +[4;26H[37;41m [31;47mßßßß [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47mßßßßßßßßß [37;40mÅÅÅÅ[5;1HÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m +[5;14H[37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31m [47m [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[6;1HÅÅÅÅ +[6;5HÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1mßß[47mß[0;37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛßß[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m +[6;65H [1mßßßß[47mß[0;37;40mÅÅÅÅÅÅÅÅÅ[7;1HÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ [0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47mßßß[37;41m [31;47m [37;40mÅÅ[1;30mÅÅ[37;41mÛ +[7;52H[0;37;41m [31;47mßßß[37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47mßßßß [37;40mÅÅÅÅÅÅÅÅÅ[8;1HÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41m +[8;37HÛ[0;37;41m [31;47m [37;40mÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31m [47m [37;40mÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[9;1HÅÅÅÅÅÅÅ[1;30m +[9;8HÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41mÛßßßß[0;37;41m [1mßßßß[47mß[30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅ[1;30mÅÅ[37;41mÛÜ[0;37;41m [31;47mß [37;40mÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40m +[9;61HÅÅ[37;41mÛ[0;37;41m [1mßßßßßßßßß[47mß[0;37;40mÅÅÅÅ[10;1HÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßß [37;40mÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßßßßßßßßßßßß [1;30;40mÅÅ[37;41mÛ[0;31;47mßß [37;40mÅÅÅÅÅÅ[1;41mÛ[0;31;47mßß [37;40mÅÅÅÅ[1;30mÅÅ +[10;57H[37;41mÛ[0;31;47mßß [1;30;40mÅÅ[37;41mÛ[0;31;47mßßßßßßßßßßßß [37;40mÅÅÅÅ[11;1HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[12;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛßßßßßßßßßßßß[47mß[30;40mÅÅ[37;41mÛßßßßßßßßß +[12;38Hßßß[47mß[30;40mÅÅ[37;41mÛßßßßßßß[47mß[0;37;40mÅÅ[1;30mÅÅ[37;41mÛßßßßßßßßßßßß[47mß[0;37;40mÅÅÅÅÅÅÅÅÅÅ[13;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47mßßßßßß[37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47mßßßßßß +[13;38H[37;41m [1;47m [30;40mÅÅ[37;41mÛ[0;37;41m [31;47mßßß[37;41m [31m [47m [37;40mÅ[1;30mÅÅ[37;41mÛ[0;31;47mßßßß[37;41m [31;47mßßßß [37;40mÅÅÅÅÅÅÅÅÅÅ[14;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅ[1;30mÅÅ +[14;22H[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1;47m [30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅ[1;30mÅÅ[37;41mÛ[0;31;41m [37m [31;47mÜ [37;40mÅÅÅÅ[1;30mÅÅ[37;41m +[14;62HÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[15;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1mßßßßßß[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1;47m [30;40mÅÅ[37;41mÛ[0;37;41m +[15;45H [1mßßß[0;37;41m [31m [37m [31;47m [37;40mÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅ[1;30mÅÁÁÁÁÁÅ[0;37;40mÅÅÅÅÅÅ[16;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47mßßßßßßßßß [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m +[16;32H[37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1;47m [30;40mÅÅ[37;41mÛ[0;37;41m [31;47mßß[37;41m [31;47mß [37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅ[1;30m´[35mPress[30mÃ[0;37;40mÅÅÅÅÅÅ[17;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ +[17;12H[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1;47m [30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [1;30;40mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅ[1;30mÅÅ +[17;62H[37;41mÛ[0;37;41m [31;47m [37;40mÅÅ[1;30m´[35ma[30m [35mKey[30mÃ[0;37;40mÅÅÅÅÅÅ[18;1HÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [1mßßßßßß[0;37;41m [1;47m [30;40mÅÅ[37;41mÛ +[18;45H[0;37;41m [31;47m [37;40mÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47mÜÜ [37;40mÅÅÅ[1;30mÅÅ[37;41mÛ[0;37;41m [31;47m [37;40mÅÅ[1;30mÅÂÂÂÂÂÅ[0;37;40mÅÅÅÅÅÅ[19;1H ÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßß [37;40mÅÅÅÅÅÅÅÅÅÅ[1;30mÅÅ[37;41mÛ +[19;29H[0;37;41mÜÜÜÜÜÜÜÜÜÜÜÜ[1;47m [30;40mÅÅ[37;41mÛ[0;31;47mßß [37;40mÅÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßßß [37;40mÅÅ[1;30mÅÅ[37;41mÛ[0;31;47mßß [37;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅ [20;1H ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ +[20;70HÅÅÅÅÅÅÅÅ [21;1H ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ [22;4HWritten by [1mMike Snyder[30m,[0;37;40m [1;30mas[0;37;40m [1;30ma[0;37;40m [1;30mproduct[0;37;40m [1;30mof[0;37;40m [1mHCI[30m, +[22;48H[0;37;40m (C) 1995 by [1mMike Snyder[0;37;40m & [1mHCI[23;1H[0m diff --git a/src/doors/timeport/title2.ans b/src/doors/timeport/title2.ans new file mode 100644 index 0000000000000000000000000000000000000000..5ed7de7bb83e4f113488c6960d778a844f5ff767 --- /dev/null +++ b/src/doors/timeport/title2.ans @@ -0,0 +1,22 @@ +[0;37;40m[30;41m[1;1H [1;37m.[0;30;41m [31;40m²²±±°°[1;30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[0;31;40m°°±±²²[1;37;41m.[0;30;41m [2;1H [31;40m²²±±°°[1;30m°[37;47mÛÛ[0;30;47m [1mßÛÛ[40m°[37;47mÛÛ +[2;28HÛß[0;30;47m [1mßÛÛÛ[40m°[37;47mÛÛÛ[30mÛ[40m°°°°°°°[37;47mÛÛß[30mÛ[40m°[37;47mÛÛÛß[0;30;47m [1mßÛÛ[40m°°°°°[0;31;40m°°±±²²[30;41m [1;37m.[0;30;41m [3;1H [1;37m)[0;30;41m [31;40m²²±±°°[1;30m°[37;47mÛ [0;30;47m +[3;21H [1mÜÛ[40m°[37;47mÛÛ[0;30;47m [1mÜÛÛ[40m°[37;47mÛÛ[0;30;47m [1mßÛ[40m°°°°°[37;47mÛß[0;30;47m [1mÛ[40m°[37;47mÛÛ[0;30;47m [1mÜÛ[40m°°°°°[0;31;40m°°±±²²[30;41m [1;37m.[0;30;41m [4;1H [1;37m.[0;30;41m +[4;8H[31;40m²²±±°°[1;30m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°[37;47mÛ[0;30;47m [1mÜÛ[40m°°°[37;47mÛ[0;30;47m [1mßÛ[40m°°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°°°[0;31;40m°°±±²²[30;41m [1;37m. +[4;77H[0;30;41m [1;37m.[0;30;41m [5;1H [1;37m.[0;30;41m [31;40m²²±±°°[1;30m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°[37;47mÛ[0;30;47m [1mÜÛ[40m°°°°[37;47mÛ[0;30;47m [1mßÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛ +[5;56H[0;30;47m [1m ßÛÛ[40m°°°[0;31;40m°°±±²²[30;41m [6;1H [1;37m.[0;30;41m [31;40m²²±±°°[1;30m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛÜ[0;30;47m +[6;48H[1mÛ[40m°[0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1m Û[40m°°°[0;31;40m°°±±²²[30;41m [1;37m.[0;30;41m [7;1H [31;40m²²±±°°[1;30m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°[37;47mÛß[0;30;47m [1mßÛ[40m°°°[37;47mÛ +[7;41H[0;30;47m [1mÛ[40m°°[37;47mÛÜ[30mÛ[40m°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛÛ[0;30;47m [1mÛ[40m°°°°°°°°[0;31;40m°°±±²²[30;41m [8;1H [31;40m²²±±°°[1;30m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[37;47mÛß[0;30;47m +[8;32H [1mßÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°[37;47mÛÜ[0;30;47m [1mÛ[40m°[37;47mÛÛÛ[0;30;47m [1mßÛÛ[40m°[0;31;40m°°±±²²[30;41m [9;1H [31;40m²²±±°°[1;30m°°°°[37;47mÛÛÜ[30mÛ[40m°°°°[37;47mÛÜ[0;30;47m +[9;33H [1mÜÛ[40m°[37;47mÛÛÜ[30mÛ[40m°°°°°°°[37;47mÛÛÜ[30mÛ[40m°[37;47mÛÛÛÛÜ[0;30;47m [1mÛ[40m°[0;31;40m°°±±²²[30;41m [10;1H [31;40m²²±±°°[1;30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[0;31;40m°°±±²² +[10;74H[30;41m [11;1H [31;40m²²±±°°[1;30m°[37;47mÛÛÛÛ[0;30;47m [1mßÛÛÛ[40m°[37;47mÛÛÛÛß[0;30;47m [1mßÛÛÛ[40m°[37;47mÛÛÛß[0;30;47m [1mßÛÛÛ[40m°[37;47mÛÛß[0;30;47m [1mßÛÛ[40m°[0;31;40m°°±±²²[30;41m +[12;1H [31;40m²²±±°°[1;30m°[37;47mÛÛÛ[0;30;47m [1mÛÛ[40m°[37;47mÛÛÛ[0;30;47m [1mÛÛ[40m°[37;47mÛÛ[0;30;47m [1mÛÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°[0;31;40m°°±±²²[30;41m [13;1H [31;40m²²± +[13;11H±°°[1;30m°[37;47mÛÛ[0;30;47m [1mÛ[40m°°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛÛ[0;30;47m [1mÛ[40m°°°°[37;47mÛ[30m [0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°[37;47mÛ[0;30;47m +[13;63H[1mÛ[40m°°°°[0;31;40m°°±±²²[30;41m [32m²²²[30m [14;1H [31;40m²²±±°°[1;30m°[37;47mÛ[0;30;47m [1mÛ[40m°°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[37;47mÛ[30m [0;30;47m [1mÛ[40m°[37;47mÛ +[14;40H[0;30;47m [1mÛÛ[40m°°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[0;31;40m°°±±²²[30;41m [33m³[30m [15;1H [32m²²²[30m [31;40m²²±±°°[1;30m°[37;47mÛ[0;30;47m [1mÛÛ[40m°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[37;47mÛ +[15;36H[0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1mÜÛÛÛ[40m°°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[0;31;40m°°±±²²[30;41m [33m³[30m [16;1H [32m²²²[33m³[30m [31;40m²²±±°°[1;30m°[37;47mÛ[0;30;47m [1mÜÛÛÛ[40m°[37;47mÛ +[16;27H[0;30;47m [1mÛ[40m°°°°[37;47mÛ[0;30;47m [1mÛ[40m°[37;47mÛ[0;30;47m [1;40m°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°°°°°°°[37;47mÛ[0;30;47m [1mÛ[40m°°°°[0;31;40m°°±±²²[30;41m [32;40m²²²²²[30;41m[17;1H [33m³[30m [33m³[30m +[17;6H [31;40m²²±±°°[1;30m°[37;47mÛÛ[0;30;47m [1;40m°°°°°°°[37;47mÛÛ[0;30;47m [1mÛÛ[40m°[37;47mÛ [0;30;47m [1;40m°°°°[37;47mÛ[0;30;47m [1mßÛ[40m°°°°°°°°°[37;47mÛÛ[0;30;47m [1mÛ[40m°°°°[0;31;40m°°±±²²[32m²²²²°²²[30;41m +[18;1H [33m³[30m [32;40m²²²[31m²²±±°°[1;30m°[37;47mÛÛÛ[0;30;47m [1;40m°°°°°°°[37;47mÛÛÛÜ[0;30;47m [1mÜÛÛÛ[40m°[37;47mÛÛÜ[0;30;47m [1;40m°°°°°[37;47mÛ[0;30;47m [1mßÛ[40m°°°°°°°°[37;47mÛÛÛ[30mÛ[40m°°°°[0;31;40m°°±±²²[32m²±²²²² +[18;80H²[30;41m[19;1H [32;40m²²±²²[31m²²±±°°[1;30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[37;47mÛ[0;30;47m [1mßÛ[40m°°°°°°°°°°°°°°°[0;31;40m°°±±²²[32m²²²±²²°[20;1H²²²²²°²[31m²²±±°°[1;30m°[37mT[0;37;40mi[1;30mme[37m P[0;37;40mo[1;30mrt +[20;24H[37m: W[0;37;40mr[1;30mitten[37m b[0;37;40my[1m M[0;37;40mi[1;30mke[37m S[0;37;40mn[1;30myder°°[37;47mÛÜ[30mßÛ[40m°°°°°°°°°°°°°°[0;31;40m°°±±²²[32m²°²²²²²[21;1H²²±²²²²[31m²²±±°°[1;30m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° +[21;57H°°°°°°°°°°°[0;31;40m°°±±²²[32m±²²²²°²[31m[22;11H(C[1m)[0;31;40m [1m1995 (Sha[0;31;40mreWare) b[1my[0;31;40m [1mMike[0;31;40m [1mSnyder an[0;31;40md Hunter C[1momputer I[0;31;40mnc.[30m[23;41H [23;1H[0m diff --git a/src/doors/timeport/title3.ans b/src/doors/timeport/title3.ans new file mode 100644 index 0000000000000000000000000000000000000000..9eaf439bc4e1a2bc1aefbde329a8ce63884d2ae5 --- /dev/null +++ b/src/doors/timeport/title3.ans @@ -0,0 +1,15 @@ +[0;37;40m[31m[1;1H¿ [1;33m ShareWare [0;31;40m [2;1HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ¿ [1;41m[3;1HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ +[3;40H[1;41mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅ¿ [1mHunter Computer[0;31;40m [1;41m[4;1HÅÅ[33;43m°°°°°°°°°°°[31;41mÅÅÅ[0;31;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;41mÅÅÅÅ[33;43m°°°°°°°°[31;41mÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅ¿ [1mInc. Presents[0;31;40m [5;1HÅ +[5;2H[1;33;43m°°°°°°°°°°°°°[31;41mÅÅ[0;31;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;41mÅÅ[0;31;40mÅÅ[1;33;43m°°°[0;31;40mÅÅÅ[1;33;43m°°°[31;41mÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅ¿[6;1HÅÅ[1;33;43m°°°°°°°°°°°[31;41mÅÅÅ[0;31;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ +[6;39H[1;41mÅÅ[0;31;40mÅÅ[1;33;43m°°°[31;41mÅÅ[0;31;40mÅÅ[1;33;43m°°°[31;41mÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;41m[7;1HÅ[0;31;40mÅÅÅÅ[1;33;43m°°°°[0;31;40mÅÅ[1;41mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[0;31;40mÅÅ[1;33;43m°°°°[31;41mÅÅ +[7;49H[0;31;40mÅÅ[1;33;43m°°°[31;41mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[8;1HÅÅÅ[0;31;40mÅÅ[1;33;43m°°°°[31;41mÅÅ[33;43m°°°°°°°[31;41mÅÅ[33;43m°°°°[31;41mÅÅÅÅ[33;43m°°°[31;41mÅÅ[33;43m°°°°°°°[0;31;40mÅÅ[1;33;43m°°°°°°°°°°[31;41mÅÅ[33;43m°°°°°° +[8;61H°°[31;41mÅÅ[33;43m°°°°°°°[31;41mÅÅ[33;43m°°°°°°[31;41mÅ[9;1HÅÅÅ[0;31;40mÅÅ[1;33;43m±±±±[0;31;40mÅÅÅÅ[1;33;43m±±±[31;41mÅÅ[0;31;40mÅÅ[1;33;43m±±±±±[0;31;40mÅÅ[1;33;43m±±±±[0;31;40mÅÅ[1;33;43m±±±[0;31;40mÅÅ[1;41mÅÅ[0;31;40mÅÅ +[9;43H[1;33;43m±±±±±±±±±[31;41mÅ[0;31;40mÅÅ[1;33;43m±±±±[0;31;40mÅÅ[1;33;43m±±[0;31;40mÅÅ[1;33;43m±±[31;41mÅ[0;31;40mÅÅ[1;33;43m±±[0;31;40mÅÅÅÅ[1;33;43m±±±[31;41mÅÅ[10;1HÅÅÅ[0;31;40mÅÅ[1;33;43m±±±±[31;41mÅÅ[0;31;40mÅÅ[1;33;43m±±± +[10;17H[31;41mÅÅ[0;31;40mÅÅ[1;33;43m±±±±±±±±±±±[0;31;40mÅÅ[1;33;43m±±±±±[31;41mÅÅ[0;31;40mÅÅ[1;33;43m±±±[0;31;40mÅÅÅÅ[1;41mÅÅÅ[0;31;40mÅÅ[1;33;43m±±±[0;31;40mÅÅÅ[1;33;43m±±[0;31;40mÅÅ[1;33;43m±±±±±±[31;41mÅÅÅ[0;31;40mÅÅ[1;33;43m±±± +[10;79H[31;41mÅÅ[11;1HÅÅÅ[0;31;40mÅÅ[1;33;43m²²²²[31;41mÅÅ[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅ[0;31;40mÅÅ[1;33;43m²²²[0;31;40mÅ[1;33;43m²²²²[0;31;40mÅ[1;33;43m²²[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅÅÅ[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅÅÅÅÅÅ +[11;53H[0;31;40mÅÅ[1;33;43m²²²[31;41mÅ[0;31;40mÅÅ[1;33;43m²²[0;31;40mÅÅ[1;33;43m²²[0;31;40mÅ[1;33;43m²²[31;41mÅÅÅÅ[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅ[12;1HÅÅÅ[0;31;40mÅÅ[1;33;43m²²²²[0;31;40mÅÅ[1;33;43m²²²²²²²[0;31;40mÅÅ[1;33;43m²²² +[12;24H[0;31;40mÅÅ[1;33;43m²²[0;31;40mÅÅ[1;33;43m²²[0;31;40mÅÅ[1;33;43m²²²²²²²[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅÅÅÅÅÅ[0;31;40mÅÅ[1;33;43m²²²²²²²²[0;31;40mÅÅ[1;33;43m²²[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅ[0;31;40mÅÅ[1;33;43m²²²[31;41mÅÅ +[13;1HÅÅÅ[0;31;40mÅÅÅÅ[1;41mÅÅ[0;31;40mÅÅÅÅÅÅÅ[1;41mÅÅ[0;31;40mÅÅÅ[1;41mÅÅ[0;31;40mÅÅ[1;41mÅÅ[0;31;40mÅÅ[1;41mÅÅ[0;31;40mÅÅÅÅÅÅÅ[1;41mÅÅ[0;31;40mÅÅÅÅ[1;41mÅÅÅÅÅÅÅÅ[0;31;40mÅÅÅÅÅÅÅÅ[1;41mÅÅ[0;31;40mÅÅ[1;41mÅÅ[0;31;40mÅÅÅ[1;41mÅÅÅÅ +[13;74H[0;31;40mÅÅÅ[1;41mÅÅÅÅ[14;1HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[0;31;40m[15;1HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[16;1HÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ +[16;31HÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁ[1;37m[17;5HWritten by Mike Snyder, [0;37;40m(C) 1995 by Hunter Computer Inc. and Mike Snyder[1;31m[18;1HÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +[23;1H[0m diff --git a/src/doors/timeport/title4.ans b/src/doors/timeport/title4.ans new file mode 100644 index 0000000000000000000000000000000000000000..1fa39cc6e1602f925973feef17751259ae431601 --- /dev/null +++ b/src/doors/timeport/title4.ans @@ -0,0 +1,14 @@ +[0;37;40m[45m[2;1H [1;32mWelcome to the 26th Century![0;37;45m [30;41m[2;43H³[37m [30m [37m [45m[2;50H [30;41m[2;54H³[37m [30m [37;45m[2;61H [3;1H [1;40m[3;5H.[3;8H.[3;10Hú[3;13H.[3;21H +[3;21Hú[3;26H.[3;29Hù[3;36Hú[3;42Hù[0;30;41m³[37m [30m [37m [1;40m[3;52Hú[0;30;41m[3;54H³[37m [30m [37;40m[3;61H [1m[3;63Hú[3;71Hù[3;76Hú[0;37;45m[3;78H [4;1H [1;40m[4;6Hù[0;30;41m³[37m [30m[4;25H³ +[4;26H[37m [30m[4;43H³[37m [1;40mú[0;30;41m[4;53H³[37m [30m[4;61H³[37m [45m[4;78H [5;1H [1;40m[5;5H.[0;30;41m[5;7H³[37m [30m[5;25H³[37m [30m[5;43H³[37m +[30m[5;49H³[37m [30m[5;52H³[37m [30m[5;55H³[37m [1;40mú[0;30;41m³[37m [45m[5;78H [6;1H [1;40m[6;6H.[6;10H.[6;12Hú[0;30;41m³[37m [1;40m[6;19Hú[6;24Hù[6;27Hú[0;30;41m[6;31H³[37m [1;40m[6;40Hú +[0;30;41m[6;43H³[37m [1;40mú[0;30;41m[6;50H³[37m [30m[6;55H³[37m [30m[6;61H³[37m [30mßßßßßß[1;37;40m[6;74Hú[0;37;45m[6;78H [7;1H [1;40m[7;5H.[7;7Hú[7;9Hú[0;30;41m[7;13H³[37m [30m[7;25H³[37m +[7;42H[1;40mú[0;30;41m³[37m [1;40m[7;51Hú[0;30;41m[7;55H³[37m [30m[7;61H³[37m [30mÜÜÜÜÜÜ[1;37;40m[7;73Hù[0;37;45m[7;78H [8;1H [1;40m.[8;8H.[8;11Hú[0;30;41m[8;13H³[37m [1;40m[8;19H.[8;22Hú[0;30;41m[8;25H³[37m +[8;26H [30m[8;43H³[37m [1;40m[8;53Hù[0;30;41m[8;55H³[37m [1;40m.[0;30;41m³[37m [45m[8;78H [9;1H [1;40m[9;6Hú[9;17Hú[9;26Hú[9;32Hú[9;36Hù[9;42Hú[9;49Hù[9;52Hú[9;63Hú[9;68Hù[9;72Hú[9;76Hù +[0;37;45m[9;78H [10;1H [1;40m[10;5Hú[0;30;41m[10;7H³[37m [30m [10;25H³[37m [30m [10;43H³[37m [30m [10;61H³[37m [30m [37;45m[10;78H [11;1H [30;41m[11;7H³[37m [30m +[11;14H [11;25H³[37m [30m [11;43H³[37m [30m [11;61H³[37m [30m [1;37;40m[11;77Hú[0;37;45m [12;1H [30;41m[12;7H³[37m [30m [1;37;40mú[12;16H.[0;30;41m[12;19H³[37m [30m +[12;24H[1;37;40m.[0;30;41m³[37m [30m [1;37;40m[12;35Hú[0;30;41m[12;37H³[37m [30m [12;43H³[37m [30m [1;37;40m[12;52Hú[0;30;41m[12;55H³[37m [30m [1;37;40mú[12;64Hú[0;30;41m[12;66H³[37m [30m [1;37;40mù[12;75Hú +[0;37;45m[12;78H [13;1H [1;40m[13;6Hú[0;30;41m³[37m [30m [13;25H³[37m [30m [1;37;40mù[0;30;41m³[37m [30m [13;66H³[37m [30m [1;37;40m[13;72Hú[0;37;45m[13;78H [14;1H [30;41m +[14;7H³[37m [30m [1;37;40m[14;14Hú[14;20Hù[14;22Hú[0;30;41m[14;25H³[37m [30m [14;43H³[37m [30m [14;53H³[37m [30m [1;37;40m[14;61Hú[0;30;40m[14;65H [41m³[37m [30m [1;37;40m[14;72H.[14;76Hú[0;37;45m[14;78H +[14;78H [15;1H [1;40m[15;5Hú[15;12Hú[15;18Hú[15;27Hú[15;31Hú[15;34Hù[15;39Hú[0;30;40m[15;43H [1;37m[15;51Hú[0;30;41m[15;55H³[37m [30m [1;37;40m[15;65Hú[15;73Hú[0;37;45m[15;78H [16;1H [1;33m Written by Mike Snyder, ( +[16;30Hc) 1995 by HCI & M.S.[0;37;45m [30;41m[16;55H³[37m [30m [37;45m[16;62H [1;33mShareWare![0;37;45m [1;36;40m[18;18HPress a key to continue....[20;1H[0m diff --git a/src/doors/timeport/title5.ans b/src/doors/timeport/title5.ans new file mode 100644 index 0000000000000000000000000000000000000000..709062056d72c4d8a5832b843afcf231825a0bb3 --- /dev/null +++ b/src/doors/timeport/title5.ans @@ -0,0 +1,15 @@ +[0;37;40m[34m[1;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[2;6H°±²[30;44mÅÅÅ[1;32mA Door game by Mike[0;30;44mÅÅÅÅÅ[1;37;45mÛßßßßßßß[40mß[0;30;44mÅÅÅÅÅÅÅÅÅ[1;31mHunter Computer[0;30;44mÅÅÅ +[2;72H[34;40m²±°[3;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;32mSnyder![0;30;44mÅÅÅÅÅ[1;37;45mÛ [33m [37m [40m [0;30;44mÅÅÅÅÅÅÅÅÅ[1;31mInc. Presents:[0;30;44mÅÅÅÅ[34;40m²±°[4;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;45mÛ [33m [37m +[4;44H[40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[5;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;45mÛ [33m [37m [40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[6;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;45mÛ +[6;44H[40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[7;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;45mÛßßß ßßß[40mß[0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[8;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;45mÛ [35m------------[37m +[8;48H[40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[9;6H°±²[30;44mÅÅÅ[1;37;45mÛßßßßßßßßßßßßßßßßßßß [35m------------[37m ßßßßßßßßßßßßßßßßßßß[40mß[0;30;44mÅÅÅ[34;40m²±°[10;6H°±²[30;44mÅÅÅ[1;37;45mÛ [0;34;45mßßÛßß[1;37m [0;34;45mßßÛß +[10;24Hß[1;37m [0;34;45mÛÜ[1;37m [0;34;45mÜÛ[1;37m [0;34;45mÛßßß[1;37m [35m--------[37m [0;34;45mÛßßÛ[1;37m [0;34;45mÛßßßÛ[1;37m [0;34;45mÛßßÛ[1;37m [0;34;45mßßÛßß[1;37m [40m [0;30;44mÅÅÅ[34;40m²±°[11;6H°±²[30;44mÅÅÅ[1;37;45mÛ +[11;16H[0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [0;34;45mß[1;37m [0;34;45mÛ[1;37m [0;34;45mÛÜÜ[1;37m [35m--------[33m [0;34;45mÛßßß[1;37m [0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [0;34;45mÛßÛß[1;37m [0;34;45mÛ +[11;65H[1;37m [40m [0;30;44mÅÅÅ[34;40m²±°[12;6H°±²[30;44mÅÅÅ[1;37;45mÛ [0;34;45mÛ[1;37m [0;34;45mÜÜÛÜÜ[1;37m [0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [0;34;45mÛÜÜÜ[1;37m [35m--------[37m [0;34;45mÛ[1;37m [0;34;45mÛÜÜÜÛ[1;37m +[12;57H[0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [0;34;45mÛ[1;37m [40m [0;30;44mÅÅÅ[34;40m²±°[13;6H°±²[30;44mÅÅÅ[1;37;45mÛ[0;30;45mÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[1;37m [35m------------[37m [0;30;45mÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ[1;37;40m [0;30;44mÅÅÅ +[13;72H[34;40m²±°[14;6H°±²[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m [35m------------[37m [40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[15;6H°±²[30;44mÅÅÅ[34;40mÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[0;30;45mÜÜÜ[1;37m +[15;45H[0;30;45mÜÜÜ[1;37;40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[16;6H ±²[30;44mÅÅ[34;40mÅÅÅ[30;44mÅÅ[34;40mÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m [40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[17;6H ²[30;44mÅÅÅ +[17;12H[34;40mÅÅ[30;44mÅÅÅÅÅÅ[34;40mÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m (C) [40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[18;6H Å[30;44mÅÅÅ[34;40mÅÅ[30;44mÅÅ[34;40mÅÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m 19.95 [40m +[18;45H[0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[19;6H ÅÅÅÅÅÅÅÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m By: [40m [0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[20;6H ÅÅÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[45m HCI [40m +[20;45H[0;30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[21;6H ÅÅÅÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;37;47mÛ[0;30;45mÜÜÜÜÜÜÜ[1;37;40m [0;30;44mÅÅÅ[1;34mPress Any Key To Begin[0;30;44mÅÅ[34;40m²±°[22;6H ÅÅÅÅÅÅÅÅÅÅÅÅ[30;44mÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ +[22;39HÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[34;40m²±°[22;1H[0m diff --git a/src/doors/timeport/title6.ans b/src/doors/timeport/title6.ans new file mode 100644 index 0000000000000000000000000000000000000000..fda92d971dee37119b448f1d2ec1d7204295cc96 --- /dev/null +++ b/src/doors/timeport/title6.ans @@ -0,0 +1,14 @@ +[0;37;40m[35m[1;1HÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[31m[2;5HHunter Computer Inc. Presents, a Door game by Mike Snyder[33m[2;63HSHAREWARE 1995[31m[3;1HÚ +[3;44H¿[4;1HÃÅ[1;33mÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ[0;31;40m ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;33mÛÛÛÛÛÛÛÛÛÛÛÛÛ[0;31;40m ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´[5;1HÃÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅ +[5;50HÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ´[6;1HÃÅÅÅÅÅ[1;33mÛÛ[0;31;40m Å[1;33mÛÛ[0;31;40m Å[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅÅ[1;33mÛÛ[0;31;40m Å[1;33mÛÛÛÛÛÛÛ[0;31;40m ÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅ[1;33mÛÛÛÛÛÛÛ +[6;67HÛ[0;31;40m Å[1;33mÛÛÛÛÛÛÛÛÛ[0;31;40m ´[7;1HÃÅÅÅÅÅ[1;33mÛÛ[0;31;40m Å[1;33mÛÛ[0;31;40m Å[1;33mÛÛÛÛ[0;31;40m ÅÅÅÅÅ[1;33mÛÛÛÛ[0;31;40m Å[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅ[1;33mÛÛ[0;31;40m Å +[7;64HÅÅ[1;33mÛÛ[0;31;40m ÅÅÅÅÅ[1;33mÛÛ[0;31;40m ÅÅÅ´[8;1HÃÅÅÅÅÅ[1;33;43m²²[0;31;40m ÅÅÅÅÅ[1;33;43m²²[0;31;40m Å[1;33;43m²²[0;31;40m Å[1;33;43m²²[0;31;40m Å[1;33;43m²²[0;31;40m Å[1;33;43m²²[0;31;40m ÅÅÅÅÅÅÅÅ[1;33;43m²²²²²²²²²²²²² +[8;55H[0;31;40m ÅÅÅÅ[1;33;43m²²[0;31;40m ÅÅÅ[1;33;43m²²[0;31;40m ÅÅÅÅÅ[1;33;43m²²[0;31;40m ÅÅÅ´[9;1HÃÅÅÅÅÅ[1;33;43m±±[0;31;40m Å[1;33;43m±±[0;31;40m Å[1;33;43m±±[0;31;40m ÅÅÅ[1;33;43m±±[0;31;40m ÅÅÅ[1;33;43m±±[0;31;40m Å[1;33;43m±± +[9;33H[0;31;40m ÅÅÅÅÅÅÅÅ[1;33;43m±±[0;31;40m ÅÅÅÅÅÅÅÅÅÅÅÅÅÅÅ[1;33;43m±±[0;31;40m ÅÅÅ[1;33;43m±±[0;31;40m ÅÅÅÅÅ[1;33;43m±±[0;31;40m ÅÅÅ´[10;1HÃÅÅÅÅÅ[1;33;43m°°[0;31;40m Å[1;33;43m°°[0;31;40m Å[1;33;43m°°[0;31;40m ÅÅÅÅÅÅÅÅÅ[1;33;43m°° +[10;29H[0;31;40m Å[1;33;43m°°°°°[0;31;40m ÅÅÅÅÅ[1;33;43m°°[0;31;40m Å[1;33;43m°°°°°°°°°°°°[0;31;40m Å[1;33;43m°°[0;31;40m ÅÅÅ[1;33;43m°°[0;31;40m ÅÅÅÅÅ[1;33;43m°°[0;31;40m ÅÅÅ´[11;1HÃÅÅÅÅÅ[1;33;43m [0;31;40m Å[1;33;43m [0;31;40m Å +[11;15H[1;33;43m [0;31;40m ÅÅÅÅÅÅÅÅÅ[1;33;43m [0;31;40m Å[1;33;43m [0;31;40m ÅÅÅÅÅÅÅÅ[1;33;43m [0;31;40m Å[1;33;43m [0;31;40m ÅÅÅÅÅÅÅ[1;33;43m [0;31;40m Å[1;33;43m [0;31;40m ÅÅÅÅÅ[1;33;43m [0;31;40m ÅÅÅ´[12;1HÃÅÅÅÅÅ[33m² +[12;8H²[31m Å[33m²²[31m Å[33m²²[31m ÅÅÅÅÅÅÅÅÅ[33m²²[31m Å[33m²²[31m ÅÅÅÅÅÅÅÅ[33m²²[31m Å[33m²²[31m ÅÅÅÅÅÅÅ[33m²²[31m Å[33m²²[31m Å[33m²²[31m ÅÅÅÅÅÅÅ[33m²²[31m ÅÅÅ´[13;1HÃÅÅÅÅÅ[33m±±[31m Å[33m±±[31m Å[33m±±[31m ÅÅÅÅÅÅÅÅÅ[33m +[13;27H±±[31m Å[33m±±[31m ÅÅÅÅÅÅÅÅ[33m±±[31m Å[33m±±[31m ÅÅÅÅÅÅÅ[33m±±[31m Å[33m±±[31m ÅÅÅ[33m±±[31m ÅÅÅÅÅ[33m±±[31m ÅÅÅ´[14;1HÃÅÅÅÅÅ[33m°°[31m Å[33m°°[31m Å[33m°°[31m ÅÅÅÅÅÅÅÅÅ[33m°°[31m Å[33m°°°°°°°[31m ÅÅÅ[33m°°[31m Å +[14;46H[33m°°°°°°°°°°°°[31m Å[33m°°[31m ÅÅÅ[33m°°[31m ÅÅÅÅÅ[33m°°[31m ÅÅÅ´[15;1HÀÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÙ[1;37m[16;10HÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ +[17;10H³[31m[17;12HCopyright (C) 1995 by Hunter Computer Inc. and Mike Snyder[30m[17;71H³[37m[18;10HÀ[30mÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ[0;35;40m[20;1HÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +[20;63HÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ[1m[21;29HPress any key to begin[21;1H[0m diff --git a/src/doors/timeport/title7.ans b/src/doors/timeport/title7.ans new file mode 100644 index 0000000000000000000000000000000000000000..8a22c77250e8a488f6c48ca16a53259f082bcee8 --- /dev/null +++ b/src/doors/timeport/title7.ans @@ -0,0 +1,22 @@ +[0;37;40m[1;30m[2;3H<<[0;37;40m<<[1m<< Hunter Computer Inc. Presents >>[0;37;40m>>[1;30m>>[36m[3;1HÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿[4;1H³[0;35;41m[4;3H²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²± +[4;41H±±±±±±±±±±±±±±±±±±±±±±±±±±±°°°°°°°°°°°[1;36;40m[4;80H³[5;1H³[0;35;41m[5;3H²²[31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m° +[5;36H°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°°[1;36;40m[5;80H³ +[6;1H³[0;35;41m[6;3H²²[1;30;40m°[37;47mÛ[32;46m²²²²²²[37;40m [47mÛ[32;46m²²²²²²[37;40m [47mÛ[32;46m²²[37;40m [30m°[0;31;40m°°[1;30m°[37;47mÛ[32;46m²²[37;40m [47mÛ[32;46m²±±±±±[37;40m [30m°[0;31;40m°[1;37;47mÛ[32;46m±±±±±± +[6;51H[37;40m [47mÛ[32;46m°°°°°°[37;40m [47mÛ[32;46m°°°°°°[37;40m [47mÛ[32;46m°°°°°°[37;40m [0;31;40m°[35;41m°°[1;36;40m[6;80H³[7;1H³[0;35;41m[7;3H²²[31;40m°°[1;30m°[37;47mÛ[32;46m²²[37;40m [30m°[0;31;40m°°[1;30m°[37;47mÛ +[7;17H[32;46m²²[37;40m [30m°[0;31;40m°[1;37;47mÛ[32;46m²²²²[37;40m [47mÛ[32;46m±±±±[37;40m [47mÛ[32;46m±±[37;40m [0;31;40m°[1;30m°°[0;31;40m°°[1;30m°[37;47mÛ[32;46m±±[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [47mÛ +[7;57H[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [30m°[0;31;40m°[1;37;47mÛ[32;46m°°[37;40m [0;31;40m°[1;30m°°[0;35;41m°°[1;36;40m[7;80H³[8;1H³[0;35;41m[8;3H²²[1;30;40m°°[0;31;40m°[1;37;47mÛ[32;46m²²[37;40m +[8;12H[0;31;40m°[1;30m°°[0;31;40m°[1;37;47mÛ[32;46m²²[37;40m [0;31;40m°[1;30m°[37;47mÛ[32;46m±±[37;40m [47mÛ[32;46m±±[37;40m [47mÛ[32;46m±±[37;40m [47mÛ[32;46m±±±±[37;40m [0;31;40m°[1;30m°°[0;31;40m°[1;37;47mÛ[32;46m°°°°°° +[8;51H[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°°°°°[37;40m [0;31;40m°[1;30m°[37;47mÛ[32;46m°°[37;40m [30m°[0;31;40m°°[35;41m°°[1;36;40m[8;80H³[9;1H³[0;35;41m[9;3H²²[31;40m°°[1;30m°[37;47mÛ[32;46m±± +[9;11H[37;40m [30m°[0;31;40m°°[1;30m°[37;47mÛ[32;46m±±[37;40m [30m°[0;31;40m°[1;37;47mÛ[32;46m±±[37;40m [0;31;40m°[1;30m°°[0;31;40m°[1;37;47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [0;31;40m°[1;30m°°[0;31;40m°°[1;30m°[37;47mÛ +[9;45H[32;46m°°[37;40m [30m°[0;31;40m°°[1;30m°[37;47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°°°[37;40m [0;31;40m°[1;30m°°[0;31;40m°[1;37;47mÛ[32;46m°°[37;40m [0;31;40m°[1;30m°°[0;35;41m°°[1;36;40m[9;80H³[10;1H³ +[0;35;41m[10;3H±±[1;30;40m°°[0;31;40m°[1;37;47mÛ[32;46m±±[37;40m [0;31;40m°[1;30m°[37;47mÛ[32;46m±±±±±±[37;40m [47mÛ[32;46m°°[37;40m [30m°[0;31;40m°°[1;30m°[37;47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°°°°°[37;40m [30m°[0;31;40m° +[10;44H[1;37;47mÛ[32;46m°°[37;40m [0;31;40m°[1;30m°°[0;31;40m°[1;37;47mÛ[32;46m°°°°°°[37;40m [47mÛ[32;46m°°[37;40m [47mÛ[32;46m°°[37;40m [0;31;40m°[1;30m°[37;47mÛ[32;46m°°[37;40m [30m°[0;31;40m°°[35;41m°°[1;36;40m[10;80H³ +[11;1H³[0;35;41m[11;3H±±[31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°° +[11;47H[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°°[1;36;40m[11;80H³[12;1H³[0;35;41m[12;3H±±[1;30;40m°°[0;31;40m°°[1;30m +[12;9H°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°° +[12;57H[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;31;40m°°[35;41m°°[1;36;40m[12;80H³[13;1H³[0;35;41m[13;3H±±[31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° +[13;47H°°°°°°°°°°°°°°°°°°°°°°[31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°°[1;36;40m[13;80H³[14;1H³[0;35;41m[14;3H±±[1;30;40m°°[0;31;40m°°[1;30m°°[0;31;40m°°[35;41m°°[30mÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ[35m°° +[14;69H[1;30;40m°°[0;31;40m°°[1;30m°°[0;31;40m°°[35;41m°°[1;36;40m[14;80H³[15;1H³[0;35;41m[15;3H±±[31;40m°°[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°° [30m³[1;32mA Door game by Mike Snyder, (C) 1995 by HCI & MS[0;30;41m³[35m °°[31;40m°° +[15;71H[1;30m°°[0;31;40m°°[1;30m°°[0;35;41m°°[1;36;40m[15;80H³[16;1H³[0;35;41m[16;3H±±[1;30;40m°°[0;31;40m°°[1;30m°°[0;31;40m°°[35;41m°°[30mÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄ[35m°°[1;30;40m°°[0;31;40m°°[1;30m°° +[16;75H[0;31;40m°°[35;41m°°[1;36;40m[16;80H³[17;1H³[0;35;41m[17;3H±±±±±±°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°[1;36;40m[17;80H³[18;1HÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ +[18;78HÄÄÙ[37m[19;52HPress a key to begin....[21;1H[0m diff --git a/src/doors/timeport/tp-event.c b/src/doors/timeport/tp-event.c new file mode 100644 index 0000000000000000000000000000000000000000..d0128150eab46a8f6b4548341208633a671f7515 --- /dev/null +++ b/src/doors/timeport/tp-event.c @@ -0,0 +1,192 @@ +#include <sys/time.h> +#include <time.h> +#include <string.h> +#include <sys/types.h> +#include <sys/time.h> +#include <unistd.h> +#include <stdlib.h> + +#include "doors.h" +#include "tplib.h" + +short Posit; +long di; + +/* +'NotAgain$ or Ch6$ (1) = Can Press Buttons? - Non-space = NO +' (2) = Alive - Non-Space = NO +' (3) = Can Place a hit now? - Non-Space = NO +' (4) = Has an Unfair Advantage - Non-Space = YES! +' (5) = Can Look in WATER again - Non-Space - NO +' (6) = Next availabe Flirt - 1 to 6 +' (789) = 3-digit "times laid" - 0 to 999 +' (10) = Times Killed since Last - 0 to 9 +' (11) = Times escaped at L-12 - 0 to 5 '5=win +' (12) = Can try to fish? - Non-space = NO +' (13) = Player is alive on another node non-space=yes +' (14) = Player can be a nuisance- Non-space = no +' (15) = Ansi room Mode: Space=Yes, Non-Space = no +' (16,17,18) = Times "simple" escaped +*/ +short StatsIn = 0; +short NamesToDel = 0; + +void Pauser(void) +{ + struct timeval to; + + to.tv_sec=2; + to.tv_usec=0; + select(0,NULL,NULL,NULL,&to); +} + +int main(int argc, char **argv) +{ + FILE *file; + char path[MAXPATHLEN]; + char str[256]; + char DATE[9]; + time_t currtime; + char *uname; + char *ualias; + char midbuf[4]; + short t; + char p; + long l; + + ParseCmdLine(argc,argv); + ReadConfig(); + ReadLinkTo(); + + srandomdev(); + Ocls(); + Oprint("\r\n`%-------------------------------------------------\r\n"); + Oprint("`#Time Port Daily Event (tp-event)\r\n`5Performing daily routines:\r\n"); + Oprint("`%-------------------------------------------------\r\n"); + + sprintf(path, "%sthedate.dat",DatPath); + file=SharedOpen(path,"a",LOCK_EX); + fputs(" \r\n",file); + fclose(file); + file=SharedOpen(path, "r", LOCK_SH); + readline(str, sizeof(str), file); + fclose(file); + currtime=time(NULL); + strftime(DATE, sizeof(DATE), "%D", localtime(&currtime)); + if(!strcmp(DATE,str)) + { + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%s\r\n",DATE); + fclose(file); + } + + Oprint("\r\n`5Running Player Maintenance\r\n"); + + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path,"a", LOCK_EX); + fclose(file); + + file=SharedOpen(path,"r", LOCK_SH); + while(!feof(file)) + { + readline(str,sizeof(str), file); + if(!str[0]) + break; + Posit ++; + uname=strtok(str,"~"); + if(uname != NULL) + ualias=strtok(NULL,"~"); + if(uname == NULL || ualias == NULL) + { + fprintf(stderr,"SysOp: There is an error in the NAMELIST.DAT file\r\neach name line must be RealName ~AliasName\r\n"); + Pauser(); + exit(1); + } + RTrim(ualias); + UCase(ualias); + OpenStats(ualias); + if(ch1[0]) + { + Ch6[13]=' '; + Ch6[0]=' '; + Ch6[2]=' '; + Ch6[4]=' '; + Ch6[11]=' '; + Ch6[14]=' '; + ChRest[9]=' '; + ChRest[11]=' '; + ChRest[12]=' '; + t=atoi(Mid(midbuf, Ch6, 16, 3)); + if(t<0) + t=0; + else + if(t>998) + t=0; + sprintf(midbuf,"%-3d",t); + Ch6[15]=midbuf[0]; + Ch6[16]=midbuf[1]; + Ch6[17]=midbuf[2]; + if(Ch6[5]<'1' || Ch6[5]>'6') + Ch6[5]='1'; + p=Ch6[9]-47; + if(p>=10) + { + SaveStrStats("DELETED2", ch1, ch2, ch3, ch4, ch5, Ch6, Ch7, Ch8, Ch9, Ch10, Ch11, Ch12, Ch13, Ch14, Ch15, Ch16, ch17, ChRest); + sprintf(str,"`$%s `#vanished from the space-time continuum today.", ch1); + WriteNews(str,1); + } + else + Ch6[9]=p+48; + if(Ch6[9]<='0' || Ch6[9] > '9') + Ch6[9]='0'; + if(strlen(Ch16)<1 || Ch16[0]==' ') + strcpy(Ch16,"Bruiser"); + sprintf(Ch13,"%d",MaxClosFight); + sprintf(Ch14,"%d",MaxPlayFight); + if((random()%15)==1) + { + strcpy(ch17, "badtimes"); + sprintf(Ch16, "R%ld N*", (random()%MaxBadTimes+1)); + } + ChRest[0]=50+random()%3; + if(Regis) + { + l=atoi(ch3)+atoi(ch3)/10; + sprintf(ch3,"%ld",l); + } + if(strcmp(Ch12, DATE) && Ch6[1]=='#') + { + Ch6[1]=' '; + sprintf(Ch9,"%ld",PlayerHP[atoi(Ch11)]); + } + if(strcmp(Ch12, DATE) && Ch6[1] != ' ') + { + Ch6[1]='#'; + } + l=atoi(Ch15); + if(l<0) + { + Ch15[0]='0'; + Ch15[1]=0; + } + SaveStrStats(ch1, ch1, ch2, ch3, ch4, ch5, Ch6, Ch7, Ch8, Ch9, Ch10, Ch11, Ch12, Ch13, Ch14, Ch15, Ch16, ch17, ChRest); + } + else + SaveStrStats("DELETED2", ch1, ch2, ch3, ch4, ch5, Ch6, Ch7, Ch8, Ch9, Ch10, Ch11, Ch12, Ch13, Ch14, Ch15, Ch16, ch17, ChRest); + } + fclose(file); + + Oprint("`5Deleting Inactive Players `8(If any)\r\n"); + DelOldFromNameList(); + + unlink(Yesterday); + rename(Today, Yesterday); + PickRandom(str,"daily.txt"); + WriteNews(str,1); + ExitGame(); + return(0); +} + +void UseItem(long c,short b) {} + +void SaveGame(void) {} diff --git a/src/doors/timeport/tplib.c b/src/doors/timeport/tplib.c new file mode 100644 index 0000000000000000000000000000000000000000..9e972c3739eda6353e37efe618ed1bb0155d1ca0 --- /dev/null +++ b/src/doors/timeport/tplib.c @@ -0,0 +1,1600 @@ +#include <ctype.h> +#include <errno.h> +#include <fcntl.h> +#include <stdlib.h> +#include <string.h> +#include <time.h> +#include <unistd.h> +#include "doors.h" +#include "tplib.h" + +// DIM SHARED ch1$, ch2$, ch3$, ch4$, ch5$, Ch6$, Ch7$, Ch8$, Ch9$, ChRest$ +char ch1[256]; +char ch2[256]; +char ch3[256]; +char ch4[256]; +char ch5[256]; +char Ch6[256]; +char Ch7[256]; +char Ch8[256]; +char Ch9[256]; +char ChRest[256]; +// DIM SHARED Ch10$, Ch11$, Ch12$, Ch13$, Ch14$, Ch15$, Ch16$, ch17$, Ch18$ +char Ch10[256]; +char Ch11[256]; +char Ch12[256]; +char Ch13[256]; +char Ch14[256]; +char Ch15[256]; +char Ch16[256]; +char ch17[256]; +char Ch18[256]; +// DIM SHARED RecLen AS INTEGER, DatPath$, BarBar$, PlayerNum AS INTEGER +short int RecLen=240; +char DatPath[MAXPATHLEN]; +char *BarBar="`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"; +short int PlayerNum; +// DIM SHARED Today$, Yesterday$, Regis AS INTEGER, FirstAvail AS INTEGER +char Today[MAXPATHLEN]; +char Yesterday[MAXPATHLEN]; +short int Regis, FirstAvail; +// DIM SHARED RegisterTo1$, RegisterTo2$, MaxClosFight$, MaxPlayFight$ +char RegisterTo1[256]; +char RegisterTo2[256]; +short MaxClosFight; +short MaxPlayFight; +// DIM SHARED RecordNumber AS INTEGER, OriginNumber AS INTEGER, Version$ +short RecordNumber, OriginNumber; +char *Version="1.2a Beta"; +// DIM SHARED Quor$, ItemCount AS INTEGER, Def$, User$, Alias$ +// char Quor[256]; /* Not used */ +char Def[256]; +char User[256]; +char Alias[256]; +short ItemCount; +// DIM SHARED into(10, 2) AS LONG, ItemName$(10) 'stored to read +long int into[11][3]; +char ItemName[11][21]; +// DIM SHARED Invent$(8), inv(8, 2) AS LONG 'access to inventory +char Invent[9][256]; +long int inv[9][3]; +// DIM SHARED MaxBadTimes AS INTEGER, KickOut AS INTEGER +short MaxBadTimes=5; +short KickOut; + +// Extras I need +char Prompt[128]; + +// Stuff common to all (May as well be in here eh?) +short Hit; +short Level; +char Bad[256]; +char NotAgain[256]; +char Weapon; +long Money; +char Defense; +long Stash; +long Exp; +char lastplay[9]; +short ClosFight; +short PlayFight; +char LineRest[256]; +char ExeLine[256]; +char ComLine[256]; +short PlayKill; +char sex[16]; +char CurCode[256]; + +char *DefName[13]={"Nothing", "Metal Shield", "Fractal Gloves", "Metalplast Shield", + "Fractal Boots", "Metalplast Vest", "Energy Helmet", "Laser Shield", + "Photon Shield", "Heat Absorber", "DiamondMatter Shield", + "Mind Shielder", "Ion Armor"}; + +char *WepName[13]={"Fists", "Pistol","Homing Grenade", "Cyber Arm", "Body Blast", + "Sonic Blaster", "Spacial Wave Rifle", "Neural Phaser", "Photon Ray", "Laser Cannon", + "Heat Disrupter", "Destruction Wand", "Ion Saber"}; + +long WepCost[13]={0,50,500,4000,11000,30000,100000,200000,400000,800000,3600000,8000000,20000000}; +long PlayerHP[13]={0, 20, 30, 40, 60, 80, 100, 120, 140, 200, 300, 450, 700}; +long WeaponAdd[13]={0, 5, 10, 20, 30, 40, 60, 80, 120, 180, 250, 350, 500}; +long DefenseAdd[13]={0, 1, 3, 9, 15, 25, 35, 50, 75, 100, 150, 225, 300}; +long MonMinHp[13]={0, 10, 20, 60, 160, 260, 400, 600, 850, 1050, 2000, 3000, 4500}; +long GoldFromEach[13]={0, 15, 100, 400, 950, 2000, 6000, 12000, 25000, 75000, 200000, 400000, 600000}; +long ExpFromEach[13]={0, 10, 75, 200, 425, 1000,3500,6200,11500,20000,43000,85000,120000}; +long UpToNext[12]={0, 300, 3000, 10000, 25000, 60000, 180000, 400000, 800000, 1500000, 3000000, 6000000}; +long HealAHit[13]={0, 2, 3, 4, 6, 8, 12, 16, 20, 25, 30, 35, 40}; +char *Rank[13]={"","New Recruit","Recruit","Partial Adept","Full Adept","Sergeant", + "Commander","General","Time Sergeant","Time Commander", + "Time General","Time Master","Time Lord"}; + +int Playercount; +int MaximumPlayers; +char guardname[256]; +char BribeGuard[256]; + +FILE *SharedOpen(const char *filename, const char *inmode, int lockop) { + FILE *file; + FILE *file2; + int trunc=0; + char mode[8]; + + strcpy(mode,inmode); + if(mode[0]=='w') { + strcpy(mode,"r+"); + trunc=1; + } + file=fopen(filename,mode); + if(file == NULL) + { + if(trunc) + { + strcpy(mode,inmode); + file=fopen(filename,mode); + trunc=0; + } + if(file==NULL) + { + fprintf(stderr, "Unable to open %s for read! %s (%d)\n", filename, strerror(errno), errno); + return(NULL); + } + } + if(flock(fileno(file),lockop)) + { + fprintf(stderr, "Unable to lock %s! %s (%d)\n", filename, strerror(errno), errno); + fprintf(stderr, "FileNo: %d LockOp: %d\n",fileno(file), lockop); + fclose(file); + return(NULL); + } + if(trunc) + { + strcpy(mode,inmode); + file2=fopen(filename,mode); + flock(fileno(file),lockop); + fclose(file); + file=file2; + } + return(file); +} + +void AddToMail(short x, char *e) +{ + char FilePath[MAXPATHLEN]; + FILE *file; + + if (x > 999) + x = 999; + if (x < 1) + x = 1; + sprintf(FilePath,"%smail.%d", DatPath, x); + file=SharedOpen(FilePath, "a", LOCK_EX); + if(file != NULL) + { + fprintf(file,"%s\r\n",e); + fclose(file); + } +} + +void DelOldFromNameList(void) +{ + short c=0; + char NameListFN[MAXPATHLEN]; + char NewListFN[MAXPATHLEN]; + FILE *NameList; + FILE *NewList; + char b[256]; + char te[16]; + char *user; + char *alias; + char str[256]; + + sprintf(NameListFN, "%snamelist.dat", DatPath); + sprintf(NewListFN, "%snewlist.dat", DatPath); + NameList=SharedOpen(NameListFN,"r",LOCK_EX); + if(NameList == NULL) + return; + NewList=SharedOpen(NewListFN,"w",LOCK_EX); + if(NewList == NULL) + { + fclose(NameList); + return; + } + while(!feof(NameList)) + { + readline(b, sizeof(b), NameList); + strcpy(str,b); + c++; + user = strtok(str, "~"); + if(user!=NULL) + { + alias=strtok(NULL,"~"); + if(alias != NULL) + { + strncpy(te,alias,15); + RTrim(te); + OpenStats(te); + if(ch1[0]) + { + fprintf(NewList,"%s\r\n",b); + } + } + } + } + rename(NewListFN, NameListFN); + fclose(NameList); + fclose(NewList); +} + +char *FixTheString(char *dest, char *a, char *b, char *c) +{ + char *in; + char *out; + + in=a; + out=dest; + *out=0; + for(;*in;in++) + { + if(*in=='*' && *(in+1)=='1') + { + strcat(out,b); + in++; + } + else if(*in=='*' && *(in+1)=='2') + { + strcat(out,c); + in++; + } + else + { + *out++=*in; + *out=0; + } + out=strchr(dest,0); + } + return(dest); +} + +char *GetCommand(char *dest) +{ + char pr[256]; + + if(strlen(Prompt)) + { + Def[0] = Prompt[strlen(Prompt)-1]; + Def[1] = 0; + Prompt[strlen(Prompt)-1]=0; + } + + Oprint("\r\n"); + sprintf(pr,"`3 Remaining Minutes: `!%ld:%02ld, `3Hits: `!%hd`3 of `!%ld\r\n`%% Awaiting Your Choice: `7" + ,MinsLeft,SecsLeft,Hit,PlayerHP[Level]); + Oprint(pr); + sprintf(pr,"`#(`9%s`!%s`5): `$",Prompt,Def); + strcat(Prompt,Def); + Oprint(pr); + ChatEnabled = 1; + Owait(pr); + dest[0]=toupper(pr[0]); + dest[1]=0; + ChatEnabled = 0; + Oprint("\r\n"); + if (dest[0]==0 || dest[0]=='\r' || dest[0]=='\n') + { + strcpy(dest, Def); + } + return(dest); +} + +char *GetYesNo(char *dest) +{ + do { + Owait(dest); + UCase(dest); + } while (dest[0] != 'Y' && dest[0] != '\r' && dest[0] != '\n' && dest[0] != 'N'); + if(dest[0] == '\n' || dest[0]=='\r') + dest[0]='Y'; + Oprint(ret); + return(dest); +} + +void InitPlayer(void) +{ + char e[MAXPATHLEN]; + int i; + FILE *file; + time_t currtime; + +// '--- initialize the MAIL.NUM file --- + sprintf(e,"%smail.%d",DatPath,FirstAvail); + file=SharedOpen(e,"w",LOCK_EX); + unlink(e); + fclose(file); + +// '--- initialize the INVENT.NUM file --- + sprintf(e,"%sinvent.%d",DatPath,FirstAvail); + file=SharedOpen(e,"w",LOCK_EX); + for(i=0;i<8;i++) + { + fwrite("------------------- 0 0 ",80,1,file); + } + fclose(file); + + strcpy(Bad, "N4"); + strcpy(NotAgain, " |"); + Weapon='0'; + Money=150; + Defense='0'; + Stash=50; + Hit=PlayerHP[1]; + Level = 1; + Exp=0; + currtime=time(NULL); + strftime(lastplay, 9, "%D", localtime(&currtime)); + NotAgain[5]='1'; + NotAgain[6]='0'; + NotAgain[7]=' '; + NotAgain[8]=' '; + NotAgain[10]='0'; + ClosFight=MaxClosFight; + PlayFight=MaxPlayFight; + strcpy(LineRest, " " + " " + " " + " "); + LineRest[0]= '2'+random()%3; // 'pole random + strcpy(ExeLine, " "); + strcpy(ComLine, " "); + PlayKill=0; +} + +short sip(void) +{ + short c; + char a[2]; + + MakeInputArea(2); + KbIn(a,1); + Oprint("`7\r\n"); + c=atoi(a); + return c; +} + +void DisplayInvent(void) +{ + char str[256]; + int x; + + Ocls(); + sprintf(str,"`!T`3ime `!P`3ort `8Version `7%s -- `7Location: `%%Inventory Listing\r\n",Version); + Oprint(str); + Oprint(BarBar); + Oprint("`! These are items currently in your inventory.\r\n"); + Oprint(BarBar); + ItemCount = 8; + for(x=1;x<=8;x++) + { + strcpy(str, Invent[x]); + if(str[0]=='-') + strcpy(str,"Nothing"); + strcpy(ItemName[x], str); + into[x][1] = inv[x][1]; + into[x][2] = inv[x][2]; + } + + ListItems(0); + Oprint(BarBar); + Oprint("`4 (`#U`4)`@se an item now "); + Oprint("`4(`#D`4)`@rop an item "); + Oprint("`4(`#R`4)`@eturn to game\r\n"); + strcpy(Prompt, "UDR"); + Oprint(BarBar); +} + +void Inventory(void) +{ + long x1, x2, x3, x4, gg1, pp1, b; + short c,Yilled; + char str[256]; + char str2[256]; + + DisplayInvent(); + while(1) + { + GetCommand(str); + if(str[0]=='R') + return; + if(str[0]=='D') + { + Oprint("\r\n`0 Drop which item? (1..8) "); + c=sip(); + if(c >= 1 && c <= 8) + { + SaveInvItem(c, "-------------------", 0, 0); + DisplayInvent(); + continue; + } + } + + if(str[0] == 'U') // 'use the item + { + Oprint("\r\n`# USE which item? (1..8) "); + c=sip(); + if(c < 1 || c > 8) + { + Oprint("\r\n`6 You can't use an item other than these listed.\r\n\r\n"); + PressAnyKey(); + DisplayInvent(); + continue; + } + b = inv[c][2]; + if(b <= 0) + { + Oprint("\r\n`6 Nothing is there for you to use.\r\n"); + continue; + } + if(b == 1) + { + sprintf(str2,"\r\n`#%ld`5 Morph Credits will transfer to Fred for each healed point.\r\n",HealAHit[Level]); + Oprint(str2); + x2 = PlayerHP[Level]; // 'max hits + gg1 = Money; // 'money + pp1 = HealAHit[Level]; // 'cost per + x1 = Hit; // 'current hits + x4 = PlayerHP[Level]; // 'max hits + x3 = x4 - x1; + if(x3 <= 0) + { + Oprint("`5 However, you are at maximum health currently.\r\n\r\n"); + PressAnyKey(); + DisplayInvent(); + continue; + } + Yilled = 0; + x4 = 0; + while(gg1 >= pp1 && x1 < x2) + { + gg1 = gg1 - pp1; + x4 = x4 + pp1; + x1 = x1 + 1; + Yilled = Yilled + 1; + } + if(Yilled <= 0) + { + Oprint("`5 You couldn't seem to afford a single hit point...\r\n\r\n"); + PressAnyKey(); + DisplayInvent(); + continue; + } + sprintf(str2,"\r\n\r\n`!%d Hit Points were healed.\r\n\r\n",Yilled); + Oprint(str2); + sprintf(str2,"`3 Fred will receive %ld Morph Credits from your account.\r\n\r\n",x4); + Oprint(str2); + Money = gg1; + Hit = x1; + SaveInvItem(c, "-------------------", 0, 0); + PressAnyKey(); + DisplayInvent(); + continue; + } + Oprint("\r\n"); + UseItem(c, b); // 'call to a routine MUST be in each module + Oprint("\r\n"); + PressAnyKey(); + if(KickOut == 1) + { + KickOut = 0; + return; + } + KickOut = 0; + DisplayInvent(); + continue; + } + + if(str[0] == '?') + { + DisplayInvent(); + continue; + } + if(str[0] == 0) + return; + Oprint("\r\n `2Choose a valid command, or [`0?`2] to re-list your inventory.\r\n"); + continue; + } +} + +void ListItems(float ee) +{ + int x; + char str[256]; + + Oprint("`$ NUM Item Name Buy cost\r\n"); + Oprint(BarBar); + for(x = 1;x <= ItemCount; x++) + { + Oprint("`7 "); + sprintf(str,"`7(`!%d`8)`6 ",x); + Oprint(str); + Pad(str, ItemName[x], 23); + Oprint(str); + sprintf(str,"`6%11ld\r\n",into[x][1]); + Oprint(str); + } + if(ee == 1) + Oprint("`7 (`%0`8)`@ None of these (quit) \r\n"); +} + +void ListPlayers(void) +{ +/* +'Ch1$ = Alias$(15) +'Ch2$ = Money$(8) +'Ch3$ = Stash$(8) +'Ch4$ = Sex$(1) +'Ch5$ = CurCode$(4) +'Ch6$ = NotAgain$(20) +'Ch7$ = Weapon$(1) +'Ch8$ = Defense$(1) +'Ch9$ = Hit$(8) +'Ch10$ = Exp$(8) +'Ch11$ = SkillLevel (2) +'Ch12$ = Date of Last Play (10) +'Ch13$ = Clost Fights Remainint(2) +'Ch14$ = PlayerFights Remaining(1) +'ch15$ = PlayerKills(3) +*/ + + // 'first, I need to sort the players based upon their experience + char AliasName[1000][256]; + long Exper[1000]; + short GoMax; + char str[256]; + FILE *file; + char *p; + short MadeChange; + short x; + long l; + short Pax; + short Pottr; + float Bv; + short xix; + + GoMax = 0; + + sprintf(str,"%snamelist.dat",DatPath); + file=SharedOpen(str,"r",LOCK_SH); + + while(!feof(file)) + { + GoMax++; + readline(str,sizeof(str),file); + p=strchr(str,'~'); + if(p!=NULL) + { + p++; + for(;*p && isspace(*p);p++); + strncpy(AliasName[GoMax],p,15); + AliasName[GoMax][15]=0; + for(p=AliasName[GoMax]+strlen(AliasName[GoMax])-1;isspace(*p) && p>=AliasName[GoMax];p--) + *p=0; + OpenStats(AliasName[GoMax]); + if(ch1[0]) + sscanf(Ch10,"%ld",&(Exper[GoMax])); + else + Exper[GoMax]=0; + } + } + fclose(file); + + + if(GoMax > 1) + { + puts(""); + do + { + MadeChange = 0; + for(x = GoMax; x>=1; x--) + { + if(Exper[x+1] > Exper[x]) + { + l=Exper[x+1]; + Exper[x+1]=Exper[x]; + Exper[x]=l; + strcpy(str,AliasName[x+1]); + strcpy(AliasName[x+1],AliasName[x]); + strcpy(AliasName[x],str); + MadeChange = 1; + } + } + } while(MadeChange>0); + } + + Ocls(); + Pax = 16; + Pottr = 1; + Oprint("\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + Oprint("`! Time Port: `#List of Recruits\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + Oprint(" Sex Name Level Experience Alive Kills Codes Wins\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + + for(xix = 1; xix<GoMax; xix++) + { + OpenStats(AliasName[xix]); + if(ch1[0]) + { + if(Pottr == 0) + { + Ocls(); + Oprint(" Sex Name Level Experience Alive Kills Codes Wins\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + } + // 'show the listing + Oprint("`$ "); + if(toupper(ch4[0]) == 'F') + sprintf(str,"%3.3s",ch4); + else + { + str[0]=' '; + str[1]=' '; + str[2]=' '; + str[3]=0; + } + Oprint(str); + Bv = 19; + l=strlen(ch1); + for(x = 0; x<l; x++) + { + if(ch1[x] == '`') + Bv += 2; + } + if(Bv < 1) + Bv = 1; + sprintf(str,"%-*.*s",(int)Bv, (int)Bv, ch1); + Oprint(str); + sprintf(str,"`@%-6.6s",Ch11); + Oprint(str); + sprintf(str,"%-14.14s",Ch10); + Oprint(str); + sprintf(str,"%-10.10s",Ch6[1] == ' '?"`%YES":"`4NO"); + Oprint(str); + sprintf(str,"`5%-7.7s",Ch15); + Oprint(str); + str[0]='`'; + str[1]='2'; + str[2]=Ch6[15]?Ch6[15]:' '; + str[3]=Ch6[16]?Ch6[16]:' '; + str[4]=Ch6[17]?Ch6[17]:' '; + str[5]=' '; + str[6]=' '; + str[7]=' '; + str[8]=' '; + str[9]=0; + Oprint(str); + str[0]='`'; + str[3]=0; + if(isdigit(Ch6[10]) && Ch6[10] != '0') + str[1]='$'; + else + str[1]= '9'; + str[2]=Ch6[10]; + Oprint(str); + Pottr++; + Oprint("\r\n"); + if(Pottr >= Pax) + { + Pottr = 0; + Pax = 20; + Oprint("\r\n"); + PressAnyKey(); + } + } + } + Oprint("\r\n\r\n"); + if(Pottr > 0) + PressAnyKey(); +} + +void LoadGame(void) +{ + OpenStats(Alias); + if(!ch1[0]) + ExitGame(); + strcpy(Bad,"N5"); + OriginNumber = RecordNumber; + Money=atoi(ch2); // sscanf(ch2,"%ld",&Money); + Stash=atoi(ch3); // sscanf(ch3,"%ld",&Stash); + sex[0]=toupper(ch4[0]); + sex[1]=0; + strcpy(CurCode, ch5); + strcpy(NotAgain, Ch6); + Weapon=Ch7[0]; // sscanf(Ch7,"%hd",&Weapon); + Defense=Ch8[0]; // sscanf(Ch8,"%hd",&Defense); + Hit=atoi(Ch9); // sscanf(Ch9,"%hd", &Hit); + Exp=atoi(Ch10); // sscanf(Ch10,"%ld", &Exp); + Level=atoi(Ch11); // sscanf(Ch11,"%hd",&Level); + strcpy(lastplay, Ch12); + ClosFight=atoi(Ch13); // sscanf(Ch13, "%hd", &ClosFight); + PlayFight=atoi(Ch14); // sscanf(Ch14, "%hd", &PlayFight); + PlayKill=atoi(Ch15); // sscanf(Ch15, "%hd", &PlayKill); + strcpy(ExeLine, Ch16); + strcpy(ComLine, ch17); + strcpy(LineRest, ChRest); +} + +void LoadItems(char *a) +{ + char *x; + short c=1; + short b; + + x=a; + ItemCount = 0; + while(*x) + { + sscanf(x,"%3hd",&b); + while(strlen(x) < 3) + strcat(x," "); + if(b > 0 && b < 999) + { + ReadItem(b, c); + ItemCount = c; + c++; + } + x+=3; + } +} + +void MakeInputArea(short v) +{ + char *buf; + + buf=(char *)malloc(v+1); + memset(buf,' ',v); + buf[v]=0; + SetColor(15, 4, 0); + Oprint(buf); + memset(buf,'\b',v); + Oprint(buf); +} + +char *MakeNode(char *dest, char *b) +{ + char *in; + char *out; + + out=dest; + for(in=b; *in; in++) + { + if(*in=='*') + { + sprintf(out,"%d",NodeNum); + out=out+strlen(out)-1; + } + else + *out=*in; + out++; + } + *out=0; + return(dest); +} + +void RTrim(char *str) +{ + char *p; + + if(!*str) + return; + for(p=str+strlen(str)-1;(isspace(*p) || !*p) && p>=str; p--) + { + *p=0; + } +} + +void OpenInventory(void) +{ + char str[MAXPATHLEN]; + FILE *file; + char buf[81]; + int x; + char midbuf[9]; + + sprintf(str,"%sinvent.%d",DatPath,OriginNumber); + file=SharedOpen(str,"r",LOCK_SH); + for(x=1;x<=8;x++) + { + buf[0]='-'; + fread(buf, 80, 1, file); + buf[80]=0; + strncpy(Invent[x],buf,20); + RTrim(Invent[x]); + inv[x][1]=atoi(Mid(midbuf,buf,20,8)); + inv[x][2]=atoi(Mid(midbuf,buf,28,3)); + } + fclose(file); +} + +char *Mid(char *dest, char *source, int start, int len) +{ + char *in; + char *out; + int x; + + in=source+(start-1); + out=dest; + for(x=1;x<=len;x++) + { + *(out++)=*(in++); + } + *out=0; + return(dest); +} + +void OpenStats(char *a1) +{ +/* +'Ch1$ = Alias$(15) +'Ch2$ = Money$(8) +'Ch3$ = Stash$(8) +'Ch4$ = Sex$(1) +'Ch5$ = CurCode$(4) +'Ch6$ = NotAgain$(20) +'Ch7$ = Weapon$(1) +'Ch8$ = Defense$(1) +'Ch9$ = Hit$(8) +'Ch10$ = Exp$(8) +'Ch11$ = SkillLevel(2) +'Ch12$ = Date of Last Play LastPlay$(8) +'Ch13$ = Closet Fights remaining ClosFight$(2) +'Ch14$ = Player fights remaining PlayFight$(1) +'Ch15$ = PlayKill$(3) +'ch16$ = ExeLine$(10) +'ch17$ = ComLine$(8) +'ChRest$ = Reserved end portion of record, + 'used to preserve data from IGM's +*/ + short Found=0; + short c=0; + char str[MAXPATHLEN]; + FILE *file; + unsigned char buf[241]; + int x; + char ach1[16]; + + ch1[0]=ch2[0]=ch3[0]=ch4[0]=ch5[0]=Ch6[0]=Ch7[0]=Ch8[0]=Ch9[0]=0; + Ch10[0]=Ch11[0]=Ch12[0]=Ch13[0]=Ch14[0]=Ch15[0]=Ch16[0]=ch17[0]=ChRest[0]=0; + + sprintf(str,"%splayers.dat",DatPath); + file=SharedOpen(str,"a",LOCK_EX); + fclose(file); + file=SharedOpen(str,"r",LOCK_SH); + while(!feof(file) && !Found) + { + c++; + buf[0]=0; + fread(buf,RecLen,1,file); + buf[240]=0; + if(strlen(buf) < RecLen) + { + ch1[0]=0; + FirstAvail = c; + break; + } + strncpy(ach1,buf,15); + ach1[15]=0; + RTrim(ach1); + if(!strcasecmp(a1,ach1)) + { + strcpy(ch1,ach1); + RTrim(Mid(ch2, buf, 16, 8)); + RTrim(Mid(ch3, buf, 24, 8)); + RTrim(Mid(ch4, buf, 32, 1)); + RTrim(Mid(ch5, buf, 33, 4)); + Mid(Ch6, buf, 37, 20); + Mid(Ch7, buf, 57, 1); + Mid(Ch8, buf, 58, 1); + RTrim(Mid(Ch9, buf, 59, 8)); + RTrim(Mid(Ch10, buf, 67, 8)); + RTrim(Mid(Ch11, buf, 75, 2)); + RTrim(Mid(Ch12, buf, 77, 10)); + RTrim(Mid(Ch13, buf, 87, 2)); + Mid(Ch14, buf, 89, 1); + RTrim(Mid(Ch15, buf, 90, 3)); + RTrim(Mid(Ch16, buf, 93, 10)); + RTrim(Mid(ch17, buf, 103, 8)); + x = (RecLen - 2) - 110; + Mid(ChRest, buf, 111, x); + + if(atoi(Ch13) <= 0) + { + Ch13[0]='0'; + Ch13[1]=0; + } + if(atoi(Ch13) >= MaxClosFight) + { + sprintf(Ch13, "%hd", MaxClosFight); + } + if(atoi(Ch14) <= 0) + { + Ch14[0]='0'; + Ch14[1]=0; + } + if(atoi(Ch14) >= MaxPlayFight) + { + sprintf(Ch14, "%hd", MaxPlayFight); + } + Found = 1; + RecordNumber = c; + FirstAvail = c; + } + if(*buf<' ' || *buf > 128) + { + ch1[0]=0; + Found = 1; + FirstAvail = c; + } + if(feof(file) && !Found) + { + ch1[0]=0; + FirstAvail = c + 1; + } + } + fclose(file); +} + +char *Pad(char *dest, char *a, long l) +{ + char *in; + char *out; + long x; + int pad=0; + + in=a; + out=dest; + + for(x=0;x<l;x++) + { + if(!*in) + pad=1; + if(pad) + *out++=' '; + else + *out++=*in++; + } + *out=0; + return(dest); +} + +void ReadConfig(void) +{ + char q[MAXPATHLEN]; + char buf[81]; + FILE *file; + char code1[128]; + char Code2[128]; + + strcpy(Bad, "C1"); + if(NodeNum == 0) + strcpy(q,"setup.cfg"); + else + sprintf(q,"setup.%hd", NodeNum); + + file=SharedOpen(q, "r", LOCK_SH); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + strcpy(Today, buf); + RTrim(Today); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + strcpy(Yesterday, buf); + RTrim(Yesterday); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + strcpy(q, buf); + RTrim(q); + MaxClosFight=atoi(q); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + strcpy(q, buf); + RTrim(q); + MaxPlayFight=atoi(q); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + strcpy(DatPath, buf); + RTrim(DatPath); + fclose(file); + + sprintf(q,"%stp1.cfg",DatPath); + file=SharedOpen(q, "r", LOCK_SH); + readline(code1, sizeof(code1), file); + RTrim(code1); + readline(Code2, sizeof(Code2), file); + RTrim(Code2); + fclose(file); + strcpy(RegisterTo1, code1); + strcpy(RegisterTo2, Code2); + if(strlen(RegisterTo1)<2 || strlen(RegisterTo2)<2) + { + RegisterTo1[0]=0; + RegisterTo2[0]=0; + Regis=0; + } + else + Regis=1; + + if(MaxClosFight < 10) + MaxClosFight = 10; + if(MaxClosFight > 25) + MaxClosFight = 25; + if(MaxPlayFight < 1) + MaxPlayFight = 1; + if(MaxPlayFight > 3) + MaxPlayFight = 3; + + strcpy(Bad,"C2"); +} + +void ReadItem(int n, int o) +{ + char path[MAXPATHLEN]; + FILE *file; + char buf[81]; + char midbuf[9]; + + sprintf(path,"%sitems.dat",DatPath); + file=SharedOpen(path, "r", LOCK_SH); + fseek(file, 80*(n-1), SEEK_SET); + buf[0]=0; + fread(buf, 80, 1, file); + buf[80]=0; + fclose(file); + strncpy(ItemName[o],buf,20); + ItemName[o][20]=0; + into[o][1]=atoi(Mid(midbuf,buf,20,8)); + into[o][2]=atoi(Mid(midbuf,buf,28,3)); +} + +char *RealName(char *dest, char *a) +{ + if(a[0]=='-') + strcpy(dest, "Nothing"); + else + strcpy(dest, a); + return(dest); +} + +char *RemoveColor(char *dest, char *te) +{ + char *in; + char *out; + + out=dest; + for(in=te; *in; in++) + { + if(*in=='`') + { + switch(*in) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '!': + case '@': + case '#': + case '$': + case '%': + in++; + break; + default: + *out++=*in; + } + } + else + *out++=*in; + } + return(dest); +} + +void SaveInvItem(short x, char *c, long b1, long b2) +{ + char path[MAXPATHLEN]; + FILE *file; + char buf[81]; + + if(x < 1 || x > 8) + return; + sprintf(path,"%sinvent.%d",DatPath,OriginNumber); + file=SharedOpen(path, "r+", LOCK_EX); + sprintf(buf, "%-20.20s%-8ld%-3ld%-47.47s ", c, b1, b2, ""); + fseek(file, 80*(x-1), SEEK_SET); + fwrite(buf, 80, 1, file); + fclose(file); + strcpy(Invent[x],c); + inv[x][1]=b1; + inv[x][2]=b2; +} + +void SaveStats(char *a0, char *a1, int b1, int c1, char *d1, char *E1, char *f1, char g1, char h1, + int i1, int j1, int k1, char *l1, int m1, int n1, int o1, char *p1, char *q1, char *Thr) +/* void SaveStats(char *a0, char *a1, char *b1, char *c1, char *d1, char *E1, char *f1, char *g1, char *h1, + char *i1, char *j1, char *k1, char *l1, char *m1, char *n1, char *o1, char *p1, char *q1, char *Thr) */ +{ + short Found=0; + short c=0; + char path[MAXPATHLEN]; + FILE *file; + unsigned char buf[241]; + char outbuf[241]; + int Record=0; + + sprintf(path,"%splayers.dat",DatPath); + file=SharedOpen(path, "r+", LOCK_EX); + while(!feof(file) && !Found) + { + Record++; + c++; + buf[0]=0; + fread(buf, RecLen, 1, file); + if(buf[0] < ' ' || buf[0] > 128) + { + // buf[0] = 0; + strcpy(buf,a1); + Found = 1; + } + buf[15]=0; + RTrim(buf); + if(!strcasecmp(buf,a1)) + { + Found = 1; + if(b1>99999999) + b1=10000000; + if(b1<-9999999) + b1=-10000000; + if(c1>99999999) + c1=10000000; + if(c1<-9999999) + c1=-10000000; + if(i1>99999999) + i1=10000000; + if(i1<-9999999) + i1=-10000000; + if(j1>99999999) + j1=10000000; + if(j1<-9999999) + j1=-10000000; + if(k1>99) + k1=10; + if(k1<-9) + k1=-1; + if(m1>99) + m1=10; + if(m1<-9) + m1=-1; + if(n1>9) + n1=1; + if(n1<0) + n1=0; + if(o1>999) + o1=100; + if(o1<-99) + o1=-10; + sprintf(buf,"%-15.15s%-8d%-8d%-1.1s%-4.4s%-19.19s|%c%c%-8d%-8d%-2d%-10.10s%-2d%-1d%-3d%-10.10s%-8.8s%-129.129s", + a0,b1,c1,d1,E1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1,Thr); + Pad(outbuf, buf, RecLen); + fseek(file, (Record-1)*RecLen, SEEK_SET); + fwrite(outbuf, RecLen, 1, file); + } + if(feof(file)) + buf[0]=0; + } + fclose(file); +} + +void SaveStrStats(char *a0, char *a1, char *b1, char *c1, char *d1, char *E1, char *f1, char *g1, char *h1, + char *i1, char *j1, char *k1, char *l1, char *m1, char *n1, char *o1, char *p1, char *q1, char *Thr) +/* void SaveStats(char *a0, char *a1, char *b1, char *c1, char *d1, char *E1, char *f1, char *g1, char *h1, + char *i1, char *j1, char *k1, char *l1, char *m1, char *n1, char *o1, char *p1, char *q1, char *Thr) */ +{ + short Found=0; + short c=0; + char path[MAXPATHLEN]; + FILE *file; + unsigned char buf[241]; + char outbuf[241]; + int Record=0; + + sprintf(path,"%splayers.dat",DatPath); + file=SharedOpen(path, "r+", LOCK_EX); + while(!feof(file) && !Found) + { + Record++; + c++; + buf[0]=0; + fread(buf, RecLen, 1, file); + if(buf[0] < ' ' || buf[0] > 128) + { + // buf[0] = 0; + strcpy(buf,a1); + Found = 1; + } + buf[15]=0; + RTrim(buf); + if(!strcasecmp(buf,a1)) + { + Found = 1; + sprintf(buf,"%-15.15s%-8.8s%-8.8s%-1.1s%-4.4s%-19.19s|%-1.1s%-1.1s%-8.8s%-8.8s%-2.2s%-10.10s%-2.2s%-1.1s%-3.3s%-10.10s%-8.8s%-129.129s", + a0,b1,c1,d1,E1,f1,g1,h1,i1,j1,k1,l1,m1,n1,o1,p1,q1,Thr); + Pad(outbuf, buf, RecLen); + fseek(file, (Record-1)*RecLen, SEEK_SET); + fwrite(outbuf, RecLen, 1, file); + } + if(feof(file)) + buf[0]=0; + } + fclose(file); +} + +void ViewStats(void) +{ + char str[256]; + short d; + + Ocls(); + Oprint("\r\n"); + Oprint("`3ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + Oprint(" `! Your Statistics and Settings\r\n"); + Oprint("`3ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n\r\n"); + sprintf(str," `3 Your Name: `@%s\r\n",Alias); + Oprint(str); + sprintf(str," `3 Your Sex: `@%s\r\n",sex[0]=='M'?"Male":"Female"); + Oprint(str); + sprintf(str," `3Morph Credits on Hand: `@%ld\r\n",Money); + Oprint(str); + sprintf(str," `3 Credits in Bank: `@%ld\r\n",Stash); + Oprint(str); + sprintf(str," `3 Your Hit Points: `@%d`3 of `@%ld\r\n",Hit,PlayerHP[Level]); + Oprint(str); + sprintf(str," `3 Experience Points: `@%ld\r\n",Exp); + Oprint(str); + sprintf(str," `3 Your Rank: `@%s (%d)\r\n",Rank[Level],Level); + Oprint(str); + sprintf(str," `3 Hours Remaining:`@ %d\r\n", ClosFight); + Oprint(str); + sprintf(str," `3 Player Fights:`@ %d\r\n", PlayFight); + Oprint(str); + d=WepNum(Weapon); + if(Weapon=='0') + d=0; + sprintf(str," `3 Your Weapon: `@%s\r\n", WepName[d]); + Oprint(str); + d=WepNum(Defense); + if(Defense=='0') + d=0; + sprintf(str," `3 Your Defense: `@%s\r\n", DefName[d]); + Oprint(str); + if(NotAgain[3] != ' ') + Oprint(" `3 You have a Heat Bomb!\r\n"); + Oprint("\r\n\r\n"); + PressAnyKey(); +} + +short WepNum(char a) +{ + if(a < 'A' || a > 'L') + return(1); + return(a-'A'+1); +} + +void WriteNews(char *e, short x) +{ + FILE *file; + + file=SharedOpen(Today,"a",LOCK_EX); + if(strlen(e) > 0) + fprintf(file,"%s\r\n",e); + if(x > 0) + fprintf(file," `4ÄÄÄÄÄÄÄ`@ÄÄÄÄÄÄÄ`4ÄÄÄÄÄÄÄ\r\n"); + fclose(file); +} + +void readline(char *dest, size_t size, FILE *file) +{ + char *p; + + if(fgets(dest,size,file)!=dest) + dest[0]=0; + + for(p=dest;*p;p++) + { + if(*p=='\r' || *p=='\n') + { + *p=0; + break; + } + } +} + +char *IsHeNew(char *dest) +{ + char kr[256]; + char a[256]; + int Found=0; + char path[MAXPATHLEN]; + char *fuser; + char *alias; + FILE *file; + + // '**** REMOVE THIS routine for STUB operation! **** + // CLOSE #1 /* Why would this be open? */ + kr[0]=0; + + Found = 0; + + strcpy(Bad, "N1"); + + sprintf(path,"%snamelist.dat", DatPath); + file=SharedOpen(path,"r", LOCK_SH); + + dest[0]=0; + while(!feof(file) && !Found) + { + readline(a, sizeof(a), file); + RTrim(a); + if((fuser=strtok(a,"~"))!=NULL) + { + RTrim(fuser); + alias=strtok(NULL,"~"); + if(alias != NULL) + { + if(strcasecmp(User, fuser)==0) + { + strcpy(dest, alias); + Found=1; + } + } + } + } + fclose(file); + return(dest); +} + +char *FindName(char *dest, char *Rr) +{ + char path[MAXPATHLEN]; + FILE *file; + char a[256]; + char Te[256]; + char *i; + char te[256]; + char str[256]; + + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path, "r", LOCK_SH); + while(!feof(file)) + { + readline(a, sizeof(a), file); + if(feof(file)) + continue; + i=strtok(a, "~"); + if(i==NULL) + { + Oprint("Error in the namelist.dat file! Inform Sysop.\r\n"); + Paus(2); + exit(1); + } + i=strtok(NULL, "~"); + if(i==NULL) + { + Oprint("Error in the namelist.dat file! Inform Sysop.\r\n"); + Paus(2); + exit(1); + } + while(isspace(*i)) + { + i++; + } + RTrim(Mid(Te, i, 1, 15)); + RemoveColor(te, Te); + strcpy(str,Rr); + UCase(te); + UCase(str); + if(strstr(te, str)!=NULL) + { + OpenStats(Te); + if(ch1[0] != 0 && !strcasecmp(ch1, Te)) // 'is it him + { + sprintf(str,"`7 Do you mean `%%%s`$ (Y/N)`7? `4",Te); + Oprint(str); + GetYesNo(str); + if(str[0] == 'Y') + { + PlayerNum = RecordNumber; + strcpy(dest,Te); + fclose(file); + Oprint("\r\n"); + return(dest); + } + } + } + } + Oprint("\r\n"); + dest[0]=0; + fclose(file); + return(dest); +} + + +short BuyStuff(char *v, char *q) // '*** STUB routine might not always be needed *** +{ + short t=0; + long d1, D2; + long w; + short m; + int x; + char str[256]; + + w = atoi(v); + if(w==0) + t=-99; + if(w < 0 || w > ItemCount) + { + Oprint("\r\n"); + Oprint(q); + Oprint("\r\n"); + t = -2; + } + if(w >= 1 && w <= ItemCount) + { + d1 = into[w][1]; + D2 = Money; + if(D2 < d1) + { + Oprint("\r\n`3 --- `!You don't seem to have enough Morph Credits onhand to buy that. `3---\r\n"); + return(-2); + } + m = 0; + for(x=8;x>=1;x--) + { + if(Invent[x][0]=='-' && Invent[x][1]=='-' && Invent[x][2]=='-') + m=x; + } + if(m == 0) + { + Oprint("`4 --- `@You're carrying all you can... you need to get rid of something. `4---\r\n"); + return(-2); + } + sprintf(str,"`@ Will you pay`$ %ld`@ Morph Credits for the `$%s`@ ? (Y/n): ",into[w][1],ItemName[w]); + Oprint(str); + GetYesNo(str); + if(str[0] == 'N') // 'don't want to pay for THAT!!! + return(-2); + SaveInvItem(m, ItemName[w], into[w][1], into[w][2]); + D2 = D2 - d1; + Money = D2; + Oprint("\r\n`2 --- `0You pay for the item and put it into your inventory. `2---\r\n"); + t = -2; + } + return(t); +} + +short FindTheLevel(long g) +{ + int x,t; + for(x=11;x>=1;x--) + { + if(g >= UpToNext[x]) + { + t = x + 1; + if(t > 5 && Regis < 1) + t = 5; + return(t); + } + } + return(1); +} + +short GetHitLev(long lx, long ly, float l1, float L2) +{ + // 'Lx is your Attack power, VS. + // 'Ly is your opponents Defense power + long Tv1, Tv2, Tv3, Tv4, Tv5; + Tv1 = lx - ly; + if(Tv1 <= 0) + return(0); + Tv2 = Tv1 * l1; + Tv3 = Tv1 * L2; + Tv4 = abs(Tv3 - Tv2); + Tv5 = random()%Tv4 + Tv2; + return(Tv5); +} + +short GetMonHp(short l, float l1, float L2) +{ + long Tv1, Tv2, Tv3, Tv4, Tv5; + Tv1 = MonMinHp[l]; + Tv2 = Tv1 * l1; + Tv3 = Tv1 * L2; + Tv4 = abs(Tv3 - Tv2); + Tv5 = random()%Tv4 + Tv2; + return(Tv5); +} + + +long GetValue(long Tv1, float l1, float L2) +{ + long Tv2, Tv3, Tv4, Tv5; + + Tv2 = Tv1 * l1; + Tv3 = Tv1 * L2; + Tv4 = abs(Tv3 - Tv2); + Tv5 = random()%Tv4+Tv2; + return(Tv5); +} + + +short TalkToPress(void) +{ + char a[49]; + char str[256]; + Oprint("\r\n`2 Do you wish to make a comment in the daily news? (`0Y`2/`0n`2): "); + GetYesNo(a); + Oprint("\r\n"); + if(a[0]=='N') + return(0); + Oprint("`2What will say? "); + MakeInputArea(49); + KbIn(a,48); + Oprint("`$\r\n\r\n"); + if(strlen(a)<2) + return(0); + sprintf(str,"`2\"%s\"`2 says %s", a, Alias); + WriteNews(str, 1); + return(1); +} + +short HasItem(char *a) +{ + int g = 0; + int x; + + RTrim(a); + for(x = 8;x>=1;x--) + { + RTrim(Invent[x]); + if((atoi(a) == inv[x][2] && inv[x][2] > 0) || !strcasecmp(Invent[x], a)) { + g = x; + } + } + return(g); +} + +#if defined(__linux__) || defined(__NetBSD__) +void srandomdev(void) +{ + FILE *dev; + unsigned long seed; + + dev=fopen("/dev/random","r"); + if(dev!=NULL) + { + fread(&seed, sizeof(seed), 1, dev); + } + else + { + seed=time(NULL); + } + srandom(seed); +} +#endif diff --git a/src/doors/timeport/tplib.h b/src/doors/timeport/tplib.h new file mode 100644 index 0000000000000000000000000000000000000000..a8063b13ed6ea5f545198b9f78cebf08033b38c1 --- /dev/null +++ b/src/doors/timeport/tplib.h @@ -0,0 +1,147 @@ +#include <stdio.h> +#include <sys/file.h> +#include <sys/param.h> + +void AddToMail(short x, char *e); +void DelOldFromNameList(void); +char *FixTheString(char *dest, char *a, char *b, char *c); +char *GetCommand(char *dest); +char *GetYesNo(char *dest); +void InitPlayer(void); +void Inventory(void); +void ListItems(float ee); +void ListPlayers(void); +void LoadGame(void); +void LoadItems(char *a); +void MakeInputArea(short v); +char *MakeNode(char *dest, char *b); +char *Mid(char *dest, char *source, int start, int len); +void OpenInventory(void); +void OpenStats(char *a1); +char *Pad(char *dest, char *a, long l); +void ReadConfig(void); +void ReadItem(int n, int o); +char *RealName(char *dest, char *a); +char *RemoveColor(char *dest, char *te); +void RTrim(char *str); +void SaveInvItem(short x, char *c, long b1, long b2); +void SaveStats(char *a0, char *a1, int b1, int c1, char *d1, char *E1, char *f1, char g1, char h1, + int i1, int j1, int k1, char *l1, int m1, int n1, int o1, char *p1, char *q1, char *Thr); +void SaveStrStats(char *a0, char *a1, char *b1, char *c1, char *d1, char *E1, char *f1, char *g1, char *h1, + char *i1, char *j1, char *k1, char *l1, char *m1, char *n1, char *o1, char *p1, char *q1, char *Thr); +FILE *SharedOpen(const char *filename, const char *mode, int lockop); +short sip(void); +void ViewStats(void); +short WepNum(char a); +void WriteNews(char *e, short x); +void readline(char *dest, size_t size, FILE *file); +char *IsHeNew(char *dest); +char *FindName(char *dest, char *Rr); +short BuyStuff(char *v, char *q); +short FindTheLevel(long g); +short GetHitLev(long lx, long ly, float l1, float L2); +short GetMonHp(short l, float l1, float L2); +long GetValue(long Tv1, float l1, float L2); +short TalkToPress(void); +short HasItem(char *a); +#if defined(__linux__) || defined(__NetBSD__) +void srandomdev(void); +#endif + +// DIM SHARED ch1$, ch2$, ch3$, ch4$, ch5$, Ch6$, Ch7$, Ch8$, Ch9$, ChRest$ +extern char ch1[256]; +extern char ch2[256]; +extern char ch3[256]; +extern char ch4[256]; +extern char ch5[256]; +extern char Ch6[256]; +extern char Ch7[256]; +extern char Ch8[256]; +extern char Ch9[256]; +extern char ChRest[256]; +// DIM SHARED Ch10$, Ch11$, Ch12$, Ch13$, Ch14$, Ch15$, Ch16$, ch17$, Ch18$ +extern char Ch10[256]; +extern char Ch11[256]; +extern char Ch12[256]; +extern char Ch13[256]; +extern char Ch14[256]; +extern char Ch15[256]; +extern char Ch16[256]; +extern char ch17[256]; +extern char Ch18[256]; +// DIM SHARED RecLen AS INTEGER, DatPath$, BarBar$, PlayerNum AS INTEGER +extern short int RecLen; +extern char DatPath[MAXPATHLEN]; +extern char *BarBar; +extern short int PlayerNum; +// DIM SHARED Today$, Yesterday$, Regis AS INTEGER, FirstAvail AS INTEGER +extern char Today[MAXPATHLEN]; +extern char Yesterday[MAXPATHLEN]; +extern short int Regis, FirstAvail; +// DIM SHARED RegisterTo1$, RegisterTo2$, MaxClosFight$, MaxPlayFight$ +extern char RegisterTo1[256]; +extern char RegisterTo2[256]; +extern short MaxClosFight; +extern short MaxPlayFight; +// DIM SHARED RecordNumber AS INTEGER, OriginNumber AS INTEGER, Version$ +extern short RecordNumber, OriginNumber; +extern char *Version; +// DIM SHARED Quor$, ItemCount AS INTEGER, Def$, User$, Alias$ +// char Quor[256]; /* Not used */ +extern char Def[256]; +extern char User[256]; +extern char Alias[256]; +extern short ItemCount; +// DIM SHARED into(10, 2) AS LONG, ItemName$(10) 'stored to read +extern long int into[11][3]; +extern char ItemName[11][21]; +// DIM SHARED Invent$(8), inv(8, 2) AS LONG 'access to inventory +extern char Invent[9][256]; +extern long int inv[9][3]; +// DIM SHARED MaxBadTimes AS INTEGER, KickOut AS INTEGER +extern short MaxBadTimes; +extern short KickOut; + +// Extras I need +extern char Prompt[128]; + +// Stuff common to all (May as well be in here eh?) +extern short Hit; +extern short Level; +extern char Bad[256]; +extern char NotAgain[256]; +extern char Weapon; +extern long Money; +extern char Defense; +extern long Stash; +extern long Exp; +extern char lastplay[9]; +extern short ClosFight; +extern short PlayFight; +extern char LineRest[256]; +extern char ExeLine[256]; +extern char ComLine[256]; +extern short PlayKill; +extern char sex[16]; +extern char CurCode[256]; + +extern char *DefName[13]; +extern char *WepName[13]; +extern long WepCost[13]; +extern long PlayerHP[13]; +extern long WeaponAdd[13]; +extern long DefenseAdd[13]; +extern long MonMinHp[13]; +extern long GoldFromEach[13]; +extern long ExpFromEach[13]; +extern long UpToNext[12]; +extern long HealAHit[13]; +extern char *Rank[13]; +extern int MaximumPlayers; +extern char guardname[256]; +extern char BribeGuard[256]; +extern int Playercount; + +/* All IGMs need these routines */ +void UseItem(long c,short b); +void SaveGame(void); diff --git a/src/doors/timeport/twenties.c b/src/doors/timeport/twenties.c new file mode 100644 index 0000000000000000000000000000000000000000..6bf1998a638855f096268f0ccec00228c72f31c1 --- /dev/null +++ b/src/doors/timeport/twenties.c @@ -0,0 +1,780 @@ +#include <ctype.h> +#include <sys/time.h> +#include <stdlib.h> +#include <string.h> +#include <signal.h> +#include "doors.h" +#include "tplib.h" + +short Room; + +void ShowRoom(long l); +short GetResponse(long l); +void ListHits(void); +void SaveOtherPlayer(void); + +void SaveTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"w",LOCK_EX); + fprintf(file,"%ld\r\n",MinsLeft); + fprintf(file,"%ld\r\n",SecsLeft); + fclose(file); +} + +void Quitter(void) +{ + SaveTime(); + ExitGame(); +} + +void LessTime(int sig) +{ + SecsLeft = SecsLeft - 1; + if(SecsLeft < 0) + { + SecsLeft = 59; + MinsLeft = MinsLeft - 1; + } + if(PlayingNow <= 0) + return; + if(MinsLeft < 1) + { + Oprint("`%\r\n\r\n"); + Oprint("Your time is up, man!\r\n"); + Quitter(); + exit(0); + } +} + +void LoadTime(void) +{ + char path[MAXPATHLEN]; + FILE *file; + char line[256]; + + sprintf(path,"timeleft.%d",NodeNum); + file=SharedOpen(path,"r",LOCK_SH); + readline(line,sizeof(line), file); + RTrim(line); + MinsLeft=atoi(line); + readline(line,sizeof(line), file); + RTrim(line); + SecsLeft=atoi(line); + fclose(file); +} + +int main(int argc, char **argv) +{ + struct itimerval it; + int x; + short a; + + ParseCmdLine(argc,argv); + srandomdev(); + + strcpy(Alias, "Who is it?"); + StatsIn = 0; + Playercount = 0; + ReadLinkTo(); // 'initialize the modem + ReadConfig(); // 'get default configuartion information + LoadTime(); + + signal(SIGALRM, LessTime); + it.it_interval.tv_sec=1; + it.it_interval.tv_usec=1; + it.it_value.tv_sec=1; + it.it_value.tv_usec=1; + setitimer(ITIMER_REAL, &it, NULL); + + ChatEnabled = 0; + + PlayingNow = 1; + + // 'Is this a new player? + IsHeNew(Alias); + LoadGame(); + NotAgain[12]='+'; + StatsIn = 1; + SaveGame(); + OpenInventory(); + + Ocls(); + // 'set opening "variables" + for(x=1;x<argc;x++) + { + if(argv[x][0]=='R') + { + Room=atoi(argv[x]+1); + break; + } + } + + if(Room != 15 && Room != 16) + Quitter(); + + // '**** begin the REPEATER code + x=1; + while(1) + { + if(x) + { + Ocls(); + ShowRoom(Room); + } + a = GetResponse(Room); + SaveGame(); + if(Hit<1) + { + NotAgain[1]='^'; + Oprint("\r\n`6 Searing pain tortures you as your life ends!\r\n"); + Paus(2); + Quitter(); + } + + if(a==-2) + { + x=0; + continue; + } + if(a==-1) + { + x=1; + continue; + } + if(a==101) + { + Quitter(); + continue; + } + if(a>=1 && a<=99) + { + Room=a; + x=1; + continue; + } + Oprint("`@The command you typed is invalid. Read the menu.\r\n"); + x=0; + } + return(0); +} + +void AskToMake(void) +{ + int a,b,c; + + // 'Check to see if he can make Fishing Pole + a = HasItem("2"); + b = HasItem("3"); + c = HasItem("4"); + + if(a > 0 && a <= 8 && b > 0 && b <= 8 && c > 0 && c <= 8) + { + if(HasItem("5") > 0) + { + Oprint("`@ I could make a fishing pole, but you already have one.\r\n"); + return; + } + SaveInvItem(a, "Fishing Pole", 0, 5); // 'cost, num + SaveInvItem(b, "-------------------", 0, 0); + SaveInvItem(c, "-------------------", 0, 0); + Oprint("`0 He takes some of your items and makes a fishing pole for you.\r\n"); + return; + } + + // 'Can he make the Huge Wings? + a = HasItem("10"); + b = HasItem("11"); + c = HasItem("12"); + if(a > 0 && a <= 8 && b > 0 && b <= 8 && c > 0 && c <= 8) + { + if(HasItem("13") > 0) + { + Oprint("`@ I could make Huge Wings, but you already have a set.\r\n"); + return; + } + SaveInvItem(a, "Huge Wings", 0, 13); // 'cost, num + SaveInvItem(b, "-------------------", 0, 0); + SaveInvItem(c, "-------------------", 0, 0); + Oprint("`0 He takes some of your items and makes a set of Huge Wings!\r\n"); + return; + } + + Oprint("`2 He looks at what you have, but can't make anything out of it.\r\n"); +} + +short GetResponse (long l) +{ + long x1, x2, x3, x4; + char v[2]; + char bstr[256]; + char cstr[256]; + char str[256]; + int t,oi; + + t = 0; + GetCommand(v); + Oprint("\r\n"); + // 'Figure out what section to switch to based upon 'L' room and v$ response + + if(v[0] == '?') + return(-1); + if(v[0]=='I' && l != 1) + { + Inventory(); + return(-1); + } + if(v[0]=='V') + { + ViewStats(); + return(-1); + } + if(v[0]=='X') // 'toggle ansi/ascii + { + if(NotAgain[14]==' ') + NotAgain[14]='|'; + else + NotAgain[14]=' '; + return(-1); + } + + // 'V$ interpretation goes here + + if(l == 15) + { + if(v[0] == 'A') + { + ListHits(); + t = -1; + } + if(v[0] == 'L') + { + ListPlayers(); + t = -1; + } + if(v[0] == '*') + t = 101; + if(v[0] == 'P') + { + if(Regis == 0) + { // 'This is a Register-only option + Oprint("`2 The Gangsters begin to laugh. After their inside joke is over, one of\r\n"); + Oprint("`2 them says, 'You want to give people an incentive to kill your enemies,\r\n"); + Oprint("`2 do you? We'll help you do that, after you've given your Sysop an\r\n"); + Oprint("`2 incentive to register Time Port. You should even consider helping\r\n"); + Oprint("`2 pay the $15 registration fee.'\r\n"); + Oprint("`2 You nod, back away, and begin to think of how cool it would be if you\r\n"); + Oprint("`2 could place a hit on another player.\r\n"); + return(-2); + } + Oprint("`# Which Recruit do you want killed? `5(Partial name is okay)\r\n"); + Oprint("`$ ---> "); + MakeInputArea(16); + SetColor(11, 4, 0); + KbIn(bstr, 15); + Oprint("`7\r\n\r\n"); + RTrim(bstr); + if(strlen(bstr) < 1) + return(-2); + FindName(cstr, bstr); + if(!cstr[0]) // 'No matching name was found + { + Oprint("`6 You can't find that person. Try another name.\r\n"); + return(-2); + } + if(!strcasecmp(cstr, Alias)) + { + Oprint("\r\n`0 You want *yourself* killed? I know of a mental hospital for you...\r\n"); + return(-2); + } + OpenStats(cstr); // 'Load the other player's file right now.... + UCase(ch4); + if(Ch6[12]!=' ') + { + sprintf(str,"\r\n`@ You can't place a hit on %s at this time.\r\n",ch4[0]=='M'?"him":"her"); + Oprint(str); + return(-2); + } + if(NotAgain[2] != ' ') + { + Oprint("\r\n`@ You have already placed a Hit on someone today.\r\n"); + return(-2); + } + // 'Okay, now place the hit + x1 = GoldFromEach[atoi(Ch11)] * 6; + x2 = atoi(Mid(str, ChRest, 2, 8)); + x3 = x1 - x2; // 'x3 is now set to the MAXIMUM money allowed for a hit + if(x3 <= 0) // 'can't hit the person + { + sprintf(str,"\r\n`@ The reward for %s`@ is already large enough.\r\n",ch1); + Oprint(str); + return(-2); + } + sprintf(str,"\r\n`0 How much will you give for a reward? (0 - %ld) ",x3); + Oprint(str); + MakeInputArea(9); + KbIn(bstr, 8); + Oprint("`7\r\n\r\n"); + x4 = atoi(bstr); + if(x4 > x3) + { + sprintf(str,"`@ The others tell you that %s`@ isn't worth that much.\r\n",ch1); + Oprint(str); + return(-2); + } + if(x4 <= 0) + { + sprintf(str, "`@ You decide not to place a hit on %s`@.\r\n", ch1); + Oprint(str); + return(-2); + } + if(x4 > Money) + { + Oprint("`@ You don't have enough Morph Credits on hand to pay that much.\r\n"); + return(-2); + } + Money -= x4; + sprintf(bstr,"%-8d",(atoi(Mid(str, ChRest, 2, 8))+x4)); + ChRest[1]=bstr[0]; + ChRest[2]=bstr[1]; + ChRest[3]=bstr[2]; + ChRest[4]=bstr[3]; + ChRest[5]=bstr[4]; + ChRest[6]=bstr[5]; + ChRest[7]=bstr[6]; + ChRest[8]=bstr[7]; + SaveOtherPlayer(); + Oprint("`# Your hit has now been placed on "); + Oprint(ch1); + Oprint("`#!\r\n"); + t = -2; + } + } + + if(l == 16) + { + if(v[0] == '*') + t = 101; + if(v[0] == 'A') + { + AskToMake(); + t = -2; + } + if(v[0] == 'G') + t = 17; + if(v[0] == 'W') + t = 19; + } + + if(l == 17) + { + if(v[0] == 'R') + t = 16; + if(v[0] == 'G') + t = 18; + } + + if(l == 18) + if(v[0] == 'R') + t = 17; + + if(l == 19) + { + if(v[0] == 'R') + t = 16; + if(v[0] == 'B') + t = 20; + } + + if(l == 20) + { + t = BuyStuff(v, "`@ 'Fraid I can't help ya with that,' Dale says."); + if(t == -99) + t = 19; // 'that's the code for "exit from this room." :) + } + + if(l == 5) + { + if(v[0] == 'R') + return(18); + t = atoi(v); + if(t < 1 || t > 5) + return(0); + oi = LineRest[10]-'0'; + if(t > oi) // 'Tried to go toooo fast + { + if(sex[0] == 'M') + { + if(t == 2) + Oprint("`@ She yanks her hand out of yours before you can kiss it.\r\n"); + if(t == 3) + Oprint("`@ She begins laughing, and tells you NO you can't kiss her.\r\n"); + if(t == 4) + Oprint("`@ As you begin running your hands over her body, she slaps you.\r\n"); + if(t == 5) + Oprint("`@ She jumps up, screams, and tells you to get out before her dad finds you.\r\n"); + } + else + { + if(t == 2) + Oprint("`@ He glances up at you, but seems not to care whatsoever.\r\n"); + if(t == 3) + Oprint("`@ He pushes you away and calls you a filthy tramp.\r\n"); + if(t == 4) + Oprint("`@ He puts a stop to your groping rather abruptly and tells you to get out.\r\n"); + if(t == 5) + Oprint("`@ He seems genuinely shocked at your lewd behavior and tells you that his\r\n"); + if(t == 5) + Oprint("`@ father, the bartender, would almost certainly disapprove of this.\r\n"); + } + oi--; + if(oi < 1) + oi = 1; + LineRest[11]=oi+'0'; + Oprint("`@ You sadly return to the Balcony, totally rejected.\r\n\r\n"); + PressAnyKey(); + return(18); + } + if(sex[0] == 'M') + { + if(t == 1) Oprint("`@ She winks at you and blushes at your compliment.\r\n"); + if(t == 2) Oprint("`@ She smiles shyly as you kiss her hand.\r\n"); + if(t == 3) Oprint("`@ The gleaming look in her eyes tells you it's safe to kiss her.\r\n"); + if(t == 4) Oprint("`@ You ravish each others bodies, only stopping when she decides it's enough.\r\n"); + if(t == 5) + { + x1 = GoldFromEach[Level] * 8; + Oprint("`@ You turn out the lights and make love to her. It is the most fulfilling\r\n"); + sprintf(str,"`@ experience of your entire life, and you gain %ld experience.\r\n",x1); + Oprint(str); + Exp += x1; + sprintf(str,"`#%s`3 got laid by the bartender's daughter in the Old West.", Alias); + WriteNews(str, 1); + } + } + else + { + if(t == 1) Oprint("`@ He nods, smiles, and tells you that he's often been told that.\r\n"); + if(t == 2) Oprint("`@ The closer you get, the wider he smiles. He must like you.\r\n"); + if(t == 3) Oprint("`@ He holds you tightly as you kiss him.\r\n"); + if(t == 4) Oprint("`@ He seems to enjoy the attention you give him.\r\n"); + if(t == 5) + { + x1 = GoldFromEach[Level] * 8; + Oprint("`@ You turn out the lights and quickly seduce him. He makes love to you,\r\n"); + Oprint("`@ and it is the most fulfilling moment in your life.\r\n"); + sprintf(str,"`@ You gained %ld experience points.\r\n",x1); + Oprint(str); + Exp += x1; + sprintf(str,"`#%s`3 got laid by the bartender's son in the Old West.",Alias); + WriteNews(str, 1); + } + } + if(oi == atoi(v)) + { + oi = oi + 1; + if(oi > 5) + oi = 1; + } + LineRest[10]=oi+'0'; + Oprint("`2 with a sense of accompolishment, you return to the Balcony.\r\n\r\n"); + PressAnyKey(); + t = 18; + } + + return(t); +} + +void SaveOtherPlayer(void) +{ + SaveStrStats(ch1, ch1, ch2, ch3, ch4, ch5, Ch6, Ch7, Ch8, Ch9, Ch10, Ch11, Ch12, Ch13, Ch14, Ch15, Ch16, ch17, ChRest); +} + +void ListHits(void) +{ + char AliasName[1000][16]; + long HitMoney[1000]; + + int GoMax = 0; + FILE *file; + char path[MAXPATHLEN]; + char bstr[256]; + char str[256]; + char *user; + char *alias; + int n,gap,i,j,k,l,Pax,Pottr,xix,Bv,x; + + sprintf(path,"%snamelist.dat",DatPath); + file=SharedOpen(path,"r",LOCK_SH); + + while(!feof(file)) + { + readline(bstr,sizeof(bstr),file); + if(feof(file)) + continue; + GoMax++; + HitMoney[GoMax]=0; + user=strtok(bstr,"~"); + if(user !=NULL) + { + alias=strtok(NULL,"~"); + if(alias != NULL) + { + RTrim(user); + RTrim(alias); + strcpy(AliasName[GoMax],alias); + OpenStats(alias); + if(ch1[0]) + HitMoney[GoMax]=atoi(Mid(str,ChRest,2,8)); + if(HitMoney[GoMax] <= 0 || HitMoney[GoMax] > 99999999) + GoMax--; + } + } + } + fclose(file); + + if(GoMax > 1) + { + // '**** begin shell-sorting + n = GoMax; + gap = n / 2; + + while(gap > 0) + { + for(i = gap + 1; i <= n; i++) + { + j = i - gap; + while(j > 0) + { + k = j + gap; + if(HitMoney[j] > HitMoney[k]) + j = 0; + else + { + l=HitMoney[j]; + HitMoney[j]=HitMoney[k]; + HitMoney[k]=l; + strcpy(str,AliasName[j]); + strcpy(AliasName[j],AliasName[k]); + strcpy(AliasName[k],str); + j = j - gap; + } + } + } + gap = gap / 2; + } + } + + Ocls(); + Pax = 16; + Pottr = 1; + Oprint("\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + Oprint("`! The Hit List\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + Oprint(" Sex Name Reward\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + + for(xix = 1;xix<=GoMax;xix++) + { + OpenStats(AliasName[xix]); + if(ch1[0]) + { + if(Pottr == 0) + { + Ocls(); + Oprint(" Sex Name Reward\r\n"); + Oprint("`2ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\r\n"); + } + // 'show the listing + Oprint("`$ "); + if(toupper(ch4[0])=='F') + Oprint("F "); + else + Oprint(" "); + Bv = 19; + for(x = 1;x<=strlen(ch1);x++) + { + if(ch1[x-1]=='`') + Bv+=2; + } + if(Bv < 1) + Bv = 1; + sprintf(str,"%-*s",Bv,ch1); + Oprint(str); + sprintf(str,"`@%-10s\r\n",Mid(bstr,ChRest,2,8)); + Oprint(str); + Pottr ++; + if(Pottr >= Pax) + { + Pottr = 0; + Pax = 20; + Oprint("\r\n"); + PressAnyKey(); + } + } + } + Oprint("\r\n"); + if(Pottr > 0) + PressAnyKey(); +} + +void SaveGame(void) +{ + // 'put any "save the game" data into this routine + if(Hit < 0) + Hit=0; + if(StatsIn > 0) + SaveStats(Alias, Alias, Money, Stash, sex, CurCode, NotAgain, Weapon, Defense, Hit, Exp, Level, lastplay, ClosFight, PlayFight, PlayKill, ExeLine, ComLine, LineRest); +} + +void ShowRoom(long l) +{ + char str[256]; + + // 'code to print "headers" + Oprint("`!T`3ime `!P`3ort `8Version `7"); + Oprint(Version); + Oprint(" -- `7Location: "); + + if(l == 15) Oprint("`%1924 New York: Gangster Meeting\r\n"); + if (l == 16) Oprint("`%1874 California: Brettville\r\n"); + if (l == 17) Oprint("`%In the Brettville Saloon\r\n"); + if (l == 18) Oprint("`%Balcony in the Saloon\r\n"); + if (l == 19) Oprint("`%Dale's General Store\r\n"); + if (l == 20) Oprint("`%Buying from Dale\r\n"); + if (l == 5) Oprint("`%A small Bedroom\r\n"); + + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + if(l != 5) + { + sprintf(str,"room%ld.%s",l,NotAgain[14]!=' '?"asc":"ans"); + DisplayText(str); + } + + if(l == 15) + { // 'Gangsters in New York + strcpy(Prompt, "LAP*"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%*`8)`@Time Phase Back to the Hanger "); + Oprint("`7 (`!A`8)`3sk to see the Hit List\r\n"); + Oprint("`7 (`!P`8)`3lace a Hit on Somebody "); + Oprint("`7 (`!L`8)`3ist Recruits using the TCCL\r\n"); + } + + if(l == 16) + { // 'Town Square of Brettville + strcpy(Prompt, "AG*"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%*`8)`@Time Phase Back to the Hanger "); + Oprint("`7 (`!A`8)`3sk Him to Make Something\r\n"); + Oprint("`7 (`!G`8)`3o into the Saloon "); + Oprint("`7 (`!W`8)`3alk into Dale's General Store\r\n"); + } + + if(l == 17) + { // 'In the Bretville saloon + strcpy(Prompt, "GR"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%R`8)`@eturn to the Town Square "); + Oprint("`7 (`%G`8)`3o up to the Balcony\r\n"); + } + + if(l == 18) + { // 'Balcony in the Saloon + strcpy(Prompt, "R"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%R`8)`@eturn Downstairs to Saloon "); + } + + if(l == 19) + { // 'Dale's General Store + strcpy(Prompt, "BR"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%R`8)`@eturn to the Town Square "); + Oprint("`7 (`%B`8)`3uy something from Dale\r\n"); + } + + if(l == 5) + { // 'In the Bedroom + strcpy(Prompt, "12345R"); + if(LineRest[10] < '1' || LineRest[10] > '5') + LineRest[10]='1'; + if(sex[0] == 'M') + { + Oprint("`6 You are in a small, cozy bedroom on the floor above the Saloon. As your\r\n"); + Oprint("`6 eyes adjust to the dim light, you see a very voluptuous woman near the bed.\r\n"); + Oprint("`6 she smiles at you and sits down on the black sheets. Your heart pounds\r\n"); + Oprint("`6 as you realize she is the most beautiful woman you have ever seen.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%1`8)`3Tell her that she is very beautiful\r\n"); + Oprint("`7 (`%2`8)`3Kiss her hand and hope to flatter her\r\n"); + Oprint("`7 (`%3`8)`3Ask for the honer of kissing her lips\r\n"); + Oprint("`7 (`%4`8)`3Sit beside her and ravish her body\r\n"); + } + else + { + Oprint("`6 You are in a small, dimly-lit bedroom on the floor above the Saloon.\r\n"); + Oprint("`6 After your eyes adjust to the light, you notice a very handsome and very\r\n"); + Oprint("`6 well built young man standing near the bed. He sees you, smiles and sits\r\n"); + Oprint("`6 down upon the black sheets.\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + Oprint("`7 (`%1`8)`3Tell him that you think he's very handsome\r\n"); + Oprint("`7 (`%2`8)`3Stand closer and dazzle him with your presence\r\n"); + Oprint("`7 (`%3`8)`3Kiss him passionately\r\n"); + Oprint("`7 (`%4`8)`3Sit with him on the bed and run your hands over his body\r\n"); + } + Oprint("`7 (`%5`8)`3Turn off the lamp and slide under the sheets\r\n"); + Oprint("`7 (`%R`8)`@eturn to the balcony right now\r\n"); + } + + if(l == 20) + { + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + LoadItems("7 8 9 "); + strcpy(Prompt, "3210"); + ListItems(1); + } + + if(l != 20) + Oprint("`7 (`!?`8)`3Re-List menu options\r\n"); + Oprint("`4-`5=`4-`5=`4----`5=`4---------`5=`4---------------------------------------`5=`4---------`5=`4----`5=`4-`5=`4-\r\n"); + + sprintf(str,"`2 You have `0%ld`2 Morph Credits on hand, and `0%ld`2 in the Time Bank.\r\n",Money,Stash); + Oprint(str); +} + +void UseItem(long c, short b) // 'c=1-8 item number, b=the item code (1-???) +{ + if(b == 13) + { + Oprint("`0 You can't fly from here..."); + return; + } + + if(Room == 18 && b == 8) + { + if(LineRest[9] != ' ') + { + Oprint("`2 Wait until tomorrow, the bartender might walk up here and see you.\r\n"); + return; + } + LineRest[9]='-'; + if(random()%2) + { + Oprint("`@ You try jamming the lock picks into one of the doors, but it doesn't work.\r\n"); + return; + } + SaveInvItem(c, "-------------------", 0, 0); + Oprint("`! The lock on the left-hand door clicks open and you step inside.\r\n"); + Room = 5; + KickOut = 1; + return; + } + + Oprint("`2 You find no use for that item here at this time.\r\n"); +} +