├── dm-dist-alfa ├── lib │ ├── board.messages │ ├── motd │ ├── credits │ ├── wizlist │ ├── help │ ├── news │ ├── info │ ├── README │ ├── poses │ └── tinyworld.shp ├── .gitignore ├── doc │ ├── do_mail │ ├── time.doc │ ├── license.doc │ ├── README │ ├── macro.doc │ ├── look.doc │ ├── newstruct.doc │ ├── shops.doc │ ├── skills.doc │ ├── actions.doc │ ├── handler.doc │ ├── spells.doc │ ├── combat.doc │ ├── interpreter.doc │ ├── running.doc │ ├── license_original.doc │ ├── levels.doc │ ├── comm.doc │ ├── spell_info.doc │ ├── database.doc │ └── values.doc ├── limits.h ├── opstart ├── README ├── nightrun ├── interpreter.h ├── comm.h ├── repairgold.c ├── delplay.c ├── signals.c ├── list.c ├── maildef.h ├── mar_fiz_maz.c ├── handler.h ├── mobact.c ├── makefile ├── utility.c ├── insert_any.c ├── sign.c ├── update.c ├── spec_assign.c ├── weather.c ├── db.h ├── utils.h ├── act.comm.c ├── spells.h ├── act.social.c ├── spells1.c └── board.c ├── read.me └── README.md /dm-dist-alfa/lib/board.messages: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dm-dist-alfa/.gitignore: -------------------------------------------------------------------------------- 1 | lib/players 2 | lib/board.messages 3 | lib/pcobjs.obj 4 | -------------------------------------------------------------------------------- /read.me: -------------------------------------------------------------------------------- 1 | Alfa Diku-- 2 | This is the original diku after 9 months of playtesting....in which the 3 | bugs were cleared in the first couple months. This is stable code in old 4 | standards. 5 | 6 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/do_mail: -------------------------------------------------------------------------------- 1 | mail -s "ANOTHER VERSION OF DATABASE.DOC" $1 < database.doc 2 | mail -s "ANOTHER VERSION OF DBSUP.DOC" $1 < dbsup.doc 3 | mail -s "ANOTHER VERSION OF DEFS.DOC" $1 < defs.doc 4 | mail -s "ANOTHER VERSION OF VALUES.DOC" $1 < values.doc 5 | mail -s "ANOTHER VERSION OF SPELL_INFO.DOC" $1 < spell_info.doc 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DikuMUD 2 | Original Alfa release 3 | 4 | This github repo is intended to contain the original DikuMUD releases and we'll see whatever it develops to from there. 5 | 6 | Please note the LGPL additions to licensing which you'll find in the doc/license.doc document. 7 | 8 | Uploaded by Michael Seifert on 2020-02-03 20:02 9 | ======= 10 | DikuMUD Alfa release 11 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/motd: -------------------------------------------------------------------------------- 1 | ******************************************** 2 | * W E L C O M E TO DikuMUD RUNNING ON ALFA * 3 | ******************************************** 4 | 5 | O B S 6 | 7 | We have good news: Thanks to Hardwark the Chalmers Sysop, we have 8 | aquired a week-old backup copy of our playerfile. Any 9 | losses of money, exp, or equipment should be considered bad luck - 10 | in the end, you'll all be stronger people for the experience. 11 | 12 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/time.doc: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 3 | ************************************************************************* */ 4 | 5 | Time of DikuMud 6 | 7 | DikuMud has 7 days per week 8 | 35 days per month 9 | 17 months per year 10 | 11 | Time of DikuMUD compared with real world. 12 | 13 | DikuMud time is 48 times faster than the real time. This implies that 14 | for example 75 seconds is the same as 1 hour dikumud time. 15 | -------------------------------------------------------------------------------- /dm-dist-alfa/limits.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * file: limits.h , Limit/Gain control module Part of DIKUMUD * 3 | * Usage: declaration of title type * 4 | ************************************************************************* */ 5 | 6 | /* Public Procedures */ 7 | int mana_limit(struct char_data *ch); 8 | int hit_limit(struct char_data *ch); 9 | int move_limit(struct char_data *ch); 10 | 11 | struct title_type 12 | { 13 | char *title_m; 14 | char *title_f; 15 | int exp; 16 | }; 17 | -------------------------------------------------------------------------------- /dm-dist-alfa/opstart: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | 3 | # Rekursivt at-job. Starter 'nightrun' og bestiller sig selv til n{ste dag 4 | 5 | 6 | # remove opstartfailed 7 | if (-e opstartfailed) then 8 | rm opstartfailed 9 | endif 10 | 11 | 12 | # put new job in queue 13 | if `atq | awk '/opstart/ {print $1}' | head -1` == "" then 14 | at -c 1705 opstart 15 | endif 16 | 17 | 18 | # get process id 19 | set process = `ps -gax | awk '/dmserver/ && ! /awk/ {print $1}' | head -1` 20 | 21 | if $process == "" then 22 | nightrun & 23 | else 24 | echo "process exists" > opstartfailed 25 | endif 26 | 27 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/license.doc: -------------------------------------------------------------------------------- 1 | DikuMud License 2 | 3 | 4 | As of February 3rd, 2020, the DikuMUD authors Sebastian Hammer, Hans-Henrik 5 | Starfeldt, Katja Nyboe, and Michael Seifert have all agreed to make their 6 | DikuMUD work available under the LGPL license. We’ve been unable to get a 7 | hold of Tom Madsen, but we feel fairly confident that he would likewise agree 8 | to submit his work under LGPL. This means you can choose yourself if you want 9 | to use DikuMUD under the LGPL or the original license. Please note that 10 | derivative work isn't automatically under LGPL. It would need to be 11 | re-released by its respective authors. 12 | 13 | (The original license can be found under the name "license_original.doc" for reference.) 14 | -------------------------------------------------------------------------------- /dm-dist-alfa/README: -------------------------------------------------------------------------------- 1 | NOTE: Copying, redistributing, or using any part of DikuMUD without reading 2 | doc/licence.doc is in violation of our copyright. 3 | 4 | To compile the game, just type 'make', and cross your fingers. So far, the game 5 | has been successfully ported to these machines: 6 | 7 | VAX 11/785 - Unix-BSD 4.3 (it was written on one of these babies) 8 | Sun 4 - Unix 9 | Sun 3 (I think) - Unix 10 | 11 | plus lots of others... we've lost track. 12 | 13 | We are, of course, very interested in expanding this list. If you successfully 14 | compile and run the game on a machine not mentioned above, please send us a 15 | word. 16 | 17 | See doc/running.doc for some hints on how to run the game - and try 'wizhelp' 18 | in the game itself. 19 | 20 | If you run into trouble whilst compiling or running the game, we'll be happy 21 | to try and help you out. Send email to: 22 | 23 | quinn@freja.diku.dk or one of the other people from the 'credits' file. 24 | -------------------------------------------------------------------------------- /dm-dist-alfa/nightrun: -------------------------------------------------------------------------------- 1 | #!/bin/csh 2 | 3 | # starter dmserver op til 10 gange, eller s}l{nge status != 0. 4 | 5 | set max=10 6 | set counter=0 7 | echo "*** Nightrun started by $user at:" >> runlog 8 | date >> runlog 9 | tail -3 syslog >> runlog 10 | mv syslog syslog.old 11 | grep killed syslog.old >> lib/dead_log 12 | if (! -e lib/core) then 13 | touch lib/core 14 | chmod ug+r lib/core 15 | endif 16 | 17 | 18 | echo "Nightrun started by $USER at `date`." > syslog 19 | 20 | while 1 21 | 22 | @ counter = ($counter + 1) 23 | 24 | echo "************* DIKUMUD REBOOT -- Run nr $counter *********" >> syslog 25 | dmserver >>& syslog 26 | set tmp=$status 27 | 28 | if (($tmp == 0) || ($counter == $max)) then 29 | echo "Nightrun terminating (after run nr $counter)." >> syslog 30 | exit 31 | endif 32 | 33 | if ($tmp == 52) then 34 | set counter=0 35 | mv syslog syslog.old 36 | endif 37 | 38 | echo "Nightrun ($user) restarting game at `date`." >> runlog 39 | tail -3 syslog >> runlog 40 | 41 | end 42 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/credits: -------------------------------------------------------------------------------- 1 | Original game idea, concept, and design: 2 | 3 | Katja Nyboe [Superwoman] (katz@freja.diku.dk) 4 | Tom Madsen [Stormbringer] (noop@freja.diku.dk) 5 | Hans Henrik Staerfeldt [God] (bombman@freja.diku.dk) 6 | Michael Seifert [Papi] (seifert@freja.diku.dk) 7 | Sebastian Hammer [Quinn] (quinn@freja.diku.dk) 8 | 9 | ------------------------------------------------------------------------------ 10 | Additional contributions from: 11 | 12 | Michael Curran - the player title collection and additional locations. 13 | Ragnar Loenn - the bulletin board. 14 | Bill Wisner - for being the first to successfully port the game, uncovering 15 | several old bugs, uh, inconsistencies, in the process. 16 | 17 | And: Mads Haar and Stephan Dahl for additional locations. 18 | 19 | Developed at: 20 | DIKU - The Department of Computer Science at the University of Copenhagen. 21 | -------------------------------------------------------------------------------- /dm-dist-alfa/interpreter.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * file: Interpreter.h , Command interpreter module. Part of DIKUMUD * 3 | * Usage: Procedures interpreting user command * 4 | ************************************************************************* */ 5 | 6 | void command_interpreter(struct char_data *ch, char *argument); 7 | int search_block(char *arg, char **list, bool exact); 8 | int old_search_block(char *argument,int begin,int length,char **list,int mode); 9 | char lower( char c ); 10 | void argument_interpreter(char *argument, char *first_arg, char *second_arg); 11 | char *one_argument(char *argument,char *first_arg); 12 | int fill_word(char *argument); 13 | void half_chop(char *string, char *arg1, char *arg2); 14 | void nanny(struct descriptor_data *d, char *arg); 15 | int is_abbrev(char *arg1, char *arg2); 16 | 17 | 18 | struct command_info 19 | { 20 | void (*command_pointer) (struct char_data *ch, char *argument, int cmd); 21 | byte minimum_position; 22 | byte minimum_level; 23 | }; 24 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/wizlist: -------------------------------------------------------------------------------- 1 | =============================================================================== 2 | The following people have achieved immortality and superior powers in this 3 | realm. They should be treated with respect, and occasional prayers are 4 | advisable. Stealing from these people is punishable by death. 5 | 6 | ******************************************************************************* 7 | Implementors: 8 | God Papi Quinn Stormbringer Superwoman 9 | ******************************************************************************* 10 | Greater Gods: 11 | Mead Lasse 12 | 13 | Gods: 14 | *Groo *Quifael *Redferne *Dragon 15 | 16 | Demigods: 17 | Moses Alf Zack Naoniel Conan Gimli *Doz Fzoul *Manxam Lottie *Ravan 18 | Iona Zellski Haz Cokex Bore 19 | 20 | * These Gods are assisting in world creation. 21 | 22 | Deities of other worlds: 23 | 24 | Atle - alex.stacken.kth.se 4000 25 | Agamemnon - roams the net. 26 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/help: -------------------------------------------------------------------------------- 1 | --------------------------------+---------------------------------------------- 2 | Movement: | Communication: 3 | NORTH SOUTH EAST WEST UP DOWN | SAY SHOUT TELL ASK WHISPER 4 | LOOK EXITS ENTER LEAVE | 5 | SLEEP WAKE REST SIT STAND | 6 | (LOCK UNLOCK OPEN CLOSE) | 7 | --------------------------------+---------------------------------------------- 8 | Objects: | Information: 9 | GET DROP PUT GIVE WEAR GRAB | SCORE HELP INFO WHO NEWS TIME WEATHER WHERE 10 | INVENTORY EQUIPMENT EXAMINE EAT | CONSIDER LEVELS WIZLIST CREDITS WIZHELP 11 | TASTE POUR WRITE DRINK SIP | 12 | --------------------------------+---------------------------------------------- 13 | Combat: | Utility: 14 | KILL WIELD FLEE | ! BUG IDEA TYPO QUIT SAVE BRIEF COMPACT 15 | (KICK BASH RESCUE BACKSTAB CAST)| 16 | --------------------------------+---------------------------------------------- 17 | Further information available by HELP , keyword being a command or 18 | (for example) one of the following: 19 | 20 | SOCIAL SHOPS INNS CLERIC WARRIOR THIEF MAGIC 21 | ------------------------------------------------------------------------------- 22 | -------------------------------------------------------------------------------- /dm-dist-alfa/comm.h: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * file: comm.h , Communication module. Part of DIKUMUD * 3 | * Usage: Prototypes for the common functions in comm.c * 4 | ************************************************************************* */ 5 | 6 | void send_to_all(char *messg); 7 | void send_to_char(char *messg, struct char_data *ch); 8 | void send_to_except(char *messg, struct char_data *ch); 9 | void send_to_room(char *messg, int room); 10 | void send_to_room_except(char *messg, int room, struct char_data *ch); 11 | void send_to_room_except_two 12 | (char *messg, int room, struct char_data *ch1, struct char_data *ch2); 13 | void perform_to_all(char *messg, struct char_data *ch); 14 | void perform_complex(struct char_data *ch1, struct char_data *ch2, 15 | struct obj_data *obj1, struct obj_data *obj2, 16 | char *mess, byte mess_type, bool hide); 17 | 18 | void act(char *str, int hide_invisible, struct char_data *ch, 19 | struct obj_data *obj, void *vict_obj, int type); 20 | 21 | #define TO_ROOM 0 22 | #define TO_VICT 1 23 | #define TO_NOTVICT 2 24 | #define TO_CHAR 3 25 | 26 | int write_to_descriptor(int desc, char *txt); 27 | void write_to_q(char *txt, struct txt_q *queue); 28 | #define SEND_TO_Q(messg, desc) write_to_q((messg), &(desc)->output) 29 | -------------------------------------------------------------------------------- /dm-dist-alfa/repairgold.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "structs.h" 6 | 7 | void do_it(FILE *src, FILE *trg, FILE *out); 8 | 9 | main(int argc, char **argv) 10 | { 11 | FILE *src, *trg, *out; 12 | 13 | if (argc != 4) { 14 | fprintf(stderr, "Usage: %s source target ulit\n", argv[0]); 15 | exit (0); 16 | } else if (!(src = fopen(argv[1], "rb"))) 17 | fprintf(stderr, "%s: Could not open.\n", argv[1]); 18 | else if (!(trg = fopen(argv[2], "rb"))) 19 | fprintf(stderr, "%s: Could not open.\n", argv[2]); 20 | else if (!(out = fopen(argv[3], "wb"))) 21 | fprintf(stderr, "%s: Could not open.\n", argv[3]); 22 | else 23 | do_it(src, trg, out); 24 | 25 | fclose(src); 26 | fclose(trg); 27 | fclose(out); 28 | } 29 | 30 | 31 | void do_it(FILE *src, FILE *trg, FILE *out) 32 | { 33 | struct char_file_u inbuf1, inbuf2; 34 | int a,b,c,d, n; 35 | 36 | srand((int) time(0)); 37 | 38 | n=1; 39 | 40 | for (;;) 41 | { 42 | fread(&inbuf1, sizeof(inbuf1), 1, trg); 43 | fread(&inbuf2, sizeof(inbuf2), 1, src); 44 | while (strcmp(inbuf1.name, inbuf2.name)) 45 | fread(&inbuf2, sizeof(inbuf2), 1, src); 46 | 47 | 48 | if (feof(trg)) 49 | break; 50 | /* do something */ 51 | 52 | inbuf1.points.gold = inbuf2.points.gold; 53 | 54 | if (inbuf1.points.gold > 25000*inbuf1.level) 55 | inbuf1.points.gold = 25000*inbuf1.level; 56 | 57 | /* do something else */ 58 | fwrite(&inbuf1, sizeof(inbuf1), 1, out); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/README: -------------------------------------------------------------------------------- 1 | This directory contains documentation on various aspects of the game. 2 | 3 | CONTENTS: 4 | -------- 5 | 6 | ACTIONS.DOC - Description of the 'social action' system. 7 | COMBAT.DOC - Out of date 8 | COMM.DOC - The game-to-player communications system, most important 9 | the act() procedure. 10 | DATABASE.DOC - The format of the most important data files. 11 | DBSUP.DOC - Detailed information on each field in database.doc 12 | DEFS.DOC - Important document on what rules should be followed 13 | when creating a part of the world, to avoid complete 14 | chaos. 15 | HANDLER.DOC - Descriptions of most of the basic 'database handling' 16 | procedures, found in handler.c 17 | INTERPRETER.DOC - ?? Out of date 18 | LEVELS.DOC - Out of date 19 | LICENSE.DOC - The conditions under which this game is distributed. 20 | NOTE: THIS FILE MUST ALWAYS BE PRESENT. 21 | LOOK.DOC 22 | MACRO.DOC - Descriptions of the macros used in the game code. 23 | NEWSTRUCT.DOC - Out of date 24 | RUNNING.DOC - Directions for running the game. 25 | SHOPS.DOC - Brief doc on how to build shop files in lib/ 26 | SKILLS.DOC - Out of date 27 | SPELL_INFO.DOC - Doc on spells, especially how damage is calculated 28 | SPELLS.DOC - Out of date 29 | TIME.DOC - How time is in DikuMud compared to real world. 30 | VALUES.DOC - The 4 generic values for items, described in detail. 31 | -------------------------------------------------------------------------------- /dm-dist-alfa/delplay.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include "structs.h" 6 | 7 | 8 | #define TOLOWER(c) (((c)>='A' && (c) <= 'Z') ? ((c)+('a'-'A')) : (c)) 9 | 10 | 11 | void del(char *filename, int name) 12 | { 13 | char confirm[80]; 14 | FILE *fl; 15 | struct char_file_u player; 16 | int pos, num; 17 | long end; 18 | 19 | if (!(fl = fopen(filename, "r+"))) 20 | { 21 | perror("list"); 22 | exit(1); 23 | } 24 | 25 | puts("Searching for player:"); 26 | 27 | for (num = 1, pos = 0;; pos++, num++) 28 | { 29 | fread(&player, sizeof(player), 1, fl); 30 | if (feof(fl)) 31 | { 32 | fprintf(stderr, "delplay: could not locate %d.\n", name); 33 | exit(1); 34 | } 35 | 36 | if (num == name) { 37 | printf("Confirm deletion of [%s] by typeing Yes: ", player.name); 38 | scanf("%s", confirm); 39 | if (strcasecmp("Yes", confirm)) { 40 | printf("Aborted delete.\n"); 41 | exit(1); 42 | } else { 43 | break; 44 | } 45 | } 46 | 47 | } 48 | 49 | /* read the last player */ 50 | fseek(fl, -sizeof(player), 2); 51 | fread(&player, sizeof(player), 1, fl); 52 | fseek(fl, pos*sizeof(player), 0); 53 | fwrite(&player, sizeof(player), 1, fl); 54 | fseek(fl, 0, 2); 55 | end = ftell(fl); 56 | fclose(fl); 57 | 58 | if (truncate(filename, end-sizeof(player))) 59 | perror("truncate"); 60 | } 61 | 62 | 63 | int main(int argc, char **argv) 64 | { 65 | if (argc != 3) 66 | puts("Usage: delplay "); 67 | else { 68 | if (atoi(argv[2]) < 1) 69 | puts("Illegal player number, must be >= 1"); 70 | else 71 | del(argv[1], atoi(argv[2])); 72 | } 73 | return 0; 74 | } 75 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/macro.doc: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 3 | ************************************************************************* */ 4 | 5 | void CREATE(result, type, number) 6 | 7 | As in Pascal.. Halts on error.. 8 | 9 | int IS_SET(flag,bit) 10 | 11 | TRUE if the bit is set in flag, else FALSE. 12 | 13 | int CAN_SEE(sub, obj) 14 | 15 | TRUE if player 'sub' can see player 'obj', else FALSE. 16 | 17 | int CAN_SEE_OBJ(sub, obj) \ 18 | 19 | TRUE if player 'sub' can see object 'obj', else FALSE. 20 | 21 | int GET_POS(ch) 22 | 23 | Returns the position of the player 'ch' 24 | 25 | int IS_SKILL(ch,skilltype) 26 | 27 | Returns TRUE if player 'ch' endure skill 'skilltype', else FALSE. 28 | 29 | const char *HSHR(ch) 30 | 31 | Returns players "his/her/its" 32 | 33 | const char *HMHR(ch) 34 | 35 | Returns players "him/her/it/" 36 | 37 | char *GET_NAME(ch) 38 | 39 | Returns players name 40 | 41 | int IS_NPC(ch) 42 | 43 | Returns TRUE if player is NPC, FALSE if player is PC 44 | 45 | int GET_LEVEL(ch) 46 | 47 | Returns the level of the player. 48 | 49 | #define GET_CLASS(ch) 50 | 51 | Returns the class of the player. 52 | 53 | int CAN_WEAR(obj,part) (IS_SET((obj)->obj_flags.wear_flags,part)) 54 | 55 | Returns TRUE if object 'obj' can be "worn" on 'part', else FALSE. 56 | 57 | int GET_ITEM_TYPE(obj) ((obj)->obj_flags.type_flag) 58 | 59 | Returns item 'obj' type. 60 | 61 | int IS_OBJ_STAT(obj,stat) (IS_SET((obj)->obj_flags.extra_flags,stat)) 62 | 63 | Returns TRUE if item 'obj' has status 'stat'. 64 | 65 | char *CAP(char *str); 66 | 67 | Changes the first character in the string pointed to by str to uppercase. 68 | Returns str. 69 | 70 | int OUTSIDE(ch) 71 | 72 | Returns TRUE if ch is in an outdoor room. 73 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/look.doc: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 3 | ************************************************************************* */ 4 | 5 | Documentation for look.c 6 | 7 | char *find_ex_description(char *word, struct extra_descr_data *list) 8 | 9 | Returnerer en pointer til den extra beskrivelse, der har 10 | noegleordet 'word' i listen 'list', NULL hvis den ikke findes. 11 | 12 | 13 | void show_obj_to_char(struct obj_data *object, struct char_data *ch,int mode) 14 | 15 | Viser et objekt 'object' til en spiller 'ch' . 16 | Mode 0: Description + [detect] 17 | Mode 1: Short_Description + [detect] 18 | Mode 2: Short_Description + [detect] + ["It contains" + list(1)] 19 | Mode 3: ("An"|"A") + Name 20 | Mode 4: Short_Description + [detect] + ["It contains" + list(3)] 21 | Mode 5: Long_Description + [detect] 22 | 23 | void list_obj_to_char(struct obj_data *list,struct char_data *ch, int mode) 24 | 25 | Udskriver en liste af objekter 'list' til en spiller 'ch' 26 | i mode 'mode' skal vaere 0,1,2,3 eller 4. Mode 2 og 4 giver 27 | en liste for hvert objekts indhold (men ikke indholdets indhold!). 28 | Programmet tager hoejde for usynlighed etc. 29 | 30 | 31 | void show_char_to_char(struct char_data *i, struct char_data *ch, victim mode) { 32 | 33 | Viser en spiller/non-spiller 'victim' til en anden spiller 'ch' 34 | Mode 0: Normal beskrivelse 35 | Mode 1: Equipment 36 | Mode 2: Inventory 37 | I mode 1,2 tages der hoejde for usynlighed 38 | 39 | 40 | void list_chars_to_char(struct char_data *list, struct char_data *ch, int mode) 41 | 42 | Udskriver en liste af spillere 'list' til en spiller 'ch' 43 | i mode 'mode' skal vaere 0,1 eller 2. Mode 1 og 2 giver en 44 | liste for hvert spillers equipment/inventory (men ikke 45 | indholdets indhold!) Programmet tager hoejde for usynlighed etc. 46 | 47 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/news: -------------------------------------------------------------------------------- 1 | THE DIKUMUD HERALD - Sunday, April 7th - 1991 2 | 3 | We do NOT want people to play more than one character at the time! If we catch 4 | someone doing this, we'll... we'll, er... anyhow, it's gonna hurt - 5 | don't do it. It's considered cheating, and will be treated as such. 6 | 7 | It now takes TIME for a thief to steal! 8 | 9 | +------------------------------------------------------------------+ 10 | | A leather worker and a jeweller have opened shops in Midgaard. | 11 | +------------------------------------------------------------------+ 12 | 13 | +-------------------------------------------------------------+ 14 | | Rumors say that the graveyard is haunted by evil entities. | 15 | | Players are encouraged to investigate and report to H.Q. | 16 | +-------------------------------------------------------------+ 17 | 18 | +---------------------------------------------------------+ 19 | | The Mayor of Midgaard City have proclaimed, that there | 20 | | now leads a small path on the outside of the wall. | 21 | | To the north of the city you can enter the plains. | 22 | +---------------------------------------------------------+ 23 | 24 | The source for this game is now available via anonymous ftp, from 25 | belch.berkeley.edu. 26 | 27 | P.S. If you find any errors or things that would need a fix, please tell us! 28 | 29 | You can use the commands 'bug', 'typo', and 'idea' for this. Or, for 30 | longer suggestions, etc: 31 | 32 | by email : bombman@freja.diku.dk (Grimm) 33 | noop@freja.diku.dk (Stormbringer) 34 | quinn@freja.diku.dk (Quinn) 35 | seifert@freja.diku.dk (Papi) 36 | katz@freja.diku.dk (Superwoman) 37 | 38 | Bombman, Katz, Quinn, Seifert and Noop. 39 | 40 | The daily joke: 41 | 42 | We hereby declare DikuMUD free of bugs. 43 | -------------------------------------------------------------------------------- /dm-dist-alfa/signals.c: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * file: signals.c , trapping of signals from Unix. Part of DIKUMUD * 3 | * Usage : Signal Trapping. * 4 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 5 | ************************************************************************* */ 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #include "utils.h" 12 | 13 | extern void slog(char *msg); 14 | 15 | void checkpointing(int); 16 | void shutdown_request(int); 17 | void logsig(int); 18 | void hupsig(int); 19 | 20 | void signal_setup(void) 21 | { 22 | struct itimerval itime; 23 | struct timeval interval; 24 | 25 | signal(SIGUSR2, shutdown_request); 26 | 27 | /* just to be on the safe side: */ 28 | 29 | signal(SIGHUP, hupsig); 30 | signal(SIGPIPE, SIG_IGN); 31 | signal(SIGINT, hupsig); 32 | signal(SIGALRM, logsig); 33 | signal(SIGTERM, hupsig); 34 | 35 | /* set up the deadlock-protection */ 36 | 37 | interval.tv_sec = 900; /* 15 minutes */ 38 | interval.tv_usec = 0; 39 | itime.it_interval = interval; 40 | itime.it_value = interval; 41 | setitimer(ITIMER_VIRTUAL, &itime, 0); 42 | signal(SIGVTALRM, checkpointing); 43 | } 44 | 45 | 46 | 47 | void checkpointing(int ignored) 48 | { 49 | extern int tics; 50 | 51 | if (!tics) 52 | { 53 | slog("CHECKPOINT shutdown: tics not updated"); 54 | abort(); 55 | } 56 | else 57 | tics = 0; 58 | } 59 | 60 | 61 | 62 | 63 | void shutdown_request(int ignored) 64 | { 65 | extern int shutting_down; 66 | 67 | slog("Received USR2 - shutdown request"); 68 | shutting_down = 1; 69 | } 70 | 71 | 72 | 73 | /* kick out players etc */ 74 | void hupsig(int ignored) 75 | { 76 | extern int shutting_down; 77 | 78 | slog("Received SIGHUP, SIGINT, or SIGTERM. Shutting down"); 79 | exit(0); /* something more elegant should perhaps be substituted */ 80 | } 81 | 82 | 83 | 84 | void logsig(int ignored) 85 | { 86 | slog("Signal received. Ignoring."); 87 | } 88 | -------------------------------------------------------------------------------- /dm-dist-alfa/list.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "structs.h" 5 | 6 | #define GET_LEVEL_TEXT(l) \ 7 | (l == 0 ? "NEW" : \ 8 | (l < 4 ? "LOW" : \ 9 | (l < 7 ? "MED" : \ 10 | (l < 10 ? "EXP" : \ 11 | (l < 16 ? "ADV" : \ 12 | (l < 20 ? "HIG" : \ 13 | (l ==20 ? "SUP" : \ 14 | (l < 24 ? "IMM" : "WIZ")))))))) 15 | 16 | #define GET_CLASS_TEXT(c) \ 17 | (c == CLASS_MAGIC_USER ? " " : \ 18 | (c == CLASS_CLERIC ? "" : \ 19 | (c == CLASS_THIEF ? "" : \ 20 | (c == CLASS_WARRIOR ? "" : "")))) 21 | 22 | void list(char *filename); 23 | 24 | main(int argc, char **argv) 25 | { 26 | if (argc != 2) 27 | fprintf(stderr, "Usage: %s \n", argv[0]); 28 | else 29 | list(argv[1]); 30 | } 31 | 32 | 33 | void list(char *filename) 34 | { 35 | FILE *fl; 36 | struct char_file_u buf; 37 | char *point; 38 | int num, days; 39 | long played; 40 | 41 | if (!(fl = fopen(filename, "rb"))) 42 | { 43 | perror(filename); 44 | exit(1); 45 | } 46 | 47 | 48 | played = 0; 49 | 50 | for (num=1;;num++) 51 | { 52 | fread(&buf, sizeof(buf), 1, fl); 53 | if (feof(fl)) 54 | break; 55 | 56 | printf("[%3d] %-20s ", num, buf.name); 57 | printf("<%s %2d> ", GET_LEVEL_TEXT(buf.level), buf.level); 58 | printf("%-8s ", GET_CLASS_TEXT(buf.class)); 59 | 60 | days = (time(0)-buf.last_logon)/SECS_PER_REAL_DAY; 61 | 62 | if (days >= 7) 63 | printf("[DAY %2d] ", days); 64 | else 65 | printf("[--- --] "); 66 | printf("[%s]", buf.pwd); 67 | printf("\n"); 68 | 69 | played += buf.played; 70 | /* 71 | for (point = buf.name; *point; ++point) 72 | printf("'%c':%d ", *point, *point); 73 | putchar('\n'); 74 | */ 75 | } 76 | 77 | fclose(fl); 78 | 79 | printf("\nGrand total time played is %d seconds\n", played); 80 | printf(" (First started on Sat Feb 2 19:20:55 1991)\n\n"); 81 | printf(" Equals %d hours\n", (played/SECS_PER_REAL_HOUR)); 82 | printf(" Equals %d days\n", (played/SECS_PER_REAL_DAY)); 83 | } 84 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/info: -------------------------------------------------------------------------------- 1 | [Note: Further information can be gained on the capitalized words by using the 2 | HELP-command] 3 | 4 | Classes, skills, and guilds: 5 | 6 | When you enter the game the first time, you are asked to select a class; either 7 | THIEF, WARRIOR, CLERIC, or MAGIC user. Characters belonging to each of these 8 | classes have their own qualities, abilities, and handicaps. 9 | It is not unusual that people belonging to different classes, by joining 10 | their efforts and combining their skills, find their chances of survival and 11 | progress greatly improved. Indeed, a team consisting of members from all four 12 | classes can be an extremely powerful unit; capable of opening doors without 13 | keys, creating food supplies out of nothing, and destroying an enemy in 14 | several different ways. It is not advisable for a new player to offend the 15 | members of such a group! 16 | 17 | In order to learn the tricks of your specific trade, you need to find your 18 | GUILD, which may take a little exploring. However, you can usually find a 19 | guild in any reasonably populated city. Once you've found it, you need to 20 | look up your guildmaster and PRACTICE. 21 | 22 | Equipment: 23 | 24 | It is never wise to travel without the proper equipment. You may purchase this 25 | in the SHOPS found in any larger city, or you may be lucky and find some left 26 | around, dropped by someone who doesn't need it anymore, for one reason or 27 | another. 28 | 29 | About Staying Fit - Eating and Drinking: 30 | 31 | At one time or another, you'll see the message "You are hungry". This means 32 | that it's time to find something edible before too long. People don't starve 33 | to death in this world, so have no fear. However, when you are hungry, you do 34 | not build up lost energy, so eventually you'll be unable to do anything but sit 35 | around and feel sorry for yourself, until someone comes by. Then, you can only 36 | hope that it's a benevolent person, rather than a greedy thief or a warrior 37 | lusting for blood. 38 | 39 | General hints: 40 | 41 | See help on the group command. 42 | See help on the consider command. 43 | See help on resting. 44 | See help on your class (magic user, cleric, warrior or thief). 45 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/newstruct.doc: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 3 | ************************************************************************* */ 4 | 5 | FORSLAG TIL AENDRING af structure for PC's og NPC 6 | 7 | Jeg foreslaar at char_data.skills laves om, og deles ud i to: 8 | 9 | 1* HVIS der bliver brug for det, skal strukturen indeholde en 10 | char_data.spells 11 | som indeholder noedvendige oplysninger om alle spells, saa som 12 | "learned" og "recognise" (som er i den nuvaerende skills[]). 13 | 14 | 2* Der skal laves en ny struktur 15 | 16 | struct affected 17 | { 18 | byte duration; 19 | byte modifier; 20 | byte location; 21 | int bitvector; 22 | 23 | struct affected *next; 24 | } 25 | 26 | "duration" som i skills[] 27 | 28 | "modifier" angiver tallet der skal +/- til en abillity (fx. strength) 29 | dette er ligeledes tallet der skal +/- (omvendt) naar 30 | duration bliver 0. 31 | 32 | "location" angiver hvilken ability der er tale om, dvs om det er 33 | strengt_apply, ac_apply, thaco_apply, etc. (som i skills[]) 34 | 35 | "bitvector" Her angives hvilken bit i en status, der er sat (og som skal 36 | fjernes naar duration = 0). Bit kan fx. vaere BLINDED, 37 | STUNNED, HELD, CHARMED, og andre helt specielle ting. 38 | Disse "bit" skal der saa tages hoejde for i look, move 39 | og andre procedurer. 40 | 41 | "*next" peger paa naeste element. 42 | 43 | Gr. bitvektoren skal der saa indsaettes en 44 | int char_affected; 45 | i selve char_data strukturen. 46 | 47 | Et umiddelbart problem er, at man ikke kan gemme denne "affected" paa 48 | disken, men Sebastian foreslog, at kopiere listen over i et array i 49 | strukturen char_file_u, her skal der saa fastlaegges et maksimum antal 50 | elementer. 51 | 52 | En anden fordel er, at ved nedtaelling af duration, undgaar vi at kigge 53 | paa alle 50 durations (i den gamle skill[]) da den nye struktur benytter 54 | haegter. 55 | 56 | 57 | S.U. Venligst, da jeg ikke kan implementere spells ordentligt uden en 58 | aendring af et eller andet... 59 | 60 | -------------------------------------------------------------------------------- /dm-dist-alfa/lib/README: -------------------------------------------------------------------------------- 1 | This directory contains the data files used by the game. 2 | 3 | CONTENTS: 4 | -------- 5 | 6 | actions - The 'social actions'. See actions.doc for the data format. 7 | 8 | board.messages - A binary file containing the contents of the bulletin board. 9 | 10 | bugs - The messages left by players with the 'bug' command. Contains 11 | the number of the room in which each message was written, 12 | along with the text. 13 | 14 | credits - For the 'credits' command. 15 | 16 | help - For 'help' with no argument. 17 | 18 | help_table - Table of keywords and associated texts. The format is simple. 19 | 20 | ideas - The messages left by players with the 'idea' command. 21 | 22 | info - For the 'info' command. 23 | 24 | messages - Combat messages. 25 | 26 | motd - Displayed to the player at login. Should contain information 27 | about recent additons to the game, wedding announcements etc. 28 | 29 | news - For the command 'news'. 30 | 31 | pcobjs.obj - Binary file containing info about objects saved in the inns. 32 | 33 | players - Binary file containing all the players. 34 | 35 | poses - For the 'pose' command, with command number (referring to 36 | the table of constants in interpreter.c), a 'hide_invisible' 37 | flag, and the minimum position of the victim (if any). 38 | 39 | time - Used by the game to keep track of time passed since last run. 40 | 41 | tinyworld.mob - File containing the monsters. See database.doc & dbsup.doc 42 | 43 | tinyworld.obj - The objects. See database.doc & dbsup.doc 44 | 45 | tinyworld.shp - Info describing the shops, eg. what kind of stuff they deal 46 | in, opening hours, profit rate, etc. See shops.doc for the 47 | format. 48 | 49 | tinyworld.wld - The rooms. See database.doc & dbsup.doc 50 | 51 | tinyworld.zon - Reset tables, describing the actions that are to take place 52 | at each reset. See database.doc & dbsup.doc 53 | 54 | typos - Messages left by players with the 'typo' command. Same format 55 | as the 'bug' command. 56 | 57 | wizlist - For the 'wizlist' command. 58 | -------------------------------------------------------------------------------- /dm-dist-alfa/doc/shops.doc: -------------------------------------------------------------------------------- 1 | /* ************************************************************************ 2 | * Copyright (C) 1990, 1991 - see 'license.doc' for complete information. * 3 | ************************************************************************* */ 4 | 5 | #~ 6 | Shop Number (Not used) 7 | 8 | 9 | 10 | 11 | 12 | 13 | These numbers refer to the objects the shop produces. 14 | The numbers are virtual numbers. 15 | 16 | 17 | The object value is multiplied by this value when sold. This is a 18 | floating point value. Must be >= 1.0 19 | 20 | 21 | The object value is multiplied by this value when bought. This is a 22 | floating point value. Must be <= 1.0 23 | 24 | 25 | 26 | 27 | 28 | 29 | These five numbers are the item-types traded with by the shop. 30 | See dbsup.doc. 31 | 32 | ~ 33 | ~ 34 | ~ 35 | ~ 36 | ~ 37 | ~ 38 | Price is %d 39 | ~ 40 | Price is %d 41 | 42 | 43 | When player can't afford an item. 44 | 0 - The shopkeeper spits player in the face. 45 | 1 - The shopkeeper smokes his joint. 46 | other - No action besides message above. 47 | 48 | 49 | When player is attempting a "kill shopkeeper" 50 | 0 - Shopkeeper tells player "Don't ever try that again!" and gets the 51 | first hit! 52 | 1 - Shopkeeper tells player "I'm to powerfull for you - midget!" and 53 | killing is impossible. 54 | other - No action besides message above. 55 | 56 | 57 | 58 | Virtual number of the shopkeeper. 59 | 60 | 61 | Case to be added later. For example character classes. 62 | 63 | 64 | The virtual number the mobile must be in for the shop to be effective. 65 | (So trans'ed shopkeepers can't sell in the desert). 66 | 67 |