Skip to content

Commit

Permalink
migrate dikumud alfa code in
Browse files Browse the repository at this point in the history
  • Loading branch information
zachflower committed Apr 15, 2017
1 parent d6d8479 commit 638f379
Show file tree
Hide file tree
Showing 91 changed files with 31,313 additions and 25,316 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CC=gcc
CFLAGS = -ansi
LFLAGS = -lcrypt
HEADERFILES = structs.h utils.h comm.h interpreter.h db.h
dmserver : comm.o act.comm.o act.informative.o act.movement.o act.obj1.o act.obj2.o act.offensive.o act.other.o act.social.o act.wizard.o handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o mobact.o fight.o modify.o weather.o spell_parser.o spells1.o spells2.o reception.o constants.o spec_procs.o signals.o board.o mar_fiz_maz.o magic.o
HEADERFILES = structs.h utils.h comm.h interpreter.h db.h maildef.h
dmserver : comm.o act.comm.o act.informative.o act.movement.o act.obj1.o act.obj2.o act.offensive.o act.other.o act.social.o act.wizard.o handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o mobact.o fight.o modify.o weather.o spell_parser.o spells1.o spells2.o reception.o constants.o spec_procs.o signals.o board.o mar_fiz_maz.o magic.o mail.o changes.o
comm.o : comm.c structs.h utils.h comm.h interpreter.h handler.h db.h
$(CC) -c -g $(CFLAGS) comm.c
act.comm.o : act.comm.c structs.h utils.h comm.h interpreter.h handler.h \
Expand Down Expand Up @@ -87,5 +87,10 @@ signals.o : signals.c utils.h
mar_fiz_maz.o : mar_fiz_maz.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h limits.h
$(CC) -c $(CFLAGS) mar_fiz_maz.c
dmserver : comm.c act.comm.c act.informative.c act.movement.c act.obj1.c act.obj2.c act.offensive.c act.other.c act.social.c act.wizard.c handler.c db.c interpreter.c utility.c spec_assign.c shop.c limits.c mobact.c fight.c modify.c weather.c spells1.c spells2.c spell_parser.c reception.c constants.c spec_procs.c signals.c board.c mar_fiz_maz.c magic.c
$(CC) -o dmserver $(CFLAGS) comm.o act.comm.o act.informative.o act.movement.o act.obj1.o act.obj2.o act.offensive.o act.other.o act.social.o act.wizard.o handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o mobact.o fight.o modify.o weather.o spells1.o spells2.o spell_parser.o reception.o constants.o spec_procs.o signals.o board.o mar_fiz_maz.o magic.o $(LFLAGS)
mail.o : mail.c maildef.h
$(CC) -c $(CFLAGS) mail.c
changes.o : changes.c structs.h utils.h comm.h interpreter.h \
handler.h db.h spells.h limits.h
$(CC) -c $(CFLAGS) changes.c
dmserver : comm.c act.comm.c act.informative.c act.movement.c act.obj1.c act.obj2.c act.offensive.c act.other.c act.social.c act.wizard.c handler.c db.c interpreter.c utility.c spec_assign.c shop.c limits.c mobact.c fight.c modify.c weather.c spells1.c spells2.c spell_parser.c reception.c constants.c spec_procs.c signals.c board.c mar_fiz_maz.c magic.c mail.c changes.c
$(CC) -o dmserver $(CFLAGS) comm.o act.comm.o act.informative.o act.movement.o act.obj1.o act.obj2.o act.offensive.o act.other.o act.social.o act.wizard.o handler.o db.o interpreter.o utility.o spec_assign.o shop.o limits.o mobact.o fight.o modify.o weather.o spells1.o spells2.o spell_parser.o reception.o constants.o spec_procs.o signals.o board.o mar_fiz_maz.o magic.o mail.o changes.o $(LFLAGS)
9 changes: 8 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ VAX 11/785 - Unix-BSD 4.3 (it was written on one of these babies)
Sun 4 - Unix
Sun 3 (I think) - Unix

plus lots of others... we've lost track.

We are, of course, very interested in expanding this list. If you successfully
compile and run the game on a machine not mentioned above, please send us a
word.

See doc/running.doc for some hints on how to run the game - and try 'wizhelp'
in the game itself.

If you run into trouble whilst compiling or running the game, we'll be happy
to try and help you out. Send email to:

[email protected]
[email protected] or one of the other people from the 'credits' file.

41 changes: 0 additions & 41 deletions README.linux

This file was deleted.

27 changes: 21 additions & 6 deletions act.comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ void do_shout(struct char_data *ch, char *argument, int cmd)
return;
}

if (GET_MOVE(ch) < 10)
{
send_to_char("You are too exhausted.\n\r", ch);
return;
}

GET_MOVE(ch) -= 10;

for (; *argument == ' '; argument++);

if (!(*argument))
Expand All @@ -76,6 +84,12 @@ void do_tell(struct char_data *ch, char *argument, int cmd)
char name[100], message[MAX_STRING_LENGTH],
buf[MAX_STRING_LENGTH];

if (IS_SET(ch->specials.act, PLR_NOTELL))
{
send_to_char("Your message didn't get through!!\n\r", ch);
return;
}

half_chop(argument,name,message);

if(!*name || !*message)
Expand All @@ -84,7 +98,8 @@ void do_tell(struct char_data *ch, char *argument, int cmd)
send_to_char("No-one by that name here..\n\r", ch);
else if (ch == vict)
send_to_char("You try to tell yourself something.\n\r", ch);
else if (GET_POS(vict) == POSITION_SLEEPING)
else if ((GET_POS(vict) == POSITION_SLEEPING) ||
IS_SET(vict->specials.act, PLR_NOTELL))
{
act("$E can't hear you.",FALSE,ch,0,vict,TO_CHAR);
}
Expand Down Expand Up @@ -170,7 +185,7 @@ void do_write(struct char_data *ch, char *argument, int cmd)
return;

if (!*papername) /* nothing was delivered */
{
{
send_to_char(
"Write? with what? ON what? what are you trying to do??\n\r", ch);
return;
Expand All @@ -191,7 +206,7 @@ void do_write(struct char_data *ch, char *argument, int cmd)
}
}
else /* there was one arg.let's see what we can find */
{
{
if (!(paper = get_obj_in_list_vis(ch, papername, ch->carrying)))
{
sprintf(buf, "There is no %s in your inventory.\n\r", papername);
Expand Down Expand Up @@ -221,13 +236,13 @@ void do_write(struct char_data *ch, char *argument, int cmd)
send_to_char("The stuff in your hand is invisible! Yeech!!\n\r", ch);
return;
}

if (pen)
paper = ch->equipment[HOLD];
else
pen = ch->equipment[HOLD];
}

/* ok.. now let's see what kind of stuff we've found */
if (pen->obj_flags.type_flag != ITEM_PEN)
{
Expand All @@ -242,7 +257,7 @@ void do_write(struct char_data *ch, char *argument, int cmd)
else
{
/* we can write - hooray! */

send_to_char("Ok.. go ahead and write.. end the note with a @.\n\r",
ch);
act("$n begins to jot down a note.", TRUE, ch, 0,0,TO_ROOM);
Expand Down
Loading

0 comments on commit 638f379

Please sign in to comment.