From 2543b3ebc8789f0c6db43035602a700e911184b9 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Mon, 18 Apr 2005 04:23:53 +0000 Subject: [PATCH] Initial import of Smurf Combat. --- src/doors/smurfcombat/GNUmakefile | 18 + src/doors/smurfcombat/Makefile | 14 + src/doors/smurfcombat/mdel.c | 16 + src/doors/smurfcombat/mdel.h | 12 + src/doors/smurfcombat/objects.mk | 29 + src/doors/smurfcombat/readme.txt | 100 ++++ src/doors/smurfcombat/regsmurf.c | 28 + src/doors/smurfcombat/smurf.c | 712 +++++++++++++++++++++++++ src/doors/smurfcombat/smurf.doc | 146 ++++++ src/doors/smurfcombat/smurf.h | 95 ++++ src/doors/smurfcombat/smurfarn.c | 169 ++++++ src/doors/smurfcombat/smurfbak.h | 137 +++++ src/doors/smurfcombat/smurfblk.c | 49 ++ src/doors/smurfcombat/smurfcnv.c | 100 ++++ src/doors/smurfcombat/smurfcnv.h | 552 +++++++++++++++++++ src/doors/smurfcombat/smurfcxx.c | 66 +++ src/doors/smurfcombat/smurfdat.d01 | 93 ++++ src/doors/smurfcombat/smurfdat.d02 | 5 + src/doors/smurfcombat/smurfdat.d03 | 24 + src/doors/smurfcombat/smurfdat.d04 | 206 ++++++++ src/doors/smurfcombat/smurfdat.d05 | 5 + src/doors/smurfcombat/smurfdat.d06 | 27 + src/doors/smurfcombat/smurfdat.d07 | 13 + src/doors/smurfcombat/smurfdat.d08 | 13 + src/doors/smurfcombat/smurfdat.d09 | 58 ++ src/doors/smurfcombat/smurfdat.d0a | 1 + src/doors/smurfcombat/smurfdat.d0b | 23 + src/doors/smurfcombat/smurfdat.d0c | 1 + src/doors/smurfcombat/smurfdat.d0d | 1 + src/doors/smurfcombat/smurfdat.d0k | 21 + src/doors/smurfcombat/smurfdat.d0m | 1 + src/doors/smurfcombat/smurfdat.d0x | 8 + src/doors/smurfcombat/smurfdat.d0z | 1 + src/doors/smurfcombat/smurfdat.h | 190 +++++++ src/doors/smurfcombat/smurfday.c | 293 +++++++++++ src/doors/smurfcombat/smurfdef.h | 209 ++++++++ src/doors/smurfcombat/smurfdxx.c | 326 ++++++++++++ src/doors/smurfcombat/smurfetc.c | 604 +++++++++++++++++++++ src/doors/smurfcombat/smurfetc.h | 2 + src/doors/smurfcombat/smurfext.h | 173 ++++++ src/doors/smurfcombat/smurfgen.c | 112 ++++ src/doors/smurfcombat/smurfgen.h | 5 + src/doors/smurfcombat/smurfhst.c | 489 +++++++++++++++++ src/doors/smurfcombat/smurfini.c | 192 +++++++ src/doors/smurfcombat/smurfins.c | 93 ++++ src/doors/smurfcombat/smurfkey.c | 72 +++ src/doors/smurfcombat/smurfmnt.c | 166 ++++++ src/doors/smurfcombat/smurfmod.c | 305 +++++++++++ src/doors/smurfcombat/smurfmss.c | 96 ++++ src/doors/smurfcombat/smurfnew.c | 144 +++++ src/doors/smurfcombat/smurfnew.h | 47 ++ src/doors/smurfcombat/smurfnex.h | 115 ++++ src/doors/smurfcombat/smurfnxx.c | 245 +++++++++ src/doors/smurfcombat/smurfnxx.h | 42 ++ src/doors/smurfcombat/smurfreg.c | 153 ++++++ src/doors/smurfcombat/smurfreg.h | 16 + src/doors/smurfcombat/smurfrnz.c | 814 +++++++++++++++++++++++++++++ src/doors/smurfcombat/smurfsav.h | 301 +++++++++++ src/doors/smurfcombat/smurfset.c | 205 ++++++++ src/doors/smurfcombat/smurfsrv.c | 180 +++++++ src/doors/smurfcombat/smurfuar.c | 380 ++++++++++++++ src/doors/smurfcombat/smurfver.h | 13 + src/doors/smurfcombat/smurfwin.c | 94 ++++ src/doors/smurfcombat/targets.mk | 6 + src/doors/smurfcombat/vendor.doc | 118 +++++ 65 files changed, 8944 insertions(+) create mode 100644 src/doors/smurfcombat/GNUmakefile create mode 100644 src/doors/smurfcombat/Makefile create mode 100644 src/doors/smurfcombat/mdel.c create mode 100644 src/doors/smurfcombat/mdel.h create mode 100644 src/doors/smurfcombat/objects.mk create mode 100644 src/doors/smurfcombat/readme.txt create mode 100644 src/doors/smurfcombat/regsmurf.c create mode 100644 src/doors/smurfcombat/smurf.c create mode 100644 src/doors/smurfcombat/smurf.doc create mode 100644 src/doors/smurfcombat/smurf.h create mode 100644 src/doors/smurfcombat/smurfarn.c create mode 100644 src/doors/smurfcombat/smurfbak.h create mode 100644 src/doors/smurfcombat/smurfblk.c create mode 100644 src/doors/smurfcombat/smurfcnv.c create mode 100644 src/doors/smurfcombat/smurfcnv.h create mode 100644 src/doors/smurfcombat/smurfcxx.c create mode 100644 src/doors/smurfcombat/smurfdat.d01 create mode 100644 src/doors/smurfcombat/smurfdat.d02 create mode 100644 src/doors/smurfcombat/smurfdat.d03 create mode 100644 src/doors/smurfcombat/smurfdat.d04 create mode 100644 src/doors/smurfcombat/smurfdat.d05 create mode 100644 src/doors/smurfcombat/smurfdat.d06 create mode 100644 src/doors/smurfcombat/smurfdat.d07 create mode 100644 src/doors/smurfcombat/smurfdat.d08 create mode 100644 src/doors/smurfcombat/smurfdat.d09 create mode 100644 src/doors/smurfcombat/smurfdat.d0a create mode 100644 src/doors/smurfcombat/smurfdat.d0b create mode 100644 src/doors/smurfcombat/smurfdat.d0c create mode 100644 src/doors/smurfcombat/smurfdat.d0d create mode 100644 src/doors/smurfcombat/smurfdat.d0k create mode 100644 src/doors/smurfcombat/smurfdat.d0m create mode 100644 src/doors/smurfcombat/smurfdat.d0x create mode 100644 src/doors/smurfcombat/smurfdat.d0z create mode 100644 src/doors/smurfcombat/smurfdat.h create mode 100644 src/doors/smurfcombat/smurfday.c create mode 100644 src/doors/smurfcombat/smurfdef.h create mode 100644 src/doors/smurfcombat/smurfdxx.c create mode 100644 src/doors/smurfcombat/smurfetc.c create mode 100644 src/doors/smurfcombat/smurfetc.h create mode 100644 src/doors/smurfcombat/smurfext.h create mode 100644 src/doors/smurfcombat/smurfgen.c create mode 100644 src/doors/smurfcombat/smurfgen.h create mode 100644 src/doors/smurfcombat/smurfhst.c create mode 100644 src/doors/smurfcombat/smurfini.c create mode 100644 src/doors/smurfcombat/smurfins.c create mode 100644 src/doors/smurfcombat/smurfkey.c create mode 100644 src/doors/smurfcombat/smurfmnt.c create mode 100644 src/doors/smurfcombat/smurfmod.c create mode 100644 src/doors/smurfcombat/smurfmss.c create mode 100644 src/doors/smurfcombat/smurfnew.c create mode 100644 src/doors/smurfcombat/smurfnew.h create mode 100644 src/doors/smurfcombat/smurfnex.h create mode 100644 src/doors/smurfcombat/smurfnxx.c create mode 100644 src/doors/smurfcombat/smurfnxx.h create mode 100644 src/doors/smurfcombat/smurfreg.c create mode 100644 src/doors/smurfcombat/smurfreg.h create mode 100644 src/doors/smurfcombat/smurfrnz.c create mode 100644 src/doors/smurfcombat/smurfsav.h create mode 100644 src/doors/smurfcombat/smurfset.c create mode 100644 src/doors/smurfcombat/smurfsrv.c create mode 100644 src/doors/smurfcombat/smurfuar.c create mode 100644 src/doors/smurfcombat/smurfver.h create mode 100644 src/doors/smurfcombat/smurfwin.c create mode 100644 src/doors/smurfcombat/targets.mk create mode 100644 src/doors/smurfcombat/vendor.doc diff --git a/src/doors/smurfcombat/GNUmakefile b/src/doors/smurfcombat/GNUmakefile new file mode 100644 index 0000000000..6980f85bf3 --- /dev/null +++ b/src/doors/smurfcombat/GNUmakefile @@ -0,0 +1,18 @@ +NEED_DATEWRAP := 1 +MAKE += NEED_DATEWRAP=1 + +ifdef FIXME + CFLAGS += -Wshadow -Wconversion -Wredundant-decls +endif + +SRC_ROOT := ../.. +include ${SRC_ROOT}/build/Common.gmake + +CFLAGS += $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS) +LDFLAGS += $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) +CFLAGS += -I$(SRC_ROOT)/odoors -I$(SRC_ROOT)/conio -I. +LDFLAGS += -L$(SRC_ROOT)/odoors + +$(SMURF): $(EXEODIR) $(OBJS) $(BUILD_DEPENDS) + @echo Linking $@ + ${QUIET}$(CC) $(LDFLAGS) $(MT_LDFLAGS) $(OBJS) -o $@ $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS) -lODoors diff --git a/src/doors/smurfcombat/Makefile b/src/doors/smurfcombat/Makefile new file mode 100644 index 0000000000..ed3ffec2c4 --- /dev/null +++ b/src/doors/smurfcombat/Makefile @@ -0,0 +1,14 @@ +NEED_DATEWARP=1 +MAKEFLAGS = $(MAKEFLAGS) -DNEED_DATEWRAP=1 + +SRC_ROOT = ..\.. +!include ${SRC_ROOT}\build\Common.bmake + +CFLAGS = -ff- $(CFLAGS) $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS) +LDFLAGS = -ff- $(LDFLAGS) -tW $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) +CFLAGS = $(CFLAGS) -I$(SRC_ROOT)/odoors +LDFLAGS = $(LDFLAGS) -L$(SRC_ROOT)/odoors + +$(SMURF): $(OBJS) + @echo Linking $@ + ${QUIET}$(CC) $(LDFLAGS) $(MT_LDFLAGS) -e$@ $(OBJS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS) ODoors.lib diff --git a/src/doors/smurfcombat/mdel.c b/src/doors/smurfcombat/mdel.c new file mode 100644 index 0000000000..07ade282cd --- /dev/null +++ b/src/doors/smurfcombat/mdel.c @@ -0,0 +1,16 @@ +#include <dirwrap.h> + +int mdel(char *glob) +{ + int count=0; + char this[MAX_PATH+1]; + + strcpy(this,glob); + while(fexistcase(this)) { + if(unlink(this)==-1) + return(count); + count++; + strcpy(this,glob); + } + return(count); +} diff --git a/src/doors/smurfcombat/mdel.h b/src/doors/smurfcombat/mdel.h new file mode 100644 index 0000000000..ff2124f84a --- /dev/null +++ b/src/doors/smurfcombat/mdel.h @@ -0,0 +1,12 @@ +#ifndef _INC_MDEL_H_ +#define _INC_MDEL_H_ + +#if defined(__cplusplus) +extern "C" { +#endif + int mdel(char *pattern); +#if defined(__cplusplus) +} +#endif + +#endif diff --git a/src/doors/smurfcombat/objects.mk b/src/doors/smurfcombat/objects.mk new file mode 100644 index 0000000000..b9dba2e525 --- /dev/null +++ b/src/doors/smurfcombat/objects.mk @@ -0,0 +1,29 @@ +OBJS = \ + $(MTOBJODIR)$(DIRSEP)mdel$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurf$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfarn$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfblk$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfcxx$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfdxx$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfetc$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfgen$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfhst$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfini$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfins$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfmnt$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfmod$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfmss$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfnxx$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfreg$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfrnz$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfset$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfsrv$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfuar$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfwin$(OFILE) + +EXTRAOBJS = \ + $(MTOBJODIR)$(DIRSEP)regsmurf$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfcnv$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfday$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfnew$(OFILE) \ + $(MTOBJODIR)$(DIRSEP)smurfkey$(OFILE) \ diff --git a/src/doors/smurfcombat/readme.txt b/src/doors/smurfcombat/readme.txt new file mode 100644 index 0000000000..35e2edcbef --- /dev/null +++ b/src/doors/smurfcombat/readme.txt @@ -0,0 +1,100 @@ + ---------------------------------------------------------------------------- + + SYNCHRONET UPDATE: If you have been using CHAIN.TXT, change your Drop File + to DOOR.SYS. This error which originates in SYCNHRONET causes the program + to think you're calling in remotely, and thus drops the sysop when he/she + tries to logon. + + ---------------------------------------------------------------------------- + + NOTICE! Smurf Combat requires a fossil driver to operate, as noted by the + correct bath file example shown below. Included in this version or + upgrade of Smurf Combat is the fossil driver BNUxxxxxx.ZIP This must + either be installed as a device driver or run in the batch file as + shown below or else your system may crash or simply not work. + + ---------------------------------------------------------------------------- + + >> Synchronet SHOULD NOT use the following BATCH file example + + SAMPLE.BAT <--- Sample batch file to run Smurf Combat via WWiV + cd\bbs\smurf [Goto Smurf Combat Dir] + copy \bbs\chain.txt [Copy User Information File] + + bnu [Fossil Driver Required] + ***OR*** [Fossil Driver Required] + x00 [Fossil Driver Required] + + smurf [Execute Program] + cd\bbs [Return to System] + ^Z [Control + Z, Release, Enter] + + >> This batch file is created in the 'BBS Main Directory' specified by + running 'C:\> SMURF SETUP' and is saved as SMURF.BAT + + ---------------------------------------------------------------------------- + +>> Synchronet Setup + +Name Smurf Combat 1.5 +Startup Dir C:\BBS\SMURF (your choice - Dir w/ SMURF.EXE) +Command Line (Normal) SMURF (Run Executive ONLY) + + NOTE: Insure that you have a fossil drive already installed, or to + install one, simply edit you autoexec.bat to run 'BNU'. A copy + of 'BNU' is included and should be in this TAZ directory. + SYNCHRONET: Synchronet functions best with X00.SYS installed as a + device in your CONFIG.SYS with LOCKED BAUD RATES. + +Clean-Up [None] +ANSI Req No +Multiuser No +I/O No +Shrink Yes +Modify No +WWiV Color Codes No +BBS Drop File GAP - DOOR.SYS (Synchronet MUST use DOOR.SYS) +Place Drop File Start-up Directory + + ---------------------------------------------------------------------------- + + Registration is $9 + $3 S&H and can be sent to: + + Laurence Maar (909)861-1616 or (818)792-9988 + 1415 Valeview Drive + Diamond Bar, CA 91765 USA (Etats-Unis) + + + Please PRINT the file ORDER.FRM or SMURF.ORD by typing: + + C:\BBS\SMURF> copy order.frm prn + + from the DOS prompt... + + + -- Laurence Maar + + ---------------------------------------------------------------------------- + + + + + + + + + NOTE: If the above file just scrolled by your screen, type: + + C:\BBS\SMURF\> type README.DOC | more + + to pause in between screen-fulls... + + + + + + + + + + diff --git a/src/doors/smurfcombat/regsmurf.c b/src/doors/smurfcombat/regsmurf.c new file mode 100644 index 0000000000..bb2262aebf --- /dev/null +++ b/src/doors/smurfcombat/regsmurf.c @@ -0,0 +1,28 @@ +#include <stdio.h> +#include <ciolib.h> +#ifdef TODO_HEADERS +#include <dos.h> +#endif + +int c_break(void){ + return (1); +} + +void +main(void) +{ + int x = 0; + char stringz[2]; + directvideo = 0; +#ifdef TODO_DOSWRAP + ctrlbrk(c_break); +#endif + textcolor(15); + cprintf("\n\rSmurf crack courtesy of [JuSTice]\n\r"); + textcolor(7); + cprintf("Enter name to register under: "); + + do { + gets(stringz); + } while (x == 0); +} diff --git a/src/doors/smurfcombat/smurf.c b/src/doors/smurfcombat/smurf.c new file mode 100644 index 0000000000..a64817c2c6 --- /dev/null +++ b/src/doors/smurfcombat/smurf.c @@ -0,0 +1,712 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! MAIN */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include"smurfdef.h" +#include"smurfdat.h" +#include"smurfver.h" + +int nada = 0; +int registered = FALSE; + +void +protov(void) +{ + od_clr_scr(); + od_set_color(11, 0); + od_printf("!********** S"); + od_set_color(3, 0); + od_printf("MURF "); + od_set_color(11, 0); + od_printf("C"); + od_set_color(3, 0); + od_printf("OMBAT "); + od_set_color(11, 0); + od_printf("2.xx %s ", __version); + od_set_color(3, 0); + od_printf("(Trial Release) "); + od_set_color(11, 0); + od_printf("**********!\n\r"); + od_set_color(15, 0); + od_printf("("); + od_set_color(7, 0); + od_printf("C"); + od_set_color(15, 0); + od_printf(")"); + od_set_color(7, 0); + od_printf("opyright 1993"); + od_set_color(15, 0); + od_printf(","); + od_set_color(7, 0); + od_printf("1994 "); + od_set_color(15, 0); + od_printf("L"); + od_set_color(7, 0); + od_printf("aurence "); + od_set_color(15, 0); + od_printf("M"); + od_set_color(7, 0); + od_printf("aar\n\n\r"); + + /* od_set_color(7,0); od_printf("Program: "); + * + * if(statis) od_printf("Registered\n\r"); else + * od_printf("Unregistered\n\r"); + * + * od_printf("Interbbs: n/a (Local Game Only)\n\r"); + * + * od_printf("Synchronet: n/a (Project Discontinued)\n\n\r"); */ + + od_set_color(7, 0); + od_printf("This version is intended to be run SysOps who wish to participate in the M.E.\n\r"); + od_printf("game testing program. You will be automatically listed as an OFFICIAL site in\n\r"); + od_printf("our next release upon report of ANY program malfunction. Simply report the\n\r"); + od_printf("nature and location of the error. Not only will your BBS be advertised nation\n\r"); + od_printf("wide, but you will be able to enjoy error free games!\n\r"); + + od_set_color(15, 0); + od_printf("Laurence Maar (909)861-1616. 1415 Valeview Dr. Diamond Bar, CA 91765-4337\n\n\r"); + + /* stream = fopen("smurf.log", "a+"); */ + /* fprintf(stream, + * "\n\n\rLOGON(%i):",od_control.user_num);fprintf(stream, "%s ... + * ",realname[thisuserno]);fprintf(stream, + * "%s\n\r",smurfname[thisuserno]); */ + /* fclose(stream); */ + + od_set_color(12, 0); + od_printf("ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ\n\r"); + nada = 1; +} + + + + + + + +#ifdef _WIN32 +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, + LPSTR lpszCmdLine, int nCmdShow) +#else +int main(int argc, char *argv[]) +#endif +{ + int stat; + char *sp; +#ifdef _WIN32 +int argc; +char* argv[100]; + + argv[0] = "market.exe"; + argv[1] = strtok(lpszCmdLine, " \t"); + for (argc = 1; argv[argc];) { + argc++; + argv[argc] = strtok(NULL, " \t"); + } +#endif + + registered = TRUE; + directvideo = 0; + if (argc > 1 && strnicmp(argv[1], "REGISTER", 8) == 0) { + __REG__main(); + exit(0); + } + if (argc > 1 && strnicmp(argv[1], "RESET", 5) == 0) { + __NEW__main(); + exit(0); + } + if (argc > 1 && strnicmp(argv[1], "SETUP", 5) == 0) { + __SET__main(); + exit(0); + } + if (argc > 1 && strnicmp(argv[1], "CNV", 3) == 0) { + __CNV__main(); + exit(0); + } +#ifdef TODO_LOCAL_DISPLAY + __mess(5); +#endif + od_init(); + od_control.od_status_on = FALSE; + od_set_statusline(STATUS_NONE); +#ifdef TODO_LOCAL_DISPLAY + window(1, 1, 80, 25); + clrscr(); +#endif + od_control.od_clear_on_exit = FALSE; + od_control.od_nocopyright = TRUE; + checkkey(); + if (od_control.user_num < 1) + od_control.user_num = 1; + if (od_control.user_num == 1) + sprintf(od_control.user_name, "System Operator"); +#ifdef TODO_LOCAL_DISPLAY + window(1, 1, 80, 25); + _wscroll = 0; + textbackground(1); + textcolor(15); + gotoxy(1, 25); + cprintf(" %-20s ³ TR 2.xx %s ³ (C)opyright 1993,1994 Laurence Maar ", od_control.user_name, __version); + window(1, 1, 80, 24); + _wscroll = 1; +#endif + titlescreen(); + loadgame(); + checkstatus(); + protov(); + displaystatus(); + getcommand(); + od_exit(10, FALSE); + return(1); +} + +void +getcommand(void) +{ + char bbsin4[10]; + int numba; + do { +#ifdef TODO_LOCAL_DISPLAY + textcolor(7); +#endif + od_set_colour(D_GREY, D_BLACK); + od_printf("Command (?=Help) :"); + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + showexit = 0; + if (bbsinkey == '!' && enterpointer == 0) { + enterpointer = 1; + what(); + } else if (bbsinkey == 'A' && enterpointer == 1) { + enterpointer = 2; + what(); + } else if (bbsinkey == 'U' && enterpointer == 2) { + enterpointer = 3; + what(); + } else if (bbsinkey == 'T' && enterpointer == 3) { + enterpointer = 4; + what(); + } else if (bbsinkey == 'O' && enterpointer == 4) { + enterpointer = 0; + what(); + automate(); + } else if (bbsinkey == 'R' && enterpointer == 1) { + enterpointer = 12; + what(); + } else if (bbsinkey == 'E' && enterpointer == 12) { + enterpointer = 13; + what(); + } else if (bbsinkey == 'R' && enterpointer == 13) { + enterpointer = 14; + what(); + } else if (bbsinkey == 'O' && enterpointer == 14) { + enterpointer = 15; + what(); + } else if (bbsinkey == 'L' && enterpointer == 15) { + enterpointer = 16; + what(); + } else if (bbsinkey == 'L' && enterpointer == 16) { + enterpointer = 0; + what(); + newplayer(2); + } else if (bbsinkey == '$' && enterpointer == 1) { + what(); + smurfmoney[thisuserno] += 1000000; + } else if (bbsinkey == 'S' && enterpointer == 1 && od_control.user_num == 1) { + enterpointer = 0; + maint(2); + } else { + enterpointer = 0; + + /* if(bbsinkey=='#' && + * enterpointer==1){enterpointer=34;what();}else if(bbsinkey=='@' + * && enterpointer==1){enterpointer=64;what();}else + * if(bbsinkey=='/' && + * enterpointer==0){enterpointer=69;what();}else if(bbsinkey=='/' + * && enterpointer==69){enterpointer=0;tolocal();}else + * if(bbsinkey=='1' && + * enterpointer==1){enterpointer=0;wongame();}else + * if(bbsinkey=='2' && + * enterpointer==1){enterpointer=0;wingame();}else + * if(bbsinkey=='Z' && enterpointer==64){what();od_printf("No. + * Players: + * ");od_input_str(bbsin4,2,'0','9');numba=atoi(bbsin4);noplayers= + * numba;}else if(bbsinkey=='S' && + * enterpointer==64){what();smurfstr[thisuserno]++;}else + * if(bbsinkey=='D' && + * enterpointer==64){what();smurfspd[thisuserno]++;}else + * if(bbsinkey=='I' && + * enterpointer==64){what();smurfint[thisuserno]++;}else + * if(bbsinkey=='R' && + * enterpointer==64){what();smurfcon[thisuserno]++;}else + * if(bbsinkey=='B' && + * enterpointer==64){what();smurfbra[thisuserno]++;}else + * if(bbsinkey=='C' && + * enterpointer==64){what();smurfchr[thisuserno]++;}else + * if(bbsinkey=='P' && + * enterpointer==64){what();smurfhpm[thisuserno]=smurfhpm[thisuser + * no]+5;}else if(bbsinkey=='X' && + * enterpointer==64){userlist(1);od_printf("Change To Who: + * ");od_input_str(bbsin4,2,'0','9');savegame();thisuserno=(atoi(b + * bsin4))-1;}else if(bbsinkey=='+' && + * enterpointer==34){what();smurfturns[thisuserno]++;}else + * if(bbsinkey=='0' && + * enterpointer==34){what();smurflose[thisuserno]=0;}else + * if(bbsinkey=='Z' && + * enterpointer==34){enterpointer=0;what();hcount=1;writehostage() + * ;}else if(bbsinkey=='$' && + * enterpointer==34){what();smurfmoney[thisuserno]+=100000;}else + * if(bbsinkey=='^' && + * enterpointer==1){enterpointer=2;what();}else if(bbsinkey=='(' + * && enterpointer==2){enterpointer=3;what();}else + * if(bbsinkey=='|' && + * enterpointer==3){enterpointer=0;maint(1);}else + * if(bbsinkey=='S' && enterpointer==1 && + * od_control.user_num==1){enterpointer=0;maint(2);}else{enterpoin + * ter=0; if(bbsinkey=='Y' && + * enterpointer==5){enterpointer=6;what();}else if(bbsinkey=='S' + * && enterpointer==6){enterpointer=7;what();}else + * if(bbsinkey=='O' && + * enterpointer==7){enterpointer=8;what();}else if(bbsinkey=='P' + * && enterpointer==8){enterpointer=9;what();}else + * if(bbsinkey=='!' && + * enterpointer==9){enterpointer=0;maint(2);}else{enterpointer=0; */ + + switch (bbsinkey) { + case '%': + service(); + break; + case '~': + stealmoney(); + break; + case '^': + hostagemenu(); + break; + case '&': + changename(); + break; + case '#': + changelast(); + break; + case ')': + ettemenu(); + break; + case 'A': + case 'a': + userarena(); + break; + case '*': + inciterevolt(); + break; + case '(': + rendezvous(); + break; + case 'G': + case 'g': + givemoney(); + break; + case 'H': + case 'h': + heal(); + break; + case 'B': + case 'b': + abilities(); + break; + case 'Z': + case 'z': + spy(); + break; + case '?': + displaymenu(); + break; + case '+': + smurfbankd[thisuserno] = smurfbankd[thisuserno] + smurfmoney[thisuserno]; + smurfmoney[thisuserno] = 0; + nl(); + od_printf("You now have %.0f in your hiding place.\n\n\r", smurfbankd[thisuserno]); + break; + case '-': + smurfmoney[thisuserno] = smurfmoney[thisuserno] + smurfbankd[thisuserno]; + smurfbankd[thisuserno] = 0; + nl(); + od_printf("You now have %.0f on hand.\n\n\r", smurfmoney[thisuserno]); + break; + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + case '0': + arena(); + break; + case 'R': + case 'r': + userlist(0); + break; + case 'L': + case 'l': + itemlist(); + break; + case 'P': + case 'p': + case 'W': + case 'w': + buyitem(); + od_printf("\n\n\r"); + break; + case 'C': + case 'c': + case 'U': + case 'u': + buyconf(); + od_printf("\n\n\r"); + break; + case 'S': + case 's': + inuser = thisuserno; + displaystatus(); + break; + case 'Q': + case 'q': + savegame(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("\n\rLeave the village? "); + bbsinkey = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\n\r"); + writeSGL(); + lastquote(); + bbsexit = 1; + od_control.user_screen_length = 23; + break; + } else + od_printf("Nope\n\n\r"); + break; + default: + what(); + enterpointer = 0; + } + } + } while (bbsexit != 1 && smurfexper[thisuserno] < 100000000); + if (smurfexper[thisuserno] >= 100000000) + wingame(); + od_exit(10, FALSE); +} + +void +displaystatus(void) +{ + char nom[80]; + int thostcount = 0; + /* stream = fopen("smurf.log", "a+"); */ + /* fprintf(stream, "STATZ(%i):",od_control.user_num);fprintf(stream, "%s + * ... ",smurfname[thisuserno]); fclose(stream); */ + if (smurfsex[inuser] == 001) + sprintf(nom, "%s (M)", smurfname[inuser]); + else + sprintf(nom, "%s (F)", smurfname[inuser]); + if (smurfsex[thisuserno] != 001 && smurfsex[thisuserno] != 002) { + asksex(); + savegame(); + } + if (!nada) + od_clr_scr(); + else + nada = 0; + od_set_colour(D_GREY, D_BLACK); + if (smurfhp[inuser] < 1) + sprintf(power, "0(%i)", smurfhpm[inuser]); + else + sprintf(power, "%i(%i)", smurfhp[inuser], smurfhpm[inuser]); + if (smurfettelevel[inuser] == 0) + sprintf(ette, "None (#0)"); + else if (smurflevel[inuser] > smurflevel[thisuserno] + 39) + sprintf(ette, ">Unknown<"); + else + sprintf(ette, "%s (#%i)", smurfettename[inuser], smurfettelevel[inuser]); + if (smurflevel[inuser] > smurflevel[thisuserno] + 19) + sprintf(weap, ">Unknown<"); + else + sprintf(weap, "%s (#%i)", smurfweap[inuser], smurfweapno[inuser] + 1); + if (smurflevel[inuser] > smurflevel[thisuserno] + 19) + sprintf(armr, ">Unknown<"); + else + sprintf(armr, "%s (#%i)", smurfarmr[inuser], smurfarmrno[inuser] + 1); + if (smurflevel[inuser] > smurflevel[thisuserno] + 9) + sprintf(conf, ">Unknown<"); + else + sprintf(conf, "%s (#%i)", smurfconf[inuser], smurfconfno[inuser] + 1); + + counthostages(); + thostcount = numhost[inuser]; + if (thostcount == 0) + sprintf(host, "None"); + else + sprintf(host, "%i", thostcount); + if (smurflevel[inuser] > smurflevel[thisuserno] + 19) + sprintf(host, "?"); + else if (displayreal == 1) { + od_printf("%s (#%i)\n\r", realname[inuser], realnumb[inuser]); + } + od_printf("%-30sLevel: %-10i Wins/Losses: %i/%i\r\n", nom, smurflevel[inuser], smurfwin[inuser], smurflose[inuser]); + od_printf("Power: %-12s Experience: %-10.0f Needed: %-10.0f\n\r", power, smurfexper[inuser], defexper[smurflevel[inuser]]); + od_printf("MITe: %-4i SPeeD: %-4i INTel: %-4i\n\r", smurfstr[inuser], smurfspd[inuser], smurfint[inuser]); + od_printf("REGen: %-4i BRAve: %-4i CHaRm: %-4i\n\r", smurfcon[inuser], smurfbra[inuser], smurfchr[inuser]); + od_printf("Weap: %-23sArmor: %-24sTurns Left: %i\n\r", weap, armr, smurfturns[inuser]); + od_printf("Ette: %-22s Confinment: %-18s Hostages: %s\n\r", ette, conf, host); + od_printf("Gold: %-14.0f Hiding Place: %-14.0f Fights Left: %i/%i\n\n\r", smurfmoney[inuser], smurfbankd[inuser], roundsleft, smurffights[inuser]); + savegame(); + od_set_colour(L_CYAN, D_BLACK); + if (__morale[inuser] > 1) + od_printf("Morale: %s\n\n\r", _morale[__morale[inuser]]); + if (__morale[inuser] < 2) + od_printf("Morale: %s%s\n\n\r", _morale[__morale[inuser]], dataref2[smurfsex[inuser]]); + if (inuser == thisuserno) + checklevel(); +} + + + + + + + + + +void +checklevel(void) +{ + int getthis, oke = 1; + do { + if (smurfexper[thisuserno] > defexper[smurflevel[thisuserno]]) { + od_set_colour(L_YELLOW, D_BLACK); + smurflevel[thisuserno]++; + od_printf("You are now level %i! \n\r", smurflevel[thisuserno]); + od_set_colour(D_CYAN, D_BLACK); + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Might increased! \n\r"); + smurfstr[thisuserno]++; + } + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Speed increased! \n\r"); + smurfspd[thisuserno]++; + } + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Intelligence increased! \n\r"); + smurfint[thisuserno]++; + } + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Regeneration increased! \n\r"); + smurfcon[thisuserno]++; + } + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Bravery increased! \n\r"); + smurfbra[thisuserno]++; + } + getthis = xp_random(8); + if (getthis < 3) { + od_printf("Charm increased! \n\r"); + smurfchr[thisuserno]++; + } + od_set_colour(L_CYAN, D_BLACK); + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Hit Points soared! \n\r"); + smurfhpm[thisuserno] += 10; + } else + od_printf("Hit Points increased! \n\r"); + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Might jumped up seven! \n\r"); + smurfstr[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Speed jumped up seven! \n\r"); + smurfspd[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Intelligence jumped up seven!\n\r"); + smurfint[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Regeneration jumped up seven!\n\r"); + smurfcon[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Bravery jumped up seven! \n\r"); + smurfbra[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) { + od_printf("Charm jumped up seven! \n\r"); + smurfchr[thisuserno] += 6; + } + getthis = xp_random(40); + if (getthis == 0) + increasemorale(); + getthis = (smurfcon[thisuserno] / 2 + xp_random(smurfcon[thisuserno] / 5)); + smurfhpm[thisuserno] = smurfhpm[thisuserno] + getthis; + smurfhp[thisuserno] = smurfhpm[thisuserno]; + nl(); + sprintf(tempenform, "%s gained a level!\n\r", smurfname[thisuserno]); + newshit(tempenform); + } else + oke = 0; + } while (oke); +} + + + + + + + + +void checkstatus(void){ + char logname[13], intext[5], in2[5]; + time_t t; + struct date d; + char olddate[10], newdate[10]; + getdate(&d); + sprintf(newdate, "%02d%02d%04d", d.da_day, d.da_mon, d.da_year); + stream = fopen("smurf.hst", "a+"); + fclose(stream); + stream = fopen("smurf.hst", "r+"); + cyc = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + detectsave(); + detectwin(); + detectversion(); + + if ((stream = fopen("smurf.cfg", "r+")) == NULL) { + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "01000311111990"); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day ###\n\r2. Turns/Day ###\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + } + stream = fopen("smurf.cfg", "r+"); + fscanf(stream, "%3s", intext); + defrounds = atoi(intext); + fscanf(stream, "%3s", intext); + turnsaday = atoi(intext); + fscanf(stream, "%8s", olddate); + fclose(stream); + + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "%03i", defrounds); + fprintf(stream, "%03i", turnsaday); + fprintf(stream, "%8s", newdate); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day\n\r2. Turns/Day\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + + if (strcmp(olddate, newdate) != 0) { + od_clr_scr(); + od_set_colour(L_BLUE, D_BLACK); + od_printf("Doing daily maintenance . . .\n\r"); + od_printf("Spawning Smurf Combat Day . . .\n\r"); + od_printf("Standing By . . .\n\r"); + /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, + * "\n\n\r------------------------------------------------------------ + * ------------------\n\n\r"); */ + /* fprintf(stream, "SPAWN:) [SMURF DAY] Ran Daily Maintenance + * Successfully!\n\r"); */ + /* fclose(stream); */ + __DAY__main(); + /* if(spawnl(P_WAIT,"SMURFDAY",NULL)==-1){od_printf("Unable to locate + * program!!!\n\r");stream = fopen("SMURF.LOG", "a+");fprintf(stream, + * "SPAWN(%i): Daily Maintenance + * *****FAILED!*****",od_control.user_num);fclose(stream);loadgame();} + * else { */ + loadgame(); + od_printf("Success!\n\r"); + smurf_pause(); + } + smurfturns[thisuserno]--; +#ifdef TODO_WRAPPERS + randomize(); +#else + srand(time(NULL)); +#endif + thisuserno = 255; + + for (cyc = 0; cyc < noplayers; cyc++) { + if (realnumb[cyc] == od_control.user_num) { + thisuserno = cyc; + inuser = cyc; + } + } + + killeduser(); + if (thisuserno == 255) + newplayer(1); + smurfturns[thisuserno]--; + torturepoints = 10; + if (statis) + vpoints = 25; + else + vpoints = 10; + etpoints = smurfettelevel[thisuserno] * 10; + if (etpoints > 25) + etpoints = 25; + + srand((unsigned)time(&t)); + smurffights[thisuserno] = 3; + roundsleft = defrounds; + + if (smurfturns[thisuserno] < 0) { + smurfturns[thisuserno] = 0; + smurffights[thisuserno] = 0; + roundsleft = 0; + } + sprintf(logname, "SMURF.%03i", thisuserno); + od_control.user_screen_length = 23; + __mess(3); /* Update Bulletins */ + __mess(1); /* Smurf Times */ + __mess(2); /* Personal Information */ + __mess(4); /* Hostage Information */ + od_control.user_screen_length = 999; + counthostages(); + + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] == thisuserno) + phostage(); + + /* for(cyc=0;cyc<hcount;cyc++){if(holder[cyc]==thisuserno && + * roundsleft>0)hostagemenu();} */ +} diff --git a/src/doors/smurfcombat/smurf.doc b/src/doors/smurfcombat/smurf.doc new file mode 100644 index 0000000000..700551fd5a --- /dev/null +++ b/src/doors/smurfcombat/smurf.doc @@ -0,0 +1,146 @@ +*** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** + +Any checks or money orders MUST be addressed to 'CASH' or 'Laurence Maar' + + NOW! FOR A LIMITED TIME ONLY!!! + + FIFTY PERCENT (50%) OFF TASMANIAN STRATEGIAL!!! + + OUR PRICES HAVE BEEN SLASHED FROM AN UNAFFORDABLE NINETEEN + DOLLARS ($19) TO MERELY NINE DOLLARS ($9)!!! + + ALL YOU HAVE TO DO IS PURCHASE SMURF COMBAT (ALSO AN ONLINER) + FOR THE FULL PRICE OF $9, TOTALLING $18 AND WE'LL WAIVE THE + S&H ON SMURF COMBAT! TOTALLING $18 + S&H + Options! + + SEE LOWER PORTION OF TAZ.DOC FOR MORE DETAILS. + + PRINT TAZ.ORD or ORDER.FRM FOR OFFICIAL ORDER FORM. + + YOU SAVE: $13!!!!! + +Any checks or money orders MUST be addressed to 'CASH' or 'Laurence Maar' + +*** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** SALE *** + o o + o o + o -----===[ Smurf Combat ]===----- o + o Version 1.xx o + o o + o o + o "Boyz will be boyz, but this game isn't child's play...." o + o o + o o + o INSTALLATION o + o ============ o + o How about we skip the junk for once, and lets be reasonable. There's o + o only one reason you're reading this manual... o + o o + o Make a directory somewhere, anywhere, your choice, but preferably a dir o + o within your bbs directory... o + o o + o C:\BBS\> md smurf o + o C:\BBS\> cd smurf o + o C:\BBS\SMURF\> o + o o + o Now from there you unzip (or copy) these files into the new directory... o + o o + o C:\BBS\SMURF\> copy c:\dloads\temp\*.* o + o OR C:\BBS\SMURF\> pkunzip c:\dloads\smurfxxx o + o o + o Now, from the DOS prompt type in the following to create a proper batch o + o file in order to run the program: o + o o + o C:\BBS\SMURF\> smurf setup o + o o + o Now, enter in the appropriate directories requested, and the setup will o + o create a batch file called SMURF.BAT within the specified bbs directory. o + o o + o Now, go into your onliners edit program or what not and simply add in o + o the name Smurf Combat (Play me, SECURITY INCREASE **everytime**) <heh> o + o and put the file name or chain file to run as "SMURF", without quotes, o + o of course. If possible, SHRINK the BBS to run!! And also, do NOT use DOS o + o interupts (the selection). o + o o + o Now all you have to do is save and run... o + o o + o Smurf Combat supports: CHAIN.TXT, DOOR.SYS, DORINFOx.DEF, SFDOORS.DAT, o + o CALLINFO.BBS, EXITINFO.BBS. o + o o + o o + o STARTING A NEW GAME (REROLL) o + o ============================ o + o Because i'm running outta time here, i'm NOT GOING TO TELL YOU HOW TO o + o REROLL!!!! ehehehhehehe... j/k. o + o o + o To reroll from DOS, simply type the following: o + o o + o C:\BBS\SMURF\> smurf reset o + o o + o OR, login to your bbs, run the game, then from the Mainmenu prompt, type o + o !SYSOP! o + o o + o The program will act like it dosn't know what the hell you are talking o + o about, but don't be distracted by the repeating "what did he say?" o + o message, you will instantly be warped to the Sysop Menu, you figure the o + o the rest out... o + o o + o o + o REROLLING AFTER A WIN o + o ===================== o + o The automatic reroll mechanism will automatically reroll if run any time o + o during or after the month following the time the game was won. However, o + o you can do an 'instant' reroll by typing 'SMURF RESET' o + o o + o o + o REGISTERING o + o =========== o + o Now lets face it, you gotta respond to the endless cries 'REGISTER!!' o + o eventually.... After all, whats ***** $9* *****!?!? Everyone knows o + o no one REALLY pays for the free 'shareware' samples which cost $45 so o + o this is my personal contribution to society, this is my way of paying o + o back, and STEALLING BUSINESS from those 'other guys'... o + o o + o If you have a printer, then at the DOS prompt, type: o + o o + o C:\BBS\SMURF\> copy order.frm prn o + o OR C:\BBS\SMURF\> copy smurf.ord prn o + o o + o and send your non-exploding order form including your hard earned $12 o + o (Send credit card info if you want, but don't be surprised by a $8000 o + o bill) to: o + o o + o Maartian Enterprises o + o 1415 Valeview Drive o + o Diamond Bar, CA 91765 o + o o + o *Price is $9 plus $3 shipping and handling. o + o o + o P.S. PPPLLLEEEAAASSSEEE use security envelopes or private delivery, for o + o your own protection, we are not responsible for lost or stolen o + o mail. o + o OH.. and your check or money order must be addressed to 'Laurence Maar' o + o to be acceptable o + o o + o HOW IT WORKS o + o ============ o + o Smurf Combat registration is done by simply running 'SMURF REGISTER' o + o Then enter in the appropriate registration numbers we gave you. o + o o + o o + o FINAL COMMENTS o + o ============== o + o I'd like to thank my nonexistant dog, my nonexistant cat, & most of all o + o Wayne Bell for inventing WWiV... o + o o + o And why the incredibly believably simulated 'computer paper' tear off o + o strips? I'll tell you that if you register and ASK for it... o + o o + o o + o o + o o + o o + o o + o Author, o + o Laurence Maar o + o o diff --git a/src/doors/smurfcombat/smurf.h b/src/doors/smurfcombat/smurf.h new file mode 100644 index 0000000000..7812008abb --- /dev/null +++ b/src/doors/smurfcombat/smurf.h @@ -0,0 +1,95 @@ +#include <stdlib.h> /* CPU-Computer Player */ +#include <string.h> /* DAT-Smurf Combat Data */ +#include <stdio.h> +#include <math.h> +#include "OpenDoor.h" /* BBS-System Player */ + +int thisuserno, inuserno, noplayers, cyc, userhp, bbsexit; +char *smurf_onl_player[] = {"GRANDPA SMURF", "PAPA SMURF", "REBEL SMURF", + "SHADOW SMURF", "SWAP SMURF", "FIREBIRD SMURF", +"CONTRACT SMURF", "GOVERNMENT SMURF", "THIEF SMURF"}; +int smurf_onl_weapon[] = {20, 19, 1, 3, 0, 0, 0, 0, 0}; +int smurf_onl_armor[] = {20, 19, 0, 3, 0, 0, 0, 0, 0}; +float smurf_onl_gold[] = {100, 200, 300, 400, 0, 0, 0, 0, 0}; +float smurf_onl_bank[] = {1000000, 1000000, 10000, 1000, 0, 0, 0, 0, 0}; +int smurf_onl_level[] = {40, 35, 10, 2, 0, 0, 0, 0, 0}; +int smurf_onl_win[] = {30, 10, 5, 0, 0, 0, 0, 0, 0}; +int smurf_onl_lose[] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; +int smurf_onl_hp[] = {30, 10, 5, 0, 0, 0, 0, 0, 0}; +float smurf_onl_exp[] = {157450, 14640, 615, 60, 0, 0, 0, 0, 0}; +int smurf_onl_turns[] = {5, 5, 5, 5, 0, 0, 0, 0, 0}; +int smurf_onl_cpu[] = {1, 1, 1, 1, 1, 1, 1, 1, 1}; +int smurf_onl_pimp[] = {10, 5, 0, 0, 0, 0, 0, 0, 0}; /* Pimping Level */ +int smurf_onl_pimp2[] = {10, 10, 0, 0, 0, 0, 0, 0, 0}; /* Pimping Quantity */ +char *smurf_smurfette[] = {"Femme Fatale", "Cassie", "None", "None", "", "", "", "", ""}; +int smurf_ettelevel[] = {11, 10, 1, 1, 0, 0, 0, 0, 0}; +int smurf_confineno[] = {11, 10, 0, 0, 0, 0, 0, 0, 0}; +char *smurf_confine[] = {"Ropes", "Wooden Cage", "Basement", "Infirmary", "Catacombs", "Jail House", "Prison", "Pyramid", "Dungeon", "Fortress", "Underworld"}; +float smurf_dat_cprices[] = {0, 1000, 10000, 50000, 100000, 500000, 1000000, 2000000, 5000000, 10000000, 100000000}; +char *smurf_dat_weapon[] = {"Bad Words", "Dandelion", "Sun Flower Seeds", "Fountain Pen", "Rubber Band", "Stick", "Auto H2O Gun", "H2O Uzi", "Kitchen Knife", + "Metal PVC", "Baseball Bat", "Ice-T Album", "Satanic Rock CD", ".45 Auto", ".357 Magnum", "Shotgun", "Uzi", "Barrel Mach. Gun", "18", "Holy Water", +"Holy Cross"}; +char *smurf_dat_armor[] = {"Middle Finger", "Smurf Cap", "No Fear Clothesline", "3", "4", "5", "6", "7", "8", + "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", +"Scapular/Inverted Star Pendant"}; +float smurf_dat_prices[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +float smurf_dat_exp[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 1, 2, 3, 4, 5, 6, 7, 8, 9, 30, 1, 2, 3, 4, 5, 6, 7, 8, 9, +0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +int smurf_onl_hxst[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; +int smurf_onl_hxst1[] = {255, 255, 0, 255, 255, 255, 255, 255, 255}; +int smurf_onl_hxst2[] = {255, 255, 1, 255, 255, 255, 255, 255, 255}; + +int smurf_onl_str[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* strength */ +int smurf_onl_dex[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* dexterity */ +int smurf_onl_int[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* intelligence */ +int smurf_onl_con[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* constitution */ +int smurf_onl_bra[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* bravery */ +int smurf_onl_chr[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; /* charisma */ +#define SD_GREEN 0x0a +#define SD_CYAN 0x0b +#define SD_RED 0x0c +#define SD_VIOLET 0x0d +#define SD_YELLOW 0x0e +#define SD_WHITE 0x0f +void itemlist(void); +void displaystatus(void); +void checkplayer(void); +void titlescreen(void); +void loadplayer(void); +void checkplayer(void); +void commandcycle(void); +void displaymenu(void); +void conflist(void); +void userlist(void); +/* #define TUN thisuserno #define IUN inuserno #define BBSPLAYER + * smurf_onl_player /* System Players */ +#define BBSWEAPON smurf_onl_weapon /* Sys Weapon */ +#define BBSARMOR smurf_onl_armor /* Sys Armor */ +#define BBSGOLD smurf_onl_gold /* Sys Gold */ +#define BBSBANK smurf_onl_bank /* Sys Gold */ +#define BBSLEVEL smurf_onl_level /* Sys Level */ +#define BBSWIN smurf_onl_win /* Sys Wins */ +#define BBSLOSE smurf_onl_lose /* Sys Loss */ +#define BBSHP smurf_onl_hp /* Sys Hit Points */ +#define BBSEXP smurf_onl_exp /* Sys Experience */ +#define BBSHOST smurf_onl_hxst /* Sys Hostages - Smurfettes */ +#define BBSHOST1 smurf_onl_hxst1 /* Sys Hostages - Player Hostage1 */ +#define BBSHOST2 smurf_onl_hxst2 /* Sys Hostages - Player Hostage2 */ +#define BBSCONF smurf_confineno /* Sys Confine Number */ +#define SMURFETTE smurf_smurfette /* Sys Smurfette Name */ +#define ETTELVL smurf_ettelevel /* Sys Smurfette Level */ +#define CONFINE smurf_confine /* Dat Confine Listing */ +#define BBSSTR smurf_onl_str /* Sys Strength */ +#define BBSDEX smurf_onl_dex /* Sys Dexterity */ +#define BBSCON smurf_onl_con /* Sys Constitution */ +#define BBSINT smurf_onl_int /* Sys Intelligence */ +#define BBSBRA smurf_onl_bra /* Sys Bravery */ +#define BBSCHR smurf_onl_chr /* Sys Charisma */ + +#define DATWEAPON smurf_dat_weapon /* Smurf Combat Data Weapon Names */ +#define DATARMOR smurf_dat_armor /* Smurf Combat Data Armor Names */ +#define DATPRICES smurf_dat_prices /* Smurf Combat Data Prices */ +#define DATEXP smurf_onl_exp /* Smurf Combat Data Experience */ +*/ diff --git a/src/doors/smurfcombat/smurfarn.c b/src/doors/smurfcombat/smurfarn.c new file mode 100644 index 0000000000..ef52670edf --- /dev/null +++ b/src/doors/smurfcombat/smurfarn.c @@ -0,0 +1,169 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! ARENA */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" + + + + + +void +arena(void) +{ + int arenalevel, erand, run = 0, hit = 0, enemyhp; + char enemie[31], eweapon[31], earmor[31]; + int ews, aws; + float gf, ef; + roundsleft--; + if (roundsleft < 0) { + roundsleft = 0; + od_printf("\n\rOutta Turns!\n\n\r"); + return; + } + /* stream=fopen("SMURF.LOG","a+"); */ + /* fprintf(stream, "ARENA(%i):%s ... + * ",od_control.user_num,smurfname[thisuserno]); */ + /* fclose(stream); */ + + od_clr_scr(); + /* if(xp_random(5)==1)registerme(); */ + arenalevel = bbsinkey - '0'; + if (arenalevel == 0) + arenalevel = 10; + + erand = xp_random(10); + ews = xp_random(8) + 1; + aws = xp_random(8) + 1; + + if (arenalevel < 2 && smurflevel[thisuserno] < 4) { + ews = xp_random(4) + 1; + aws = xp_random(3) + 1; + } + enemyhp = (xp_random(arenalevel * 4) + (8 * arenalevel)); +#ifdef TODO_WRAPPERS + strset(eweapon, 0); + strset(earmor, 0); +#endif + memset(eweapon, 0, sizeof(eweapon)); + memset(earmor, 0, sizeof(earmor)); + + if (eweapno[arenalevel - 1][erand] > 99) + sprintf(eweapon, "%s", enemieweap[eweapno[arenalevel - 1][erand] - 100]); + else + sprintf(eweapon, "%s", defweapon[eweapno[arenalevel - 1][erand]]); + if (earmrno[arenalevel - 1][erand] > 99) + sprintf(earmor, "%s", enemiearmr[earmrno[arenalevel - 1][erand] - 100]); + else + sprintf(earmor, "%s", defarmor[earmrno[arenalevel - 1][erand]]); + + sprintf(enemie, "%s", defenemie[arenalevel - 1][erand]); + od_set_colour(L_CYAN, D_BLACK); + od_printf("A %s %s\n\r", enemie, defstartline[erand]); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Y.Weapon: %s, %i Pts\n\rY.Defense: %s, %i Pts\n\r", smurfweap[thisuserno], (smurfweapno[thisuserno] + 1) * 5, smurfarmr[thisuserno], (smurfarmrno[thisuserno] + 1) * 4); + od_printf("E.Weapon: %s, %i Pts\n\rE.Defense: %s, %i Pts\n\n\r", eweapon, (arenalevel - 1) * 10 + ews, earmor, (arenalevel - 1) * 8 + aws); + + do { + od_set_colour(D_CYAN, D_BLACK); + od_printf("He has %i points left.\n\r", enemyhp); + od_set_colour(D_CYAN, D_BLACK); + od_printf("You have %i points left.\n\r", smurfhp[thisuserno]); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("(A)ttack (R)un (S)tats: ", enemie); + bbsinkey = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + + switch (bbsinkey) { + case 'A': + case 'a': + od_set_colour(L_CYAN, D_BLACK); + od_printf("Attack!\n\r"); + hit = (xp_random((smurfweapno[thisuserno] + 1) * 5)) + 1; + hit = hit - xp_random((arenalevel - 1) * 10 + aws); + if (hit < 0) + hit = 0; + enemyhp = (enemyhp - hit); + __hit(hit); + if (enemyhp > 0) { + hit = (xp_random((arenalevel - 1) * 10 + ews)) + 1; + hit = hit - xp_random(smurfarmrno[thisuserno] * 4); + if (hit < 0) + hit = 0; + smurfhp[thisuserno] = (smurfhp[thisuserno] - hit); + __ehit(hit, 0); + } + /* if(enemyhp>0 && smurfhp[thisuserno]>0)od_clr_scr();else */ nl(); + nl(); + break; + case 'R': + case 'r': + run = 1; + od_printf("Run\n\n\rWimp!\n\n\r"); + smurflose[thisuserno]++; + if (xp_random(20) == 1) + deductmorale(); + if (xp_random(5) == 1) { + deductettemorale(); + od_printf("Your smurfette is ashamed to know you...\n\r"); + } + nl(); + break; + case 'S': + case 's': + od_set_colour(L_CYAN, D_BLACK); + od_clr_scr(); + deafult:nl(); + nl(); + break; + /* + od_printf("Enemie: %s [ArenaLevel: %i]\n\r", enemie, arenalevel); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Y.Weapon: %s, %i Pts\n\rY.Defense: %s, %i Pts\n\r", smurfweap[thisuserno], (smurfweapno[thisuserno] + 1) * 5, smurfarmr[thisuserno], (smurfarmrno[thisuserno] + 1) * 4); + od_printf("E.Weapon: %s, %i Pts\n\rE.Defense: %s, %i Pts\n\n\r", eweapon, (arenalevel - 1) * 10 + ews, earmor, (arenalevel - 1) * 8 + aws); + break; + */ + } + } while (enemyhp > 0 && smurfhp[thisuserno] > 0 && run != 1); + + if (smurfhp[thisuserno] < 1) { + od_printf("\n\n\rLooks like we have a problem here...\n\n\r"); + smurfhp[thisuserno] = smurfhpm[thisuserno]; + fprintf(stream, "LOST!(%i):", od_control.user_num); + fprintf(stream, "%-30s\n\r", smurfname[thisuserno]); + fclose(stream); + savegame(); + lastquote(); + od_exit(10, FALSE); + } + if (enemyhp < 1) { + gf = smurflevel[thisuserno] + 1; + gf *= arenalevel; + gf *= (xp_random(100)); + gf += (69 * smurflevel[thisuserno]); + ef = smurflevel[thisuserno] + 1; + ef *= arenalevel; + ef *= (xp_random(100)); + ef += (69 * smurflevel[thisuserno]); + od_printf("\n\n\rThe arena roars as you defeat the %s...\n\n\r", enemie); + od_printf("You found %.0f gold and get %.0f experience!\n\n\r", gf, ef); + smurfmoney[thisuserno] = (smurfmoney[thisuserno] + gf); + smurfexper[thisuserno] = (smurfexper[thisuserno] + ef); + fprintf(stream, "CHAM!(%i):", od_control.user_num); + fprintf(stream, "%-30s\n\r", smurfname[thisuserno]); + fclose(stream); + checklevel(); + savegame(); + } +} diff --git a/src/doors/smurfcombat/smurfbak.h b/src/doors/smurfcombat/smurfbak.h new file mode 100644 index 0000000000..90f886ec24 --- /dev/null +++ b/src/doors/smurfcombat/smurfbak.h @@ -0,0 +1,137 @@ +#include<datewrap.h> +void +backgame(void) +{ + char backname[20]; + struct date d; + int thp; + getdate(&d); + sprintf(backname, "smurf.S%02.2d", d.da_day); + stream = fopen(backname, "w+"); + fprintf(stream, "%03i", noplayers); + for (cyc = 0; cyc < noplayers; cyc++) { + if (smurfturns[cyc] < 0) + smurfturns[cyc] = 0; + if (smurffights[cyc] < 0) + smurffights[cyc] = 0; + thp = smurfhpm[cyc]; + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", realname[cyc][cyc2]); + fprintf(stream, "%010i", realnumb[cyc]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfname[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 80; cyc2++) + fprintf(stream, "%03i", smurftext[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfweap[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfarmr[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfettename[cyc][cyc2]); + fprintf(stream, "%010i", smurfettelevel[cyc]); + fprintf(stream, "%010i", smurfweapno[cyc]); + fprintf(stream, "%010i", smurfarmrno[cyc]); + for (cyc3 = 0; cyc3 < 40; cyc3++) + fprintf(stream, "%03i", smurfconf[cyc][cyc3]); + fprintf(stream, "%010i", smurfconfno[cyc]); + for (cyc3 = 0; cyc3 < 10; cyc3++) { + /* 69d */ fprintf(stream, "%010i", smurfhost[cyc][cyc3]); + } + + /* 69a fprintf(stream, "%010i",smurfhost[cyc]);fprintf(stream, + * "%010i",smurfhost1[cyc]);fprintf(stream, "%010i",smurfhost2[cyc]); */ + fprintf(stream, "%010i", smurflevel[cyc]); + fprintf(stream, "%020.0f", smurfexper[cyc]); + fprintf(stream, "%020.0f", smurfmoney[cyc]); + fprintf(stream, "%020.0f", smurfbankd[cyc]); + fprintf(stream, "%010i", smurffights[cyc]); + fprintf(stream, "%010i", smurfwin[cyc]); + fprintf(stream, "%010i", smurflose[cyc]); + fprintf(stream, "%010i", thp); + fprintf(stream, "%010i", smurfhpm[cyc]); + fprintf(stream, "%010i", smurfstr[cyc]); + fprintf(stream, "%010i", smurfspd[cyc]); + fprintf(stream, "%010i", smurfint[cyc]); + fprintf(stream, "%010i", smurfcon[cyc]); + fprintf(stream, "%010i", smurfbra[cyc]); + fprintf(stream, "%010i", smurfchr[cyc]); + fprintf(stream, "%010i", smurfturns[cyc]); + + /* 91 */ if (__morale[cyc] >= 13) { + __morale[cyc] = 13; + } + /* 91 */ if (__ettemorale[cyc] >= 999) { + __ettemorale[cyc] = 999; + } + /* 91 */ if (__morale[cyc] < 1) { + __morale[cyc] = 0; + } + /* 91 */ if (__ettemorale[cyc] < 1) { + __ettemorale[cyc] = 0; + } + /* 91 */ fprintf(stream, "%03i%03i", __morale[cyc], __ettemorale[cyc]); + + for (cyc3 = 0; cyc3 < 5; cyc3++) { + /* 69b */ fprintf(stream, "%03i%03i", smurfspcweapon[cyc][cyc3], smurfqtyweapon[cyc][cyc3]); /* 111222 - Special Weap + * Number / Qty */ + } + /* 69c */ fprintf(stream, "%03i", smurfsex[cyc]); /* 000/001/002 + * Nil/Mal/Fem */ + + } fclose(stream); + fprintf(stream, "%03i", noplayers); + for (cyc = 0; cyc < noplayers; cyc++) { + od_sleep(50); + cprintf("."); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", realname[cyc][cyc2]); + fprintf(stream, "%010i", realnumb[cyc]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfname[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 80; cyc2++) + fprintf(stream, "%03i", smurftext[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfweap[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfarmr[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfettename[cyc][cyc2]); + fprintf(stream, "%010i", smurfettelevel[cyc]); + fprintf(stream, "%010i", smurfweapno[cyc]); + fprintf(stream, "%010i", smurfarmrno[cyc]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfconf[cyc][cyc2]); + fprintf(stream, "%010i", smurfconfno[cyc]); + for (cyc3 = 0; cyc3 < 10; cyc3++) { + /* 69d */ fprintf(stream, "%010i", smurfhost[cyc][cyc3]); + } + /* 69a fprintf(stream, "%010i",smurfhost[cyc]);fprintf(stream, + * "%010i",smurfhost1[cyc]);fprintf(stream, "%010i",smurfhost2[cyc]); */ + fprintf(stream, "%010i", smurflevel[cyc]); + fprintf(stream, "%020.0f", smurfexper[cyc]); + fprintf(stream, "%020.0f", smurfmoney[cyc]); + fprintf(stream, "%020.0f", smurfbankd[cyc]); + fprintf(stream, "%010i", smurffights[cyc]); + fprintf(stream, "%010i", smurfwin[cyc]); + fprintf(stream, "%010i", smurflose[cyc]); + fprintf(stream, "%010i", smurfhp[cyc]); + fprintf(stream, "%010i", smurfhpm[cyc]); + fprintf(stream, "%010i", smurfstr[cyc]); + fprintf(stream, "%010i", smurfspd[cyc]); + fprintf(stream, "%010i", smurfint[cyc]); + fprintf(stream, "%010i", smurfcon[cyc]); + fprintf(stream, "%010i", smurfbra[cyc]); + fprintf(stream, "%010i", smurfchr[cyc]); + fprintf(stream, "%010i", smurfturns[cyc]); + + for (cyc3 = 0; cyc3 < 6; cyc3++) { + /* 69b */ fprintf(stream, "%03i%03i", smurfspcweapon[cyc][cyc3], smurfqtyweapon[cyc][cyc3]); /* 111222 - Special Weap + * Number / Qty */ + } + + } fclose(stream); + stream = fopen("smurf.log", "a+"); + fprintf(stream, "\n\rSPAWN:) System Backup\n\r"); + fprintf(stream, "SPAWN:) System Save Game\n\r"); + fclose(stream); +} diff --git a/src/doors/smurfcombat/smurfblk.c b/src/doors/smurfcombat/smurfblk.c new file mode 100644 index 0000000000..e9921d6376 --- /dev/null +++ b/src/doors/smurfcombat/smurfblk.c @@ -0,0 +1,49 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! BLOCKADE */ +/* REMOTE Maintenance Code: !-SIX-NINE-| BLOCKADE */ +/* */ +/***************************************************************************/ + +extern char *get_blk_err_msg(int num); + + + + + +char * +get_blk_err_msg(int num) +{ + char *sp; + static char *blk_err_msgs[] = { + "No error", /* 0 */ + "No memory for buffer", /* 1 */ + "Error opening file", /* 2 */ + "No memory for file buffering", + "File buffering failure", /* 4 */ + "Fseek error", + "Error reading data block", /* 6 */ + "Invalid data block info", + "Error reading file", /* 8 */ + "Error reading file", /* 9 */ + "Error reading file", /* 10 */ + "Check Value error", /* 11 */ + "File size error", /* 12 */ + "Invalid error number"}; /* 13 */ + if (num == -1) + num = 11; + if (num == -2) + num = 12; + if ((num < 0) || (num > 12)) + num = 13; /* out of range */ + sp = blk_err_msgs[num]; + return (sp); +} diff --git a/src/doors/smurfcombat/smurfcnv.c b/src/doors/smurfcombat/smurfcnv.c new file mode 100644 index 0000000000..9dc370e4b8 --- /dev/null +++ b/src/doors/smurfcombat/smurfcnv.c @@ -0,0 +1,100 @@ +#define DOSMODEONLY +#include<stdlib.h> +#include<string.h> +#include<stdio.h> +#include<ciolib.h> +#ifdef TODO_HEADERS +#include<dos.h> +#endif + +#include"smurfdef.h" + +#include"smurfgen.h" + +#include"smurfver.h" + +#include"smurfsav.h" + +#include"smurfcnv.h" + + + + + +void +main(void) +{ + int a = 0, b = 0, c = 0; + getdate(&d); + + clrscr(); + printf("This program will convert your old Smurf Combat save game files\n"); + printf("from version 69a-69c to version 91. If you are not sure which\n"); + printf("version you are converting FROM, press letter X to abort. Your\n"); + printf("current version number will be displayed on the title screen of\n"); + printf("Smurf Combat.\n\n"); + printf("Press X to abort, any other key to continue..."); + + + proc = getch(); + + + if (proc == 'X' || proc == 'x') + exit(1); + + + + clrscr(); + textcolor(12); + cprintf("\n"); + cprintf(" S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" 69-91 Conversion Module\n\r"); + cprintf(" %sVersion %s\n\r", __vcnvsp, __vcnv); + cprintf(" By Laurence Manhken\n\n\r"); + textcolor(9); + cprintf("From Version 69a, 69b, or 69c? [abC]: "); + textcolor(12); + proc = getch(); + if (proc == 'A' || proc == 'a') + a = 1; + else if (proc == 'B' || proc == 'b') + b = 1; + else + c = 1; + textcolor(9); + cprintf("\n\n\rProceed? [Yn]: "); + textcolor(12); + proc = getch(); + if (proc != 'Y' && proc != 'y') { + cprintf("Nope\n\r"); + return; + } cprintf("Yea\n\n\r"); + textcolor(9); + cprintf("Sure!?!?!? [Yn]: "); + textcolor(12); + proc = getch(); + if (proc != 'Y' && proc != 'y') { + cprintf("Nope\n\r"); + return; + } cprintf("Yea\n\n\r"); + textcolor(9); + cprintf("SURE!?!?!? [Yn]: "); + textcolor(12); + proc = getch(); + if (proc != 'Y' && proc != 'y') { + cprintf("Nope\n\r"); + return; + } cprintf("Yea\n\n\r"); + if (a) + loadgame69a(); + if (b) + loadgame69b(); + if (c) + loadgame69c(); + for (cyc = 0; cyc < noplayers; cyc++) { + __morale[cyc] = 3; + __ettemorale[cyc] = 0; + } + savegame(); +} diff --git a/src/doors/smurfcombat/smurfcnv.h b/src/doors/smurfcombat/smurfcnv.h new file mode 100644 index 0000000000..c75089cc8d --- /dev/null +++ b/src/doors/smurfcombat/smurfcnv.h @@ -0,0 +1,552 @@ +/* /* 69a -- 69a -- 69a */ + +void +loadgame69a(void) +{ + char intext[81], revtext[10], outtext[81] = ""; + int inputint; + stream = fopen("smurf.sgm", "r+"); + cyc = 0; + fscanf(stream, "%3s", intext); + noplayers = atoi(intext); + + for (cyc = 0; cyc < noplayers; cyc++) { + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(realname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + realnumb[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 80; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurftext[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfweap[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfarmr[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfettename[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfettelevel[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfweapno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfarmrno[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfconf[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfconfno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhost[cyc][0] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhost[cyc][0] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhost[cyc][0] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflevel[cyc] = atoi(intext); + fscanf(stream, "%20s", intext); + smurfexper[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfmoney[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfbankd[cyc] = atof(intext); + fscanf(stream, "%10s", intext); + smurffights[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfwin[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflose[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhp[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhpm[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfstr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfspd[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfint[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfcon[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfbra[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfchr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfturns[cyc] = atoi(intext); + } fclose(stream); +} + + + + + + + + + + + + + +/* 69b -- 69b -- 69b */ + +void +loadgame69b(void) +{ + char intext[81], revtext[10], outtext[81] = ""; + int inputint; + stream = fopen("smurf.sgm", "r+"); + cyc = 0; + fscanf(stream, "%3s", intext); + noplayers = atoi(intext); + for (cyc = 0; cyc < noplayers; cyc++) { + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(realname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + realnumb[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 80; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurftext[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfweap[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfarmr[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfettename[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfettelevel[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfweapno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfarmrno[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfconf[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfconfno[cyc] = atoi(intext); + /* 69b */ for (cyc3 = 0; cyc3 < 10; cyc3++) { + fscanf(stream, "%10s", intext); + smurfhost[cyc][cyc3] = atoi(intext); + } + /* fscanf(stream,"%10s",intext);smurfhost1[cyc]=atoi(intext); //69b */ + /* fscanf(stream,"%10s",intext);smurfhost2[cyc]=atoi(intext); //69b */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + fscanf(stream, "%10s", intext); + smurflevel[cyc] = atoi(intext); + fscanf(stream, "%20s", intext); + smurfexper[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfmoney[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfbankd[cyc] = atof(intext); + fscanf(stream, "%10s", intext); + smurffights[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfwin[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflose[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhp[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhpm[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfstr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfspd[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfint[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfcon[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfbra[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfchr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfturns[cyc] = atoi(intext); + + for (cyc3 = 0; cyc3 < 6; cyc3++) { + /* 69b */ fscanf(stream, "%3s", intext); + smurfspcweapon[cyc][cyc3] = atoi(intext); + /* 69b */ fscanf(stream, "%3s", intext); + smurfqtyweapon[cyc][cyc3] = atoi(intext); + } + + } fclose(stream); +} + + + + + +/* 69c -- 69c -- 69c */ + +void +loadgame69c(void) +{ + char intext[81], revtext[10], outtext[81] = ""; + int inputint; + stream = fopen("smurf.sgm", "r+"); + cyc = 0; + fscanf(stream, "%3s", intext); + noplayers = atoi(intext); + for (cyc = 0; cyc < noplayers; cyc++) { + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(realname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + realnumb[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 80; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurftext[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfweap[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfarmr[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfettename[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfettelevel[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfweapno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfarmrno[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfconf[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfconfno[cyc] = atoi(intext); + /* 69b */ for (cyc3 = 0; cyc3 < 10; cyc3++) { + fscanf(stream, "%10s", intext); + smurfhost[cyc][cyc3] = atoi(intext); + } + /* fscanf(stream,"%10s",intext);smurfhost1[cyc]=atoi(intext); //69b */ + /* fscanf(stream,"%10s",intext);smurfhost2[cyc]=atoi(intext); //69b */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + fscanf(stream, "%10s", intext); + smurflevel[cyc] = atoi(intext); + fscanf(stream, "%20s", intext); + smurfexper[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfmoney[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfbankd[cyc] = atof(intext); + fscanf(stream, "%10s", intext); + smurffights[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfwin[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflose[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhp[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhpm[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfstr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfspd[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfint[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfcon[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfbra[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfchr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfturns[cyc] = atoi(intext); + + for (cyc3 = 0; cyc3 < 6; cyc3++) { + /* 69b */ fscanf(stream, "%3s", intext); + smurfspcweapon[cyc][cyc3] = atoi(intext); + /* 69b */ fscanf(stream, "%3s", intext); + smurfqtyweapon[cyc][cyc3] = atoi(intext); + } + /* 69c */ fscanf(stream, "%3s", intext); + smurfsex[cyc] = atoi(intext); + } fclose(stream); +} + + + + + +/* 91 -- 91 -- 91 */ + +void +loadgame91(void) +{ + char intext[81], revtext[10], outtext[81] = ""; + int inputint; + stream = fopen("smurf.sgm", "r+"); + cyc = 0; + fscanf(stream, "%3s", intext); + noplayers = atoi(intext); + fscanf(stream, "%5s", intext); /* save version */ + + for (cyc = 0; cyc < noplayers; cyc++) { + + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(realname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + realnumb[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 80; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurftext[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfweap[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfarmr[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfettename[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfettelevel[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfweapno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfarmrno[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfconf[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfconfno[cyc] = atoi(intext); + /* 69b */ for (cyc3 = 0; cyc3 < 10; cyc3++) { + fscanf(stream, "%10s", intext); + smurfhost[cyc][cyc3] = atoi(intext); + } + /* fscanf(stream,"%10s",intext);smurfhost1[cyc]=atoi(intext); //69b */ + /* fscanf(stream,"%10s",intext);smurfhost2[cyc]=atoi(intext); //69b */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + fscanf(stream, "%10s", intext); + smurflevel[cyc] = atoi(intext); + fscanf(stream, "%20s", intext); + smurfexper[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfmoney[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfbankd[cyc] = atof(intext); + fscanf(stream, "%10s", intext); + smurffights[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfwin[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflose[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhp[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhpm[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfstr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfspd[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfint[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfcon[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfbra[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfchr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfturns[cyc] = atoi(intext); + + /* 91 */ fscanf(stream, "%3s", intext); + __morale[cyc] = atoi(intext); + /* 91 */ fscanf(stream, "%3s", intext); + __ettemorale[cyc] = atoi(intext); + /* 91 */ if (__morale[cyc] >= 13) { + __morale[cyc] = 13; + } + /* 91 */ if (__ettemorale[cyc] >= 999) { + __ettemorale[cyc] = 999; + } + /* 91 */ if (__morale[cyc] < 1) { + __morale[cyc] = 0; + } + /* 91 */ if (__ettemorale[cyc] < 1) { + __ettemorale[cyc] = 0; + } + for (cyc3 = 0; cyc3 < 5; cyc3++) { + /* 69b */ fscanf(stream, "%3s", intext); + smurfspcweapon[cyc][cyc3] = atoi(intext); + /* 69b */ fscanf(stream, "%3s", intext); + smurfqtyweapon[cyc][cyc3] = atoi(intext); + } + /* 69c */ fscanf(stream, "%3s", intext); + smurfsex[cyc] = atoi(intext); + + } fclose(stream); +} +*/ diff --git a/src/doors/smurfcombat/smurfcxx.c b/src/doors/smurfcombat/smurfcxx.c new file mode 100644 index 0000000000..ac11ba0998 --- /dev/null +++ b/src/doors/smurfcombat/smurfcxx.c @@ -0,0 +1,66 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! CXXvert */ +/* REMOTE Maintenance Code: !-SIX-NINE-| Module */ +/* */ +/***************************************************************************/ + +#define DOSMODEONLY +#include"smurfext.h" +/* #include"smurfcnv.h" */ + + + +void +__CNV__main(void) +{ + /* struct date d; *//* char proc; int a=0,b=0,c=0,e=0; getdate(&d); */ + clrscr(); + /* printf("This program will convert your old Smurf Combat save game + * files\n"); printf("from version .69a-.91 to version 1.30. If you are + * not sure which\n"); printf("version you are converting FROM, press + * letter X to abort. Your\n"); printf("current version number will be + * displayed on the title screen of\n"); */ + printf("This conversion program CANNOT convert to 1.77.\n"); + printf("You must run 'SMURF RESET'\n\n"); + + printf("Press any key ..."); + + + /* proc= */ getch(); + exit(1); + /* + * if(proc=='X' || proc=='x')exit(1); + * + * + * clrscr();textcolor(12);cprintf("\n"); cprintf(" S M U R F C O M B A + * T\n\n\r");textcolor(10); cprintf(" 69-91 Conversion Module\n\r"); + * cprintf(" %sVersion %s\n\r",__vcnvsp,__vcnv); cprintf(" By + * Laurence Manhken\n\n\r"); textcolor(7); cprintf("[A] Version + * 0.69a\n\r"); cprintf("[B] Version 0.69b\n\r"); cprintf("[C] Version + * 0.69c\n\r"); cprintf("[D] Version 0.91\n\n\r"); textcolor(9); + * cprintf("From Version [abcD]: ");textcolor(12);proc=getch(); + * if(proc=='A' || proc=='a')a=1; else if(proc=='B' || proc=='b')b=1; + * else if(proc=='C' || proc=='c')c=1; else e=1; + * textcolor(9);cprintf("\n\n\rProceed? [Yn]: + * ");textcolor(12);proc=getch(); if(proc!='Y' && + * proc!='y'){cprintf("Nope\n\r");return;}cprintf("Yea\n\n\r"); + * textcolor(9);cprintf("Sure!?!?!? [Yn]: ");textcolor(12);proc=getch(); + * if(proc!='Y' && + * proc!='y'){cprintf("Nope\n\r");return;}cprintf("Yea\n\n\r"); + * textcolor(9);cprintf("SURE!?!?!? [Yn]: ");textcolor(12);proc=getch(); + * if(proc!='Y' && + * proc!='y'){cprintf("Nope\n\r");return;}cprintf("Yea\n\n\r"); + * if(a)loadgame69a(); if(b)loadgame69b(); if(c)loadgame69c(); + * if(e)loadgame91(); //if(e)loadgame100(); + * for(cyc=0;cyc<noplayers;cyc++){__morale[cyc]=3;__ettemorale[cyc]=0;} + * savegame(); */ +} diff --git a/src/doors/smurfcombat/smurfdat.d01 b/src/doors/smurfcombat/smurfdat.d01 new file mode 100644 index 0000000000..c02cb3c85d --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d01 @@ -0,0 +1,93 @@ + o o + o SMURF COMBAT STORYLINE INTRODUCTION (revised version 1.81!!!) o + o o + o Looking up at the massive carving you stare at the face of doG, (God o + o spelled backwards) his body nailed to a cross. Wondering where you o + o had gone wrong you recalled what had happened several weeks ago on a o + o camping trip. You looked in search of rumors of a deserted fortress. o + o Papa Smurf had always warned people never to believe such rumors and o + o to NEVER go in search of them, but you, you had... o + o o + o As you glance up and the massive carving, and then down at the floor o + o you recall your journey... o + o o + o "Well, THIS one looks a MITE cultishLESS... wouldn't you say Jason?" o + o Jason smurf glanced up at a gagged smurfette who had been chained up o + o against a wall in torchure position (We can't detail because small o + o children may be reading this). After a short pause he replied, "I'd o + o say so, you know what THAT means, don't you?" The second smurf, a o + o short but VERY well built smurf in his early twenties sort of o + o giggled, but the hollowness in his raspy voice sounded more like the o + o two year old giggle of a perverted Saddam Hussien on crack. "Yup, I o + o know what that means!" The reply was openly energetic and full of o + o anticipation. Slowly he drew out a gun metal black object about six o + o inches long, six feet wide, and two metric tons from his inside coat o + o pocket. The smurf raised the weapon and carefully aimed it at the o + o smurfette who's face was now full of terror, but unable to scream o + o due to a sudden lack of interest and raw boredom, not to mention the o + o fact she was gagged. Focusing in on her head, Jason made a devilish o + o laugh of SEXUAL satisfaction as he pulled the trigger... o + o o + o Suddenly, from a high over-looking balcony of the fortress someone o + o yelled "Noooooooooooooooooon!" in a French accent. Instantenously, o + o sun flower seeds screamed through the atmosphere and collided into o + o Jason square in the head, knocking him unconcious. H2O (pure water) o + o erupted from the Uzi (so thats what Jason was holding), missing the o + o shocked smurfette by a fraction of a nanometer. Jason fired out "Get o + o him Murf Smurf!" and fell into unconsciousness. Murf swirled around o + o just in time to see a dark shadow dashing off, pulling hard on his o + o gun's trigger, water sliced into the balcony railing, causing part o + o of it the come crashing down into the lower floor. o + o o + o You dashed through the tunnels of the fortress and within a couple o + o seconds alarms sounded and you could hear the metallic slamming of o + o vertical doors against solid concrete being closed by a battery of o + o security computers. Suddenly, guard smurfs were appearing out of no o + o where, many of them armed with sticks, while a few elite guards o + o furbished stainless steel H2O Uzis and Rifles. By the time you o + o reached the main entrance hall of the fortress, a couple dozen o + o guards were dashing around to their posts, the drawbridge slowly o + o closing less than 100 yards ahead. You were almost out of air but o + o you knew you HAD to escape. Nearing to the drawbridge, a few guards o + o locked on you with their sights and fired. The sound of fire water o + o jeting arcross the hall and sticks flying through the air was almost o + o deafening. o + o o + o You leaped through the air as a blast of water went soaring past o + o your body. You could hear a loud painful wailing as if it were in o + o the distance -- your wailing as you made solid contact with the o + o closing drawbridge. The bridge was already at a 45 degree angle, o + o but regaining your composure, you scrambled over the large o + o drawbridge and dived into the moat. Slowly you climbed out and ran o + o towards your camp. In the background you could hear the sound o + o of water tearing apart layers of the solid oak and sticks colliding, o + o wood against metal... o + o o + o You arived home ten minutes later by hitch-hiking on a local forest o + o animal, a crabbit (rabbit with a crab like upper torso) only to find o + o that the evil smurfs had gotten there first in their Z28 Camaros, o + o and killed your entire family. Signs that they were shot to death o + o was evident by the amount of water on the floor. You left in search o + o of help... o + o o + o ------------------------------------------------------------------------ o + o o + o Three weeks later. You had contacted an underground movement, the o + o CIASIAM smurf rebellion (Climatic and Intelligent Anti-Social Indigo o + o Asia Movement) which was headed by REBEL SMURF. You learned that o + o PAPA SMURF had been coordinating an operation to convert the village o + o village into pseudo-satan-saddamism and conquer the humans. You also o + o learned that by spying on humans the evil smurfs obtained a o + o technology far more damaging than bad words and before forbidden o + o which allows one to fire METAL projectile thru the air similar to o + o the fatal H2O weapons used by the military's elite for bass fishing. o + o Except, FAR more destructive than a broken yo-yo dropped from the o + o top of the Empire State building, even better than the best of the o + o H2O class. The rebels had bribed several guards and managed to o + o obtain this technology as well in order to combat the evil smurfs. o + o o + o REBEL SMURF offered you to chance to join the revolution, told you o + o the location of the CIASIAM C.H.Q. and all you have to do is sign in o + o and report... o + o o + diff --git a/src/doors/smurfcombat/smurfdat.d02 b/src/doors/smurfcombat/smurfdat.d02 new file mode 100644 index 0000000000..0d93b6bea0 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d02 @@ -0,0 +1,5 @@ + Well, hello there. Unless I'm wrong, I believe your new here. You've + come to get justice for what has happened to your family and for + smurfanity. You've come to battle the evil pseudo-satan-saddamist + smurfs! + diff --git a/src/doors/smurfcombat/smurfdat.d03 b/src/doors/smurfcombat/smurfdat.d03 new file mode 100644 index 0000000000..d27c026cf1 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d03 @@ -0,0 +1,24 @@ +.............................................................................. +. Hostage Menu . +.............................................................................. +.[1] Torture Hostage : This command lets you torture hostages, however this . +. may be too much for a hostage, esp. if it's a female . +. which may kill him/her. This has a negative result, . +. see kill hostage. . +.[2] Abuse Hostage : This command is like torture hostage except it has a . +. greater affect on your hostage, and if word gets out . +. about your torchurings, you will lose levels and you . +. will be attacked at random intervals by computer . +. players. . +.[3] Kill Hostage : This command will let you attempt to kill a hostage, . +. if you succeed you will lose 1-5 levels, lose 5 win . +. points, and you will recieve 3 loss points. . +.[4] Transfer Hostage : This command will let you transfer a hostage to . +. another player with an open slot for a hostage. . +.[5] Release Hostage : In Smurf Combat you have the option or releasing a . +. hostage, maybe to open up space for others or maybe . +. that smurf simply can't pay up. . +.[?] Hostage Help : This documentation. . +.[Q] Quit Menu . +.............................................................................. +. . \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d04 b/src/doors/smurfcombat/smurfdat.d04 new file mode 100644 index 0000000000..092f1884ed --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d04 @@ -0,0 +1,206 @@ +o...........................................................................o +o o +o ***** Smurf Combat 1.81 ***** o +o o +o The prerequisite for winning this game is [now]: o +o 100,000,000 Experience Points + Defeat of Grandpa Smurf o +o or 101,000,000 Experience Points Only o +o o +o The cheat code that lets you automatically win the game has been fixed. o +o The sysop operations menu is now only accessible by user number one. o +o o +o The BC++ 2.0 source code for this program is now $69 due to high demand. o +o o +o Please distribute this version to any and all boards running outmoded o +o copies of Smurf Combat. Your karma will reflect your efforts. o +o o +o...........................................................................o +o o +o ***** Smurf Combat 1.77 ***** o +o o +o All functions and codes have been encrypted with SIXTEEN LEVELS of code o +o verification to prevent old cracks from functioning. This was done when o +o we discovered that there was a GOOD crack for this program, but that's o +o PERMANENTLY solved now (oh well...<heheh>) o +o o +o The new title screen and version screen Maartian Enterprise policy is o +o now in effect, so hope you like the new screen format! o +o o +o SAVE FILE CORRUPTION! SAVE FILE CORRUPTION! SAVE FILE CORRUPTION! o +o To my best belief, I think we have FINALLY solved the problem where the o +o save file becomes corrupt and the 'Ranking' outputs strange characters! o +o Their were several problems with hostage functions which caused it. o +o o +o This program has also been tested with over 100 Synchronet users, so we o +o believe that all Synchronet bugs should have been worked out. o +o o +o The SOURCE CODE for Smurf Combat still only $29. o +o o +o...........................................................................o +o o +o <<< FINAL RELEASE -- Smurf Combat 1.50 >>> o +o o +o Once again I have changed the algorithms and relocated the locations o +o of the registration function as well as renamed variable into integers o +o instead of words, so any old 'CRACK' will NOT work. o +o o +o Also, your registration code MIGHT not work with this version, if it o +o doesn't, contact me. o +o o +o Intermediate codes are also no longer required and your registration o +o name will fit on one line now! o +o o +o The SOURCE CODE for Smurf Combat is now ONLY *** $29 *** price is o +o negotiable, and there is no longer a restriction on who can buy it. o +o Source code includes all *.C* files. o +o o +o...........................................................................o +o o +o <<< FINAL RELEASE -- Smurf Combat 1.30 >>> o +o o +o Once again I have changed the algorithms and relocated the locations o +o of the registration function as well as renamed variable into integers o +o instead of words, so any old 'CRACK' will NOT work. o +o o +o Also, your registration code MIGHT not work with this version, if it o +o doesn't, contact me. o +o o +o Intermediate codes are also no longer required and your registration o +o name will fit on one line now! o +o o +o The SOURCE CODE for Smurf Combat is now ONLY *** $30 *** price is o +o negotiable, and there is no longer a restriction on who can buy it. o +o Source code includes all *.C* files. o +o o +o...........................................................................o +o o +o >>> Smurf Combat [Legal] Released 1.20 o +o o +o BEAUCOUP, BEAUCOUP, BEAUCOUP things have changed. Well, okay some small o +o things including: Local screen scrolls easier. Typographical errors were o +o fixed. Secret Service is COMPLETELY functional. Registration codes are o +o calculated to be exactly 9.33333333334 times harder to crack. Also, o +o status bar has been removed. No more staring at the grey box at the o +o bottom of your screen. Gender remarks have been all filtered! o +o o +o Smurf Combat now comes with it VERY VERY VERY own FILEID.DIZ and o +o DESC.SDI (or whatever). Also, look out for Tasanian strategical!! The o +o new onliner coming from the mother of all new wave door games! o +o o +o Also, a few days before the releasal of this version I received the o +o following letter of registration which basically left me fanatic for the o +o next hour or so. I was literally yelling out <<EVERYBODY LOVES IT!>> o +o o +o "3 bucks for Da Registration. Very cool o +o game, everyone loves it!..." o +o -- Brian T. (Red Brawn), N. Carolina o +o o +o No capitalization or punctualization has been modified. o +o o +o This will probably be my last release unless someone wants to help o +o me program or something on a royalty basis, cuz I am TOTALLY swamped o +o with onliner ideas. Gushing left and right, sooooo..... o +o o +o...........................................................................o +o o +o >>> Smurf Combat [Legal] Released 1.10 o +o o +o Several unclassified changes have been made. o +o o +o Program no longer uses direct video writes. o +o o +o Unregistered attack message now occurs once every 5 times and o +o duration is 6 times shorter! (cool dayz, huh?) o +o o +o...........................................................................o +o o +o >>> Smurf Combat [Legal] Released 1.00 o +o o +o Several unclassified changes have been made. o +o o +o...........................................................................o +o o +o >>> Smurf [***Official Release***] Combat 0.91 o +o o +o Incite Revolt functions all work without and problems so far o +o o +o Secret Service functions also have been finished and work o +o o +o Abilities can now be swapped and all serve a purpose o +o o +o...........................................................................o +o o +o --0.70a Beta-- o +o Player limit enforced o +o o +o Smurfette menu completed and working o +o o +o Smurfette operations completed and working o +o o +o Spying on another smurf completed and working o +o o +o...........................................................................o +o o +o --0.69f-- o +o Hostages can be tortured, released or transfered. o +o o +o Killing a hostage costs you experience and loss points, and hit points. o +o o +o Computer players now upgrade weapons and attack players o +o o +o...........................................................................o +o o +o --0.69-- o +o The number of hostages you can have is determined by the number of your o +o confinement level. o +o o +o The Release hostage command works. o +o o +o The ranking list is color coded as follows: B.Green-Alive, D.Green-Host o +o B.Cyan-You. o +o o +o If you CANNOT afford something on the weapons list (calculates bank & on o +o hand) it will not display the number for that item. o +o o +o...........................................................................o +o o +o --0.01b-- o +o o +o Problem fixed, work continues o +o o +o...........................................................................o +o o +o --0.01-- o +o o +o Program corrupts BIOS/DOS/EMS/XMS ... o +o o +o...........................................................................o +o o +o --0.00d-- o +o o +o Project resumed, basic functions work, can ask for command input, etc.. o +o o +o Experimental o +o o +o...........................................................................o +o o +o --0.00c-- o +o o +o Same problems occured, project abandoned o +o o +o...........................................................................o +o o +o --0.00b-- o +o o +o Problems occured, entire program had to be rewritten. o +o o +o...........................................................................o +o o +o --0.00-- o +o o +o Nothing works, only file names, i.e. SMURF.CPP, *.PRJ, *.DSK exist. o +o o +o Program is $0.01 to register. o +o o +o...........................................................................o +o o \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d05 b/src/doors/smurfcombat/smurfdat.d05 new file mode 100644 index 0000000000..799b95efc0 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d05 @@ -0,0 +1,5 @@ +Your player information has been written and saved... + +The next time you run this game you will be able to start +playing right away! + diff --git a/src/doors/smurfcombat/smurfdat.d06 b/src/doors/smurfcombat/smurfdat.d06 new file mode 100644 index 0000000000..aded419554 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d06 @@ -0,0 +1,27 @@ +............................................................................. +. Civil Operations Menu . +............................................................................. +. [1] Demoralize Player: Using this, you can lower a players morale, thus U . +. wont lower your morale if you attack his confine . +. and also, it makes them more susceptible to attack . +. from computer players. . +. [2] Demoralize Ette : When you demoralize a Smurfette you make them more . +. likely to cheat on their guy and easier to steal. . +. However, if you are caught you lose morale. . +. [3] Rape Smurfette : This is the most damaging why to take care of . +. an enemies ette, HOWEVER at the same time you risk . +. dropping your morale two points by doing this. . +. [4] Publicize Abuse : This puts a false message in the smurf log saying . +. the subject has been abusing hostages. . +. [5] Support Rescue : Supporting a rescue allows you to support a small . +. Anarchy or terrorist group in return for their . +. confine sabotage services. . +. [6] Attempt Rescue : You can attempt to rescue hostages yourself, this . +. is more expensive, yes but more effective threefold. . +. [7] Sabotage Confine : This command will cause un repairable damage to a . +. confine, IF successful. . +. [8] Attack Confine : Exactly like sabotage, only 5 times more effective . +. [?] Civil Ops Help : This documentation. . +. [Q] Quit Menu . +............................................................................. +. . \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d07 b/src/doors/smurfcombat/smurfdat.d07 new file mode 100644 index 0000000000..e506631f3b --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d07 @@ -0,0 +1,13 @@ +Rendez-Vous General Help + +[1] Probe City Streets - loney smurfettes +[2] Village Communities - common neighborhood smurfettes +[3] Industrial Areas - all kinds of smurfettes +[4] Local Education Facils - sophisticated smurfettes +[5] Night Life - all kinds of smurfettes +[6] Journey To Other Lands - rich son-of-kings-types smurfettes +[7] Engage Full Blown Seance - find soul mate smurfette + +[S] Steal Smurfette - try to capture a smurfette +[V] Smurf Ette Listing - list smurfettes and masters + diff --git a/src/doors/smurfcombat/smurfdat.d08 b/src/doors/smurfcombat/smurfdat.d08 new file mode 100644 index 0000000000..46ebb71d54 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d08 @@ -0,0 +1,13 @@ +Smurfette Menu General Information + + The object of having smurfettes is to have a loving mate by your side. +When you have a smurfette which is dedicated to you, you have a larger +chance of getting bonus jumps whenever you gain a level, you heal faster, +your morale increases faster, and decreases slower, and most importantly, +you must have one to win the game. + + The number of ette-points you have to spend every turn depends on the +level of your smurfette. The more 'small things' you get for her, like +taking her to a concert or whatever, you gain respect. Once you have enough +respect you can ask her to marry you. After that, you're set. + diff --git a/src/doors/smurfcombat/smurfdat.d09 b/src/doors/smurfcombat/smurfdat.d09 new file mode 100644 index 0000000000..f6d2558dc5 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d09 @@ -0,0 +1,58 @@ + [ Basics Of Smurf Combat ] + + WINNING THE GAME. + + (1) Attain 100,000,000 experience points and THEN defeat Grandpa Smurf OR + (2) Attain 101,000,000 experience points only. + + OBJECTIVES. + + (1) To destroy all evil Pseudo-Satan-Saddamist Smurfs. Once you're able to + defeat GRANDPA SMURF that means you are VERY close! + (2) Become the top ranked person in the game, including computer players. + (3) Have the hottest looking, highest level ette, with the highest morale. + (4) To destroy other player's confines to liberate hostages. + (5) To demoralize other players. + (6) To demoralize other smurfettes via the Civil Operations + (7) The be the biggest, the baddest, the best. PERIOD. + + THE ARENA is a place where novice smurfs come to first prove their worth to + the people, to get a boost of morale, or to run away and lose morale. To + enter an arena press a number from 1-10. The 0 key is level 10. The lower + the number, the easier. + + ATTACK ANOTHER PLAYER. This is much like the arena, with a few exceptions. + For one, you're fighting your fellow man, and thus are 'expected' not to + torture him if captured. But, there are isolated incidents of smurfs who + insisted on brutally beating recently captured enemies to death. Killing + player hostages WILL RESULT in a loss of exp. pts., morale, and hit points! + + THE HOSTAGE MENU is were your private hostage control takes place, this is + where some may opt to a whipping in order to teach a foe a lesson, or + maybe to result in bloody death. Whenever you release an enemy you have a + chance that you will gain morale from the act. Transfering the enemy has + no effect upon you or your hostage, this is usually done in order to move + a prisoner into a higher security prison (usually a friend works best). + + RENDEZ-VOUS MENU. This is were you get your CHEESE. This menu allows you + to find a lonely ette, or a rampant prostitute and to make her YOUR ette. + Whenever you have an ette, it is your responsibility to please her... that + is in the next section. Different selections on this menu vary in price + and percent chance of result. Also, in higher education areas, you will + definately get a higher level ette versus searching the streets. + + SMURFETTE MENU. This menu is for pleasing / abusing your ette. You can + always propose marriage, but in smurfland there's no such thing as true + love at first sight. Instead, you must slowly coax your ette until her + morale (or feelings towards you) increase. Many players like to competing + for the most ette-morale. In competitions like these, a morale of 900% is + not uncommon. + + CIVIL OPERATIONS MENU. Civil operations are anything you can do to someone + that will demoralize or derank a player aside from his physical abilities + and combat ranking. Bombing a confine is 5 times more cost-efficient + versus sabotaging. Most operations have a 75% of success, just how much + damage will be done is another random number. + + + diff --git a/src/doors/smurfcombat/smurfdat.d0a b/src/doors/smurfcombat/smurfdat.d0a new file mode 100644 index 0000000000..414fdfbd0f --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0a @@ -0,0 +1 @@ +[40m[2J[13C[0;1;31mÛÛß[CÛÛ[3CÛÛ[CÜÛÛÛÛÛÜ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[CÞÛÛÝ[CÜÛÛÛÛÛÜ[CßÛÛ[2;14HÛÛ[2CÛÛÜ[CÜÛÛ[CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[3;14HÛÛ[3CßÛÛÛß[2CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[4;14HÛÛÜ[3CÞÛÝ[3CßÛÛÛÛÛß[CßÛÛÛÛÛß[2CßÛÛÛÛÛÛß[CÞÛÛÝ[CÛÛ[3CÛÛ[CÜÛÛ[19;14HÛÛß[CÛÛ[3CÛÛ[CÜÛÛÛÛÛÜ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[CÞÛÛÝ[CÜÛÛÛÛÛÜ[CßÛÛ[20;14HÛÛ[2CÛÛÜ[CÜÛÛ[CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[21;14HÛÛ[3CßÛÛÛß[2CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[22;14HÛÛÜ[3CÞÛÝ[3CßÛÛÛÛÛß[CßÛÛÛÛÛß[2CßÛÛÛÛÛÛß[CÞÛÛÝ[CÛÛ[3CÛÛ[CÜÛÛ[7;14H[0;36mAs[Cthe[Clast[Csoldiers[Cfall[Cbefore[Cyour[Ceyes[Cscreaming[8;14Hfor[Cmercy,[Cyou[Ccan[Calmost[Cfeel[Cpity[Cfor[Cthem,[Cbut[Cthe[9;14Htemptation[Cevades[Cyou.[CMomentarily,[Cblue[Cblood[Cpaints[10;14Hthe[Cfloors[Cand[Cscreams[Cof[Cfreedom[Crush[Cthrough[Cyour[11;14Hhead.[COxygen[Cfills[Cyour[Cveins,[Cyou[Cfeel[Cas[Cif[Cyou've[12;14Hbad[Cthe[Cbest[Cworkout[Cof[Cyour[Clife...[14;14HSuddenly,[Cthe[Csound[Cof[Cdesperately[Cpleading[Csirens[15;14Hintrudes[Cyour[Cimages[Cof[Cpeace[Cfor[Call[Csmurfanity.[16;14HRed[Clights[Cflash,[Cand[Ca[Cgloom[Cfills[Cthe[Cair...[17;1H[1;37m [0m \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0b b/src/doors/smurfcombat/smurfdat.d0b new file mode 100644 index 0000000000..6382e9d0e0 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0b @@ -0,0 +1,23 @@ +[40m[2J[40m + + + + + + + + + + + + + + + + +[39C[0;33m±± +[38C±²²± +[30C²Û²Û² ±²²²²± ²Û²Û² +[31C²Û² ²²²ÛÛÛÛ²²² ²Û² +[31C²Û²²²²²²±±²²²²²²Û² +[31C²Û²²ÛÛ²±°°±²ÛÛ²²Û²[0m[255D \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0c b/src/doors/smurfcombat/smurfdat.d0c new file mode 100644 index 0000000000..4962d38164 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0c @@ -0,0 +1 @@ +[1;1H[23;16H[0;1;33;41m°±²±°²±²±Û²ÛÛßßÜßÝÛßÝÜßÝÜßÝܲÜÝÜßݲßܲ²°Û²±²²°²±²°²²°°[22;23H°±²±²±²Û²±ÛßÛßÛßÛ²Û²ßÛßßÛÛßÛ²±²±°°±°[40mÜ[21;30H[41m°°°±²²±²ßÛÛ²±²Ü²ßÛ²Û²±°±°[20;33H°±²°²°±[C±²[C°±²±²±°[19;30H[40mÜ[2C[41m°±²±°²±Û°²Û²±Û²²±°[4C[40mÜ[18;29Hß[3C[41m°±²±Û±²°²±Û°Û±²²±°[6C[40mß[17;27HÜ[5C[41m°±²±°²±°²°±°±²±²±°[2C[40mÜ[5Cß[16;33H[41m°±²°²°±²°±²°±²±²±°[5C[40mÜ[15;24HÜ[3CÜ[3C[41m°±²²±°²Û°±²±°²°±²²±°[3C[40mß[4CÜ[14;15Hß[4CÜ[Cß[3CÜ[5C[41m°±²²²°±±°²°±²°±²²²±°[8C[40mÜ[5CÜ[13;27Hß[4C[41m°±²²ÛßÛ±²±°²°°Û°²²±°[5C[40mÜ[11CÜ[12;10Hß[2Cß[4C[41m°±²°±²²±°[4C°±²±²±²Û²±Û²±±²°±²±²±°[7C°±²²±±²°°[5C[40mÜ[11;6HÜ[9C[41m°±²²Û²Û²²±²²±°°±²±²Û±²°Û²°±Û°±²Û±²±²²±°[2C°±²²²±Û²±±±±°±°[10;10H°±²°²±°±²Û°²±Û²Û°°±±²°²Û²°±Û²±Û²±Û²±Û²±Û±²±²±°°±²²±Û±²Û²±Û²ß²±°[9;8H°±²²°±²±°²°±²±°²±°²°±Û²±²±Û±²Û±²Û±²°Û±²°Û²±±°±Û²±²Û²Û±²²±±Û²²°²Û²±°[8;6H±²±°²±Û±²°±±²Û±²±²²±²°±Û±²Û²±²±°²°±²±²±²°±[43m±±²±[41m±°[43m²±Û[41m±²±°²±²±²±°±Û²Û±²±°[7;5H°±²±²±°±°±°²°±²°±²°±²°±²°²°²±²°±²°²²²°²°²°²°²±°²±²°°²°²²±Û²±²°²°²±°²±²±°[6;4H°±²±°±²°±²±°²±°²±²Û²±Û°°²Û²±°±²°±Û²±Û²²±²±²°±Û²±Û²Û²±²°²±²°±²°²±²°²°²±²±°[5;4H°±²²±°²±°²°±²°±²°±²°±²°±²°²°±²°±²°±²±°²°±²°±°²±°±°²Û±°²±Û²Û²±²Û°°±²°±²°²°[4;4H°±²²Û²±Û±²°Û²Û°±²Û²²°±²±°²±°²°±²±²°²±²°±²°²°°±²°±²±°²°±²°±²±²°±²°²±°²±²±°[3;5H°±²±°°±²±°±²²±Û²²Û²±Û²±Û²Û±²±°²²²±°²°±²±Û°²±Û²±Û²Û±±°²°²±°°±°±°±²±²²²±°[2;7H°±²°±²²±²±°²[C²±°²±°±²±°[C°±²±°±°²±°²±Û±Û²±Û±²±²²²²±°[C°±²±Û±²²±²±²±²±°[1;9H°±²°±²²±±²²±°²²±²±°[4C°±²±°±°²°±²±°²±°²±°²±°²±°[3C°±²±²±²°±²²±°[0m \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0d b/src/doors/smurfcombat/smurfdat.d0d new file mode 100644 index 0000000000..f8dcded8e5 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0d @@ -0,0 +1 @@ +[40m[2J[13C[0;1;31mÛÛß[CÛÛ[3CÛÛ[CÜÛÛÛÛÛÜ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[CÞÛÛÝ[CÜÛÛÛÛÛÜ[CßÛÛ[2;14HÛÛ[2CÛÛÜ[CÜÛÛ[CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[3;14HÛÛ[3CßÛÛÛß[2CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[4;14HÛÛÜ[3CÞÛÝ[3CßÛÛÛÛÛß[CßÛÛÛÛÛß[2CßÛÛÛÛÛÛß[CÞÛÛÝ[CÛÛ[3CÛÛ[CÜÛÛ[19;14HÛÛß[CÛÛ[3CÛÛ[CÜÛÛÛÛÛÜ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[CÞÛÛÝ[CÜÛÛÛÛÛÜ[CßÛÛ[20;14HÛÛ[2CÛÛÜ[CÜÛÛ[CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[21;14HÛÛ[3CßÛÛÛß[2CÛÛ[3CÛÛ[CÛÛ[3CÛÛ[2CÛÛ[CÛÛ[CÛÛ[2CÛÛ[2CÛÛ[3CÛÛ[2CÛÛ[22;14HÛÛÜ[3CÞÛÝ[3CßÛÛÛÛÛß[CßÛÛÛÛÛß[2CßÛÛÛÛÛÛß[CÞÛÛÝ[CÛÛ[3CÛÛ[CÜÛÛ[11;14H[0;36mYou never make it out in time, but you shall be[12;14Hforever remembered in the hearts of the people...[15;1H[1;37m [0m \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0k b/src/doors/smurfcombat/smurfdat.d0k new file mode 100644 index 0000000000..c305835e10 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0k @@ -0,0 +1,21 @@ +[40m[2J[0mo...........................................................................o +o[75Co +o [1m***** Smurf Combat 2.xx DELTAxx ***** [36C[0mo +o[75Co +o [1;36mThe prerequisite for winning this game is [now]:[26C[0mo +o[6C[1;36m100,000,000 Experience Points + Defeat of Grandpa Smurf[14C[0mo +o [1;36mor 101,000,000 Experience Points Only[35C[0mo +o[75Co +o [1;36mThis version of Smurf Combat is intended only for SysOps who wish to be [0mo +o [1;36man OFFICIAL game testing site. Benefits include free national advertising [0mo +o [1;36mand free direct upgrades. Test sites which are deemed the most effective [0mo +o [1;36mwill be entitled to free registration of ALL M.E. games. [0mo +o[75Co +o [1;36mReport any instances of program malfunction immediately to Maartian Ent. [0mo +o [1;36mLaurence Maar (909)861-1616 1415 Valeview Dr. Diamond Bar, CA 91765. [0mo +o[75Co +o [1;36mPlease limit number of copies in distribution. [6C[0mo +o [1;36mYour karma will reflect your efforts. [6C[0mo +o[75Co +o...........................................................................o +[0m[255D \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0m b/src/doors/smurfcombat/smurfdat.d0m new file mode 100644 index 0000000000..5cc1e3dde3 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0m @@ -0,0 +1 @@ +[40m[2J[2;20H[0;1mThis[Cgame[Cwas[Cproduced[Cand[Cdistributed[Cin[3;32Hcoordination[Cwith[6;10H[0;31mÜÜÜÜ[CÜÜÜÜ[4CÜÜ[7CÜÜ[4CÜÜÜÜÜ[2CÜÜÜÜÜÜ[CÜÜ[4CÜÜ[4CÜÜÜÜ[2CÜÜ[7;9HÛ[0;1;31m²²²²[0;31mÛ[0;1;31m²²²²[0;31mÛ[2CÛ[0;1;31m²²[0;31mÛ[5CÛ[0;1;31m²²[0;31mÛ[2CÛ[0;1;31m²²²²²[0;31mÛÛ[0;1;31m²²²²²²[0;31mÛ[0;1;31m²²[0;31mÛ[2CÛ[0;1;31m²²[0;31mÛ[2CÛ[0;1;31m²²²²[0;31mÛ[C[0;1;31m²²[0;31mÛ[8;9HÛ[0;1;31m²²²²²²²²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛÜÜ[3CÛ[0;1;31m²²[0;31mÛÜÜ[CÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛßÛ[0;1;31m²²[0;31mÛßÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛÛÜ[CÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[9;9HÛ[0;1;31m²²[0;31mÛ[0;1;31m²²²[0;31mÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[10;9HÛ[0;1;31m²²[0;31mÛßßßÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛÛÛÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛÛÛÛ[0;1;31m²²[0;31mÛ[0;1;31m²²²²[0;31mÛÛ[2CÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛÛÛÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[0;1;31m²²[0;31mÛ[11;9HÛ[0;1;31m²²[0;31mÛ[3CÛ[0;1;31m²²[0;31mÛ[0;1;31m²²²²²²²²[0;31mÛ[0;1;31m²²²²²²²²[0;31mÛ[0;1;31m²²[0;31mÛÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛ[CÛ[0;1;31m²²[0;31mÛ[0;1;31m²²²²²²²²[0;31mÛ[0;1;31m²²[C[0;31mÛ[0;1;31m²²²²[0;31mÛ[12;10Hßß[5Cßß[Cßßßßßßßß[Cßßßßßßßß[Cßß[2Cßß[3Cßß[3Cßß[Cßßßßßßßß[Cßß[2Cßßßß[13;70H[0;1mTM[14;23H[0;1;34mÛß[CÜÜÜ[CÜÜÜ[CÜÜ[CÜÜÜ[CÜÜ[2CÜÜ[2CÜ[2CÜ[CÜÜ[2CÜ[15;23HÛß[CÛ[CÛ[2CÛ[2CÛß[CÛÜß[CÛÜß[CÛÜß[CÛ[CßÜ[CÛß[CßÜ[16;23Hßß[Cß[Cß[2Cß[2Cßß[Cß[Cß[Cß[3Cß[Cß[Cß[Cß[2Cßß[Cß[19;9H[0;1mFor[Cinformation[Con[Chow[Cwe[Ccan[Cdistribute[Cyour[Cprograms,[Ccall[Cus![20;30H(909)861-1616[CLaurence[21;1H [0m \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.d0x b/src/doors/smurfcombat/smurfdat.d0x new file mode 100644 index 0000000000..3679f8e4f7 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0x @@ -0,0 +1,8 @@ +The gain levels, first use all your arena turns every day, to do this press +a number from 1-10 (the 0 key is 10). Number 1 being the easiest, number 10 +being the hardest. + +Also, whenever you defeat a smurf, if he is of higher ranking than you, you +automatically jump up to his level, and he goes down to yours. If he has +better weapons or armor you also switch equipment in your favor. + diff --git a/src/doors/smurfcombat/smurfdat.d0z b/src/doors/smurfcombat/smurfdat.d0z new file mode 100644 index 0000000000..8d4deb52e1 --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.d0z @@ -0,0 +1 @@ +[40m[2J[2;7H[0;1;31m±±±±±±±±±±±[3;6H±±±±±±±±±±±±±[4;5H±±±±±±±[2C±±±±±±[8C[0;1mOrignal[CConcept,[CDesign,[Cand[CProgramming[Cby[0m:[5;5H[0;1;31;41m°°°°°°°[2C°°°°°°[6;5H°°°°°°°[2C°°°°°°[7;5H°°°°°°°[2C°°°°°°[2C[0;31mÜÜÜ[2CÜ[3CÜ[2CÜÜÜ[2CÛßßßÜ[8;5H[0;1;31;41m±±±±±±±[9C[0;31mÛ[3CÛ[CÜ[3CÜ[CÛ[3CÛ[CÜ[3CÜ[CÜßßßÜ[9;6H[0;1;31;41m±±±±±±±±±±±±±[2C[0;31mÛßßßß[CÛ[3CÛ[CÛßßßß[CÛßßßÜ[CÛÜÜÜÛ[10;14H[0;1;31;41m±±±±±±[C[0;31mÜ[3CÜ[2CÛ[CÛ[2CÜ[3CÜ[CÜ[3CÜ[CÜ[11;5H[0;1;31;41m°°°°°°°[2C°°°°°°[2C[0;31mßßß[4Cß[4Cßßß[8CßÜÜÜß[12;5H[0;1;31;41m°°°°°°°[2C°°°°°°[13;5H°°°°°°°[2C°°°°°°[2C°°°°°°°°°°°°°°°°°[14;5H[0;1;31m±±±±±±±[2C±±±±±±[2C[0;1;31;41m°°°°[10C°°°°°[15;6H[0;1;31m±±±±±±±±±±±±±[3C[0;1;31;41m°°°°[12C°°°°[8C[0;31mÜÜ[16;7H[0;1;31m±±±±±±±±±±±[4C[0;1;31;41m±±±±[12C±±±±[C[0;31mßßÛßÜ[CÛ[2Cß[6CÜÜÜ[2CßßßÜ[2CÜÜÜ[2CßßßÜ[17;22H[0;1;31;41m±±±±[12C±±±±[3C[0;31mÛ[4CßßÜ[CÜßßÜ[CÜ[2CÛ[CÛ[2CÛ[CÛ[3CÛ[CÛÜÜß[18;22H[0;1;31;41m±±±±[12C±±±±[3C[0;31mÛ[3CßÜÜß[Cß[2CÛ[CÛßßÜ[CÛ[2CÛ[CÛßßßß[Cß[2CÛ[19;22H[0;1;31;41m°°°°[12C°°°°[C[0;31mßßßßÜ[6CÛ[2CÜ[CÜ[2CÛ[Cßßß[2CÛ[3CÜ[Cß[2Cß[20;22H[0;1;31;41m°°°°[10C°°°°°[14C[0;31mßß[13Cßßß[21;22H[0;1;31;41m°°°°°°°°°°°°°°°°°[20;1H[0;1m [0m \ No newline at end of file diff --git a/src/doors/smurfcombat/smurfdat.h b/src/doors/smurfcombat/smurfdat.h new file mode 100644 index 0000000000..ebb159cffd --- /dev/null +++ b/src/doors/smurfcombat/smurfdat.h @@ -0,0 +1,190 @@ +char *__amiss[10] = { + "You can't faze it!", + "It absorbs the damage!", + "Your enemy stealthily dodges...", + "Your attack is blocked", + "It only smiles back", + "It takes in the damage", + "Your attacks are useless", + "You can't carry through the attack", + "It absorbs the damage", + "Its too fast for you" +}; + +char *__ahit[10] = { + "You do damage for", + "You cause him to convulse, damaging for", + "You bomb on him for", + "Your sexual prowess does him in for", + "You smurf him for", + "You smurf him for", + "You smurf him for", + "You smurf him for", + "You smurf him for", + "You send shockwaves through him" +}; + +char *_ettemorale[12] = { + "Inpersonal", + "Purely Sexual Relationship", + "Friendship", + "Infatuation", + "Admiration", + "Idolic Awe", + "Found Love", + "Passionate Sessions", + "Total Respect", + "Codependent Relationship", + "Marriage Status", + "Eternal Diamond Hard Dedication" +}; + +char *_morale[14] = { + "Godish Everybody's Idol Kinda ", /* 0 */ + "Heroish Women's Dream Kinda ", /* 1 */ + "Studly", /* 2 */ + "Cool", + "Flirtish", /* 4 */ + "Average", + "Creepy", /* 6 */ + "Annonyance", + "Public Offender", /* 8 */ + "Humiliated Sack Of Crap", + "Total Loss", /* 10 */ + "Embarrasment to The Program", + "Smurf Gladiator Wannabe", /* 12 */ + "Forenification Under Citizens Knowledge" /* 13 */ +}; + +char datasex[3][7] = {"Unkown", "Male", "Female"}; +char dataref[3][4] = {"It", "Him", "Her"}; +char dataref2[3][6] = {"Thing", "Guy", "Babe"}; +char dataref3[3][4] = {"It", "He", "She"}; + +char *defenemie[10][10] = { + "Spittle Smurf", "Wimpy Smurf", "Baby Mouse Smurf", + "Baby Smurf", "Bump on a Log", "Slime Mold", + "Blind Smurf", "Enormous Mushroom", "Really Fungii", "Democrat Smurf", /* Done */ + + "Jack Rabbit", "Brother Smurf", "Math Smurf", + "Nerd Smurf", "Poor Smurf", "Minor Smurf", + "Grouchy Smurf", "Golfer Smurf", "Baby Sister Smurf", "Clumsy Smurf", /* Done */ + + "Grounded Hog", "Shorty Smurf", "Mouse Smurf", + "Clown Smurf", "Drunk Smurf", "Teacher Smurf", + "Mouse", "Gymnastic Smurf", "Brainy Smurf", "Froggy", /* Done */ + + "Ugly Toad", "Stripper Smurf", "Doctor Smurf", + "Slugo Smurf", "Loser Smurf", "Professer Smurf", + "Mc Smurf", "Business Smurf", "Big Sister Smurf", "Warthog", /* Done */ + + "Rapper Smurf", "Ninja Smurf", "Nazi Smurf", + "Mob Smurf", "Lady Smurf", "Really Big Brother Smurf", /* Done? */ + "Dancing Smurf", "Handy Smurf", "Hit Smurf", "Cat", + + "Punk Smurf", "Assassin Smurf", "Drunk Smurf", + "Gestapo Smurf", "White Supremecy Smurf", "Boxer Smurf", + "Warrior Smurf", "Basketball Smurf", "Thief Smurf", "Gangmember Smurf", /* Done? */ + + "Werewolf Smurf", "Dog", "Drugie Smurf", + "Model Smurf", "Gladiator Smurf", "Tag Football Smurf", + "Rocker Smurf", "Republican Smurf", "Police Smurf", "Sadist Smurf", /* Done */ + + "Weresmurf", "Rich Smurf", "Jungle Smurf", + "Blue Supremecy Smurf", "Mafia Smurf", "Football Smurf", + "Smash Dance Smurf", "Water Smurf", "Guard Smurf", "Shock Smurf", /* Done? */ + + "Secret Service Smurf", "Weight Trainer Smurf", "Drug Dealer Smurf", + "Corporate Smurf", "NeoNazi Smurf", "Jr. Varsity Football Smurf", + "Ice-T Smurf", "Sniper Smurf", "Cyber Smurf", "Contruction Worker Smurf", /* Done? */ + + "Bodyguard Smurf", "REALLY Big Smurf", "Human", /* Done? */ + "Elite Smurf", "Spawn Smurf", "Commander Smurf", + "Terminator Smurf", "Big Black Smurf", "Varsity Football Smurf", "ProBasketball Smurf" +}; + +float defcprices[11] = {0, 1000, 10000, 50000, 100000, 500000, 1000000, 2000000, 5000000, 10000000, 100000000}; +char *defconfine[11] = {"Ropes", "Wooden Cage", "Basement", "Infirmary", "Catacombs", "Jail House", "Prison", "Pyramid", "Dungeon", "Fortress", "Underworld"}; +char *defweapon[21] = {"Bad Words", "Dandelion", + "Sun Flower Seeds", "Fountain Pen", + "Rubber Band", "Stick", + "Mace Spray", "Auto H2O Gun", + "H2O Uzi", "Kitchen Knife", + "Metal PVC", "Baseball Bat", + "Ice-T Album", "Satanic Rock CD", + "Dart Gun", "Magnum Handgun", + "Shotgun", "Uzi", + "Barrel Mach. Gun", "Holy Water", +"Holy Cross"}; +char *defarmor[21] = {"Middle Finger", "Smurf Cap", + "Smurf Attire", "Poor Wear", + "Rumble Wear", "No Fear Clothes", + "I'm a Vet Blazer", "Varsity Jacket", + "Mushroom Helmet", "Mushroom Shield", + "Mushroom Vest", "Mushroom Suit", + "Mushroom Armor", "Mushroom Costume", + "Cyber Armor", "Fission Suit", + "Fussion Suit", "WWIV Suit", + "Saint", "Blessed Pendant", +"Scapular"}; + +float defprices[21] = {0, 1000, 2000, 4000, 8000, 10000, 20000, 40000, 80000, 100000, 200000, 400000, 800000, 1000000, 2000000, 4000000, 8000000, 10000000, 20000000, 40000000, 100000000}; + +float defexper[52] = { + 0, + 1000, + 3000, + 6000, + 10000, + 15000, + 21000, + 28000, + 36000, + 45000, + 55000, /* 10 */ + + 66000, /* 11 */ + 78000, + 91000, + 105000, + 120000, + 136000, + 153000, + 171000, + 190000, + 210000, + + 231000, /* 21 */ + 252000, + 275000, + 299000, + 324000, + 350000, + 377000, + 405000, + 434000, + 464000, + 594000, + + 625000, /* 31 */ + 657000, + 690000, + 724000, + 759000, + 795000, + 832000, + 870000, + 909000, + 949000, + + 10000000, /* 41 */ + 30000000, + 60000000, + 100000000, + 150000000, + 210000000, + 280000000, + 360000000, + 500000000, /* 50 */ + 99999999999.0 +}; diff --git a/src/doors/smurfcombat/smurfday.c b/src/doors/smurfcombat/smurfday.c new file mode 100644 index 0000000000..fab5b77049 --- /dev/null +++ b/src/doors/smurfcombat/smurfday.c @@ -0,0 +1,293 @@ +#define DOSMODEONLY +#ifdef TODO_HEADERS +#include<dos.h> +#endif +#include<datewrap.h> +#include"smurfver.h" +#include"smurfgen.h" +#include"smurfdef.h" +#include"smurfdat.h" +#include"smurfsav.h" +#include"smurfbak.h" +int lgain[50] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +float gain[50] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +int freecost; +FILE *logstream; +char in2[40], senform[81]; + +void +checklevel(void) +{ + int getthis; + if (smurfexper[cyc] > defexper[smurflevel[cyc]]) { + smurflevel[cyc]++; + getthis = xp_random(8); + if (getthis < 3) { + smurfstr[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfspd[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfint[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfcon[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfbra[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfchr[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfstr[cyc] = smurfstr[cyc] + 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfspd[cyc] = smurfspd[cyc] + 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfint[cyc] = smurfint[cyc] + 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfcon[cyc] = smurfcon[cyc] + 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfbra[cyc] = smurfbra[cyc] + 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfchr[cyc] = smurfchr[cyc] + 6; + } + getthis = ((smurfcon[cyc] * .80) + (xp_random(smurfcon[cyc] / 10))); + smurfhpm[cyc] = smurfhpm[cyc] + getthis; + smurfhp[cyc] = smurfhpm[cyc]; + lgain[cyc]++; + } +} + +void +main(void) +{ + char proc, newdate[10], olddate[10]; + int turnsaday, defrounds, mod; + struct date d; + char intext[81]; + char stat[4][81]; + int ef = 0, gf = 0; + int hostage[1000], holder[1000], hcount; + getdate(&d); + + + textcolor(12); + cprintf("\n S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" Maintenance (24hr) Module\n\r"); + cprintf(" %sVersion %s\n\r", __vdaysp, __vday); + cprintf(" By Laurence Manhken\n\r"); + textcolor(14); + cprintf(" Automatic Re-roll\n\n\n\r"); + textcolor(9); + cprintf("Proceed [Yn]: "); + od_sleep(200); + textcolor(12); + cprintf("Yea (Forced)\n\n\r"); + textcolor(13); + cprintf("Reading Configuration: "); + od_sleep(200); + textcolor(14); + cprintf("Success.\n\r"); + sprintf(newdate, "%02d%02d%04d", d.da_day, d.da_mon, d.da_year); + stream = fopen("smurf.cfg", "r+"); + fscanf(stream, "%3s", intext); + defrounds = atoi(intext); + fscanf(stream, "%3s", intext); + turnsaday = atoi(intext); + fscanf(stream, "%8s", olddate); + fclose(stream); + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "%03i", defrounds); + fprintf(stream, "%03i", turnsaday); + fprintf(stream, "%8s", newdate); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day ###\n\r2. Turns/Day ###\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + textcolor(13); + cprintf("Loading Smurf Players: "); + od_sleep(200); + textcolor(14); + loadgame(); + backgame(); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Loading Hostage Intellegence: "); + od_sleep(200); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + od_sleep(50); + cprintf("."); + } cprintf("Success.\n\r"); + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + numhost[cyc2] = 0; + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == thisuserno) { + numhost[cyc2]++; + } + } + textcolor(13); + cprintf("Reseting Variables: "); + stream = fopen("smurf.hst", "a+"); + fclose(stream); + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + stream = fopen("smurf.hst", "w"); + fprintf(stream, "255255"); + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] != 255 && holder[cyc] != 255) + fprintf(stream, "%03d%03d", hostage[cyc], holder[cyc]); + fclose(stream); + + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + sleep(1); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + od_sleep(50); + cprintf("."); + smurfturns[cyc] = turnsaday; + } cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Animating Cpu Players: "); + od_sleep(100); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + if (realnumb[cyc] == 0) { + + for (cyc2 = 0; cyc2 < hcount; cyc2++) + if (hostage[cyc2] == cyc) { + if (smurflevel[hostage[cyc2]] > 0) + freecost = 5000; + if (smurflevel[hostage[cyc2]] > 5) + freecost = 10000; + if (smurflevel[hostage[cyc2]] > 10) + freecost = 20000; + if (smurflevel[hostage[cyc2]] > 20) + freecost = 100000; + smurfmoney[hostage[cyc2]] -= freecost; + smurfmoney[holder[cyc2]] += freecost; + if (smurfmoney[hostage[cyc2]] < 1) + smurfmoney[cyc2] = 0; + sprintf(senform, "smurflog.%03d", holder[cyc2]); + logstream = fopen(senform, "a+"); + fprintf(logstream, "%s payed %i for freedom!\n\r", smurfname[hostage[cyc2]], freecost); + fclose(logstream); + hostage[cyc2] = 255; + holder[cyc2] = 255; + od_sleep(200); + cprintf("$"); + } + od_sleep(200); + cprintf("@"); + for (cyc3 = 0; cyc3 < turnsaday; cyc3++) { + mod = smurflevel[cyc] / 2; + if (mod < 1) + mod = 1; + for (cyc2 = 0; cyc2 < defrounds; cyc2++) { + gf = xp_random(2 * 100 * (mod)) + 69 * mod; + ef = xp_random(2 * 100 * (mod)) + 69 * mod; + smurfmoney[cyc] = (smurfmoney[cyc] + gf); + smurfexper[cyc] = (smurfexper[cyc] + ef); + gain[cyc] = gain[cyc] + ef; + checklevel(); + } + checklevel(); + } + } else { + od_sleep(50); + cprintf("."); + } + } cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Saving Player Game File: "); + sleep(1); + textcolor(14); + savegame(); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Logon Log File: "); + stream = fopen("smurf.hst", "w"); + fprintf(stream, "255255"); + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] != 255 && holder[cyc] != 255) + fprintf(stream, "%03d%03d", hostage[cyc], holder[cyc]); + fclose(stream); + od_sleep(200); + stream = fopen("smurf.sel", "a+"); + fprintf(stream, "SPAWNDOS:) Logon Maintenance.\n\r"); + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Today Log File: "); + stream = fopen("smurf.new", "w+"); + od_sleep(200); + for (cyc = 0; cyc < noplayers; cyc++) { + if (realnumb[cyc] == 0) { + if (gain[cyc] > 0) + fprintf(stream, "%s gained %.0f experience\n\r", smurfname[cyc], gain[cyc]); + if (lgain[cyc] > 1) + fprintf(stream, "%s gained %i levels!\n\r", smurfname[cyc], lgain[cyc]); + if (lgain[cyc] == 1) + fprintf(stream, "%s gained a level!\n\r", smurfname[cyc]); + } + } + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); + stream = fopen("smurf.sel", "a+"); + fprintf(stream, "SPAWNDOS:) DISCONNECT Maintenance.\n\r"); + fclose(stream); +} diff --git a/src/doors/smurfcombat/smurfdef.h b/src/doors/smurfcombat/smurfdef.h new file mode 100644 index 0000000000..6b01ab8a92 --- /dev/null +++ b/src/doors/smurfcombat/smurfdef.h @@ -0,0 +1,209 @@ +#ifdef TODO_HEADERS +#include<process.h> +#include<dos.h> +#endif +#include<time.h> +#include<OpenDoor.h> +#include<stdio.h> +#include<string.h> +#include<ciolib.h> +#include<stdlib.h> +#include<genwrap.h> +#include<datewrap.h> +#define SD_GREEN 0x0a +#define SD_CYAN 0x0b +#define SD_RED 0x0c +#define SD_YELLOW 0x0e +int fix_mode = 0; /* 1 = patch to fix... */ +int corrupt_mode = 0; /* 1 = Corrupt to force error */ +unsigned fix_value; +int patch_overide = 1; /* MSC uses the checksum area ?! */ +int thishostcount = 0; +void __REG__main(void); +extern int registered; +void __SET__main(void); +void __mess(int x); +void detectwin(void); +void __CNV__main(void); +void __DAY__main(void); +void __NEW__main(void); +void wingame(void); +void wongame(void); +void killsmurf(int numba); +void what(void); +void __hit(int hit); +void __ehit(int hit, int numba); +void increasemorale(void); +void deductmorale(void); +void deductettemorale(void); +void __etteit(int a, int b, int c, unsigned long d); +void __incite(int x, int c, int y); +void killeduser(void); +void toomany(void); +void abilities(void); +void stealmoney(void); +void spy(void); +void inciterevolt(void); +void service(void); +void givemoney(void); +void rva(int sel__); +void ettemenu(void); +void rendezvous(void); +void killsmurf(int numba); +void treathostage(int mere); +void counthostages(void); +void asksex(void); +void detectsave(void); +void detectversion(void); +void hostagemenu(void); +void mustregister(void); +void tolocal(void); +void checkkey(void); +void automate(void); +void writehostage(void); +void phostage(void); +void notdone(void); +void registerme(void); +void heal(void); +void lastquote(void); +void userarena(void); +void arena(void); +void writeSGL(void); +void ettelist(int high); +void savegame(void); +void checklevel(void); +void loadgame(void); +void maint(int level); +void newplayer(int x); +void buyitem(void); +void buyconf(void); +void getcommand(void); +void titlescreen(void); +void displaystatus(void); +void checkstatus(void); +void smurf_pause(void); +void nl(void); +void displaymenu(void); +void itemlist(void); +void conflist(void); +void rankuserlist(int ink); +void userlist(int ink); +void changename(void); +void changelast(void); +int torturepoints, vpoints, etpoints; +int showexit, numhost[99]; +FILE *stream; +char registeredxx = 0; /* 1 if registered, 0 if not */ +char registered_name[201]; /* Name of registered user */ +int inuser, cyc, bbsexit, thisuserno, noplayers, displayreal, + cyc2, scrnlen, cyc3, enterpointer, epold, defturns = 3, + userhp, statis = 0, hostage[1000], holder[1000], hcount; +char tempenform[80]; +char logname[13]; +char power[41], weap[41], armr[41], ette[41], conf[41], host[41], + shost[10], bbsinkey; +char smurfname[99][41]; +char realname[99][41]; +int realnumb[99]; +char smurfweap[99][41]; +char smurfarmr[99][41]; +char smurftext[99][81]; +char smurfettename[99][41]; +int smurfettelevel[99]; +int smurfweapno[99]; +int smurfarmrno[99]; +char smurfconf[99][41]; +int smurfconfno[99]; +int smurfhost[99][10]; +int smurflevel[99]; +float smurfmoney[99]; +float smurfbankd[99]; +float smurfexper[99]; +int smurffights[99]; +unsigned int smurfwin[99]; +unsigned int smurflose[99]; +int smurfhp[99]; +int smurfhpm[99]; +unsigned int smurfstr[99]; +unsigned int smurfspd[99]; +unsigned int smurfint[99]; +unsigned int smurfcon[99]; +unsigned int smurfbra[99]; +unsigned int smurfchr[99]; +int smurfturns[99]; +int defrounds; +int roundsleft; +int turnsaday; +int smurfspcweapon[99][6]; +int smurfqtyweapon[99][6]; +char smurfsex[99]; +int __morale[99]; +int __ettemorale[99]; +void killsmurf(int numba); + +char *ettenamez[20] = { + "Jennifer", + "Cassie", + "Sassy", + "Wanda", + "Michelle", + "Elizabeth", + "Animal Babe", + "Estelle", + "Jenny", + "Bunga Babe", + "Rasta Babe", + "Troopet", + "Sophisticette", + "Teacher Ette", + "Waiter Ette", + "Play Thing", + "Flirt Ette", + "Fatty", + "Perfect Ette", + "Joanna" +}; + +char *enemieweap[10] = { + "Feet", "Body", "Bite", "Claws", "H2O Uzi", +"Rubber Band", "H2O Uzi", "Uzi", "Ice-T Album", "Stick"}; + +char *enemiearmr[10] = { + "No Armor", "Smurf Attire", "I'm a Vet Blazer", "Middle Finger", "Cyber Armor", + "Fission Suit", "Fusion Suit", "WWIV Suit", "Blessed Pendant", "No Fear Clothes" +}; + +char *defstartline[10] = { + "fires H2O at you!", "has you in his sights!", "bombards you with seeds!", + "is charging you!", "has you in his sights!", "launches a band at you!", + "rockets through the air!", "challenges you!", "turns up the bass", "flys into the arena!" +}; + +int eweapno[10][10] = { + 0, 1, 0, 0, 0, 1, 100, 100, 100, 2, + 1, 3, 3, 3, 2, 2, 0, 2, 3, 3, + 5, 4, 5, 4, 5, 5, 4, 101, 6, 5, + 103, 102, 7, 7, 6, 7, 7, 7, 7, 103, + 8, 9, 9, 9, 8, 8, 9, 9, 8, 104, + 12, 10, 10, 16, 12, 9, 10, 9, 7, 7, + 104, 103, 14, 102, 13, 9, 12, 14, 14, 8, + 103, 16, 100, 15, 16, 9, 12, 8, 8, 12, + 7, 10, 8, 17, 17, 10, 11, 17, 18, 15, + 17, 17, 101, 18, 18, 17, 16, 16, 15, 16 +}; + +int earmrno[10][10] = { + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109, + 109, 109, 109, 109, 109, 109, 109, 109, 109, 109 +}; + +void newshit(char shitlog[80]); +void logshit(int numba, char shitlog[80]); diff --git a/src/doors/smurfcombat/smurfdxx.c b/src/doors/smurfcombat/smurfdxx.c new file mode 100644 index 0000000000..7e133b8b3c --- /dev/null +++ b/src/doors/smurfcombat/smurfdxx.c @@ -0,0 +1,326 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! DXXRoll */ +/* REMOTE Maintenance Code: !-SIX-NINE-| Module */ +/* */ +/***************************************************************************/ + + + + + + + +/* #define DOSMODEONLY */ +/* #include"smurfver.h" */ +/* #include"smurfgen.h" */ +#include"smurfext.h" +/* #include"smurfdef.h" */ +/* #include"smurfdat.h" */ +/* #include"smurfsav.h" */ +#include"smurfbak.h" + +int lgain[50] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +float gain[50] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +unsigned long freecost; +FILE *logstream; +char in2[40], senform[81]; + +void +__DAY__checklevel(void) +{ + int getthis; + if (smurfexper[cyc] > defexper[smurflevel[cyc]]) { + smurflevel[cyc]++; + getthis = xp_random(8); + if (getthis < 3) { + smurfstr[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfspd[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfint[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfcon[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfbra[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfchr[cyc]++; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfstr[cyc] += 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfspd[cyc] += 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfint[cyc] += 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfcon[cyc] += 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfbra[cyc] += 6; + } + getthis = xp_random(8); + if (getthis < 3) { + smurfchr[cyc] += 6; + } + getthis = ((smurfcon[cyc] * .80) + (xp_random(smurfcon[cyc] / 10))); + smurfhpm[cyc] = smurfhpm[cyc] + getthis; + smurfhp[cyc] = smurfhpm[cyc]; + lgain[cyc]++; + } +} + +void +__DAY__main(void) +{ + char proc, newdate[10], olddate[10]; + int turnsaday, defrounds, mod; + struct date d; + char intext[81]; + char stat[4][81]; + int ef = 0, gf = 0; + int hostage[1000], holder[1000], hcount; + getdate(&d); + + textcolor(12); + cprintf("\n S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" Maintenance (24hr) Module\n\r"); + cprintf(" %sVersion %s\n\r", __vdaysp, __vday); + cprintf(" By Laurence Manhken\n\r"); + textcolor(14); + cprintf(" Daily Routine\n\n\n\r"); + textcolor(9); + cprintf("Proceed [Yn]: "); + od_sleep(200); + textcolor(12); + cprintf("Yea (Automatic)\n\n\r"); + textcolor(13); + cprintf("Reading Configuration: "); + od_sleep(200); + textcolor(14); + cprintf("Success.\n\r"); + sprintf(newdate, "%02d%02d%04d", d.da_day, d.da_mon, d.da_year); + stream = fopen("smurf.cfg", "r+"); + fscanf(stream, "%3s", intext); + defrounds = atoi(intext); + fscanf(stream, "%3s", intext); + turnsaday = atoi(intext); + fscanf(stream, "%8s", olddate); + fclose(stream); + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "%03i", defrounds); + fprintf(stream, "%03i", turnsaday); + fprintf(stream, "%8s", newdate); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day ###\n\r2. Turns/Day ###\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + textcolor(13); + cprintf("Loading Smurf Players: "); + od_sleep(200); + textcolor(14); + loadgame(); + backgame(); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Loading Hostage Intellegence: "); + od_sleep(200); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + od_sleep(50); + cprintf("."); + } + cprintf("Success.\n\r"); + + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + numhost[cyc2] = 0; + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == thisuserno) { + numhost[cyc2]++; + } + } + + textcolor(13); + cprintf("Reseting Variables: "); + + stream = fopen("smurf.hst", "a+"); + fclose(stream); + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + stream = fopen("smurf.hst", "w+"); + fprintf(stream, "255255"); + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] != 255 && holder[cyc] != 255) + fprintf(stream, "%03d%03d", hostage[cyc], holder[cyc]); + fclose(stream); + + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + sleep(1); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + od_sleep(50); + cprintf("."); + smurfturns[cyc] = turnsaday; + } + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Animating Cpu Players: "); + od_sleep(100); + textcolor(14); + for (cyc = 0; cyc < noplayers; cyc++) { + if (realnumb[cyc] == 0) { + + for (cyc2 = 0; cyc2 < hcount; cyc2++) + if (hostage[cyc2] == cyc) { + if (smurflevel[hostage[cyc2]] > 0) + freecost = 1000; + if (smurflevel[hostage[cyc2]] > 5) + freecost = 20000; + if (smurflevel[hostage[cyc2]] > 10) + freecost = 50000; + if (smurflevel[hostage[cyc2]] > 20) + freecost = 100000; + if (smurfmoney[hostage[cyc2]] < freecost) + smurfmoney[hostage[cyc2]] = freecost; + smurfmoney[hostage[cyc2]] -= freecost; + smurfmoney[holder[cyc2]] += freecost; + /* if(smurfmoney[hostage[cyc2]]<1)smurfmoney[cyc2]=0; */ + sprintf(senform, "smurflog.%03d", holder[cyc2]); + logstream = fopen(senform, "a+"); + fprintf(logstream, "%s payed %lu for freedom!\n\r", smurfname[hostage[cyc2]], freecost); + fclose(logstream); + hostage[cyc2] = 255; + holder[cyc2] = 255; + od_sleep(200); + cprintf("$"); + } + od_sleep(200); + cprintf("@"); + for (cyc3 = 0; cyc3 < turnsaday; cyc3++) { + mod = smurflevel[cyc] / 2; + if (mod < 1) + mod = 1; + for (cyc2 = 0; cyc2 < defrounds; cyc2++) { + gf = xp_random(2 * 100 * (mod)) + 69 * mod; + ef = xp_random(2 * 100 * (mod)) + 69 * mod; + smurfmoney[cyc] = (smurfmoney[cyc] + gf); + smurfexper[cyc] = (smurfexper[cyc] + ef); + gain[cyc] = gain[cyc] + ef; + } + __DAY__checklevel(); + __DAY__checklevel(); + } + } else { + od_sleep(50); + cprintf("."); + } + } cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Saving Player Game File: "); + stream = fopen("smurf.hst", "w+"); + fprintf(stream, "255255"); + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] != 255 && holder[cyc] != 255) + fprintf(stream, "%03d%03d", hostage[cyc], holder[cyc]); + fclose(stream); + + stream = fopen("smurf.hst", "r+"); + cyc = 0; + hcount = 0; + do { + fscanf(stream, "%3s%3s", intext, in2); + hostage[cyc] = atoi(intext); + holder[cyc] = atoi(in2); + cyc++; + hcount++; + } while (feof(stream) == 0); + fclose(stream); + + od_sleep(200); /* stream = fopen("smurf.log", + * "a+");fprintf(stream, "SPAWN:) + * Logon Maintenance.\n\r"); + * fclose(stream); */ + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Today Log File: "); + stream = fopen("smurf.new", "w+"); + od_sleep(200); + for (cyc = 0; cyc < noplayers; cyc++) { + if (realnumb[cyc] == 0) { + if (gain[cyc] > 0) + fprintf(stream, "%s gained %.0f experience\n\r", smurfname[cyc], gain[cyc]); + if (lgain[cyc] > 1) + fprintf(stream, "%s gained %i levels!\n\r", smurfname[cyc], lgain[cyc]); + if (lgain[cyc] == 1) + fprintf(stream, "%s gained a level!\n\r", smurfname[cyc]); + } + } + fclose(stream); + savegame(); + textcolor(14); + cprintf("Success.\n\r"); /* stream = fopen("smurf.log", + * "a+");fprintf(stream, "SPAWN:) + * Disconnect Maintenance.\n\r"); + * fclose(stream); */ +} diff --git a/src/doors/smurfcombat/smurfetc.c b/src/doors/smurfcombat/smurfetc.c new file mode 100644 index 0000000000..19a13375c1 --- /dev/null +++ b/src/doors/smurfcombat/smurfetc.c @@ -0,0 +1,604 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! ETCETERA */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" +#include "smurfsav.h" + + + + +void +automate(void) +{ + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("Computer Automate Player Character\n\n\r"); + od_set_colour(L_BLUE, D_BLACK); + od_printf("This function will change the real user number to 0 which will\n\r"); + od_printf("tell the Smurf Combat daily maintenance program to play this\n\r"); + od_printf("character, like grandpa smurf, papa smurf, shadow smurf, and\n\r"); + od_printf("rebel smurf.\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Automate %s [yN]: ", smurfname[thisuserno]); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') + od_printf("Yea\n\rAre You Sure [yN]: "); + else { + od_printf("Nope\n\n\r"); + return; + } bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + realnumb[thisuserno] = 0; + od_printf("Yea\n\n\rAutomated...\n\n\r"); + } else + od_printf("Nope\n\n\rNot Automated...\n\n\r"); +} + + + + + + + + + +void +givemoney(void) +{ + int ref[256], conflicted, listno; + char bbsin4[5], bbsin5[10]; + od_clr_scr(); + rankuserlist(3); + for (cyc = 0; cyc < noplayers; cyc++) { + conflicted = 0; + if (smurfexper[cyc] == 0) + listno--; + else { + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + if (smurfexper[cyc2] > smurfexper[cyc]) + conflicted++; + } + ref[conflicted] = cyc; + } + } + + for (cyc = 0; cyc < noplayers; cyc++) { + if (smurfexper[cyc] == 0) { + listno++; + ref[listno] = cyc; + } + } + + od_set_colour(L_CYAN, D_BLACK); + od_printf("You have %.0f gold on hand and %.0f in your hiding place.\n\n\r", smurfmoney[thisuserno], smurfbankd[thisuserno]); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("Give gold to who: "); + od_input_str(bbsin4, 4, '0', '9'); + od_set_colour(L_RED, D_BLACK); + if ((atoi(bbsin4)) == 0) { + nl(); + nl(); + od_printf("Aborted\n\n\r"); + return; + } + if ((atoi(bbsin4)) > noplayers) { + nl(); + nl(); + od_printf("No Such Player!\n\n\r"); + return; + } + od_set_colour(L_YELLOW, D_BLACK); + od_printf("Amount: "); + od_input_str(bbsin5, 9, '0', '9'); + od_set_colour(L_RED, D_BLACK); + if ((atof(bbsin5)) == 0) { + nl(); + nl(); + od_printf("Aborted\n\n\r"); + return; + } + if ((atof(bbsin5)) > smurfmoney[thisuserno]) { + nl(); + nl(); + od_printf("You don't have that much on hand!\n\n\r"); + return; + } + smurfmoney[thisuserno] -= (atof(bbsin5)); + smurfmoney[ref[(atoi(bbsin4)) - 1]] += (atof(bbsin5)); + savegame(); + nl(); + nl(); +} + + + + + +void buyitem(void){ + char bbsin[10]; + int numba; + float pp = 0; + pp = (smurfint[thisuserno] * .05); + if (pp > 1) + pp = 1; + /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "BUYIT(%i):",od_control.user_num);fprintf(stream, "%s + * ... ",smurfname[thisuserno]); */ + /* fclose(stream); */ + itemlist(); + od_set_attrib(SD_YELLOW); + od_printf("(B)uy (S)ell (C)onfines: "); + od_clear_keybuffer(); + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + switch (bbsinkey) { + case 'S': + case 's': + od_clr_scr(); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("Which One? (W)eapon (A)rmor :"); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_RED, D_BLACK); + if (bbsin[0] == 'W' || bbsin[0] == 'w') { + pp = (pp * defprices[smurfweapno[thisuserno]]); + od_printf("\n\rI'll give you %.0f for your %s, deal? ", pp, smurfweap[thisuserno]); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + smurfweapno[thisuserno] = 0; + od_printf("Yea\n\n\r"); +#ifdef TODO_WRAPPERS + strset(smurfweap[thisuserno], 0); +#else + memset(smurfweap[thisuserno], 0, sizeof(smurfweap[thisuserno])); +#endif + sprintf(smurfweap[thisuserno], "%s", defweapon[0]); + smurfmoney[thisuserno] = smurfmoney[thisuserno] + pp; + return; + } else { + od_printf("Nope\n\n\r"); + return; + } + } + if (bbsin[0] == 'A' || bbsin[0] == 'a') { + pp = (pp * defprices[smurfarmrno[thisuserno]]); + od_printf("\n\rI'll give you %.0f for your %s, deal? ", pp, smurfarmr[thisuserno]); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + smurfarmrno[thisuserno] = 0; + od_printf("Yea\n\n\r"); +#ifdef TODO_WRAPPERS + strset(smurfarmr[thisuserno], 0); +#else + memset(smurfarmr[thisuserno], 0, sizeof(smurfarmr[thisuserno])); +#endif + sprintf(smurfarmr[thisuserno], "%s", defarmor[0]); + smurfmoney[thisuserno] = smurfmoney[thisuserno] + pp; + return; + } else { + od_printf("Nope\n\n\r"); + return; + } + } od_printf("Neither.\n\n\r"); + return; + case 'B': + case 'b': + od_printf("Buy\n\rNumber: "); + od_set_colour(L_CYAN, D_BLACK); + od_input_str(bbsin, 2, '0', '9'); + numba = atoi(bbsin); + numba--; + if (numba < 0 || numba > 20) + return; + if (smurfmoney[thisuserno] < defprices[numba]) { + od_set_colour(L_RED, D_BLACK); + od_printf("\n\rNot enuff gold!\n\n\r"); + return; + } + od_clr_scr(); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("Which One? (W)eapon (A)rmor :"); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_RED, D_BLACK); + if (bbsin[0] == 'W' || bbsin[0] == 'w') { + od_printf("Weapon\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Number: %i\n\rWeapon: %s\n\rPrice: %.0f gold\n\rDamage: %i Points\n\n\r", numba + 1, defweapon[numba], defprices[numba], (numba + 1) * 5); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Buy it? "); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + od_printf("Yea\n\n\r"); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - defprices[numba]; + smurfweapno[thisuserno] = numba; +#ifdef TODO_WRAPPERS + strset(smurfweap[thisuserno], 0); +#else + memset(smurfweap[thisuserno], 0, sizeof(smurfweap[thisuserno])); +#endif + sprintf(smurfweap[thisuserno], "%s\0", defweapon[numba]); + return; + } od_printf("Nope\n\n\r"); + return; + } + if (bbsin[0] == 'A' || bbsin[0] == 'a') { + od_printf("Armor\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Number: %i\n\rArmor: %s\n\rPrice: %.0f gold\n\rRating: %i Points\n\n\r", numba + 1, defarmor[numba], defprices[numba], (numba + 1) * 4); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Buy it? "); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + od_printf("Yea\n\n\r"); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - defprices[numba]; + smurfarmrno[thisuserno] = numba; +#ifdef TODO_WRAPPERS + strset(smurfarmr[thisuserno], 0); +#else + memset(smurfarmr[thisuserno], 0, sizeof(smurfarmr[thisuserno])); +#endif + sprintf(smurfarmr[thisuserno], "%s\0", defarmor[numba]); + return; + } od_printf("Nope\n\n\r"); + return; + } + od_printf("Neither."); + return; + case 'P': + case 'p': + od_printf("Power Up!!\n\rNumber: "); + od_set_colour(L_CYAN, D_BLACK); + od_input_str(bbsin, 2, '0', '9'); + numba = atoi(bbsin); + numba--; + if (numba < 0 || numba > 20) + return; + if (smurfmoney[thisuserno] < defprices[numba]) { + od_set_colour(L_RED, D_BLACK); + od_printf("\n\rNot enuff gold!\n\n\r"); + return; + } + od_clr_scr(); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("Which One? (W)eapon (A)rmor :"); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_RED, D_BLACK); + if (bbsin[0] == 'W' || bbsin[0] == 'w') { + od_printf("Weapon\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Number: %i\n\rWeapon: %s\n\rPrice: %.0f gold\n\rDamage: %i Points\n\n\r", numba + 1, defweapon[smurfweapno[thisuserno]], defprices[numba], (numba + 1) * 5); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Power it up? "); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + od_printf("Yea\n\n\r"); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - defprices[numba]; + smurfweapno[thisuserno] = numba; + return; + } od_printf("Nope\n\n\r"); + return; + } + if (bbsin[0] == 'A' || bbsin[0] == 'a') { + od_printf("Armor\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Number: %i\n\rArmor: %s\n\rPrice: %.0f gold\n\rRating: %i Points\n\n\r", numba + 1, defarmor[smurfweapno[thisuserno]], defprices[numba], (numba + 1) * 4); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Power it up? "); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + od_printf("Yea\n\n\r"); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - defprices[numba]; + smurfarmrno[thisuserno] = numba; + return; + } od_printf("Nope\n\n\r"); + return; + } + od_printf("Neither."); + return; + case 'C': + case 'c': + buyconf(); + break; + } if (showexit == 0) { + showexit = 1; + od_printf("Exit\n\n\r"); + } +} + +void +tolocal(void) +{ + char inputline[80]; + od_clr_scr(); + od_set_colour(L_BLUE, D_BLACK); + od_printf("This function lets you say something to anyone who is watching for\n\rerror testing, or if you need help.\n\n\r"); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("(: "); + od_set_attrib(SD_GREEN); + od_input_str(inputline, 76, 32, 167); +} + + + +void +buyconf(void) +{ + char bbsin[10]; + int numba; + /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "BUYCF(%i):",od_control.user_num);fprintf(stream, "%s + * ... ",smurfname[thisuserno]); */ + /* fclose(stream); */ + conflist(); + od_set_attrib(SD_YELLOW); + od_printf("(U)pgrade (A)rmaments: "); + od_clear_keybuffer(); + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + switch (bbsinkey) { + case 'A': + case 'a': + buyitem(); + break; + case 'U': + case 'u': + od_printf("Upgrade\n\rNumber: "); + od_set_colour(L_CYAN, D_BLACK); + od_input_str(bbsin, 2, '0', '9'); + numba = atoi(bbsin); + numba--; + if (numba < 0 || numba > 20) + return; + if (smurfmoney[thisuserno] < defcprices[numba]) { + od_set_colour(L_RED, D_BLACK); + od_printf("\n\rNot enuff gold!\n\n\r"); + return; + } + od_clr_scr(); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Type: #%i\n\rConfine: %s\n\rPrice: %.0f gold\n\rEscape: %i%\n\n\r", numba + 1, defconfine[numba], defcprices[numba], 100 - (numba + 1) * 8); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Buy it? "); + bbsin[0] = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsin[0] == 'Y' || bbsin[0] == 'y') { + od_printf("Yea\n\n\r"); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - defcprices[numba]; + smurfconfno[thisuserno] = numba; +#ifdef TODO_WRAPPERS + strset(smurfconf[thisuserno], 0); +#else + memset(smurfconf[thisuserno], 0, sizeof(smurfconf[thisuserno])); +#endif + sprintf(smurfconf[thisuserno], "%s", defconfine[numba]); + return; + } break; + } if (showexit == 0) { + showexit = 1; + od_printf("Exit\n\n\r"); + } +} + + + + + + + + + + + + +void +itemlist(void) +{ + int max; /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "ILIST(%i):",od_control.user_num);fprintf(stream, "%s + * ... ",smurfname[thisuserno]); */ + /* fclose(stream); */ + od_clr_scr(); + if (displayreal == 1) + max = 20; + else + max = 18; + if (smurflevel[thisuserno] > 20) + max = 20; + od_set_attrib(SD_RED); + od_disp_str(" No. Weapon Armor Price \n\r"); + od_set_attrib(SD_YELLOW); + od_disp_str("------------------------------------------------------------\n\r"); + for (cyc = 0; cyc < max; cyc++) { + if (defprices[cyc] < smurfmoney[thisuserno] + smurfbankd[thisuserno]) + od_set_attrib(SD_GREEN); + else + od_set_colour(D_GREEN, D_BLACK); + od_printf(" %2i : ", cyc + 1); + od_set_colour(D_GREY, D_BLACK); + if (smurfweapno[thisuserno] == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-20s ", defweapon[cyc]); + od_set_colour(D_GREY, D_BLACK); + if (smurfarmrno[thisuserno] == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-20s ", defarmor[cyc]); + od_set_colour(D_GREY, D_BLACK); + od_printf("%10.0f\n\r", defprices[cyc]); + } nl(); +} + +void +conflist(void) +{ + int max; /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "CLIST(%i):",od_control.user_num);fprintf(stream, "%s + * ... ",smurfname[thisuserno]); */ + /* fclose(stream); */ + od_clr_scr(); + if (displayreal == 1) + max = 11; + else + max = 10; + if (smurflevel[thisuserno] > 30) + max = 11; + od_set_attrib(SD_RED); + od_disp_str(" No. Confine Name Price \n\r"); + od_set_attrib(SD_YELLOW); + od_disp_str("-------------------------------------------------\n\r"); + for (cyc = 0; cyc < max; cyc++) { + if (defcprices[cyc] < smurfmoney[thisuserno] + smurfbankd[thisuserno]) + od_set_attrib(SD_GREEN); + else + od_set_colour(D_GREEN, D_BLACK); /* od_set_attrib(SD_GREEN); */ + od_printf(" %2i : ", cyc + 1); + od_set_colour(D_GREY, D_BLACK); + if (smurfconfno[thisuserno] == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %10.0f\n\r", defconfine[cyc], defcprices[cyc]); + } + nl(); +} + + + + + + +void +smurf_pause(void) +{ + od_clear_keybuffer(); + od_set_attrib(SD_CYAN); + od_disp_str("\r(-*-)"); + od_get_key(TRUE); + od_clr_line(); + od_disp_str("\r "); + nl(); +} + +void +nl(void) +{ + od_printf("\n\r"); +} + +void +lastquote(void) +{ + if (!statis) { + od_set_colour(L_CYAN, D_BLACK); + od_printf("Laurence: Hey, before you go, I was just wondering how come your\n\r"); + od_printf(" SysOp didn't register this program, I mean it's ONLY $9!!!\n\n\r"); + /* sleep(2); */ od_set_colour(L_WHITE, D_BLUE); + od_printf("REGISTER ME!"); + od_set_colour(7, 0); + od_printf(" \n\n\r"); /* sleep(3); */ + } +} + +void +asksex(void) +{ + od_set_colour(L_BLUE, D_BLACK); + od_printf("\n\n\rMale or Female? [Mf]: "); + bbsinkey = od_get_key(TRUE); + od_set_colour(L_RED, D_BLACK); + if (bbsinkey == 'F' || bbsinkey == 'f') { + od_printf("Femme\n\r"); + smurfsex[thisuserno] = 002; + smurf_pause(); + return; + } + od_set_colour(D_CYAN, D_BLACK); + od_printf("Male\n\r"); + smurfsex[thisuserno] = 001; + smurf_pause(); +} + + + + + + + + + + +void +rankuserlist(int ink) +{ + int ref[100], conflicted, listno; + listno = noplayers; + if (ink == 1) + listno = 10; + if (ink == 2) + listno = 20; + if (listno > noplayers) + listno = noplayers; + od_disp_str("\n\n\rProcessing....."); + od_sleep(100); + for (cyc = 0; cyc < noplayers; cyc++) { + conflicted = 0; + if (smurfexper[cyc] == 0) + listno--; + else { + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + if (smurfexper[cyc2] > smurfexper[cyc]) + conflicted++; + } + ref[conflicted] = cyc; + } + } + od_clr_scr(); + od_set_attrib(SD_RED); + od_disp_str(" No. Smurf Name Level Wins:Loss Conf Smurfette Morale\n\r"); + od_set_attrib(SD_YELLOW); + od_disp_str("-------------------------------------------------------------------------\n\r"); + for (cyc = 0; cyc < listno; cyc++) { + od_set_attrib(SD_GREEN); + if (thisuserno == ref[cyc]) + od_set_colour(L_CYAN, D_BLACK); + for (cyc3 = 0; cyc3 < hcount; cyc3++) + if (hostage[cyc3] == ref[cyc]) + od_set_colour(D_GREEN, D_BLACK); + od_printf(" %2i : ", cyc + 1); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == ref[cyc]) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %2i %4i:%4i %4i %4i %3i%% %5i%%\n\r", smurfname[ref[cyc]], smurflevel[ref[cyc]], smurfwin[ref[cyc]], smurflose[ref[cyc]], smurfconfno[ref[cyc]], smurfettelevel[ref[cyc]], __ettemorale[ref[cyc]], 130 - __morale[ref[cyc]] * 10); + } + for (cyc = 0; cyc < noplayers; cyc++) { + if (smurfexper[cyc] == 0) + if ((ink == 1 && listno < 10) || (ink == 2 && listno < 20) || ink == 3) { + listno++; + od_set_attrib(SD_GREEN); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + for (cyc3 = 0; cyc3 < hcount; cyc3++) + if (hostage[cyc3] == cyc) + od_set_colour(D_GREEN, D_BLACK); + od_printf(" %2i : ", listno); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %2i %4i:%4i %4i %4i %3i%% %5i%%\n\r", smurfname[cyc], smurflevel[cyc], smurfwin[cyc], smurflose[cyc], smurfconfno[cyc], smurfettelevel[cyc], __ettemorale[cyc], 130 - __morale[cyc] * 10); + } + } nl(); +} diff --git a/src/doors/smurfcombat/smurfetc.h b/src/doors/smurfcombat/smurfetc.h new file mode 100644 index 0000000000..a48c5e0542 --- /dev/null +++ b/src/doors/smurfcombat/smurfetc.h @@ -0,0 +1,2 @@ +int thishostcount = 0; +void detectsave(void); diff --git a/src/doors/smurfcombat/smurfext.h b/src/doors/smurfcombat/smurfext.h new file mode 100644 index 0000000000..3fca106b72 --- /dev/null +++ b/src/doors/smurfcombat/smurfext.h @@ -0,0 +1,173 @@ +#ifdef TODO_HEADERS +#include<process.h> +#include<dos.h> +#endif +#include<time.h> +#include<OpenDoor.h> +#include<stdio.h> +#include<string.h> +#include<ciolib.h> +#include<stdlib.h> +#include<genwrap.h> +#define SD_GREEN 0x0a +#define SD_CYAN 0x0b +#define SD_RED 0x0c +#define SD_YELLOW 0x0e +extern void __REG__main(void); +extern int registered; +extern int thishostcount; +extern void __SET__main(void); +extern void __mess(int x); +extern void detectwin(void); +extern void __CNV__main(void); +extern void __DAY__main(void); +extern void __NEW__main(void); +extern void wingame(void); +extern void wongame(void); +extern void killsmurf(int numba); +extern void treathostage(int mere); +extern void what(void); +extern void __hit(int hit); +extern void __ehit(int hit, int numba); +extern void increasemorale(void); +extern void deductmorale(void); +extern void deductettemorale(void); +extern void __etteit(int a, int b, int c, unsigned long d); +extern void __incite(int x, int c, int y); +extern void killeduser(void); +extern void toomany(void); +extern void abilities(void); +extern void stealmoney(void); +extern void spy(void); +extern void inciterevolt(void); +extern void service(void); +extern void givemoney(void); +extern void rva(int sel__); +extern void ettemenu(void); +extern void rendezvous(void); +extern void counthostages(void); +extern void asksex(void); +extern void detectsave(void); +extern void detectversion(void); +extern void hostagemenu(void); +extern void mustregister(void); +extern void tolocal(void); +extern void checkkey(void); +extern void automate(void); +extern void writehostage(void); +extern void phostage(void); +extern void notdone(void); +extern void registerme(void); +extern void heal(void); +extern void lastquote(void); +extern void userarena(void); +extern void arena(void); +extern void writeSGL(void); +extern void ettelist(int high); +extern void savegame(void); +extern void checklevel(void); +extern void loadgame(void); +extern void maint(int level); +/* extern void maint(void); */ +extern void newplayer(int x); +extern void buyitem(void); +extern void buyconf(void); +extern void getcommand(void); +extern void titlescreen(void); +extern void displaystatus(void); +extern void checkstatus(void); +extern void smurf_pause(void); +extern void nl(void); +extern void displaymenu(void); +extern void itemlist(void); +extern void conflist(void); +extern void rankuserlist(int ink); +extern void userlist(int ink); +extern void changename(void); +extern void changelast(void); +extern char tempenform[80]; +extern char datasex[3][7]; +extern char dataref[3][4]; +extern char dataref2[3][6]; +extern char dataref3[3][4]; +extern int torturepoints, vpoints, etpoints; +extern int showexit, numhost[99]; +extern FILE *stream; +extern char registeredxx; /* 1 if registered, 0 if not */ +extern char registered_name[201]; /* Name of registered user */ +extern int inuser, cyc, bbsexit, thisuserno, noplayers, displayreal, + cyc2, scrnlen, cyc3, enterpointer, epold, defturns, userhp, + statis, hostage[1000], holder[1000], hcount; +extern char logname[13]; +extern char power[41], weap[41], armr[41], ette[41], conf[41], host[41], + shost[10], bbsinkey; +extern char smurfname[99][41]; +extern char realname[99][41]; +extern int realnumb[99]; +extern char smurfweap[99][41]; +extern char smurfarmr[99][41]; +extern char smurftext[99][81]; +extern char smurfettename[99][41]; +extern int smurfettelevel[99]; +extern int smurfweapno[99]; +extern int smurfarmrno[99]; +extern char smurfconf[99][41]; +extern int smurfconfno[99]; +extern int smurfhost[99][10]; +extern int smurflevel[99]; +extern float smurfmoney[99]; +extern float smurfbankd[99]; +extern float smurfexper[99]; +extern int smurffights[99]; +extern unsigned int smurfwin[99]; +extern unsigned int smurflose[99]; +extern int smurfhp[99]; +extern int smurfhpm[99]; +extern unsigned int smurfstr[99]; +extern unsigned int smurfspd[99]; +extern unsigned int smurfint[99]; +extern unsigned int smurfcon[99]; +extern unsigned int smurfbra[99]; +extern unsigned int smurfchr[99]; +extern int smurfturns[99]; +extern int defrounds; +extern int roundsleft; +extern int turnsaday; +extern int smurfspcweapon[99][6]; +extern int smurfqtyweapon[99][6]; +extern char smurfsex[99]; +extern char *enemieweap[10]; +extern char *defstartline[10]; +extern int eweapno[10][10]; +extern int earmrno[10][10]; +extern char *defenemie[10][10]; +extern float defcprices[11]; +extern char *defconfine[11]; +extern char *defweapon[21]; +extern char *defarmor[21]; +extern float defprices[21]; +extern float defexper[51]; +extern char *enemieweap[10]; +extern char *enemiearmr[10]; +extern char *ettenamez[20]; +extern int __morale[99]; +extern int __ettemorale[99]; +extern char *_morale[14]; +extern char *_ettemorale[12]; +extern char *__ahit[10]; +extern char *__amiss[10]; +extern char *__version; +extern char *__vspace; +extern char *__saveversion; +extern char *__vnew; +extern char *__vnewsp; +extern char *__vday; +extern char *__vdaysp; +extern char *__vcnv; +extern char *__vcnvsp; +extern char *__vkey; +extern char *__vkeysp; +extern char *__vlog; +extern char *__vlogsp; +extern void newshit(char shitlog[80]); +extern void logshit(int numba, char shitlog[80]); diff --git a/src/doors/smurfcombat/smurfgen.c b/src/doors/smurfcombat/smurfgen.c new file mode 100644 index 0000000000..436f463342 --- /dev/null +++ b/src/doors/smurfcombat/smurfgen.c @@ -0,0 +1,112 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! GENERAL */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" + + + + + +/* +-----------------------| +---------------+----------| | 0 | Black + * | | 0 | Black | Off | | 1 | Blue | | 1 | Blue + * | Off | | 2 | Green | | 2 | Green | Off | | 3 + * | Cyan | | 3 | Cyan | Off | | 4 | Red + * | | 4 | Red | Off | | 5 | Magenta | | 5 | Magenta + * | Off | | 6 | Brown | | 6 | Brown | Off | | 7 + * | White (grey) | | 7 | White | Off | | 8 | Bright Black + * | | 8 | Black | On | | 9 | Bright Blue | | 9 | Blue + * | On | | a | Bright Green | | a | Green | On | | b + * | Bright Cyan | | b | Cyan | On | | c | Bright Red + * | | c | Red | On | | d | Bright Magenta | | d | Magenta + * | On | | e | Yellow | | e | Brown | On | | f + * | White (bright) | | f | White | On | + * +-----------------------+ +--------------------------+ */ + + +void +titlescreen(void) +{ + char spacing[81]; + int spacz; +#ifdef TODO_WRAPPERS + strset(spacing, 0); +#else + memset(spacing, 0, sizeof(spacing)); +#endif + detectwin(); + if (!statis) + sprintf(registered_name, "UNREGISTERED"); + /* spacz=((80-(strlen(registered_name)+17))/2+1); + * for(cyc=0;cyc<spacz;cyc++)strcat(spacing," + * ");od_set_colour(L_BLUE,D_BLACK); od_clr_scr(); + * od_set_attrib(SD_CYAN); od_disp_str("\n\rYou grin as a crackling + * sounds beneath your feet . . .\n\n\n\n\r"); od_set_attrib(SD_RED); + * od_disp_str(" SúMúUúRúF + * CúOúMúBúAúT\n\n\n\r"); od_set_attrib(SD_YELLOW);od_disp_str(" + * By Severe Disorder\n\r"); textcolor(15); cprintf (" + * (Laurence Manhken)\n\r"); od_set_attrib(SD_GREEN); od_printf (" + * %sVersion %s\n\n\r",__vspace,__version); od_set_attrib(SD_GREEN); + * od_disp_str(" Copyright + * 1993\n\n\n\r"); */ + od_send_file("smurfnew.nfo"); + + od_set_colour(7, 0); + od_printf("Registered to: "); + od_printf("%s\n\r", registered_name); + + if (!statis) { + od_printf(" Note that this copy is unregistered and registration is "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("only $9.\n\r"); + sleep(2); + } else + od_printf(" Thank your SysOp for registering me!\n\r"); + smurf_pause(); + od_send_file("smurfver.nfo"); + smurf_pause(); + od_clr_scr(); + od_set_color(7, 0); + od_send_file("smurfsal.nfo"); + smurf_pause(); +} + + + + +void +displaymenu(void) +{ + /* stream = fopen("SMURF.LOG", "a+"); fprintf(stream, + * "DMAIN(%i):",od_control.user_num);fprintf(stream, "%s ... + * ",smurfname[thisuserno]);fclose(stream); */ + od_clr_scr(); + od_set_attrib(SD_RED); + od_disp_str(" \nSúMúUúRúF CúOúMúBúAúT\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf(" n Combat Arena Level (1-10) ? Display Smurf Menu\n\r"); + od_printf(" A Attack Another Smurf R Rank Other Smurfs\n\r"); + od_printf(" G Give money to Smurf H Heal Injuries\n\r"); + od_printf(" L List Armaments P Purchase Armaments\n\r"); + od_printf(" B Swap Abilities C Upgrade Confinment\n\r"); + od_printf(" S Smurf Status Z Spy On Another Smurf\n\r"); + od_printf(" + Hide All Your Money - Get Money from Hiding Place\n\r"); + od_printf(" !AUTO Kill Character !REROLL Reroll Character\n\r"); + od_printf("\n\r"); + od_printf(" ( Rendez Vous Menu ) Smurfette Menu\n\r"); + od_printf(" * Civil Operations Menu %% Secret Service\n\r"); + od_printf(" ~ Instructions ** ^ Hostage Menu\n\r"); + od_printf(" # Change Last Words & Change Smurf Alias\n\r"); + od_printf("\n\n\r"); +} diff --git a/src/doors/smurfcombat/smurfgen.h b/src/doors/smurfcombat/smurfgen.h new file mode 100644 index 0000000000..b46b2c7b8c --- /dev/null +++ b/src/doors/smurfcombat/smurfgen.h @@ -0,0 +1,5 @@ +#include<datewrap.h> +struct date d; +int timeoud = 0, tcount = 0; +char intext[81], olddate[10]; +char proc; diff --git a/src/doors/smurfcombat/smurfhst.c b/src/doors/smurfcombat/smurfhst.c new file mode 100644 index 0000000000..7ee03f16a7 --- /dev/null +++ b/src/doors/smurfcombat/smurfhst.c @@ -0,0 +1,489 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! HOSTAGE */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include <genwrap.h> +#include "smurfext.h" + + + + + +void +hostagemenu(void) +{ + int quit = 0, tnumba, thishostcount, numba; + char bbsin500[10], enform[20]; + __mess(4); + do { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf(" [ Hostage Menu ]\n\r"); + nl(); + thishostcount = 0; + od_set_colour(D_RED, D_BLACK); + od_printf(" Hostages: "); + od_set_colour(L_BLUE, D_BLACK); + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == thisuserno) { + thishostcount++; + od_printf("%s\n\r ", smurfname[hostage[cyc]]); + } + if (thishostcount == 0) + od_printf("NONE\n\r"); + od_set_colour(D_RED, D_BLACK); + od_printf("\r Total: "); + od_set_colour(L_BLUE, D_BLACK); + od_printf("%d\n\n\r", thishostcount); + od_set_colour(L_CYAN, D_BLACK); + od_printf(" No Treatment Name Pts\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [1] Torture Hostage 1\n\r"); + od_printf(" [2] Abuse Hostage 3\n\r"); + od_printf(" [3] Batter Hostage 6\n\r"); + od_printf(" [4] Transfer Hostage 0\n\r"); + od_printf(" [5] Release Hostage 0\n\r"); + od_printf(" [?] Hostage Help\n\r"); + od_printf(" [Q] Quit Menu\n\n\r"); + + od_set_colour(L_GREEN, D_BLACK); + od_printf(" Points Remaining: %i\n\r", torturepoints); + od_set_colour(D_GREEN, D_BLACK); + if (statis) + od_printf(" Your Choice [1-5,Q]: ? "); + if (!statis) + od_printf(" Your Choice [1-4,V,Q]: ? "); + bbsinkey = od_get_key(TRUE); + + switch (bbsinkey) { + case '1': + treathostage(1); + break; + case '2': + treathostage(2); + break; + case '3': + treathostage(3); + break; + case '4': + od_printf("\n\n\rTransfer Who (1-%i): ", thishostcount); + od_input_str(bbsin500, 2, '0', '9'); + numba = atoi(bbsin500); + if (numba > 0 && numba <= noplayers) { + userlist(1); + od_printf("\n\rTo Who (1-%i): ", noplayers); + od_input_str(bbsin500, 2, '0', '9'); + tnumba = atoi(bbsin500); + od_set_colour(L_BLUE, D_BLACK); + od_printf("Are You Sure [yN]: "); + od_set_colour(L_CYAN, D_BLACK); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\n\r"); + cyc3 = 0; + for (cyc = 0; cyc3 < numba; cyc++) { + if (holder[cyc] == thisuserno) + cyc3++; + } cyc--; + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s transfered.\n\n\r", smurfname[hostage[cyc]]); + sprintf(tempenform, "%s *TRADED* you to %s!!!\n\r", smurfname[thisuserno], smurfname[tnumba - 1]); + logshit(hostage[cyc], tempenform); + holder[cyc] = tnumba - 1; + writehostage(); + } else + od_printf("Nope\n\n\r"); + smurf_pause(); + } break; + case '5': + od_printf("\n\n\rRelease Who (1-%i): ", thishostcount); + od_input_str(bbsin500, 2, '0', '9'); + numba = atoi(bbsin500); + if (numba > 0 && numba <= thishostcount) { + od_set_colour(L_BLUE, D_BLACK); + od_printf("Are You Sure [yN]: "); + od_set_colour(L_CYAN, D_BLACK); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\n\r"); + cyc = 0; + for (cyc3 = 0; cyc < numba; cyc3++) { + if (holder[cyc3] == thisuserno) + cyc++; + } cyc = cyc3 - 1; + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s released.\n\n\r", smurfname[hostage[cyc]]); + sprintf(tempenform, "%s *FREED* You!!!\n\r", smurfname[thisuserno]); + logshit(hostage[cyc], tempenform); + if (xp_random(20) == 1) { + increasemorale(); + nl(); + } + holder[cyc] = 255; + hostage[cyc] = 255; + writehostage(); + } else + od_printf("Nope\n\n\r"); + smurf_pause(); + } break; + case '?': + od_clr_scr(); + od_send_file("smurfdat.d03"); + smurf_pause(); + break; + case 'Q': + case 'q': + nl(); + nl(); + quit = 1; + break; + } + } while (quit != 1); + writehostage(); + savegame(); + counthostages(); +} + + +void +treathostage(int mere) +{ + int fatality; + int total = 0; + int thishostcount, numba; + char bbsin500[10]; + int tcost = 0; + fatality = mere * 20 + 20 * smurfsex[hostage[cyc]] - 20; + thishostcount = 0; + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == thisuserno) + thishostcount++; + total = 0; + od_printf("\n\n\rHostage (1-%i): ", thishostcount); + od_input_str(bbsin500, 2, '0', '9'); + numba = atoi(bbsin500); + if (numba > 0 && numba <= thishostcount) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("Fatality will result in negative effect! (%d percent chance)\n\r", fatality); + od_set_colour(L_BLUE, D_BLACK); + od_printf("Proceed [yN]: "); + od_set_colour(L_CYAN, D_BLACK); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\n\r"); + cyc = 0; + for (cyc3 = 0; cyc < numba; cyc3++) { + if (holder[cyc3] == thisuserno) + cyc++; + } + od_clr_scr(); + cyc = cyc3 - 1; + if (mere == 1) + tcost = 1; + if (mere == 2) + tcost = 3; + if (mere == 3) + tcost = 6; + if (torturepoints < tcost) { + od_printf("Urr, I think you've had enuff...\n\n\r"); + smurf_pause(); + return; + } torturepoints -= tcost; + od_set_color(D_GREEN, D_BLACK); + if (mere == 1) + od_printf("Torture Hostage: Attempting to inflict bodily harm with risk of overkill.\n\n\r"); + if (mere == 2) + od_printf("Abuse Hostage: Physical or Sexual abuse with high risk of overkill.\n\n\r"); + if (mere == 3) + od_printf("Batter Hostage: Severe torture and/or abuse with intent of fatality.\n\n\r"); + od_set_colour(L_CYAN, D_BLACK); + od_printf("Subject: %s%d\n\r", smurfname[hostage[cyc]], cyc); + od_printf("Gender: %s\n\r", datasex[smurfsex[hostage[cyc]]]); + od_printf("Fatality: %i\%\n\n\r", fatality); + od_set_colour(L_BLUE, D_BLACK); + total = 0; + + for (cyc3 = 0; cyc3 < 10; cyc3++) { + cyc2 = xp_random(100); + if (cyc2 < 20) + od_printf("ú"); + if (cyc2 < 40) + od_printf("-"); + if (cyc2 < 60) + od_printf("="); + if (cyc2 < 81) + od_printf("ð"); + if (cyc2 > 80) + od_printf("þ"); + total += cyc2; + od_sleep(200); + } + if (mere == 1) { + sprintf(tempenform, "%s Tortured %s!\n\r", smurfname[thisuserno], smurfname[hostage[cyc]]); + newshit(tempenform); + } + if (mere == 2) { + sprintf(tempenform, "%s ABUSED %s!!!\n\r", smurfname[thisuserno], smurfname[hostage[cyc]]); + newshit(tempenform); + } + if (mere == 3) { + sprintf(tempenform, "%s *BATTERED* %s!!!!!!!!!!\n\r", smurfname[thisuserno], smurfname[hostage[cyc]]); + newshit(tempenform); + } + if (total < fatality * 10) { + od_printf("°"); + od_sleep(200); + od_printf("÷"); + od_sleep(200); + od_printf("±"); + od_sleep(200); + od_printf("²"); + od_sleep(200); + od_printf("÷"); + od_sleep(200); + od_printf("Û\n\n\r"); + od_sleep(200); + killsmurf(hostage[cyc]); + hostage[cyc] = 255; + holder[cyc] = 255; + writehostage(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("You lose control, brutally beating %s.\n\r", dataref[smurfsex[hostage[cyc]]]); + sleep(1); + od_printf("A grin of satisfaction crosses your face as blue blood slowly covers\n\r"); + od_printf("the cubicle...\n\n\r"); + sleep(1); + od_set_colour(L_RED, D_BLACK); + sprintf(tempenform, "Hostage: %s *KILLED* %s!!!\n\r", smurfname[thisuserno], smurfname[hostage[cyc]]); + newshit(tempenform); + od_printf("Fatality...\n\n\r"); + sleep(2); + od_set_colour(D_RED, D_BLACK); + deductmorale(); + od_printf("Experience Points Lost!\n\r"); + od_sleep(100); + if (smurflevel[thisuserno] > 0) + smurfexper[thisuserno] = defexper[smurflevel[thisuserno] - 1]; + else + smurfexper[thisuserno] = 0; + od_printf("Hit Points Lost!\n\r"); + od_sleep(100); + smurfhpm[thisuserno] *= .8; + od_printf("Loss Tally Increased!\n\n\r"); + od_sleep(100); + smurflose[thisuserno] += (xp_random(5) + 5); + } else + od_printf("\n\n\rAs you walk away you say 'Damn That Felt GOOD!'\n\n\r"); + } else + od_printf("Nope\n\n\r"); + smurf_pause(); + } +} + + + + + + + + + + + + + + +void +phostage(void) +{ + char logname[13]; + unsigned int escape = 0, thishostno = 255, freecost = 10000; + for (cyc = 0; cyc < hcount; cyc++) + if (hostage[cyc] == thisuserno) + thishostno = cyc; + smurfmoney[thisuserno] = smurfmoney[thisuserno] + smurfbankd[thisuserno]; + smurfbankd[thisuserno] = 0; + if (smurflevel[thisuserno] > 0) + freecost = 1000; + if (smurflevel[thisuserno] > 5) + freecost = 20000; + if (smurflevel[thisuserno] > 10) + freecost = 50000; + if (smurflevel[thisuserno] > 20) + freecost = 100000; + do { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("You are the hostage of %s!\n\n\r", smurfname[holder[thishostno]]); + od_set_colour(L_BLUE, D_BLACK); + od_printf("The chance of escape is %i percent.\n\r", 100 - (smurfconfno[holder[thishostno]] + 1) * 8); + od_printf("Turns Left: %i\n\r", smurfturns[thisuserno]); + od_printf("It'll cost you %i gold to buy your freedom.\n\r", freecost); + od_printf("Gold on you is %.0f.\n\r", smurfmoney[thisuserno]); + od_printf("He'll give you %i gold for working.\n\r", smurflevel[thisuserno] * 100); + od_printf("You can trade your weapons and armor for gold.\n\r", smurfmoney[thisuserno]); + od_set_colour(D_CYAN, D_BLACK); + od_printf("\n\r(E)scape (T)rade (P)ayup (W)ork (S)UICIDE!!!!!\n\r"); + if (smurffights[thisuserno] < 1) { + od_set_colour(L_RED, D_BLACK); + od_printf("You rot in your cubicle while waiting your next turn...\n\n\r"); + lastquote(); + od_exit(10, FALSE); + } + od_set_colour(L_CYAN, D_BLACK); + od_printf("\n\rHostage [etpwqs?]: "); + od_clear_keybuffer(); + bbsinkey = od_get_key(TRUE); + switch (bbsinkey) { + case 'T': + case 't': + buyitem(); + break; + case 'E': + case 'e': + case 'Q': + case 'q': + escape = 1; + break; + case 'W': + case 'w': + smurfmoney[thisuserno] = smurfmoney[thisuserno] + smurflevel[thisuserno] * 100; + od_printf("\n\n\r"); + bbsexit = 1; + break; + case 'P': + case 'p': + if (smurfmoney[thisuserno] > freecost) { + sprintf(tempenform, "%s payed %i for freedom!\n\r", smurfname[thisuserno], freecost); + logshit(holder[thishostno], tempenform); + smurfmoney[thisuserno] = smurfmoney[thisuserno] - freecost; + smurfmoney[holder[thishostno]] = smurfmoney[holder[thishostno]] + freecost; + freecost = 0; + od_printf("\n\n\rHe excepts the money...\n\n\r"); + } else { + od_printf("\n\n\rNot enuff gold!\n\r"); + smurf_pause(); + } break; + case 'S': + case 's': + killsmurf(thisuserno); + od_clr_scr(); + od_printf("Death becomes you.\n\r"); + smurf_pause(); + savegame(); + od_exit(0, FALSE); + break; + case '?': + case '*': + od_set_colour(L_RED, D_BLACK); + od_printf("\n\n\r(E)scape (T)rade (P)ayup (W)ork (S)UICIDE!!!!!\n\n\r"); + smurf_pause(); + break; + } + } while (freecost > 0 && bbsexit != 1 && escape != 1); + smurfbankd[thisuserno] = smurfbankd[thisuserno] + smurfmoney[thisuserno]; + smurfmoney[thisuserno] = 0; + if (escape == 1) { + od_clr_scr(); + od_set_colour(L_BLUE, D_BLACK); + od_printf("You await nightfall . . ."); + sleep(2); + od_printf("\n\n\rYou take advantage of your dimly lit surroundings to try to escape!"); + sleep(2); + od_set_colour(L_RED, D_BLACK); + if (xp_random(101) > (smurfconfno[holder[thishostno]] + 1) * 8) { + od_printf("\n\n\rYou escape successfully!\n\n\r"); + escape = 3; + od_set_colour(L_YELLOW, D_BLACK); + od_printf("You can play if you have more turns next game ...\n\n\r"); + } else { + sprintf(tempenform, "%s ATTEMPTED ESCAPE!\n\r", smurfname[thisuserno]); + logshit(holder[thishostno], tempenform); + od_printf("\n\n\rYou hear a hollow crash and feel a shocking pain on your head!"); + sleep(1); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("\n\n\rYou were unsuccessful!\n\n\r"); + sleep(1); + od_set_colour(D_CYAN, D_BLACK); + od_printf("You must try again or pay up ...\n\n\r"); + } + } + if (escape == 3) { + sprintf(tempenform, "%s *** ESCAPED ***\n\r", smurfname[thisuserno]); + logshit(holder[thishostno], tempenform); + sprintf(tempenform, "%s *ESCAPED* from %s\n\r", smurfname[thisuserno], smurfname[holder[thishostno]]); + newshit(tempenform); + hostage[thishostno] = 255; + holder[thishostno] = 255; + od_set_colour(D_CYAN, D_BLACK); + smurfhost[holder[thishostno]][0] = 255; + } + if (freecost == 0) { + hostage[thishostno] = 255; + holder[thishostno] = 255; + od_set_colour(D_CYAN, D_BLACK); + smurfhost[holder[thishostno]][0] = 255; + } + writehostage(); + savegame(); + lastquote(); + od_exit(10, FALSE); +} + +void +newshit(char shitlog[80]) +{ + stream = fopen("smurf.new", "a+"); + fprintf(stream, "%s", shitlog); + fclose(stream); +} + + + +void +logshit(int numba, char shitlog[80]) +{ + char senform[15]; + sprintf(senform, "smurf.%03i", numba); + stream = fopen(senform, "a+"); + fprintf(stream, "%s", shitlog); + fclose(stream); +} + +void +what(void) +{ + od_printf("\n\rWhat did he say!?!?\n\n\r"); +} + +void +counthostages(void) +{ + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + numhost[cyc2] = 0; + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == thisuserno) { + numhost[cyc2]++; + } + } +} + +void +writehostage(void) +{ + stream = fopen("smurf.hst", "w+"); + for (cyc = 0; cyc < hcount; cyc++) { + fprintf(stream, "%03i%03i", hostage[cyc], holder[cyc]); + } fclose(stream); +} diff --git a/src/doors/smurfcombat/smurfini.c b/src/doors/smurfcombat/smurfini.c new file mode 100644 index 0000000000..e1ffa43e55 --- /dev/null +++ b/src/doors/smurfcombat/smurfini.c @@ -0,0 +1,192 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! IniPlay */ +/* REMOTE Maintenance Code: !-SIX-NINE-| Module */ +/* */ +/***************************************************************************/ + +#include<genwrap.h> +#include"smurfext.h" + + + + + +void +newplayer(int x) +{ + char inputline[1][80]; + char logname[13]; + if (x == 1) { + if (noplayers > 97) + toomany(); + thisuserno = noplayers++; + inuser = thisuserno; + od_control.user_screen_length = 23; + od_clr_scr(); + sprintf(logname, "smurf.%03i", thisuserno); + stream = fopen(logname, "w+"); + fclose(stream); + od_clear_keybuffer(); + od_set_colour(D_CYAN, D_BLACK); + od_send_file("smurfdat.d01"); + nl(); + smurf_pause(); + } + od_clr_scr(); + od_set_colour(D_CYAN, D_BLACK); + od_send_file("smurfdat.d02"); + nl(); + smurf_pause(); +getname:; +#ifdef TODO_WRAPPERS + strset(smurfname[thisuserno], 0); +#else + memset(smurfname[thisuserno], 0, sizeof(smurfname[thisuserno])); +#endif + od_set_attrib(SD_RED); + od_printf("Enter in your smurf name (i.e. WARRIOR SMURF) of 28 character or less.\n\r"); + od_set_colour(L_YELLOW, D_BLACK); + od_printf(": "); + od_set_attrib(SD_GREEN); + od_input_str(inputline[0], 25, 32, 167); + sprintf(smurfname[thisuserno], "%s", strupr(inputline[0])); + for (cyc = 0; cyc + 1 < noplayers; cyc++) { + od_set_attrib(SD_GREEN); + if (strcmp(smurfname[cyc], smurfname[thisuserno]) == 0) { + od_set_colour(L_CYAN, D_BLACK); + od_printf("Same name found in rebel roster!!!\n\n\n\r"); + goto getname; + } + } + od_set_attrib(SD_CYAN); + if (strlen(inputline[0]) < 2) { + od_printf("Aborted . . . (Minimum 2 character input)\n\r"); + smurf_pause(); + od_exit(10, FALSE); + } + od_printf("Is this cool? "); + do { + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + if (bbsinkey == 'N' || bbsinkey == 'n') { + od_printf("Nope"); + nl(); + nl(); + nl(); + goto getname; + } + } while (bbsinkey != 'Y' && bbsinkey != 'y'); + od_printf("Yea"); +gettext:; +#ifdef TODO_WRAPPERS + strset(smurftext[thisuserno], 0); +#else + memset(smurftext[thisuserno], 0, sizeof(smurftext[thisuserno])); +#endif + od_set_attrib(SD_RED); + od_printf("\n\n\n\rWhen someone wins you in a fight, what do you want to say? (i.e. I'LL BE BACK!)\n\r"); + od_set_colour(L_YELLOW, D_BLACK); + od_printf(": "); + od_set_attrib(SD_GREEN); + od_input_str(inputline[0], 70, 32, 167); + sprintf(smurftext[thisuserno], "%s", inputline[0]); + od_set_attrib(SD_CYAN); + od_printf("Is this cool? "); + do { + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + if (bbsinkey == 'N' || bbsinkey == 'n') { + od_printf("Nope"); + nl(); + nl(); + nl(); + goto gettext; + } + } while (bbsinkey != 'Y' && bbsinkey != 'y'); + od_printf("Yea"); + sprintf(realname[thisuserno], "%s", od_control.user_name); + realnumb[thisuserno] = od_control.user_num; + sprintf(smurfweap[thisuserno], "%s", defweapon[0]); + sprintf(smurfarmr[thisuserno], "%s", defarmor[0]); + sprintf(smurfettename[thisuserno], "None"); + smurfettelevel[thisuserno] = 0; + smurfweapno[thisuserno] = 0; + smurfarmrno[thisuserno] = 0; + sprintf(smurfconf[thisuserno], "%s", defconfine[0]); + smurfconfno[thisuserno] = 0; + smurfhost[thisuserno][0] = 255; + smurfhost[thisuserno][1] = 255; + smurfhost[thisuserno][2] = 255; + smurfhost[thisuserno][3] = 255; + smurfhost[thisuserno][4] = 255; + smurfhost[thisuserno][5] = 255; + smurfhost[thisuserno][6] = 255; + smurfhost[thisuserno][7] = 255; + smurfhost[thisuserno][8] = 255; + smurfhost[thisuserno][9] = 255; + smurflevel[thisuserno] = 1; + smurfexper[thisuserno] = 0; + smurfmoney[thisuserno] = xp_random(2000) + 500; + smurfbankd[thisuserno] = 0; + smurffights[thisuserno] = 3; + smurfwin[thisuserno] = 0; + smurflose[thisuserno] = 0; + smurfhp[thisuserno] = 16; + smurfhpm[thisuserno] = 16; + smurfstr[thisuserno] = 12; + smurfspd[thisuserno] = 12; + smurfint[thisuserno] = 12; + smurfcon[thisuserno] = 12; + smurfbra[thisuserno] = 12; + smurfchr[thisuserno] = 12; + smurfturns[thisuserno] = defturns; + __morale[thisuserno] = 3; + __ettemorale[thisuserno] = 0; + /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "\n\n\rNew Player : #%5i + * ",od_control.user_num);fprintf(stream, "%s ... + * ",realname[thisuserno]);fprintf(stream, + * "%s\n\r",smurfname[thisuserno]); */ + /* fclose(stream); */ + od_control.user_screen_length = 999; + asksex(); + savegame(); + for (cyc = 0; cyc < hcount; cyc++) { + if ((holder[cyc] == thisuserno) || (hostage[cyc] == thisuserno)) { + hostage[cyc] = 255; + holder[cyc] = 255; + } + } + + writehostage(); + stealmoney(); + + od_send_file("smurfnew.nfo"); + smurf_pause(); + od_send_file("smurfdat.d0z"); + smurf_pause(); + od_send_file("smurfdat.d0m"); + smurf_pause(); + + if (x == 2) { + od_clr_scr(); + od_send_file("smurfdat.d05"); + sleep(3); + od_exit(10, FALSE); + } +} + +void +writeSGL(void) +{ + /* This code not transmitted to Elysium Software. */ +} diff --git a/src/doors/smurfcombat/smurfins.c b/src/doors/smurfcombat/smurfins.c new file mode 100644 index 0000000000..22a263608e --- /dev/null +++ b/src/doors/smurfcombat/smurfins.c @@ -0,0 +1,93 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! SERVICES */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" + + + + + +void +stealmoney(void) +{ + do { + od_control.user_screen_length = 24; + od_clr_scr(); + od_printf("@\x0c [ Instructions Menu ]\n\n\r"); + od_printf("@\x03 [1] Basics Of Smurf Combat\n\r"); + od_printf("@\x03 [2] How To Gain Levels and Fight\n\r"); + od_printf("@\x03 [3] Smurf Combat History\n\r"); + nl(); + od_printf("@\x0a Which [1-3,Q]: ? "); + od_set_colour(3, 0); + + bbsinkey = od_get_key(TRUE); + od_clr_scr(); + if (bbsinkey == '1') + od_send_file("smurfdat.d09"); + else if (bbsinkey == '2') + od_send_file("smurfdat.d0x"); + else if (bbsinkey == '3') + __mess(13); + else + bbsinkey = 'Q'; + smurf_pause(); + } while (bbsinkey != 'Q'); + od_control.user_screen_length = 999; +} + + + +void +killsmurf(int numba) +{ + char oldname[40]; + unsigned long lvl; + if (xp_random(2) == 1) + sprintf(oldname, "SPIRIT %-1.22s", smurfname[numba]); + else + sprintf(oldname, "%-1.17s REINCARNATE", smurfname[numba]); +#ifdef TODO_WRAPPERS + strset(smurfname[numba], 0); +#else + memset(smurfname[numba], 0, sizeof(smurfname[numba])); +#endif + sprintf(smurfname[numba], oldname); + realnumb[numba] = 0; + smurflevel[numba] = xp_random(26) + 5; + lvl = smurflevel[numba]; + smurfmoney[numba] = lvl * 20000; + smurfhpm[numba] = lvl * 13 + 100; + smurfhp[numba] = smurfhpm[numba]; + smurfexper[numba] = defexper[lvl]; + smurfconfno[numba] = xp_random(4) + 1; +#ifdef TODO_WRAPPERS + strset(smurfweap[numba], 0); + strset(smurfarmr[numba], 0); + strset(smurfettename[numba], 0); +#else + memset(smurfweap[numba], 0, sizeof(smurfweap[numba])); + memset(smurfarmr[numba], 0, sizeof(smurfarmr[numba])); + memset(smurfettename[numba], 0, sizeof(smurfettename[numba])); +#endif + sprintf(smurfweap[numba], "Necromancy"); + smurfweapno[numba] = xp_random(5) + 14; + sprintf(smurfarmr[numba], "Fire Sphere"); + smurfarmrno[numba] = xp_random(5) + 16; + sprintf(smurfettename[numba], "Ghost"); + __ettemorale[numba] = xp_random(200) + 75; + smurfettelevel[numba] = xp_random(6) + 3; + savegame(); +} diff --git a/src/doors/smurfcombat/smurfkey.c b/src/doors/smurfcombat/smurfkey.c new file mode 100644 index 0000000000..f58202a596 --- /dev/null +++ b/src/doors/smurfcombat/smurfkey.c @@ -0,0 +1,72 @@ +#include<stdlib.h> +#include<string.h> +#include<stdio.h> +#include<ciolib.h> +#include"smurfver.h" + +void bp(char *registration_string, unsigned int security_code); +unsigned long rcount = 0; +main() +{ + char registered; + char registered_name[201]; + char temp_string[201]; + char registration_string[201]; + char registration_verification[201]; + unsigned int security_code; + char tempstring[201]; + unsigned int security_verification; + clrscr(); + textcolor(12); + cprintf("\n S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" Registration No. Module\n\r"); + cprintf(" %sVersion %s\n\r", __vkeysp, __vkey); + cprintf(" By Laurence Manhken\n\n\n\r"); + textcolor(9); + cprintf(" Smurf Combat est 909 ou 12345\n\n\r"); + + textcolor(11); + cprintf(" Programme Code : "); + gets(temp_string); + security_code = atoi(temp_string); + cprintf(" Repetez : "); + gets(temp_string); + security_verification = atoi(temp_string); + if (security_code != security_verification) { + printf("\nCodes ne match pas!\n"); + return (1); + } + textcolor(11); + cprintf(" Individule Nom : "); + gets(registration_string); + cprintf(" Repetez : "); + gets(registration_verification); + if (strcmp(registration_string, registration_verification) != 0) { + printf("\nStrings ne match pas!\n"); + return (1); + } + bp(registration_string, security_code); + textcolor(9); + cprintf("\n Individule Nom : [%s]\n\r", registration_string); + cprintf(" Serialle : [%lu]\n\n\r", rcount); + +} + + + +void +bp(char *registration_string, unsigned int security_code) +{ + char tempstring[201]; + int cyc; +#ifdef TODO_WRAPPERS + strset(tempstring, 0); +#else + memset(tempstring, 0, sizeof(tempstring)); +#endif + sprintf(tempstring, "%s", registration_string); + for (cyc = 0; cyc < strlen(tempstring); cyc++) { + rcount = rcount + tempstring[cyc] * security_code; + } +} diff --git a/src/doors/smurfcombat/smurfmnt.c b/src/doors/smurfcombat/smurfmnt.c new file mode 100644 index 0000000000..26015e7c2c --- /dev/null +++ b/src/doors/smurfcombat/smurfmnt.c @@ -0,0 +1,166 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! MAINTENT */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" +#include "mdel.h" + + + + +void +maint(int level) +{ + char inputline[80], x = 1; + char *leveln[3] = {"Alien", "Author", "SysOp"}; + int cyc4; + /* stream = fopen("SMURF.LOG", "a+"); fprintf(stream, + * "MAINT(%i):",od_control.user_num); fprintf(stream, "%s ... + * ",smurfname[thisuserno]); */ + /* fclose(stream); */ + do { + od_clr_scr(); + gotoxy(1, 20); + printf("Local ECho Only: Press Alt-C To Chat!"); + gotoxy(1, 1); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("\n\rLevel %d (%s) ", level, leveln[level]); + od_set_colour(L_RED, D_BLACK); + od_printf("maintenance signing in...\n\n\r"); + od_set_colour(L_GREEN, D_BLACK); + od_printf("[1] Cycle thru Status of All Players\n\r"); + od_printf("[2] Cycle thru and Rename Players\n\r"); + od_printf("[3] Reroll Current Game\n\r"); + if (level == 1) { + od_set_colour(L_CYAN, D_BLACK); + od_printf("[A] Display: Smurf Player Records\n\r"); + od_printf("[B] Display: Smurf Log Records\n\r"); + od_printf("[C] Display: Smurf Save Game File\n\r"); + od_printf("[Z] Purge: Smurf Record Files\n\r"); + } + od_printf("[Q] Return to Previous Mode\n\r"); + od_printf("[*] Full Player Information Mode\n\r"); + od_set_colour(D_GREY, D_BLACK); + od_printf("\n\rCommand [Official Release] :"); + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + switch (bbsinkey) { + case '1': + for (cyc4 = 0; cyc4 < noplayers; cyc4++) { + inuser = cyc4; + displaystatus(); + smurf_pause(); + } break; + case '2': + for (cyc4 = 0; cyc4 < noplayers; cyc4++) { + inuser = cyc4; + displaystatus(); + od_set_colour(L_BLUE, D_BLACK); + od_printf("Change Name [yN]: "); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') + if (realnumb[cyc] != 0) { + od_printf("Yea\n\n\r"); + getname:; + od_set_colour(L_YELLOW, D_BLACK); + od_printf(": "); + od_set_attrib(SD_GREEN); + od_input_str(inputline, 28, 32, 167); + sprintf(smurfname[cyc], "%s", strupr(inputline)); + for (cyc2 = 0; cyc2 + 1 < noplayers; cyc2++) { + od_set_attrib(SD_GREEN); + if (strcmp(smurfname[cyc2], smurfname[cyc]) == 0 && smurfname[cyc2] != smurfname[cyc]) { + od_set_colour(L_CYAN, D_BLACK); + od_printf("Same name found in rebel roster!!!\n\n\n\r"); + goto getname; + } + } + od_set_attrib(SD_CYAN); + od_printf("Is this cool? "); + bbsinkey = od_get_key(TRUE); + od_set_colour(D_CYAN, D_BLACK); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\r"); + } else { + od_printf("Nope\n\r"); + nl(); + goto getname; + } + } else { + od_set_colour(L_BLUE, D_BLACK); + od_printf("Can't edit a computer player!\n\r"); + nl(); + smurf_pause(); + } else { + od_set_colour(L_BLUE, D_BLACK); + od_printf("Nope\n\r"); + nl(); + } + } + break; + case '3': + __NEW__main(); + smurf_pause(); + od_exit(10, FALSE); + break; + case 'A': + case 'a': + if (level == 1) { + od_clr_scr(); + od_printf("Press something...\n\r"); + od_get_key(TRUE); + od_send_file("smurflog.nfo"); + od_printf("\n\n\rDone."); + od_get_key(TRUE); + } break; + case 'B': + case 'b': + if (level == 1) { + od_clr_scr(); + od_printf("Press something...\n\r"); + od_get_key(TRUE); + od_send_file("smurf.log"); + od_printf("\n\n\rDone."); + od_get_key(TRUE); + } break; + case 'C': + case 'c': + if (level == 1) { + od_clr_scr(); + od_printf("Press something...\n\r"); + od_get_key(TRUE); + od_send_file("smurf.sgm"); + od_printf("\n\n\rDone."); + od_get_key(TRUE); + } break; + case 'Z': + case 'z': + if (level == 1) { + mdel("*.SEL"); + mdel("*.LOG"); + mdel("*.SGL"); + mdel("*.SCL"); + } break; + case '*': + od_set_colour(D_CYAN, D_BLACK); + od_printf("Real names now displayed at status!\n\n\r"); + displayreal = 1; + break; + default: + od_clr_scr(); + od_printf("\n\n\rReturning to Game ...\n\n\r"); + return; + } od_printf("\n\n\r"); + } while (x); +} diff --git a/src/doors/smurfcombat/smurfmod.c b/src/doors/smurfcombat/smurfmod.c new file mode 100644 index 0000000000..04c4805bc4 --- /dev/null +++ b/src/doors/smurfcombat/smurfmod.c @@ -0,0 +1,305 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! ALTERNATE */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include <genwrap.h> +#include "smurfext.h" + + + + + +void +spy(void) +{ + char bbsin4[10]; + unsigned long price = 0, r; + userlist(1); + r = xp_random(3); + od_set_colour(L_BLUE, D_BLACK); + od_printf("Spy On Who? (1-%d): ", noplayers); + od_input_str(bbsin4, 9, '0', '9'); + inuser = (atoi(bbsin4)) - 1; + od_clr_scr(); + if (r == 0) + od_printf("The legendary Murf Smurf HIMSELF reviews your request...\n\n\r"); + if (r == 1) + od_printf("The Smurfland cheif of defense reviews your request...\n\n\r"); + if (r == 2) + od_printf("The secretary of state reviews your request...\n\n\r"); + r = xp_random(50) + 50; + price = smurflevel[inuser] * smurflevel[thisuserno]; + price *= r; + od_printf("Subject: %s\n\r", smurfname[inuser]); + od_printf("Level: %d / %d Exp\n\n\r", smurflevel[inuser], smurfexper[inuser]); + od_printf("Price: %lu\n\n\r", price); + if (smurflevel[inuser] > 19) + od_printf("In my personal opinion, the Secret Service would better suite your\n\rneeds, however we'll do our best...\n\n\r"); + else if (smurflevel[inuser] > 9) + od_printf("Well, this shouldn't be that tough a job, I'll get on it\n\rpersonally...\n\n\r"); + else + od_printf("Okey Dokey, you got the PERFECT person for the job, deal? ...\n\n\r"); + if (smurfmoney[thisuserno] < price) { + od_printf("Oops, looks like you don't have enough money!\n\n\r"); + return; + } + od_printf("Accept [Yn]: ?"); + bbsinkey = od_get_key(TRUE); + nl(); + nl(); + if (bbsinkey == 'N' || bbsinkey == 'n') + return; + displaystatus(); + smurfmoney[thisuserno] -= price; + savegame(); +} + +void +toomany(void) +{ + od_clr_scr(); + od_set_colour(L_CYAN, D_BLACK); + od_printf("Sorry, but this game is SOOOOOOoooooooooooooooooooooooo popular\n\r"); + od_printf("that there isn't any more room for new players!\n\n\r"); + od_printf("Tell your SysOp to make a new directory, copy all the files and\n\r"); + od_printf("run SMURFNEW in that 2nd directory to start up a SECOND GAME!!\n\n\n\r"); + sleep(5); + od_exit(10, FALSE); +} + + + + + + + + + + +void +killeduser(void) +{ + char _rame[40], _rame2[40]; + sprintf(_rame, "%s", realname[thisuserno]); + sprintf(_rame2, "%s", od_control.user_name); + if (thisuserno == 255) + return; + if (_rame2[0] != _rame[0] && _rame2[2] != _rame[2]) { + od_clr_scr(); + od_set_colour(L_WHITE, D_BLACK); + od_printf("When old players are erased on a bulletin board, their characters\n\r"); + od_printf("are not. Your name does not match the smurf record of your user\n\r"); + od_printf("account number. By pressing No on the following, this character\n\r"); + od_printf("will be computerized, and you will get your own slot.\n\n\r"); + od_set_colour(L_CYAN, D_BLACK); + od_printf("Is your name '%s'? [Yn]: ", realname[thisuserno]); + bbsinkey = od_get_key(TRUE); + nl(); + nl(); + if (bbsinkey != 'N' && bbsinkey != 'n') + return; + realnumb[thisuserno] = 0; + thisuserno = 255; + } +} + + +void +heal(void) +{ + unsigned int cost, numba, injur, intelmod, maxheal; + char bbsin[5]; + intelmod = smurfint[thisuserno]; + if (intelmod > 20) + intelmod = 20; + injur = smurfhpm[thisuserno] - smurfhp[thisuserno]; + cost = (((smurflevel[thisuserno] * 10)) * (((20 - intelmod) * .05) + 1)); + od_set_colour(L_BLUE, D_BLACK); + if (smurfhp[thisuserno] + 1 > smurfhpm[thisuserno]) { + od_printf("\n\n\rYou're not hurt!\n\n\r"); + return; + } + if (smurfmoney[thisuserno] < cost) { + od_printf("\n\n\rCome back when you have money!\n\n\r"); + return; + } + od_clr_scr(); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Doctor Smurf: It'll cost you %i gold per point for me to heal.\n\r", cost); + od_printf("You have %.0f gold and %i injuries.\n\n\r", smurfmoney[thisuserno], injur); + od_set_colour(L_RED, D_BLACK); + maxheal = injur; + if (maxheal * cost > smurfmoney[thisuserno]) + maxheal = smurfmoney[thisuserno] / cost; + od_printf("Heal How Much? [%i] :", maxheal); + od_set_colour(L_YELLOW, D_BLACK); + od_input_str(bbsin, 3, '0', '9'); + numba = atoi(bbsin); + if (numba > injur || numba == 0) + numba = injur; + if (numba > maxheal) + numba = maxheal; + if (smurfmoney[thisuserno] < cost * numba) { + od_printf("\n\n\rCome back when you have enuff money!\n\n\r"); + return; + } + od_printf("%i points healed.\n\n\r", numba); + smurfhp[thisuserno] = smurfhp[thisuserno] + numba; + smurfmoney[thisuserno] = smurfmoney[thisuserno] - numba * cost; +} + + +void +userlist(int ink) +{ + if (ink == 0) { + od_set_colour(L_CYAN, D_BLACK); + od_disp_str("\n\n\rList --> All [DEFAULT]\n\rRank --> Top (1)0\n\r Top (2)0\n\r (A)ll\n\r (S)murfettes\n\r"); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == '1') { + rankuserlist(1); + return; + } + if (bbsinkey == '2') { + rankuserlist(2); + return; + } + if (bbsinkey == 'A') { + rankuserlist(3); + return; + } + if (bbsinkey == 'a') { + rankuserlist(3); + return; + } + if (bbsinkey == 'S') { + ettelist(0); + return; + } + if (bbsinkey == 's') { + ettelist(0); + return; + } + } + od_clr_scr(); + od_set_attrib(SD_RED); + od_disp_str(" No. Smurf Name Level Wins:Loss Conf Smurfette Morale\n\r"); + od_set_attrib(SD_YELLOW); + od_disp_str("-------------------------------------------------------------------------\n\r"); + for (cyc = 0; cyc < noplayers; cyc++) { + od_set_attrib(SD_GREEN); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + for (cyc3 = 0; cyc3 < hcount; cyc3++) + if (hostage[cyc3] == cyc) + od_set_colour(D_GREEN, D_BLACK); + od_printf(" %2i : ", cyc + 1); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %2i %4i:%4i %4i %4i %3i%% %5i%%\n\r", smurfname[cyc], smurflevel[cyc], smurfwin[cyc], smurflose[cyc], smurfconfno[cyc], smurfettelevel[cyc], __ettemorale[cyc], 130 - __morale[cyc] * 10); + } + nl(); +} + +void +changename(void) +{ + char inputline[80]; + od_clr_scr(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("\n\rCurrent Name: %s\n\n\r", smurfname[thisuserno]); + od_set_attrib(SD_RED); +getname:; + od_printf("Enter in your smurf name (i.e. WARRIOR SMURF) of 28 character or less.\n\r"); + od_set_colour(L_YELLOW, D_BLACK); + od_printf(": "); + od_set_attrib(SD_GREEN); + od_input_str(inputline, 25, 32, 167); + if (strlen(inputline) < 2) { + od_printf("Aborted . . .\n\r"); + smurf_pause(); + return; + } + for (cyc = 0; cyc + 1 < noplayers; cyc++) { + od_set_attrib(SD_GREEN); + if (strcmp(smurfname[cyc], strupr(inputline)) == 0) { + od_set_colour(L_CYAN, D_BLACK); + od_printf("Same name found in rebel roster!!!\n\n\n\r"); + goto getname; + } + } + od_set_attrib(SD_CYAN); + od_printf("Is this cool? "); + do { + bbsinkey = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsinkey == 'N' || bbsinkey == 'n') { + od_printf("Nope"); + nl(); + nl(); + nl(); + return; + } + } while (bbsinkey != 'Y' && bbsinkey != 'y'); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Yea\n\n\r"); +#ifdef TODO_WRAPPERS + strset(smurfname[thisuserno], 0); +#else + memset(smurfname[thisuserno], 0, sizeof(smurfname[thisuserno])); +#endif + sprintf(smurfname[thisuserno], "%s", strupr(inputline)); +} + +void +changelast(void) +{ + char inputline[80]; + od_clr_scr(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("\n\rNow: %s\n\n\r", smurftext[thisuserno]); + od_set_attrib(SD_RED); + od_printf("When someone wins you in a fight, what do you want to say? (i.e. I'LL BE BACK!)\n\r"); + od_set_colour(L_YELLOW, D_BLACK); + od_printf(": "); + od_set_attrib(SD_GREEN); + od_input_str(inputline, 70, 32, 167); + if (strlen(inputline) < 2) { + od_printf("Aborted . . .\n\r"); + smurf_pause(); + return; + } + od_set_attrib(SD_CYAN); + od_printf("Is this cool? "); + do { + bbsinkey = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsinkey == 'N' || bbsinkey == 'n') { + od_printf("Nope"); + nl(); + nl(); + nl(); + return; + } + } while (bbsinkey != 'Y' && bbsinkey != 'y'); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Yea\n\n\r"); +#ifdef TODO_WRAPPERS + strset(smurftext[thisuserno], 0); +#else + memset(smurftext[thisuserno], 0, sizeof(smurftext[thisuserno])); +#endif + sprintf(smurftext[thisuserno], "%s", inputline); +} diff --git a/src/doors/smurfcombat/smurfmss.c b/src/doors/smurfcombat/smurfmss.c new file mode 100644 index 0000000000..a613cc1efa --- /dev/null +++ b/src/doors/smurfcombat/smurfmss.c @@ -0,0 +1,96 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! MESSAGE */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include<datewrap.h> +#include"smurfext.h" + + + + + +void +__mess(int x) +{ + char pch, logname[13], intext[5], in2[5]; + time_t t; + struct date d; + char olddate[10], newdate[10]; + strcpy(logname, "smurflog.000"); + getdate(&d); + sprintf(newdate, "%02d%02d%04d", d.da_day, d.da_mon, d.da_year); + if (x == 1) { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("SMURF TIMES %d/%d/%d\n\n\r", d.da_day, d.da_mon, d.da_year); + od_set_colour(L_BLUE, D_BLACK); + od_send_file("smurf.new"); + smurf_pause(); + stream = fopen(logname, "a+"); + fclose(stream); + } + if (x == 2) { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("PERSONAL SMURF LOG AS OF %d/%d/%d\n\n\r", d.da_day, d.da_mon, d.da_year); + od_set_colour(L_BLUE, D_BLACK); + od_send_file(logname); + smurf_pause(); + stream = fopen(logname, "w+"); + fclose(stream); + } + if (x == 3) { + od_clr_scr(); + od_set_colour(7, 0); + od_send_file("smurfdat.d0k"); + smurf_pause(); + } + if (x == 13) { + od_clr_scr(); + od_send_file("smurfdat.d04"); + } + if (x == 4) { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("HOSTAGE INFORMATION\n\n\r"); + od_set_colour(L_BLUE, D_BLACK); + for (cyc2 = 0; cyc2 < hcount; cyc2++) + if (hostage[cyc2] != 255 && hostage[cyc2] < noplayers) + od_printf("%s is a hostage of %s with %i%% chance of escape.\n\r", smurfname[hostage[cyc2]], smurfname[holder[cyc2]], 100 - (smurfconfno[holder[cyc2]] + 1) * 8); + smurf_pause(); + } + if (x == 5) { + clrscr(); + printf("Smurf Combat Local Echo Info:\n\n"); + printf(" SMURF SETUP : Initial Game Setup\n"); + printf(" SMURF RESET : Reroll Current Game\n"); + printf(" SMURF SYSOP : Local SysOp Menu\n"); + /* printf(" SMURF CNV : Convert Save Game Type\n"); */ + printf(" SMURF REGISTER : Register Game\n"); + printf(" Door Info File : CHAIN.TXT/DOOR.SYS etc must be in current dir\n\n\n"); + sleep(2); + } + if (x == 10) { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf("*** WARNING! ***\n\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf("The version of the save file is obsolete.\n\r"); + od_printf("Tell your SYSOP to run "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("'SMURF RESET'\n\n\r"); + smurf_pause(); + od_exit(0, FALSE); + } +} diff --git a/src/doors/smurfcombat/smurfnew.c b/src/doors/smurfcombat/smurfnew.c new file mode 100644 index 0000000000..b0f4525f44 --- /dev/null +++ b/src/doors/smurfcombat/smurfnew.c @@ -0,0 +1,144 @@ +#define DOSMODEONLY +#ifdef TODO_HEADERS +#include<process.h> +#include<dos.h> +#endif +#include<stdlib.h> +#include<string.h> +#include<stdio.h> +#include<ciolib.h> +#include<genwrap.h> +#include"smurfnew.h" +#include"smurfgen.h" +#include"smurfver.h" +#include"smurfsav.h" +#include"mdel.h" + +void +main(void) +{ + getdate(&d); + noplayers = 4; + clrscr(); + textcolor(12); + cprintf("\n S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" New Game (Re-Roll) Module\n\r"); + cprintf(" %sVersion %s\n\r", __vnewsp, __vnew); + cprintf(" By Laurence Manhken\n\r"); + textcolor(14); + cprintf(" AutoYea in 10secs\n\n\n\r"); + textcolor(9); + cprintf("Proceed [Yn]: "); + textcolor(12); + if ((stream = fopen("smurf.sgm", "r+")) == NULL) + tcount = 999; + else + fclose(stream); + + do { + tcount++; + od_sleep(10); + } while (!kbhit() && tcount < 1000); + if (tcount > 999) + timeoud = 1; + else + proc = getch(); + if (proc != 'Y' && proc != 'y' && timeoud != 1) { + cprintf("Nope\n\r"); + return; + } + if (timeoud != 1) + cprintf("Yea\n\n\r"); + if (timeoud == 1) + cprintf("Yea (Forced)\n\n\r"); + stream = fopen("smurf.sgm", "w+"); + fprintf(stream, "%03i%05.5s", 0, __saveversion); + fclose(stream); + textcolor(13); + cprintf("Checking Configuration: "); + if ((stream = fopen("smurf.cfg", "r+")) == NULL) { + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "01000311111990"); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day ###\n\r2. Turns/Day ###\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + } else { + fscanf(stream, "%3s", intext); + defrounds = atoi(intext); + fscanf(stream, "%3s", intext); + turnsaday = atoi(intext); + fscanf(stream, "%8s", olddate); + fclose(stream); + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "%03i", defrounds); + fprintf(stream, "%03i", turnsaday); + fprintf(stream, "01011990"); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day\n\r2. Turns/Day\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + } + + od_sleep(500); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Reseting Variables: "); + sleep(1); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Computer Players: "); + savegame(); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Saving Save Game File: "); + od_sleep(200); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Name Listing: "); + stream = fopen("smurf.scl", "w+"); + od_sleep(200); + fprintf(stream, "NAME LISTING:)\n\r"); + fprintf(stream, "[0-CPU] #1:) GRANDPA SMURF\n\r"); + fprintf(stream, "[0-CPU] #2:) PAPA SMURF\n\r"); + fprintf(stream, "[0-CPU] #3:) SHADOW SMURF\n\r"); + fprintf(stream, "[0-CPU] #4:) REBEL SMURF\n\r"); + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Error Log File: "); + stream = fopen("smurf.sel", "w+"); + od_sleep(200); + fprintf(stream, "ERROR RECORDS:)\n\r"); + fprintf(stream, "LOCALDOS:) ***Ran Re-Roll program\n\r"); + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Player Logon Log File: "); + stream = fopen("smurf.sgl", "w+"); + od_sleep(200); + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Writing Personal Log Files: "); + od_sleep(200); + stream = fopen("smurflog.xxx", "w+"); + fclose(stream); + mdel("SMURFLOG.*"); + textcolor(14); + cprintf("Success.\n\r"); + textcolor(13); + cprintf("Writing Player Hostage File: "); + od_sleep(200); + stream = fopen("smurf.hst", "w+"); + fprintf(stream, "255255"); + fclose(stream); + mdel("SMURF.D0D"); + textcolor(14); + cprintf("Success.\n\r"); +} diff --git a/src/doors/smurfcombat/smurfnew.h b/src/doors/smurfcombat/smurfnew.h new file mode 100644 index 0000000000..a961383ffb --- /dev/null +++ b/src/doors/smurfcombat/smurfnew.h @@ -0,0 +1,47 @@ +FILE *stream; +int turnsaday, defrounds; +int inuser, cyc, bbsexit, thisuserno, noplayers, displayreal, + cyc2, scrnlen, cyc3; + +char smurfname[10][41] = {"GRANDPA SMURF", "PAPA SMURF", "SHADOW SMURF", "REBEL SMURF"}; +char realname[10][41] = {"GRANDPA SMURF", "PAPA SMURF", "SHADOW SMURF", "REBEL SMURF"}; +int realnumb[10] = {0, 0, 0, 0}; +char smurfweap[10][41] = {"Burning Cross", "Fire Water", "Shadow Lance", "H2O Uzi"}; +char smurfarmr[10][41] = {"Inverted Star", "Armor", "Shadow Shield", "No Fear Clothes"}; +char smurftext[10][81] = {"The forces of evil will prevail!", + "Didn't anyone teach you to respect your dad!?!?", + "Fool, now the S.S. must make you pay . . .", +"Traitor! You are one of PAPA SMURF'S henchmen!"}; + +char smurfettename[10][41] = {"Female Fetale", "Fire Eyes", "Shadow Girl", "Cassie"}; +int smurfettelevel[10] = {10, 9, 7, 5}; + +int smurfweapno[10] = {20, 19, 3, 8}; +int smurfarmrno[10] = {20, 19, 3, 8}; + +char smurfconf[10][41] = {"Underworld", "Fortress", "Basement", "Infirmary"}; +int smurfconfno[10] = {11, 10, 2, 3}; + +int smurfhost[10][10] = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + +int smurflevel[10] = {41, 30, 3, 3}; +float smurfmoney[10] = {8458, 3245, 3491, 745}; +float smurfbankd[10] = {9127231, 788735, 497, 2446}; +float smurfexper[10] = {553, 513, 154, 634}; +int smurffights[10] = {3, 3, 3, 0}; +int smurfwin[10] = {231, 117, 23, 34}; +int smurflose[10] = {0, 1, 3, 2}; +int smurfhp[10] = {413, 329, 36, 34}; +int smurfhpm[10] = {413, 329, 36, 34}; +int smurfstr[10] = {42, 37, 12, 16}; +int smurfspd[10] = {45, 32, 22, 13}; +int smurfint[10] = {26, 23, 13, 11}; +int smurfcon[10] = {31, 24, 14, 12}; +int smurfbra[10] = {36, 42, 12, 12}; +int smurfchr[10] = {13, 27, 8, 17}; +int smurfturns[10] = {3, 3, 3, 3}; +int smurfspcweapon[10][6] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +int smurfqtyweapon[10][6] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +char smurfsex[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; +int __morale[41] = {0, 1, 2, 2}; +int __ettemorale[41] = {999, 999, 999, 999}; diff --git a/src/doors/smurfcombat/smurfnex.h b/src/doors/smurfcombat/smurfnex.h new file mode 100644 index 0000000000..be2acd204f --- /dev/null +++ b/src/doors/smurfcombat/smurfnex.h @@ -0,0 +1,115 @@ +#ifdef TODO_HEADERS +#include<process.h> +#include<dos.h> +#endif +#include<time.h> +#include<OpenDoor.h> +#include<stdio.h> +#include<string.h> +#include<ciolib.h> +#include<stdlib.h> +#define SD_GREEN 0x0a +#define SD_CYAN 0x0b +#define SD_RED 0x0c +#define SD_YELLOW 0x0e +extern void __CNV__main(void); +extern void __DAY__main(void); +extern void __NEW__main(void); +extern void wingame(void); +extern void wongame(void); +extern void killsmurf(int numba); +extern void treathostage(int mere); +extern void what(void); +extern void __hit(int hit); +extern void __ehit(int hit, int numba); +extern void increasemorale(void); +extern void deductmorale(void); +extern void deductettemorale(void); +extern void __etteit(int a, int b, int c, unsigned long d); +extern void __incite(int x, int c, int y); +extern void killeduser(void); +extern void toomany(void); +extern void abilities(void); +extern void stealmoney(void); +extern void spy(void); +extern void inciterevolt(void); +extern void service(void); +extern void givemoney(void); +extern void rva(int sel__); +extern void ettemenu(void); +extern void rendezvous(void); +extern void counthostages(void); +extern void asksex(void); +extern void detectsave(void); +extern void detectversion(void); +extern void hostagemenu(void); +extern void mustregister(void); +extern void tolocal(void); +extern void checkkey(void); +extern void automate(void); +extern void writehostage(void); +extern void phostage(void); +extern void notdone(void); +extern void registerme(void); +extern void heal(void); +extern void lastquote(void); +extern void userarena(void); +extern void arena(void); +extern void writeSGL(void); +extern void ettelist(int high); +extern void savegame(void); +extern void checklevel(void); +extern void loadgame(void); +extern void maint(int level); +/* extern void maint(void); */ +extern void newplayer(int x); +extern void buyitem(void); +extern void buyconf(void); +extern void getcommand(void); +extern void titlescreen(void); +extern void displaystatus(void); +extern void checkstatus(void); +extern void smurf_pause(void); +extern void nl(void); +extern void displaymenu(void); +extern void itemlist(void); +extern void conflist(void); +extern void rankuserlist(int ink); +extern void userlist(int ink); +extern void changename(void); +extern void changelast(void); +extern char tempenform[80]; +extern char *datasex[3]; +extern char *dataref[3]; +extern char *dataref2[3]; +extern char *dataref3[3]; +extern int torturepoints, vpoints, etpoints; +extern int showexit, numhost[99]; +extern FILE *stream; +extern char registeredxx; /* 1 if registered, 0 if not */ +extern char registered_name[201]; /* Name of registered user */ +extern int inuser, cyc, bbsexit, thisuserno, noplayers, displayreal, + cyc2, scrnlen, cyc3, enterpointer, epold, defturns, userhp, + statis, hostage[1000], holder[1000], hcount; +extern char logname[13]; +extern char power[41], weap[41], armr[41], ette[41], conf[41], host[41], + shost[10], bbsinkey; +extern char *_morale[14]; +extern char *_ettemorale[12]; +extern char *__ahit[10]; +extern char *__amiss[10]; +extern char *__version; +extern char *__vspace; +extern char *__saveversion; +extern char *__vnew; +extern char *__vnewsp; +extern char *__vday; +extern char *__vdaysp; +extern char *__vcnv; +extern char *__vcnvsp; +extern char *__vkey; +extern char *__vkeysp; +extern char *__vlog; +extern char *__vlogsp; +extern void newshit(char shitlog[80]); +extern void logshit(int numba, char shitlog[80]); diff --git a/src/doors/smurfcombat/smurfnxx.c b/src/doors/smurfcombat/smurfnxx.c new file mode 100644 index 0000000000..ae7d270da4 --- /dev/null +++ b/src/doors/smurfcombat/smurfnxx.c @@ -0,0 +1,245 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! NXXGame */ +/* REMOTE Maintenance Code: !-SIX-NINE-| Module */ +/* */ +/***************************************************************************/ + + + + + + + +#define DOSMODEONLY +#ifdef TODO_HEADERS +#include<process.h> +#include<dos.h> +#endif +#include<stdlib.h> +#include<string.h> +#include<stdio.h> +#include<ciolib.h> +#include"smurfnex.h" +#include<genwrap.h> +#include"smurfnxx.h" +#include"smurfgen.h" +#include"mdel.h" + +int __NEW__noplayers; +extern int defrounds; +extern int turnsaday; + +void +__NEW__savegame(void) +{ + int thp; + stream = fopen("smurf.sdm", "w+"); + fprintf(stream, "%03i", __NEW__noplayers); + fprintf(stream, "%05.5s", __saveversion); + for (cyc = 0; cyc < __NEW__noplayers; cyc++) { + if (__NEW__smurfturns[cyc] < 0) + __NEW__smurfturns[cyc] = 0; + if (__NEW__smurffights[cyc] < 0) + __NEW__smurffights[cyc] = 0; + thp = __NEW__smurfhpm[cyc]; + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", __NEW__realname[cyc][cyc2]); + fprintf(stream, "%010i", __NEW__realnumb[cyc]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", __NEW__smurfname[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 80; cyc2++) + fprintf(stream, "%03i", __NEW__smurftext[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", __NEW__smurfweap[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", __NEW__smurfarmr[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", __NEW__smurfettename[cyc][cyc2]); + fprintf(stream, "%010i", __NEW__smurfettelevel[cyc]); + fprintf(stream, "%010i", __NEW__smurfweapno[cyc]); + fprintf(stream, "%010i", __NEW__smurfarmrno[cyc]); + for (cyc3 = 0; cyc3 < 40; cyc3++) + fprintf(stream, "%03i", __NEW__smurfconf[cyc][cyc3]); + fprintf(stream, "%010i", __NEW__smurfconfno[cyc]); + for (cyc3 = 0; cyc3 < 10; cyc3++) { + /* 69d */ fprintf(stream, "%010i", __NEW__smurfhost[cyc][cyc3]); + } + + /* 69a fprintf(stream, + * "%010i",__NEW__smurfhost[cyc]);fprintf(stream, + * "%010i",__NEW__smurfhost1[cyc]);fprintf(stream, + * "%010i",__NEW__smurfhost2[cyc]); */ + fprintf(stream, "%010i", __NEW__smurflevel[cyc]); + fprintf(stream, "%020.0f", __NEW__smurfexper[cyc]); + fprintf(stream, "%020.0f", __NEW__smurfmoney[cyc]); + fprintf(stream, "%020.0f", __NEW__smurfbankd[cyc]); + fprintf(stream, "%010i", __NEW__smurffights[cyc]); + fprintf(stream, "%010i", __NEW__smurfwin[cyc]); + fprintf(stream, "%010i", __NEW__smurflose[cyc]); + fprintf(stream, "%010i", thp); + fprintf(stream, "%010i", __NEW__smurfhpm[cyc]); + fprintf(stream, "%010i", __NEW__smurfstr[cyc]); + fprintf(stream, "%010i", __NEW__smurfspd[cyc]); + fprintf(stream, "%010i", __NEW__smurfint[cyc]); + fprintf(stream, "%010i", __NEW__smurfcon[cyc]); + fprintf(stream, "%010i", __NEW__smurfbra[cyc]); + fprintf(stream, "%010i", __NEW__smurfchr[cyc]); + fprintf(stream, "%010i", __NEW__smurfturns[cyc]); + + /* 91 */ fprintf(stream, "%03i%03i", __NEW____morale[cyc], __NEW____ettemorale[cyc]); + + for (cyc3 = 0; cyc3 < 5; cyc3++) { + /* 69b */ fprintf(stream, "%03i%03i", __NEW__smurfspcweapon[cyc][cyc3], __NEW__smurfqtyweapon[cyc][cyc3]); /* 111222 - Special Weap + * Number / Qty */ + } + /* 69c */ fprintf(stream, "%03i", __NEW__smurfsex[cyc]); /* 000/001/002 + * Nil/Mal/Fem */ + + } fclose(stream); +} + + + + + +void +__NEW__main(void) +{ + getdate(&d); + __NEW__noplayers = 4; + clrscr(); + textcolor(12); + cprintf("\n S M U R F C O M B A T\n\n\r"); + textcolor(10); + cprintf(" New Game (Re-Roll) Module\n\r"); + cprintf(" %sVersion %s\n\r", __vnewsp, __vnew); + cprintf(" By Laurence Manhken\n\r"); + textcolor(14); + cprintf(" AutoYea in 10secs\n\n\n\r"); + textcolor(9); + cprintf("Proceed [Yn]: "); + textcolor(12); + if ((stream = fopen("smurf.sgm", "r+")) == NULL) + tcount = 999; + else + fclose(stream); + + do { + tcount++; + od_sleep(10); + } while (!kbhit() && tcount < 1000); + if (tcount > 999) + timeoud = 1; + else + proc = getch(); + if (proc != 'Y' && proc != 'y' && timeoud != 1) { + cprintf("Nope\n\r"); + return; + } + if (timeoud != 1) + cprintf("Yea\n\n\r"); + if (timeoud == 1) + cprintf("Yea (Forced)\n\n\r"); + mdel("SMURFLOG.*"); + mdel("SMURFBAK.0*"); + mdel("SMURFDAT.D0E"); + /* system("DEL SMURF.S*"); */ + stream = fopen("smurf.sgm", "w+"); + fprintf(stream, "%03i%05.5s", 0, __saveversion); + fclose(stream); + gotoxy(1, 12); + textcolor(13); + cprintf("Reading Configuration: "); + if ((stream = fopen("smurf.cfg", "r+")) == NULL) { + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "01000311111990"); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day ###\n\r2. Turns/Day ###\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + } else { + fscanf(stream, "%3s", intext); + defrounds = atoi(intext); + fscanf(stream, "%3s", intext); + turnsaday = atoi(intext); + fscanf(stream, "%8s", olddate); + fclose(stream); +#ifdef TODO_WRAPPERS + sound(1000); +#endif + stream = fopen("smurf.cfg", "w+"); + fprintf(stream, "%03i", defrounds); + fprintf(stream, "%03i", turnsaday); + fprintf(stream, "01011990"); + fprintf(stream, "\n\r\n\r1. Arena Rounds/Day\n\r2. Turns/Day\n\r3. Last Ran Date DDMMYYYY\n\r"); + fclose(stream); + } +#ifdef TODO_WRAPPERS + nosound(); +#endif + + od_sleep(500); + textcolor(14); + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Reading Defaults: "); + od_sleep(500); + textcolor(14); + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Reseting Variables: "); + sleep(1); + textcolor(14); + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Writing Save Game File: "); + cprintf("..."); + od_sleep(200); + __NEW__savegame(); + cprintf("..."); + stream = fopen("smurf.log", "w+"); + od_sleep(200); + fprintf(stream, "***** Smurf Combat 1995 ***** Version 2.00 Diassi Diassis Diablo\n\n\r"); + fprintf(stream, "Error Records -- In event of program malfunction, this file may be printed\n\r"); + fprintf(stream, "and mailed to Maartian Enterprises for evaluation along with a clear account\n\r"); + fprintf(stream, "of situation and any problems.\n\n\r"); + fprintf(stream, "------------------------------------------------------------------------------\n\n\r"); + fprintf(stream, "Computer Created and Controlled Characters :)\n\r"); + fprintf(stream, "[0-CPU] #1:) GRANDPA SMURF\n\r"); + fprintf(stream, "[0-CPU] #2:) PAPA SMURF\n\r"); + fprintf(stream, "[0-CPU] #3:) SHADOW SMURF\n\r"); + fprintf(stream, "[0-CPU] #4:) REBEL SMURF\n\n\r"); + fprintf(stream, "------------------------------------------------------------------------------\n\n\r"); + /* fclose(stream); */ + cprintf("..."); + /* stream = fopen("smurf.log", "a+");od_sleep(200); */ + fprintf(stream, "Error Records :) **********\n\n\r"); + fprintf(stream, "------------------------------------------------------------------------------\n\n\r"); + fprintf(stream, "MSDOS:) [SMURF RESET] Ran re-roll program successfully!\n\r"); + fclose(stream); + cprintf("..."); + textcolor(14); + cprintf("Success.\n\r"); + + textcolor(13); + cprintf("Writing Log Files: "); + od_sleep(200); + cprintf("..."); + od_sleep(200); + cprintf("..."); + stream = fopen("smurf.hst", "w+"); + fprintf(stream, "255255"); + fclose(stream); + textcolor(14); + cprintf("Success.\n\r"); +} diff --git a/src/doors/smurfcombat/smurfnxx.h b/src/doors/smurfcombat/smurfnxx.h new file mode 100644 index 0000000000..0b75715314 --- /dev/null +++ b/src/doors/smurfcombat/smurfnxx.h @@ -0,0 +1,42 @@ +char __NEW__smurfname[10][41] = {"GRANDPA SMURF", "PAPA SMURF", "SHADOW SMURF", "REBEL SMURF"}; +char __NEW__realname[10][41] = {"GRANDPA SMURF", "PAPA SMURF", "SHADOW SMURF", "REBEL SMURF"}; +int __NEW__realnumb[10] = {0, 0, 0, 0}; +char __NEW__smurfweap[10][41] = {"Burning Cross", "Fire Water", "Shadow Lance", "H2O Uzi"}; +char __NEW__smurfarmr[10][41] = {"Inverted Star", "Armor", "Shadow Shield", "No Fear Clothes"}; +char __NEW__smurftext[10][81] = {"The forces of evil will prevail!", + "Didn't anyone teach you to respect your dad!?!?", + "Fool, now the S.S. must make you pay . . .", +"Traitor! You are one of PAPA SMURF'S henchmen!"}; + +char __NEW__smurfettename[10][41] = {"Female Fetale", "Fire Eyes", "Shadow Girl", "Cassie"}; +int __NEW__smurfettelevel[10] = {10, 9, 7, 5}; + +int __NEW__smurfweapno[10] = {20, 19, 3, 8}; +int __NEW__smurfarmrno[10] = {20, 19, 3, 8}; + +char __NEW__smurfconf[10][41] = {"Underworld", "Fortress", "Basement", "Infirmary"}; +int __NEW__smurfconfno[10] = {11, 10, 2, 3}; + +int __NEW__smurfhost[10][10] = {255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255}; + +int __NEW__smurflevel[10] = {41, 30, 3, 3}; +float __NEW__smurfmoney[10] = {8458, 3245, 3491, 745}; +float __NEW__smurfbankd[10] = {927231, 78735, 5497, 2446}; +float __NEW__smurfexper[10] = {10000000, 594000, 4000, 3000}; +int __NEW__smurffights[10] = {3, 3, 3, 0}; +int __NEW__smurfwin[10] = {231, 117, 23, 34}; +int __NEW__smurflose[10] = {0, 1, 3, 2}; +int __NEW__smurfhp[10] = {413, 329, 36, 34}; +int __NEW__smurfhpm[10] = {413, 329, 36, 34}; +int __NEW__smurfstr[10] = {42, 37, 12, 16}; +int __NEW__smurfspd[10] = {45, 32, 22, 13}; +int __NEW__smurfint[10] = {26, 23, 13, 11}; +int __NEW__smurfcon[10] = {31, 24, 14, 12}; +int __NEW__smurfbra[10] = {36, 42, 12, 12}; +int __NEW__smurfchr[10] = {13, 27, 8, 17}; +int __NEW__smurfturns[10] = {3, 3, 3, 3}; +int __NEW__smurfspcweapon[10][6] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +int __NEW__smurfqtyweapon[10][6] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +char __NEW__smurfsex[10] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; +int __NEW____morale[41] = {0, 1, 2, 2}; +int __NEW____ettemorale[41] = {752, 512, 213, 198}; diff --git a/src/doors/smurfcombat/smurfreg.c b/src/doors/smurfcombat/smurfreg.c new file mode 100644 index 0000000000..9c4de3f0aa --- /dev/null +++ b/src/doors/smurfcombat/smurfreg.c @@ -0,0 +1,153 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! REGISTA */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ +/* SMURF.nnn (Personal) SMURF.Dnn (Documentation) */ +/* ! Standard Operation Codes */ +/* !# Extended Testing Codes, Value Increment */ +/* !@ Extended Testing Codes, Smurf Increment */ +/* // Specialized To-Local Codes */ +/***************************************************************************/ + +#include<ciolib.h> +#include<stdlib.h> +#include"smurfreg.h" + +void +__REG__main(void) +{ + char code[40], name[80], cod; + FILE *stream; + printf("\n\r"); + printf("Enter Registration Code: "); + gets(code); + printf("Enter Registration Name: "); + gets(name); + /* printf("Enter Intermediate Code: "); cin >> name[0];cod=atoi(name[0]); + * if(cod>0)for(cyc=0;cyc<cod;cyc++){ printf("Name %d: + * ",cyc);scanf("%39s", name[cyc]);} fprintf(stream,"%s",name[0]); + * if(cod>1)for(cyc=1;cyc<cod;cyc++) fprintf(stream," %s",name[cyc]); */ + stream = fopen("smurfreg.nfo", "w+"); + fprintf(stream, "%s", name); + fprintf(stream, "\n\r%s\n\r", code); + fclose(stream); +} + +void +notdone(void) +{ + mustregister(); + if (statis) { + od_set_colour(L_BLUE, D_BLACK); + od_printf("\n\rSorry, but this function is not complete as of.\n\n\r"); + } +} + +void +mustregister(void) +{ + if (!statis) { + od_clr_scr(); + od_printf("Sorry to interrupt your fun like this but your Sysop didn't\n\r"); + od_printf("register this version of SMURF COMBAT yet! \n\n\r"); + od_printf("In order for this function to be orperative, your Sysop has\n\r"); + od_printf("to pay the one time, VERY low registration cost of $9!!! \n\n\r"); + od_printf("Consider the advantages, plain out no more waits, and ALL\n\r"); + od_printf("the functions work 100 percent!\n\n\r"); + /* sleep(5); */ + smurf_pause(); + } +} + +void +registerme(void) +{ + if (!statis) { + od_clr_scr(); + nl(); + nl(); + od_set_colour(15, 0); + od_printf("Sorry to interrupt your fun like this but your Sysop didn't\n\r"); + od_printf("register this version of SMURF COMBAT yet! OHMYGOD! So, I'd\n\r"); + od_printf("like to take .21 minutes to remind you that it took 10,000+\n\r"); + od_printf("minutes of day-in-day-out work to complete this game.\n\n\r"); + od_set_colour(11, 0); + /* cyc=0; do{ cyc++;od_printf(" *** $9 + * ***\r");od_sleep(200); cyc++;od_printf(" ONLY $9! + * \r");od_sleep(200); cyc++;od_printf("registration is only $9! + * \r");od_sleep(200); }while(cyc<3); // sleep(1); */ + od_set_colour(10, 0); + od_printf("\n\n\rThanks for your time, I hope you appreciate mine.\n\n\r"); + /* sleep(2); */ + } +} + +void +checkkey(void) +{ /* Main program function */ + FILE *fp; /* File pointer for REGISTER.KEY file */ + unsigned long supplied_key; /* Key supplied by user */ + unsigned long correct_key; /* Correct registration key */ + if ((fp = fopen("smurfreg.nfo", "r")) != NULL) { /* Try to open file *//* I + * f successful */ + fgets(registered_name, 200, fp); /* read name from file */ + if (registered_name[strlen(registered_name) - 1] == '\n') + registered_name[strlen(registered_name) - 1] = '\0'; + + fscanf(fp, "%lu", &supplied_key); /* read key from file */ + + fclose(fp); /* Close file */ + + bp(registered_name, 909); /* Calculate correct key */ + correct_key = rcount; + + if (correct_key == supplied_key) { /* Compare correct & supplied + * keys *//* If they are identical */ + registeredxx = 1; /* Then switch program into registered + * mode */ + } + } + if (registeredxx == 1) + statis = 1; /* If registered mode */ +#if 0 + /* { /* Display registration information */ */ + /* printf("This program is registered to: %s\n",registered_name); */ + /* } */ + /* else if(registeredxx==0) /* If not in registered + mode */ */ + /* { /* Display unregistered information */ */ + /* printf("This program is UNREGISTERED!!!\n"); */ + /* }smurf_pause(); */ +#endif +} + + + + + + +void +bp(char *registration_string, unsigned int security_code) +{ + char tempstring[201]; + int cyc; +#ifdef TODO_WRAPPERS + strset(tempstring, 0); +#else + memset(tempstring, 0, sizeof(tempstring)); +#endif + sprintf(tempstring, "%s", registration_string); + for (cyc = 0; cyc < strlen(tempstring); cyc++) { + rcount = rcount + tempstring[cyc] * security_code; + } +} diff --git a/src/doors/smurfcombat/smurfreg.h b/src/doors/smurfcombat/smurfreg.h new file mode 100644 index 0000000000..1601df1540 --- /dev/null +++ b/src/doors/smurfcombat/smurfreg.h @@ -0,0 +1,16 @@ +#include<OpenDoor.h> +#ifdef TODO_HEADERS +#include<dos.h> +#endif +#include<stdio.h> +#include<string.h> +void bp(char *registration_string, unsigned int security_code); +unsigned long rcount = 0; +extern char registeredxx; +extern char registered_name[201]; +extern void notdone(void); +extern void mustregister(void); +extern void registerme(void); +extern int statis, cyc; +extern void nl(void); +extern void smurf_pause(void); diff --git a/src/doors/smurfcombat/smurfrnz.c b/src/doors/smurfcombat/smurfrnz.c new file mode 100644 index 0000000000..e700148a9c --- /dev/null +++ b/src/doors/smurfcombat/smurfrnz.c @@ -0,0 +1,814 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! RENDEZVOUS */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include<ctype.h> +#include<genwrap.h> +#include"smurfext.h" + +/* use od_disp(buffer,size,optional local echo); --- userlist(1); */ + + +void +__etteit(int a, int b, int c, unsigned long d) +{ + int cost, outco_, gain, typo; + cost = smurfettelevel[thisuserno]; + cost *= d; + gain = xp_random(c) + b; + od_set_colour(D_GREEN, D_BLACK); + nl(); + nl(); + if (a > etpoints) { + od_printf("Insufficient Points!\n\r"); + smurf_pause(); + return; + } + if (cost > smurfmoney[thisuserno]) { + od_printf("Insufficient Money On Hand!\n\r"); + smurf_pause(); + return; + } + etpoints -= a; + smurfmoney[thisuserno] -= cost; + typo = xp_random(__ettemorale[thisuserno] / 2) + __ettemorale[thisuserno] / 2; + if (a > typo + 1) { + od_printf("Rejection!\n\r"); + deductettemorale(); + od_printf("You lost your standing with her while trying to go to far!\n\n\r"); + smurf_pause(); + return; + } + if (a == 10) { + od_printf("She accepts!!!"); + if (__ettemorale[thisuserno] < 100) + __ettemorale[thisuserno] = 100; + } else + od_printf("You Score!\n\r"); + od_printf("Hey stud, look like you raised your standing with her.\n\r"); + od_printf("Morale points: +%d\n\n\r", gain); + __ettemorale[thisuserno] += gain; + savegame(); + smurf_pause(); +} + +void +ettemenu(void) +{ + int xms; + ettelist(1); + smurf_pause(); + do { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf(" [ Smurfette Menu ]\n\r"); + nl(); + od_set_colour(L_CYAN, D_BLACK); + od_printf(" No Search Area Pts Price/Lvl\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [1] Grab Some Fast Food 1 10\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [2] Have a Night on The Town 2 100\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [3] Wieney Roast and Sing Along Concert 3 200\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [4] Visit Very,Very Expensive Resturant 4 500\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [5] Watch The Sunset on a Cruise Boat 6 1000\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [6] Go on a Wilderness Camping Trip 8 2000\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [7] Will You Marry Me? 10 10000\n\r"); + nl(); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [?] Smurfette Menu General Help\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [Q] Return To Main Menu\n\r"); + nl(); + xms = 0; + xms = __ettemorale[thisuserno] / 10; + if (xms > 10) + xms = 11; + + od_set_colour(L_GREEN, D_BLACK); + od_printf(" Smurfette Morale: %s (%d%%)\n\r", _ettemorale[xms], xms * 10); + od_printf(" Points Remaining: %i\n\r", etpoints); + od_set_colour(D_GREEN, D_BLACK); + if (statis) + od_printf(" Your Choice [1-7,S,V,Q]: ? "); + if (!statis) + od_printf(" Your Choice [1-4,V,Q]: ? "); + bbsinkey = (toupper(od_get_key(TRUE))); + if (bbsinkey == '?') { + od_clr_scr(); + od_send_file("smurfdat.d08"); + smurf_pause(); + } + if (bbsinkey == 'V' || bbsinkey == 'v') { + ettelist(1); + smurf_pause(); + } + if (bbsinkey == '1') + __etteit(1, 1, 1, 10); + if (bbsinkey == '2') + __etteit(2, 2, 1, 100); + if (bbsinkey == '3') + __etteit(3, 3, 1, 200); + if (bbsinkey == '4') + __etteit(4, 4, 3, 500); + if (bbsinkey == '5') + __etteit(6, 5, 5, 1000); + if (bbsinkey == '6') + __etteit(8, 10, 10, 2000); + if (bbsinkey == '7') + __etteit(10, 25, 25, 10000); + + } while (bbsinkey != 'Q' && bbsinkey != 'q'); + nl(); + nl(); +} + +void +__incite(int x, int c, int y) +{ + int outco_, xms; + unsigned long cost; + char bbsin4[10]; + userlist(1); + od_printf("Subject? (1-%d): ", noplayers); + od_input_str(bbsin4, 9, '0', '9'); + inuser = (atoi(bbsin4)) - 1; + if (inuser < 0) + return; + if (inuser >= noplayers) + return; + if (c == 2) + cost = smurfettelevel[inuser] * y; + if (c == 1) + cost = smurflevel[inuser] * y; + if (c == 0) + cost = smurfconfno[inuser] * y; + cost *= 1000; + od_clr_scr(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Smurf Name: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s\n\r", smurfname[inuser]); + if (c != 2) { + od_set_colour(D_CYAN, D_BLACK); + od_printf("Level: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i\n\r", smurflevel[inuser]); + } + if (c == 2) { + od_set_colour(D_CYAN, D_BLACK); + od_printf("Smurfette: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s\n\r", smurfettename[inuser]); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Ettelevel: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i\n\r", smurfettelevel[inuser]); + } + if (x != 1 && x < 4) { + od_set_colour(D_CYAN, D_BLACK); + od_printf("Confine: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s\n\r", smurfconf[inuser]); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Conf No: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i\n\r", smurfconfno[inuser]); + } + od_set_colour(D_CYAN, D_BLACK); + od_printf("Cost: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%lu\n\r", cost); + od_set_colour(D_GREEN, D_BLACK); + nl(); + if (cost > smurfmoney[thisuserno]) { + od_printf("Insufficient Money!\n\n\r"); + smurf_pause(); + return; + } + od_printf("Proceed [yN]: ? "); + bbsinkey = od_get_key(TRUE); + + od_set_colour(L_GREEN, D_BLACK); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + od_printf("Yea\n\n\r"); + od_set_colour(L_RED, D_BLACK); + od_printf("[Results]\n\r"); + sleep(2); + smurfmoney[thisuserno] -= cost; + + if (x == 3) { + sprintf(tempenform, "%s attacked %s's confine!!!\n\r", smurfname[thisuserno], smurfname[inuser]); + newshit(tempenform); + outco_ = xp_random(y / 10); + if (outco_) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + } + if (!outco_) { + od_set_colour(D_RED, D_BLACK); + od_printf("Failure\n\n\r"); + smurf_pause(); + return; + } od_set_colour(D_GREEN, D_BLACK); + sprintf(tempenform, "%s attacked your confine!!!\n\r", smurfname[thisuserno]); + logshit(inuser, tempenform); + outco_ = xp_random(y / 10) + y / 20; + od_printf("Confine Lowered %d Level(s)\n\r", outco_); + smurfconfno[inuser] -= outco_; + if (smurfconfno[inuser] < 1) { + smurfconfno[inuser] = 0; + od_printf("Confine Destroyed\n\r"); + sprintf(tempenform, "%s destroyed your confine!!!\n\r", smurfname[thisuserno]); + logshit(inuser, tempenform); + } + nl(); + smurf_pause(); + return; + } + if (x == 2) { + sprintf(tempenform, "%s sabotaged %s's confine!!!\n\r", smurfname[thisuserno], smurfname[inuser]); + newshit(tempenform); + outco_ = xp_random(y / 5); + if (outco_) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + } + if (!outco_) { + od_set_colour(D_RED, D_BLACK); + od_printf("Failure\n\n\r"); + smurf_pause(); + return; + } + od_set_colour(D_GREEN, D_BLACK); + smurfconfno[inuser] -= outco_; + if (smurfconfno[inuser] < 1) { + smurfconfno[inuser] = 0; + od_printf("Confine Destroyed\n\r"); + sprintf(tempenform, "%s destroyed your confine!!!\n\r", smurfname[thisuserno]); + logshit(inuser, tempenform); + } else + od_printf("Confine Damaged\n\r", outco_); + nl(); + smurf_pause(); + counthostages(); + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + for (cyc = 0; cyc < hcount; cyc++) + if (holder[cyc] == inuser) { + hostage[cyc] = 255; + holder[cyc] = 255; + } + } + od_printf("%d Hostage(s) have been rescued thanks to your efforts.\n\r0 Hostages remain!\n\r", numhost[inuser]); + if (__morale[inuser] < 2) + od_printf("You have offended the gods severely!!!\n\r"); + else if (__morale[inuser] < 3) + od_printf("Your crime will not go unpunished!\n\r"); + else if (__morale[inuser] < 5) + od_printf("Many people will look down on you for this.\n\r"); + else if (__morale[inuser] < 7) + od_printf("People will look up to you for some time...\n\r"); + else + od_printf("Soon after, you are congradulated by the head of justice!\n\r"); + if (__morale[inuser] < 5) + deductmorale(); + savegame(); + nl(); + smurf_pause(); + return; + } + if (x == 1) { + sprintf(tempenform, "%s *DEMORALIZED* %s!\n\r", smurfname[thisuserno], smurfname[inuser]); + newshit(tempenform); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + od_set_colour(D_GREEN, D_BLACK); + od_printf("Before: %s\n\r", _morale[__morale[inuser]]); + __morale[inuser]++; + od_printf("After: %s\n\n\r", _morale[__morale[inuser]]); + logshit(inuser, "Someone caused you to lost morale!\n\r"); + nl(); + smurf_pause(); + return; + } + if (x == 5) { + outco_ = xp_random(4); + if (outco_ == 1) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("Failure\n\rYou have been CAUGHT!!\n\r"); + od_set_colour(D_GREEN, D_BLACK); + sprintf(tempenform, "\n\rSEXUAL HARASSMENT!!\n\r", smurfname[thisuserno], smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " In broad daylight, %s made relentless\n\r", smurfname[thisuserno]); + newshit(tempenform); + sprintf(tempenform, " attempts to make %s, %s's ette\n\r", smurfettename[inuser], smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " to go to bed with him for 'a price' --Sgt. Broadwick Smurf\n\r\n\r"); + newshit(tempenform); + sprintf(tempenform, "%s tried to pimp your smurfette!!!\n\r", smurfname[thisuserno]); + logshit(inuser, tempenform); + deductmorale(); + smurf_pause(); + return; + } + sprintf(tempenform, "%s's Ette Arrested ***SELLING HER BODY***\n\r", smurfname[inuser]); + newshit(tempenform); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + od_set_colour(D_GREEN, D_BLACK); + xms = 0; + xms = __ettemorale[inuser] / 10; + if (xms > 10) + xms = 11; + od_printf("Before: %-21s (%d)\n\r", _ettemorale[xms], __ettemorale[inuser]); + __ettemorale[inuser] -= xp_random(9) + 1; + savegame(); + xms = 0; + xms = __ettemorale[inuser] / 10; + if (xms > 10) + xms = 11; + od_printf("After: %-21s (%d)\n\n\r", _ettemorale[xms], __ettemorale[inuser]); + logshit(inuser, "Your smurfette has become a teenage callgirl!!!\n\r"); + nl(); + smurf_pause(); + return; + } + if (x == 4) { + outco_ = xp_random(4); + if (outco_ == 1) { + sprintf(tempenform, "%s tried to talk crap about you in the Times!\n\r"); + logshit(inuser, tempenform); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + sprintf(tempenform, "--- %s is caught trying to enter an article\n\r", smurfname[thisuserno]); + newshit(tempenform); + sprintf(tempenform, " demeaning %s in the Smurf Times!!!\n\r", smurfname[inuser]); + newshit(tempenform); + deductmorale(); + } else { + logshit(inuser, "Someone has been spreading rumors of you in the Smurf Times!\n\r"); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + sprintf(tempenform, "\n\rSPECIAL REPORT:\n\r"); + newshit(tempenform); + sprintf(tempenform, " Secret Service agent Dwight Emancipation has hard\n\r"); + newshit(tempenform); + sprintf(tempenform, " evidence of %s MOLESTING\n\r", smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " hostages! The mayor expressed much concern over\n\r"); + newshit(tempenform); + sprintf(tempenform, " the matter and urges that someone attack his confine,\n\r"); + newshit(tempenform); + sprintf(tempenform, " and NOW!\n\r\n\r"); + newshit(tempenform); + } + nl(); + smurf_pause(); + return; + } + if (x == 6) { + outco_ = xp_random(4); + if (outco_ == 1) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("Failure\n\rYou have been CAUGHT!!\n\r"); + od_set_colour(D_GREEN, D_BLACK); + sprintf(tempenform, "\n\rRAPE ATTEMPT*******\n\r", smurfname[thisuserno], smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " %s was arrested yesterday\n\r", smurfname[thisuserno]); + newshit(tempenform); + sprintf(tempenform, " evening on charges of raping %s\n\r", smurfettename[inuser]); + newshit(tempenform); + sprintf(tempenform, " %s, her fiance expressed desire\n\r", smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " to 'KILL THAT MOTHER F***!'\n\r\n\r"); + newshit(tempenform); + sprintf(tempenform, "%s tried to ***RAPE*** %s!!!\n\r", smurfname[thisuserno], smurfettename[inuser]); + logshit(inuser, tempenform); + deductmorale(); + deductmorale(); + smurf_pause(); + return; + } + sprintf(tempenform, "\n\r o %s's ette found BRUTALLY BEATEN AND NUDE!\n\r", smurfname[inuser]); + newshit(tempenform); + sprintf(tempenform, " o %s had appearently had high amount of\n\r", smurfettename[inuser]); + newshit(tempenform); + sprintf(tempenform, " o alcohol in her blood and had no recollection of what happened.\n\r\n\r"); + newshit(tempenform); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Success\n\n\r"); + od_set_colour(D_GREEN, D_BLACK); + xms = 0; + xms = __ettemorale[inuser] / 10; + if (xms > 10) + xms = 11; + od_printf("Before: %-21s (%d)\n\r", _ettemorale[xms], __ettemorale[inuser]); + __ettemorale[inuser] -= xp_random(29) + 21; + savegame(); + xms = 0; + xms = __ettemorale[inuser] / 10; + if (xms > 10) + xms = 11; + od_printf("After: %-21s (%d)\n\n\r", _ettemorale[xms], __ettemorale[inuser]); + logshit(inuser, "Your smurfette was raped!!!\n\r"); + nl(); + smurf_pause(); + return; + } + } else { + od_printf("Nope\n\n\r"); + } +} + +void +inciterevolt(void) +{ + char bbsin4[11]; + do { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf(" [ Civil Operations ]\n\r"); + nl(); + od_set_colour(L_CYAN, D_BLACK); + od_printf(" No Operation Type Price Per\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [1] Demoralize Player 5,000 Level\n\r"); + od_printf(" [2] Publicize Hostage Abuse 5,000 Level\n\r"); + od_printf(" [3] Demoralize Smurfette 5,000 Level\n\r"); + od_printf(" [4] Rape Smurfette 10,000 Level\n\r"); + od_printf(" [5] Support Rescue Operation 10,000 Confn\n\r"); + od_printf(" [6] Attempt Rescue Operation 20,000 Confn\n\r"); + od_printf(" [7] Sabotage Confine 20,000 Confn\n\r"); + od_printf(" [8] Muster Confine Attack 100,000 Confn\n\r"); + nl(); + od_printf(" [?] Civil Operations Help\n\r"); + od_printf(" [V] View Smurf Ette Listing\n\r"); + od_printf(" [Q] Return To Main Menu\n\r"); + nl(); + od_set_colour(D_GREEN, D_BLACK); + if (statis) + od_printf(" Your Choice [1-5,S,V,Q]: ? "); + if (!statis) + od_printf(" Your Choice [1-3,5,V,Q]: ? "); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == '?') { + od_clr_scr(); + od_send_file("smurfdat.d06"); + smurf_pause(); + } + if (bbsinkey == 'v' || bbsinkey == 'V') { + userlist(1); + smurf_pause(); + } + if (bbsinkey == '1') { + __incite(1, 1, 5); + } + if (bbsinkey == '2') { + __incite(4, 1, 5); + } + if (bbsinkey == '3') { + __incite(5, 2, 5); + } + if (bbsinkey == '5') { + __incite(2, 0, 10); + } + if (bbsinkey == '7') { + __incite(3, 0, 20); + } if (statis) { + if (bbsinkey == '4') { + __incite(6, 2, 5); + } + if (bbsinkey == '6') { + __incite(2, 0, 20); + } + if (bbsinkey == '8') { + __incite(3, 0, 100); + } + } + if (!statis) + if (bbsinkey == '4' || bbsinkey == '6' || bbsinkey == '8') + mustregister(); + } while (bbsinkey != 'Q' && bbsinkey != 'q'); + nl(); + nl(); +} + +void +rendezvous() +{ + char bbsin4[4]; + ettelist(2); + smurf_pause(); + do { + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf(" [ ReNdEz-VouS Menu ]\n\r"); + nl(); + od_set_colour(L_CYAN, D_BLACK); + od_printf(" No Search Area Pts %\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [1] Probe City Streets 1 99\n\r"); + od_printf(" [2] Village Communities 2 40\n\r"); + od_printf(" [3] Industrial Areas 4 50\n\r"); + od_printf(" [4] Local Education Facils 6 20\n\r"); + od_printf(" [5] Night Life 10 80\n\r"); + od_printf(" [6] Journey To Other Lands 25 20\n\r"); + od_printf(" [7] Engage Full Blown Seance 25 ??\n\r"); + nl(); + od_printf(" [S] Attempt To Steal Smurfette\n\r"); + od_printf(" [V] View Smurf Ette Listing\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" [?] Rendez-Vous General Help\n\r"); + od_printf(" [Q] Return To Main Menu\n\r"); + nl(); + od_set_colour(L_GREEN, D_BLACK); + od_printf(" Points Remaining: %i\n\r", vpoints); + od_set_colour(D_GREEN, D_BLACK); + if (statis) + od_printf(" Your Choice [1-7,S,V,Q]: ? "); + if (!statis) + od_printf(" Your Choice [1-4,V,Q]: ? "); + bbsinkey = od_get_key(TRUE); + + if (bbsinkey == '?') { + od_clr_scr(); + od_send_file("smurfdat.d07"); + smurf_pause(); + } + if (bbsinkey == '1') { + rva(1); + } + if (bbsinkey == '2') { + rva(2); + } + if (bbsinkey == '3') { + rva(3); + } + if (bbsinkey == '4') { + rva(4); + } + if (statis) { + if (bbsinkey == '5') { + rva(5); + } + if (bbsinkey == '6') { + rva(6); + } + if (bbsinkey == '7') { + rva(7); + } + if (bbsinkey == 'S' || bbsinkey == 's') { + ettelist(2); + od_printf("Steal Which Ette? "); + od_input_str(bbsin4, 3, '0', '9'); + savegame(); + } + } + if (!statis) + if (bbsinkey == '5' || bbsinkey == '6' || bbsinkey == '7' || bbsinkey == 'S' || bbsinkey == 's') + mustregister(); + if (bbsinkey == 'V' || bbsinkey == 'v') { + ettelist(2); + smurf_pause(); + } + } while (bbsinkey != 'Q' && bbsinkey != 'q'); + nl(); + nl(); +} + + + + + + + + +void +rva(int sel__) +{ + int charg, chance, bevl, dmx, cst, outco_; + if (sel__ == 1) { + charg = 1; + chance = 99; + bevl = 1; + dmx = 2; + cst = 1000; + } + if (sel__ == 2) { + charg = 2; + chance = 40; + bevl = 3; + dmx = 4; + cst = 2000; + } + if (sel__ == 3) { + charg = 4; + chance = 50; + bevl = 2; + dmx = 3; + cst = 1000; + } + if (sel__ == 4) { + charg = 6; + chance = 20; + bevl = 5; + dmx = 5; + cst = 5000; + } + if (sel__ == 5) { + charg = 10; + chance = 80; + bevl = 6; + dmx = 3; + cst = 2000; + } + if (sel__ == 6) { + charg = 25; + chance = 20; + bevl = 7; + dmx = 3; + cst = 10000; + } + if (sel__ == 7) { + charg = 25; + chance = 80; + bevl = 1; + dmx = 9; + cst = 100; + } + od_clr_scr(); + od_set_colour(D_CYAN, D_BLACK); + od_printf("Rendezvous Points: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i Points\n\r", vpoints); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" Charge: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i Points\n\r", charg); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" Expense: "); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%i Gold\n\r", cst); + od_set_colour(D_GREEN, D_BLACK); + nl(); + if (charg > vpoints) { + od_printf("Insufficient Points!\n\n\r"); + smurf_pause(); + return; + } + if (cst > smurfmoney[thisuserno]) { + od_printf("Insufficient Gold On Hand!\n\n\r"); + smurf_pause(); + return; + } + od_printf("Attempt ReNdEz-VouS [yN]: ? "); + bbsinkey = od_get_key(TRUE); + od_set_colour(L_GREEN, D_BLACK); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + vpoints -= charg; + od_printf("Yea\n\n\r"); + od_set_colour(L_RED, D_BLACK); + od_printf("Success : %i%%\n\rOutcome : ", chance); + sleep(2); + outco_ = xp_random(101); + if (outco_ <= chance) { + od_set_colour(L_GREEN, D_BLACK); + od_printf("ReNdEz-VouS\n\n\r"); + } + if (outco_ > chance) { + od_set_colour(D_RED, D_BLACK); + od_printf("Failure\n\n\r"); + smurf_pause(); + return; + } + charg = xp_random(dmx) + bevl; + chance = xp_random(20); + nl(); + od_set_colour(L_MAGENTA, D_BLACK); + od_printf("Smurfette Name : %s\n\r", ettenamez[chance]); + od_printf("Level: %i\n\r", charg); + nl(); + etpoints += charg * 10; + if (etpoints < 25) + etpoints = 25; + od_set_colour(D_RED, D_BLACK); + od_printf("Acceptable [yN]: ? "); + od_set_colour(L_RED, D_BLACK); + bbsinkey = od_get_key(TRUE); + if (bbsinkey == 'Y' || bbsinkey == 'y') { + vpoints -= charg; + sprintf(tempenform, "%s ReNDeZ-VouS avec %s\n\r", ettenamez[chance], smurfname[thisuserno]); + newshit(tempenform); + od_printf("Yea\n\n\r"); + __ettemorale[thisuserno] = 0; +#ifdef TODO_WRAPPERS + strset(smurfettename[thisuserno], 0); +#else + memset(smurfettename[thisuserno], 0, sizeof(smurfettename[thisuserno])); +#endif + sprintf(smurfettename[thisuserno], "%s", ettenamez[chance]); + smurfettelevel[thisuserno] = charg; + etpoints = smurfettelevel[thisuserno] * 10; + if (etpoints > 25) + etpoints = 25; + } else + od_printf("Nope\n\n\r"); + } else { + od_printf("Nope\n\n\r"); + } +} + + + + + + + + + + + + +void +ettelist(int high) +{ + int ref[256], conflicted, listno = noplayers; + for (cyc = 0; cyc < noplayers; cyc++) { + conflicted = 0; + if (smurfexper[cyc] == 0) + listno--; + else { + for (cyc2 = 0; cyc2 < noplayers; cyc2++) { + if (smurfexper[cyc2] > smurfexper[cyc]) + conflicted++; + } + ref[conflicted] = cyc; + } + } + od_clr_scr(); + od_set_attrib(SD_RED); + od_disp_str(" No. Smurf Name Smurfette Morale Level\n\r"); + od_set_attrib(SD_YELLOW); + od_disp_str("------------------------------------------------------------------------\n\r"); + for (cyc = 0; cyc < listno; cyc++) { + od_set_attrib(SD_GREEN); + if (thisuserno == ref[cyc]) + od_set_colour(L_CYAN, D_BLACK); + od_printf(" %2i : ", cyc + 1); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == ref[cyc]) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %-20s", smurfname[ref[cyc]], smurfettename[ref[cyc]]); + if (high == 1) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%5i%%", __ettemorale[ref[cyc]]); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == ref[cyc]) + od_set_colour(L_CYAN, D_BLACK); + if (high == 2) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%5i\n\r", smurfettelevel[ref[cyc]]); + } + for (cyc = 0; cyc < noplayers; cyc++) { + if (smurfexper[cyc] == 0) { + listno++; + od_set_attrib(SD_GREEN); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf(" %2i : ", listno); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%-30s %-20s", smurfname[cyc], smurfettename[cyc]); + if (high == 1) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%5i%%", __ettemorale[cyc]); + od_set_colour(D_GREY, D_BLACK); + if (thisuserno == cyc) + od_set_colour(L_CYAN, D_BLACK); + if (high == 2) + od_set_colour(L_CYAN, D_BLACK); + od_printf("%5i\n\r", smurfettelevel[cyc]); + /* od_printf("%-30s %-20s %5i%% + * %5i\n\r",smurfname[cyc],smurfettename[cyc],__ettemorale[cyc],sm + * urfettelevel[cyc]); */ + } + } + nl(); +} diff --git a/src/doors/smurfcombat/smurfsav.h b/src/doors/smurfcombat/smurfsav.h new file mode 100644 index 0000000000..1561f37d97 --- /dev/null +++ b/src/doors/smurfcombat/smurfsav.h @@ -0,0 +1,301 @@ +void +savegame(void) +{ + int thp; + stream = fopen("smurf.sgm", "w+"); + fprintf(stream, "%03i", noplayers); + fprintf(stream, "%05.5s", __saveversion); + for (cyc = 0; cyc < noplayers; cyc++) { + if (smurfturns[cyc] < 0) + smurfturns[cyc] = 0; + if (smurffights[cyc] < 0) + smurffights[cyc] = 0; + thp = smurfhpm[cyc]; + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", realname[cyc][cyc2]); + fprintf(stream, "%010i", realnumb[cyc]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfname[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 80; cyc2++) + fprintf(stream, "%03i", smurftext[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfweap[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfarmr[cyc][cyc2]); + for (cyc2 = 0; cyc2 < 40; cyc2++) + fprintf(stream, "%03i", smurfettename[cyc][cyc2]); + fprintf(stream, "%010i", smurfettelevel[cyc]); + fprintf(stream, "%010i", smurfweapno[cyc]); + fprintf(stream, "%010i", smurfarmrno[cyc]); + for (cyc3 = 0; cyc3 < 40; cyc3++) + fprintf(stream, "%03i", smurfconf[cyc][cyc3]); + fprintf(stream, "%010i", smurfconfno[cyc]); + for (cyc3 = 0; cyc3 < 10; cyc3++) { + /* 69d */ fprintf(stream, "%010i", smurfhost[cyc][cyc3]); + } + + /* 69a fprintf(stream, "%010i",smurfhost[cyc]);fprintf(stream, + * "%010i",smurfhost1[cyc]);fprintf(stream, "%010i",smurfhost2[cyc]); */ + fprintf(stream, "%010i", smurflevel[cyc]); + fprintf(stream, "%020.0f", smurfexper[cyc]); + fprintf(stream, "%020.0f", smurfmoney[cyc]); + fprintf(stream, "%020.0f", smurfbankd[cyc]); + fprintf(stream, "%010i", smurffights[cyc]); + fprintf(stream, "%010i", smurfwin[cyc]); + fprintf(stream, "%010i", smurflose[cyc]); + fprintf(stream, "%010i", thp); + fprintf(stream, "%010i", smurfhpm[cyc]); + fprintf(stream, "%010i", smurfstr[cyc]); + fprintf(stream, "%010i", smurfspd[cyc]); + fprintf(stream, "%010i", smurfint[cyc]); + fprintf(stream, "%010i", smurfcon[cyc]); + fprintf(stream, "%010i", smurfbra[cyc]); + fprintf(stream, "%010i", smurfchr[cyc]); + fprintf(stream, "%010i", smurfturns[cyc]); + + /* 91 */ if (__morale[cyc] >= 13) { + __morale[cyc] = 13; + } + /* 91 */ if (__ettemorale[cyc] >= 999) { + __ettemorale[cyc] = 999; + } + /* 91 */ if (__morale[cyc] < 1) { + __morale[cyc] = 0; + } + /* 91 */ if (__ettemorale[cyc] < 1) { + __ettemorale[cyc] = 0; + } + /* 91 */ fprintf(stream, "%03i%03i", __morale[cyc], __ettemorale[cyc]); + + for (cyc3 = 0; cyc3 < 5; cyc3++) { + /* 69b */ fprintf(stream, "%03i%03i", smurfspcweapon[cyc][cyc3], smurfqtyweapon[cyc][cyc3]); /* 111222 - Special Weap + * Number / Qty */ + } + /* 69c */ fprintf(stream, "%03i", smurfsex[cyc]); /* 000/001/002 + * Nil/Mal/Fem */ + + } fclose(stream); +} + + + + + + + + + + + + + + +void +loadgame(void) +{ + char intext[81], revtext[10], outtext[81] = ""; + int inputint; + stream = fopen("smurf.sgm", "r+"); + if(stream == NULL) { + stream = fopen("smurf.sgm", "w+"); + fprintf(stream,"%03i%05.5s",0 , __saveversion); + fseek(stream, 0, SEEK_SET); + } + cyc = 0; + fscanf(stream, "%3s", intext); + noplayers = atoi(intext); + fscanf(stream, "%5s", intext); /* save version */ + + for (cyc = 0; cyc < noplayers; cyc++) { + + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(realname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + realnumb[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfname[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 80; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurftext[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfweap[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfarmr[cyc], "%s", outtext); + sprintf(outtext, "\0"); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfettename[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfettelevel[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfweapno[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfarmrno[cyc] = atoi(intext); + for (cyc2 = 0; cyc2 < 40; cyc2++) { + fscanf(stream, "%3s", intext); + inputint = atoi(intext); + sprintf(revtext, "%c", inputint); + strcat(outtext, revtext); + } + sprintf(smurfconf[cyc], "%s", outtext); + sprintf(outtext, "\0"); + fscanf(stream, "%10s", intext); + smurfconfno[cyc] = atoi(intext); + /* 69b */ for (cyc3 = 0; cyc3 < 10; cyc3++) { + fscanf(stream, "%10s", intext); + smurfhost[cyc][cyc3] = atoi(intext); + } + /* fscanf(stream,"%10s",intext);smurfhost1[cyc]=atoi(intext); //69b */ + /* fscanf(stream,"%10s",intext);smurfhost2[cyc]=atoi(intext); //69b */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + /* 69a fscanf(stream,"%10s",intext);smurfhost[cyc][0]=atoi(intext); */ + fscanf(stream, "%10s", intext); + smurflevel[cyc] = atoi(intext); + fscanf(stream, "%20s", intext); + smurfexper[cyc] = atof(intext); + fscanf(stream, "%20s", intext); + smurfmoney[cyc] = atof(intext);/* if(smurfmoney[cyc]<0)smurfmoney[cyc] + * =0; */ + fscanf(stream, "%20s", intext); + smurfbankd[cyc] = atof(intext); + fscanf(stream, "%10s", intext); + smurffights[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfwin[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurflose[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhp[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfhpm[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfstr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfspd[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfint[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfcon[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfbra[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfchr[cyc] = atoi(intext); + fscanf(stream, "%10s", intext); + smurfturns[cyc] = atoi(intext); + + /* 91 */ fscanf(stream, "%3s", intext); + __morale[cyc] = atoi(intext); + /* 91 */ fscanf(stream, "%3s", intext); + __ettemorale[cyc] = atoi(intext); + /* 91 */ if (__morale[cyc] >= 13) { + __morale[cyc] = 13; + } + /* 91 */ if (__ettemorale[cyc] >= 999) { + __ettemorale[cyc] = 999; + } + /* 91 */ if (__morale[cyc] < 1) { + __morale[cyc] = 0; + } + /* 91 */ if (__ettemorale[cyc] < 1) { + __ettemorale[cyc] = 0; + } + for (cyc3 = 0; cyc3 < 5; cyc3++) { + /* 69b */ fscanf(stream, "%3s", intext); + smurfspcweapon[cyc][cyc3] = atoi(intext); + /* 69b */ fscanf(stream, "%3s", intext); + smurfqtyweapon[cyc][cyc3] = atoi(intext); + } + /* 69c */ fscanf(stream, "%3s", intext); + smurfsex[cyc] = atoi(intext); + + } fclose(stream); +} + + + + + + + + + + + + + + + + +#ifndef DOSMODEONLY +void +detectversion(void) +{ + char intext[6]; + stream = fopen("smurf.sgm", "r+"); + if(stream == NULL) { + stream = fopen("smurf.sgm", "w+"); + fprintf(stream,"%03i%05.5s",0 , __saveversion); + fseek(stream, 0, SEEK_SET); + } + cyc = 0; + fscanf(stream, "%3s", intext); /* noplayers=atoi(intext); */ + fscanf(stream, "%5s", intext); /* save version */ + fclose(stream); + if (intext[0] == 'w') + wongame(); + if (strcmp(intext, __saveversion) != 0) + __mess(10); +} +#endif + + +void +detectsave(void) +{ + if ((stream = fopen("smurf.sgm", "r+")) == NULL) + __NEW__main(); + /* spawnl(P_WAIT,"SMURFnew",NULL); else fclose(stream); */ +} + +void +detectwin(void) +{ + if ((stream = fopen("smurfdat.d0e", "r+")) != NULL) { + fclose(stream); + wongame(); + } +} diff --git a/src/doors/smurfcombat/smurfset.c b/src/doors/smurfcombat/smurfset.c new file mode 100644 index 0000000000..28f1478edb --- /dev/null +++ b/src/doors/smurfcombat/smurfset.c @@ -0,0 +1,205 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! SETUP */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + + +#ifdef TODO_HEADERS +/* Setup 1.00 */ +#include<dir.h> +/* Setup 1.00 */ +#include<io.h> +/* Setup 1.00 */ +#include<process.h> +#endif +/* Setup 1.00 */ +#include<stdio.h> +/* Setup 1.00 */ +#include<stdlib.h> +/* Setup 1.00 */ +#include<ciolib.h> +/* Setup 1.00 */ +#include<fcntl.h> +/* Setup 1.00 */ +#include<string.h> +/* Setup 1.00 */ +#include<sys/stat.h> +/* Setup 1.00 */ +#include<genwrap.h> +/* Setup 1.00 */ +#include<filewrap.h> +#include<dirwrap.h> + /* Setup 1.00 */ char _fname[15]; + /* Setup 1.00 */ typedef struct { + /* Setup 1.00 */ unsigned char parameter[11]; + /* Setup 1.00 */ char directory[10][90]; + /* Setup 1.00 */ +} configrec; + /* Setup 1.00 */ configrec config; + /* Setup 1.00 */ char *yn[2] = {"No", "Yes"}; + /* Setup 1.00 */ void +__errormessage(int x, char y[15]) +{ + /* Setup 1.00 */ printf("Error #%d with file %s", x, y); + exit(0); +} + /* Setup 1.00 */ void +__loadconfiguration(void) + /* Initiate */ +{ + /* Initiate */ int __userhandle, bytes; + /* Open Save */ sprintf(_fname, "bolivia.cfg"); + /* Open Save */ if ((__userhandle = open(_fname, O_RDONLY | O_BINARY, S_IWRITE | S_IREAD)) == -1) + __errormessage(1, _fname); + /* Open Save */ if ((bytes = read(__userhandle, (void *)&config, sizeof(configrec))) == -1) + __errormessage(2, _fname); + /* Close Up */ close(__userhandle); + /* Terminate */ +} + /* Setup 1.00 */ void +__saveconfiguration(void) + /* Initiate */ +{ + /* Initiate */ int __userhandle, bytes; + /* Open Save */ sprintf(_fname, "bolivia.cfg"); + /* Open Save */ if ((__userhandle = open(_fname, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE)) == -1) + __errormessage(1, _fname); + /* Open Save */ if ((bytes = write(__userhandle, (void *)&config, sizeof(configrec))) != sizeof(configrec)) + __errormessage(3, _fname); + /* Close Up */ close(__userhandle); + /* Terminate */ +} + /* Setup 1.00 */ void +dline(void) +{ + /* Terminate */ cprintf("\r \r"); +} + /* Setup 1.00 */ void +dnl(void) +{ + /* Terminate */ cprintf("\r \n\r"); +} + /* Setup 1.00 */ void +__window(int x1, int x2, int c1, int c2) + /* Initiate */ +{ + int cyc; + /* Initiate */ textcolor(c1); + /* Initiate */ textbackground(c2); + /* Initiate */ for (cyc = x1; cyc < x2; cyc++) { + /* Initiate */ gotoxy(1, cyc); + cprintf("º"); + /* Initiate */ gotoxy(80, cyc); + cprintf("º"); + /* Initiate */ + } + /* Initiate */ for (cyc = x1; cyc < x2; cyc++) { + /* Initiate */ gotoxy(2, cyc); + cprintf(" "); + /* Initiate */ + } + /* Initiate */ gotoxy(2, x1); + cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"); + /* Initiate */ gotoxy(2, x2); + cprintf("ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ"); + /* Initiate */ gotoxy(1, x1); + cprintf("É"); + /* Initiate */ gotoxy(1, x2); + cprintf("È"); + /* Initiate */ gotoxy(80, x1); + cprintf("»"); + /* Initiate */ gotoxy(80, x2); + cprintf("¼"); + /* Initiate */ +} + + + + + /* Setup 1.00 */ void +__SET__main(void) +{ + /* Setup 1.00 */ char path[80], pathname[160], path2[80], path3[3], + type; + FILE *stream; + /* Setup 1.00 */ textbackground(0); + clrscr(); + /* Setup 1.00 */ __window(1, 7, 14, 1); + /* Setup 1.00 */ gotoxy(5, 3); + cprintf(" Maartian Enterprises"); + /* Setup 1.00 */ gotoxy(5, 5); + cprintf(" Standardized Setup Program 1.0"); + /* Setup 1.00 */ __window(21, 23, 14, 1); + /* Setup 1.00 */ gotoxy(3, 22); + cprintf("(C) Copyright 1993 - Laurence Maar - No Fee May Be Charged For This Software"); + /* Setup 1.00 */ window(1, 10, 80, 18); + /* Setup 1.00 */ gotoxy(1, 1); + textbackground(0); + /* Setup 1.00 */ textcolor(10); + cprintf("Enter Directory Containing BBS Program (No Trailing Backslash) \n\r"); + /* Setup 1.00 */ textcolor(2); + cprintf("C:\\BBS \n\r"); + /* Setup 1.00 */ textcolor(15); + dline(); + cgets(path); + /* Setup 1.00 */ textcolor(10); + cprintf("\n\rEnter Directory Containing THIS Program (No Trailing Backslash)\n\r"); + /* Setup 1.00 */ textcolor(2); + cprintf("C:\\BBS\\SMURF \n\r"); + /* Setup 1.00 */ textcolor(15); + dline(); + cgets(path2); + /* Setup 1.00 */ textcolor(11); + textcolor(7); + /* Setup 1.00 */ clrscr(); + /* Setup 1.00 */ cprintf("\n\rSelect Door Information File Format\n\n\r"); + /* Setup 1.00 */ cprintf("[1] CHAIN.TXT - Apex/Telegard/WWiV\n\r"); + /* Setup 1.00 */ cprintf("[2] DOOR.SYS - Apex/GAP/RemoteAccess/Spitfire v3/TAG/Telegard/Wildcat v3\n\r"); + /* Setup 1.00 */ cprintf("[3] DORINFOx.DEF - Apex/QBBS/RBBS/RemoteAccess/Telegard\n\r"); + /* Setup 1.00 */ cprintf("[4] SFDOORS.DAT - Apex/Spitfire/Telegard/TriTel\n\r"); + /* Setup 1.00 */ cprintf("[5] CALLINFO.BBS - Apex/Telegard/Wildcat [A]/Wildcat [B]\n\n\r"); + /* Setup 1.00 */ textcolor(15); + dline(); + cgets(path3); + type = atoi(path3); + /* Setup 1.00 */ textcolor(11); + textcolor(7); + /* Setup 1.00 */ window(1, 1, 80, 25); + clrscr(); + /* Setup 1.00 */ chdir(path); + /* Setup 1.00 */ sprintf(pathname, "smurf.bat", path); + /* Setup 1.00 */ stream = fopen(pathname, "w+"); + /* Setup 1.00 */ fprintf(stream, "@echo off\n\r"); + /* Setup 1.00 */ fprintf(stream, "echo The Fossil Driver BNU is included with this program.\n\r", path2); + /* Setup 1.00 */ fprintf(stream, "echo The author of Smurf Combat encourages that you register\n\r", path2); + /* Setup 1.00 */ fprintf(stream, "echo BNU if you already havn't done so. This program will\n\r", path2); + /* Setup 1.00 */ fprintf(stream, "echo not function without a fossil driver such as BNU or X00. \n\r", path2); + /* Setup 1.00 */ fprintf(stream, "echo BNU is (C) 1989 by David Nugent & Unique Computing Ptd Ltd \n\r", path2); + /* Setup 1.00 */ fprintf(stream, "cd %s\n\r", path2); + /* Setup 1.00 */ if (type == 1) + fprintf(stream, "copy %s\\CHAIN.TXT\n\r", path2); + /* Setup 1.00 */ if (type == 2) + fprintf(stream, "copy %s\\DOOR.SYS\n\r", path2); + /* Setup 1.00 */ if (type == 3) + fprintf(stream, "copy %s\\DORINFO*.DEF\n\r", path2); + /* Setup 1.00 */ if (type == 4) + fprintf(stream, "copy %s\\SFDOORS.DAT\n\r", path2); + /* Setup 1.00 */ if (type == 5) + fprintf(stream, "copy %s\\CALLINFO.BBS\n\r", path2); + /* Setup 1.00 */ fprintf(stream, "BNU\n\r"); + /* Setup 1.00 */ fprintf(stream, "SMURF %%1 %%2 %%3 %%4 %%5 %%6 %%7 %%8 %%9\n\r"); + /* Setup 1.00 */ fprintf(stream, "cd %s\n\r", path); + /* Setup 1.00 */ fclose(stream); + /* Setup 1.00 */ chdir(path2); + /* Setup 1.00 */ +} diff --git a/src/doors/smurfcombat/smurfsrv.c b/src/doors/smurfcombat/smurfsrv.c new file mode 100644 index 0000000000..f8d21bff2e --- /dev/null +++ b/src/doors/smurfcombat/smurfsrv.c @@ -0,0 +1,180 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! SERVICES */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" +#include <ctype.h> + + + + +void +service(void) +{ + od_set_colour(11, 0); + od_printf("\n\n\r<<You are not powerful enough to join the Secret Service>>\n\n\r"); + smurf_pause(); +} + + + + + + + + + + + + + + + +void +abilities(void) +{ + int r1, r2, r3, r4; + char bbsin4[2]; + r1 = smurfcon[thisuserno] / 4; + r2 = smurfstr[thisuserno] / 5; + + if (r1 >= r2) { + r1 = 1; + r2 = 1; + } + od_clr_scr(); + od_set_colour(L_RED, D_BLACK); + od_printf(" [ Swap Abilities ]\n\r"); + od_set_colour(D_CYAN, D_BLACK); + od_printf(" Ratio: %d:%d\n\n\r", r1, r2); + od_set_colour(D_GREEN, D_BLACK); + od_printf(" (1) Strength (%d)\n\r", smurfstr[thisuserno]); + od_printf(" (2) Speed (%d)\n\r", smurfspd[thisuserno]); + od_printf(" (3) Intelligence (%d)\n\r", smurfint[thisuserno]); + od_printf(" (4) Constitution (%d)\n\r", smurfcon[thisuserno]); + od_printf(" (5) Bravery (%d)\n\r", smurfbra[thisuserno]); + od_printf(" (6) Charisma (%d)\n\n\r", smurfchr[thisuserno]); + + od_set_colour(L_GREEN, D_BLACK); + od_printf(" Increase Which: "); + od_input_str(bbsin4, 1, '1', '6'); + r3 = atoi(bbsin4); + od_printf(" Decrease Which: "); + od_input_str(bbsin4, 1, '1', '6'); + r4 = atoi(bbsin4); + + od_set_colour(D_CYAN, D_BLACK); + + if ((r4 == 1 && smurfstr[thisuserno] - r2 < 7) || (r4 == 2 && smurfspd[thisuserno] - r2 < 7) || (r4 == 3 && smurfint[thisuserno] - r2 < 7) || (r4 == 4 && smurfcon[thisuserno] - r2 < 7) || (r4 == 5 && smurfbra[thisuserno] - r2 < 7) || (r4 == 6 && smurfchr[thisuserno] - r2 < 7)) { + od_printf("\n\rNo value can go below 7\n\n\r"); + return; + } + if (r3 < 1 || r4 < 1 || r3 == r4) { + od_printf("\n\n\rNothing changed, laughing boy.\n\n\r"); + return; + } + od_printf("\n\rAre you sure? [yN]: "); + bbsinkey = od_get_key(TRUE); + od_set_colour(L_CYAN, D_BLACK); + if (bbsinkey != 'Y' && bbsinkey != 'y') { + od_printf("Nope\n\n\r"); + return; + } + od_printf("Yea\n\n\r"); + + if (r3 == 1) + smurfstr[thisuserno] += r1; + if (r3 == 2) + smurfspd[thisuserno] += r1; + if (r3 == 3) + smurfint[thisuserno] += r1; + if (r3 == 4) + smurfcon[thisuserno] += r1; + if (r3 == 5) + smurfbra[thisuserno] += r1; + if (r3 == 6) + smurfchr[thisuserno] += r1; + if (r4 == 1) + smurfstr[thisuserno] -= r2; + if (r4 == 2) + smurfspd[thisuserno] -= r2; + if (r4 == 3) + smurfint[thisuserno] -= r2; + if (r4 == 4) + smurfcon[thisuserno] -= r2; + if (r4 == 5) + smurfbra[thisuserno] -= r2; + if (r4 == 6) + smurfchr[thisuserno] -= r2; +} + + + + + + + + + +void +increasemorale(void) +{ + __morale[thisuserno]--; + savegame(); + od_set_colour(L_CYAN, D_BLACK); + od_printf("You gained morale!!! \n\r"); +} + +void +deductmorale(void) +{ + __morale[thisuserno]++; + savegame(); + od_printf("You lost morale!\n\r"); +} + +void +deductettemorale(void) +{ + __ettemorale[thisuserno] -= xp_random(10); + savegame(); +} + + + +void +__hit(int hit) +{ + od_set_colour(D_CYAN, D_BLACK); + if (hit == 0) + od_printf("%s\n\r", __amiss[xp_random(10)]); + else + od_printf("%s %i points!\n\r", __ahit[xp_random(10)], hit); + od_sleep(300); +} + +void +__ehit(int hit, int numba) +{ + char *ref; + ref = dataref3[smurfsex[numba]]; + if (numba == 0) + sprintf(ref, "It"); + od_set_colour(D_CYAN, D_BLACK); + if (hit == 0) + od_printf("%s couldnt quite smurf you!\n\r", ref); + else + od_printf("He smurfed you for %i points!\n\r", hit); + od_sleep(300); +} diff --git a/src/doors/smurfcombat/smurfuar.c b/src/doors/smurfcombat/smurfuar.c new file mode 100644 index 0000000000..8fdc1bf8ad --- /dev/null +++ b/src/doors/smurfcombat/smurfuar.c @@ -0,0 +1,380 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! ARENA */ +/* REMOTE Maintenance Code: !-SIX-NINE-| MODULE */ +/* */ +/***************************************************************************/ + +#include "smurfext.h" +#ifndef TODO_WRAPPERS +#define strset(x,y) memset(x,y,sizeof(x)); +#endif + + + + +void +userarena(void) +{ + int ht = 0, tw = 0, ta = 0, erand, numba, ew, aw, round, + run = 0, hit = 0, enemyhp, old, mod; + char enemie[41], eweapon[41], earmor[41], bbsin[10], *enform; + float gf, ef; + if (smurffights[thisuserno] < 1) { + smurffights[thisuserno] = 0; + od_printf("\n\rOutta Turns!\n\n\r"); + return; + } + /* stream = fopen("SMURF.LOG", "a+"); */ + /* fprintf(stream, "USERF(%i):%s ... + * ",od_control.user_num,smurfname[thisuserno]); */ + /* fclose(stream); */ + + userlist(1); + + + od_set_colour(L_CYAN, D_BLACK); + od_printf("Number Of Smurf To Fight: (0-%d)? ", noplayers); + od_input_str(bbsin, 2, '0', '9'); + numba = atoi(bbsin); + erand = xp_random(10); + + if (numba < 1) + return; + + if (numba < 1 || numba > noplayers) { + od_printf("\n\rNot Listed!\n\n\r"); + return; + } + if (numba == thisuserno + 1) { + od_printf("\n\rWe do not encourage suicide...\n\n\r"); + return; + } + for (cyc = 0; cyc < hcount; cyc++) { + if (hostage[cyc] == numba - 1 && holder[cyc] == thisuserno) { + od_set_colour(L_RED, D_BLACK); + od_printf("\n\rThat's YOUR Hostage!\n\n\r", smurfname[holder[cyc]]); + return; + } else if (hostage[cyc] == numba - 1) { + od_set_colour(L_RED, D_BLACK); + od_printf("\n\rThat Smurf is %s's Hostage!\n\n\r", smurfname[holder[cyc]]); + return; + } + } + /* if(smurfhpm[numba-1]<1 || smurfhp[numba-1]<1){ + * od_set_colour(L_RED,D_BLACK); od_printf("\n\rThat Smurf is + * *UNDEAD*!\n\n\r");smurf_pause(); smurfhpm[numba-1]==xp_random(500)+100; } */ + + numba--; + enemyhp = smurfhpm[numba]; + + strset(eweapon, 0); + strset(earmor, 0); + sprintf(eweapon, "%s", smurfweap[numba]); + sprintf(earmor, "%s", smurfarmr[numba]); + + ew = (smurfweapno[numba] + 1) * 5; + aw = (smurfarmrno[numba] + 1) * 4; + sprintf(enemie, "%s", smurfname[numba]); + smurffights[thisuserno]--; + + if (xp_random(25) == 1) + registerme(); + od_clr_scr(); + od_set_colour(L_CYAN, D_BLACK); + od_printf("%s %s\n\r", enemie, defstartline[erand]); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Y: Weapon: %s, %i Pts\n\rY: Defense: %s, %i Pts\n\n\r", smurfweap[thisuserno], (smurfweapno[thisuserno] + 1) * 5, smurfarmr[thisuserno], (smurfarmrno[thisuserno] + 1) * 4); + od_printf("E: Weapon: %s, %i Pts\n\rE: Defense: %s, %i Pts\n\n\r", eweapon, ew, earmor, aw); + + do { + od_set_colour(D_CYAN, D_BLACK); + od_printf("%s has %i points left.\n\r", dataref3[smurfsex[numba]], enemyhp); + od_set_colour(D_CYAN, D_BLACK); + od_printf("You have %i points left.\n\r", smurfhp[thisuserno]); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("(A)ttack (R)un (S)tats: ", enemie); + + bbsinkey = od_get_key(TRUE); + mod = smurfstr[thisuserno] * 5; + if (mod > 150) + mod = 150; + if (mod < 50) + mod = 50; + switch (bbsinkey) { + case 'A': + case 'a': + od_set_colour(L_CYAN, D_BLACK); + od_printf("Attack!\n\r"); + if ((xp_random(smurfspd[thisuserno])) > (xp_random(smurfspd[numba]))) { + + hit = ((xp_random((smurfweapno[thisuserno] + 1) * 5) * mod) / 100) + 1; + hit -= xp_random(aw); + if (hit < 0) + hit = 0; + enemyhp -= hit; + __hit(hit); + + if (enemyhp > 0) { + hit = xp_random(ew) + 1; + hit = hit - xp_random(aw); + if (hit < 0) + hit = 0; + smurfhp[thisuserno] = (smurfhp[thisuserno] - hit); + __ehit(hit, numba); + } + } else { + hit = xp_random(ew) + 1; + hit = hit - xp_random(aw); + if (hit < 0) + hit = 0; + smurfhp[thisuserno] = (smurfhp[thisuserno] - hit); + __ehit(hit, numba); + + if (smurfhp[thisuserno] > 0) { + hit = ((xp_random((smurfweapno[thisuserno] + 1) * 5) * mod) / 100) + 1; + hit -= xp_random(aw); + if (hit < 0) + hit = 0; + enemyhp -= hit; + __hit(hit); + } + } nl(); + nl(); + /* if(enemyhp>0 && smurfhp[thisuserno]>0)od_clr_scr(); */ + /* else */ + nl(); + nl(); + break; + + case 'R': + case 'r': + run = 1; + od_printf("Run\n\n\rWimp!\n\n\r"); + smurflose[thisuserno]++; + if (xp_random(10) == 1) + deductmorale(); + if (xp_random(3) == 1) { + deductettemorale(); + od_printf("Your smurfette is ashamed to know you...\n\r"); + } + nl(); + break; + + case 'S': + case 's': + od_set_colour(L_CYAN, D_BLACK); + od_clr_scr(); + od_printf("Enemie: %s [Level %i]\n\r", enemie, smurflevel[numba]); + od_set_colour(L_GREEN, D_BLACK); + od_printf("Y: Weapon: %s, %i Pts\n\rY: Defense: %s, %i Pts\n\n\r", smurfweap[thisuserno], (smurfweapno[thisuserno] + 1) * 5, smurfarmr[thisuserno], (smurfarmrno[thisuserno] + 1) * 4); + od_printf("E: Weapon: %s, %i Pts\n\rE: Defense: %s, %i Pts\n\n\r", eweapon, ew, earmor, aw); + break; + + default: + nl(); + nl(); + break; + } + } + while (enemyhp > 0 && smurfhp[thisuserno] > 0 && run != 1); + + od_set_colour(L_BLUE, D_BLACK); + + + + + + + + + + + + + + + + /* // // // // // // // // // // // // // // // // // // // // // // // + * // // */ + /* // // // // // // // // // // // // // // // // // // // // // // // + * // // */ + if (smurfhp[thisuserno] < 1) { + smurflose[thisuserno]++; + smurfwin[numba]++; + gf = smurflevel[thisuserno]; + gf *= smurflevel[numba] + 1; + gf *= (xp_random(100)); + gf += 83 * smurflevel[numba]; + gf *= .5; + ef = smurflevel[thisuserno]; + ef *= smurflevel[numba] + 1; + ef *= (xp_random(100)); + ef += 83 * smurflevel[numba]; + ef *= .5; + if (gf < smurfmoney[thisuserno]) + gf = smurfmoney[thisuserno]; + smurfmoney[thisuserno] = 0; + smurfmoney[numba] += gf; + smurfexper[numba] += ef; + od_printf("\n\n\rLooks like we have a problem here...\n\n\r"); + od_set_colour(L_MAGENTA, D_BLACK); + counthostages(); + + if (numhost[numba] <= smurfconfno[numba]) { + ht = 1; + hostage[hcount] = thisuserno; + holder[hcount] = numba; + hcount++; + writehostage(); + od_printf("*** You've been taken hostage! ***\n\n\r"); + stream = fopen("smurf.new", "a+"); + fprintf(stream, "%s took %s HOSTAGE!\n\r", smurfname[numba], smurfname[thisuserno]); + fclose(stream); + } + od_set_colour(L_BLUE, D_BLACK); + + if (smurfweapno[thisuserno] > smurfweapno[numba]) { + for (cyc = 0; cyc < hcount; cyc++) + if (smurfhost[numba][0] == hostage[cyc]) + hostage[cyc] = 255; + tw = 1; + sprintf(eweapon, "%s", smurfweap[numba]); + ew = smurfweapno[numba]; + strset(smurfweap[numba], 0); + sprintf(smurfweap[numba], "%s", smurfweap[thisuserno]); + strset(smurfweap[thisuserno], 0); + sprintf(smurfweap[thisuserno], "%s", defweapon[smurfweapno[numba]]); + smurfweapno[numba] = smurfweapno[thisuserno]; + smurfweapno[thisuserno] = ew; + od_printf("He took your weapon!\n\r"); + } + if (smurfarmrno[thisuserno] > smurfarmrno[numba]) { + ta = 1; + sprintf(earmor, "%s", smurfarmr[numba]); + ew = smurfarmrno[numba]; + strset(smurfarmr[numba], 0); + sprintf(smurfarmr[numba], "%s", smurfarmr[thisuserno]); + strset(smurfarmr[thisuserno], 0); + sprintf(smurfarmr[thisuserno], "%s", defarmor[smurfarmrno[numba]]); + smurfarmrno[numba] = smurfarmrno[thisuserno]; + smurfarmrno[thisuserno] = ew; + od_printf("He took your armor!\n\r"); + } + smurfhp[thisuserno] = smurfhpm[thisuserno]; + stream = fopen("smurf.new", "a+"); + fprintf(stream, "%s thrased %s!\n\r", enemie, smurfname[thisuserno]); + if (ht == 1) + fprintf(stream, "%s took %s HOSTAGE!\n\r", smurfname[numba], smurfname[thisuserno]); + fclose(stream); + savegame(); + lastquote(); + od_exit(10, FALSE); + } + /* // // // // // // // // // // // // // // // // // // // // // // // + * // // */ + /* // // // // // // // // // // // // // // // // // // // // // // // + * // // */ + if (enemyhp < 1) { + smurfwin[thisuserno]++; + smurflose[numba]++; + + nl(); + sprintf(tempenform, "%s thrased %s!\n\r", smurfname[thisuserno], smurfname[numba]); + newshit(tempenform); + counthostages(); + + od_set_colour(L_CYAN, D_BLACK); + + if (smurfexper[thisuserno] < smurfexper[numba]) { + od_printf("You made a MASSIVE experience jump!\n\r%s swaps experience with you!\n\n\r", smurfname[numba]); + old = smurfexper[thisuserno]; + smurfexper[thisuserno] = smurfexper[numba]; + smurfexper[numba] = old; + } + od_set_colour(L_MAGENTA, D_BLACK); + + if (numhost[thisuserno] <= smurfconfno[thisuserno]) { + ht = 1; + hostage[hcount] = numba; + holder[hcount] = thisuserno; + hcount++; + writehostage(); + od_printf("You took %s as a hostage!\n\r", smurfname[numba]); + fclose(stream); + stream = fopen("smurf.new", "a+"); + fprintf(stream, "%s took %s HOSTAGE!\n\r", smurfname[thisuserno], smurfname[numba]); + fclose(stream); + writehostage(); + } + od_set_colour(L_BLUE, D_BLACK); + + od_printf("As they carry %s away, he yells:\n\r'%s'\n\n\r", smurfname[numba], smurftext[numba]); + gf = smurflevel[thisuserno]; + gf *= smurflevel[numba] + 1; + gf *= (xp_random(100)); + gf += 83 * smurflevel[numba]; + gf *= .5; + ef = smurflevel[thisuserno]; + ef *= smurflevel[numba] + 1; + ef *= (xp_random(100)); + ef += 83 * smurflevel[numba]; + ef *= .5; + if (gf < smurfmoney[numba]) + gf = smurfmoney[numba]; + smurfmoney[numba] = 0; + + od_printf("The arena roars as you defeat %s...\n\n\r", enemie); + od_set_colour(L_YELLOW, D_BLACK); + od_printf("You found %.0f gold and get %.0f experience!\n\n\r", gf, ef); + smurfmoney[thisuserno] = (smurfmoney[thisuserno] + gf); + smurfexper[thisuserno] = (smurfexper[thisuserno] + ef); + if (smurfweapno[thisuserno] < smurfweapno[numba]) { + tw = 1; + strset(smurfweap[thisuserno], 0); + sprintf(smurfweap[thisuserno], "%s", eweapon); + strset(smurfweap[numba], 0); + sprintf(smurfweap[numba], "%s", defweapon[smurfweapno[thisuserno]]); + smurfweapno[numba] = smurfweapno[thisuserno]; + smurfweapno[thisuserno] = ew / 5; + od_printf("You took his weapon!\n\r"); + } + if (smurfarmrno[thisuserno] < smurfarmrno[numba]) { + ta = 1; + strset(smurfarmr[thisuserno], 0); + sprintf(smurfarmr[thisuserno], "%s", earmor); + strset(smurfarmr[numba], 0); + sprintf(smurfarmr[numba], "%s", defarmor[smurfarmrno[thisuserno]]); + smurfarmrno[numba] = smurfarmrno[thisuserno]; + smurfarmrno[thisuserno] = aw / 4; + od_printf("You took his armor!\n\r"); + } + checklevel(); + savegame(); + + sprintf(logname, "smurf.%03i", numba); + stream = fopen(logname, "a+"); + fprintf(stream, "%s thrashed you!!!\n\r", smurfname[thisuserno]); + if (tw == 1) + fprintf(stream, "%s stole your %s!\n\r", smurfname[thisuserno], eweapon); + if (ta == 1) + fprintf(stream, "%s stole your %s!\n\r", smurfname[thisuserno], earmor); + if (ht == 1) + fprintf(stream, "***** YOU ARE A HOSTAGE OF %s *****\n\r", smurfname[thisuserno]); + fprintf(stream, "\n\r"); + fclose(stream); + } + nl(); + + if (numba == 0 && enemyhp < 1 && smurfexper[thisuserno] > 100000000) + wingame(); + +} diff --git a/src/doors/smurfcombat/smurfver.h b/src/doors/smurfcombat/smurfver.h new file mode 100644 index 0000000000..4b520dddbb --- /dev/null +++ b/src/doors/smurfcombat/smurfver.h @@ -0,0 +1,13 @@ +char *__version = "DELTA1A"; +char *__vspace = " "; +char *__saveversion = "v177v"; +char *__vnew = "BETA"; +char *__vnewsp = ""; +char *__vday = "BETA"; +char *__vdaysp = ""; +char *__vcnv = "BETA"; +char *__vcnvsp = ""; +char *__vkey = "1.0"; +char *__vkeysp = " "; +char *__vlog = "1.0"; +char *__vlogsp = " "; diff --git a/src/doors/smurfcombat/smurfwin.c b/src/doors/smurfcombat/smurfwin.c new file mode 100644 index 0000000000..baace45889 --- /dev/null +++ b/src/doors/smurfcombat/smurfwin.c @@ -0,0 +1,94 @@ +/***************************************************************************/ +/* */ +/* sss fff ccc b */ +/* s s f f c c b */ +/* s f c b */ +/* sss mmm mmm u u r rr fff c ooo mmm mmm bbb aaa ttt */ +/* s m m m u u rr f c o o m m m b b a a t */ +/* s s m m m u uu r f c c o o m m m b b aaaa t */ +/* sss m m m uu u r f ccc ooo m m m bbb a a t */ +/* */ +/* SYSOP Maintenance Code: !-S-Y-S-O-P-! WinGame */ +/* REMOTE Maintenance Code: !-SIX-NINE-| Module */ +/* */ +/***************************************************************************/ + +#include "genwrap.h" +#include "datewrap.h" +#include "smurfext.h" + + + + + +void +writeD0E(void) +{ + stream = fopen("smirfdat.d0e", "w+"); + fprintf(stream, "%s", smurfname[thisuserno]); + fclose(stream); +} + +void +wingame(void) +{ + struct date d; + getdate(&d); + od_clr_scr(); + od_control.user_screen_length = 999; + od_send_file("smurfdat.d0a"); + smurf_pause(); + od_send_file("smurfdat.d0b"); + sleep(5); + od_send_file("smurfdat.d0c"); + sleep(5); + od_send_file("smurfdat.d0d"); + smurf_pause(); + writeD0E(); + sprintf(__saveversion, "w0%02dw", d.da_mon + 1); + savegame(); + od_send_file("smurfdat.d0z"); + smurf_pause(); + od_exit(10, FALSE); +} + +void +wongame(void) +{ + char intext[4]; + struct date d; + getdate(&d); + stream = fopen("smurf.sgm", "r+"); + fscanf(stream, "%3s", intext); /* noplayers=atoi(intext); */ + fscanf(stream, "%2s", intext); /* save blanks */ + fscanf(stream, "%2s", intext); /* save month */ + fclose(stream); + if (d.da_mon > atoi(intext) || d.da_mon < atoi(intext) - 1) { + od_clr_scr(); + od_printf("Rerolling game, please hold..."); + __NEW__main(); + __DAY__main(); + return; + } + od_set_colour(15, 0); + od_clr_scr(); + nl(); + nl(); + od_printf("The game has been won, but there will be other lands and\n\r"); + od_printf("and other worlds to be conquered...\n\n\r"); + od_printf("Until then?\n\r"); + od_printf("Ask any authorized member of management to reroll\n\r"); + od_set_colour(L_RED, D_BLACK); + od_printf("Smurf Combat...\n\n\r"); + od_set_colour(L_GREEN, D_BLACK); + od_send_file("smurfdat.d0e"); + od_printf("... "); + od_set_colour(D_GREEN, D_BLACK); + od_printf("some heros will never be forgotten...\n\n\n\r"); + smurf_pause(); + od_send_file("smurfdat.d0z"); + smurf_pause(); + od_send_file("smurfdat.d0m"); + smurf_pause(); + od_exit(10, FALSE); +} diff --git a/src/doors/smurfcombat/targets.mk b/src/doors/smurfcombat/targets.mk new file mode 100644 index 0000000000..45235e445d --- /dev/null +++ b/src/doors/smurfcombat/targets.mk @@ -0,0 +1,6 @@ +SMURF = $(EXEODIR)$(DIRSEP)smurf$(EXE_SUFFIX)$(EXEFILE) + +all: xpdev-mt ciolib-mt $(MTOBJODIR) $(EXEODIR) $(SMURF) + +$(SMURF): $(XPDEV-MT_LIB) $(CIOLIB-MT) + diff --git a/src/doors/smurfcombat/vendor.doc b/src/doors/smurfcombat/vendor.doc new file mode 100644 index 0000000000..0aafc9b63a --- /dev/null +++ b/src/doors/smurfcombat/vendor.doc @@ -0,0 +1,118 @@ +============================================================================== +|| Maartian Enterprises || 1415 Valeview Dr. || Diamond Bar, CA 91765 || +============================================================================== + + + MAARTIAN ENTERPRISES DISTRIBUTION LICENSING AGREEMENT TERMS + +Anyone wishing to charge individuals a FEE (not including shipping, handling, +and packaging) for giving them a copy of any Maartian Enterprises program +MUST have the written authorization of Maartian Enterprises, without which, +the distributor is guilty of copyright violation. To recieve such +authorization, print, complete, and mail the following application. + + 1) Applicants must enclose a cash or money order payment for the amount of + all licenses and services desired. + + 2) Regular Distributors MUST purchase a license for each individual program + distributed for a fee. + + 3) Once registered, distributors may ONLY DISTRIBUTE COPIES OF THE PROGRAM + SUPPLIED DIRECTLY FROM MAARTIAN ENTERPRISES. This is for control reasons. + + 4) The distributor is expected to state on any packaging and accompanying + documentation that the program(s) enclosed are 'SHAREWARE'. The + distributor is also responsible for describing and clearly defining that + shareware is a 'Program intended for demonstration purposes only' and + that the user is expected to 'Register the enclosed program for a fee + set by the authoring organization'. + + 5) New Distributors MUST purchase the Official Distributors License. + + 6) New Distributors MUST purchase the 'Latest Version Pakage' to insure + that only the most recent releases are being distributed. + + 7) Distributors also must reorder the 'Latest Version Package' in order to + legally upgrade their copies. (All distributors will be notified of + version upgrades, discounts, etc...) + + 8) Any distribution organization may be subject to investigations concerning + economic stability, legal history, and economic feasability. + + 9) We ask but not require that prospective distributors enclose a their + presentation package(s). + + 10) All processing fees are subject to change. + + 11) Any commercial distributor not meeting undisclosable minimum standards + may be denied a distribution license with a full refund of license fees. + + 12) Shipping, RUSH Processing, and Latest Version fees are not refundable. + + Thank you for your understanding and cooperation. + + + +============================================================================== +|| Maartian Enterprises || 1415 Valeview Dr. || Diamond Bar, CA 91765 || +============================================================================== + +============================================================================= +|| Maartian Enterprises || 1415 Valeview Dr. || Diamond Bar, CA 91765 || +============================================================================= + + License Processing Fee Enclosed + DISTRIB -- Official U.S. Distribution License $ 7 U.S. _____ + DISTRIB -- International Distribution License $ 27 U.S. _____ + + TAZSMURF -- Dist. Lic. For Both T-S and S-C $ 13 U.S. _____ + TAZ -- " " " Tasmanian Strategical $ 7 U.S. _____ + SMU -- " " " Smurf Combat $ 7 U.S. _____ + + LATEST -- Latest Versions *DISK PACKAGE* $ 2 U.S. _____ + + =====-----> Subtotal _____ + -> Add $3 for Basic Shipping _____ + -> Add $7 for Non-U.S. Overseas Shipping _____ + -> Add $5 for 96 Hour RUSH Processing _____ + =====-----> TOTAL _____ + +============================================================================= + + Company/Org. Name: _______________________________________________________ + + Applicant (Person): _________________________________ Relation: __________ + + Ship to: _________________________________________________________________ + + _________________________________________________________________ + + _________________________________________________________________ + + Voice Phone: _____________ Mail Phone: _____________ Beeper: _____________ + + Data HQ Name: _____________________ Data Phone: ____________ Users: ______ + + Questions:________________________________________________________________ + + ________________________________________________________________ + + Comments: ________________________________________________________________ + + ________________________________________________________________ + + ________________________________________________________________ + + ________________________________________________________________ + + ________________________________________________________________ + + ________________________________________________________________ + +============================================================================= +Any checks or money orders MUST be addressed to 'Laurence Maar'. +Laurence Maar can be reached at (909)-861-1616 or (818)792-9988 in CA, USA. +============================================================================= +|| Maartian Enterprises || 1415 Valeview Dr. || Diamond Bar, CA 91765 || +============================================================================= + -- GitLab