Index: circle/ChangeLog diff -u circle/ChangeLog:1.145 circle/ChangeLog:1.158 --- circle/ChangeLog:1.145 Sun Jan 23 13:24:32 2000 +++ circle/ChangeLog Sun Mar 18 18:59:11 2001 @@ -1,6 +1,7 @@ Release history: +Version 3.00 beta pl17 release: January 23, 2000 Version 3.00 beta pl16 release: August 30, 1999 Version 3.00 beta pl15 release: March 16, 1999 Version 3.00 beta pl14 release: July 3, 1998 @@ -3007,3 +3008,153 @@ parse_object(): in_room=NOWHERE is superfluous. interpreter.c: nanny(): CON_CLOSE is possible. +-- gg - Released patchlevel 17. + +******** Patchlevel 18 *************************************************** + +1/23/2000 + +-- gg - constants.c/structs.h: Welcome to bpl18. + +-- gg - Makefile.lcc: Remove some constants I have to change every patch. + +-- gg - doc/README.CYGWIN: bpl17 -> bpl18 + +7/3/2000 + +-- gg - doc/license.doc: Add copyright information that seems lacking + elsewhere. + +-- gg - build_circlemud.com: Update from author. + +-- gg - utils.h: -1 => NOBODY/NOWHERE/NOTHING cleanups. + +-- gg - spells.c: spell_teleport(): No teleporting into ROOM_GODROOM. + +-- gg - spec_procs.c: Restrict pets to NPCs. + +-- gg - interpreter.c: is_abbrev(): s/returnss/returns/ + +-- gg - handler.c: affect_join(): Keep 'next' pointer for extracted + objects in list. + +-- gg - act.wizard.c: perform_immort_invis(): Remove redundant + IS_NPC check. + +-- gg - utils.c: basic_mud_log(): Cancel message if stream hasn't + been initialized. + +7/7/2000 + +-- gg - utils.c: mudlog(): log(var) => log("%s", var); to avoid + interpreting %% codes. + +-- gg - db.c: parse_object(): Print the offending character. + check_object(): Drink aliases should last now. The code + to remove the aliases shouldn't care where it is, though. + +-- gg - act.item.c: name_from_drinkcon()/name_to_drinkcon(): + Much more intelligent support for removing/adding the + drink name to containers. + +-- gg - lib/world/obj/0.obj: An extra ~ escaped the removal of + object #99. + +11/3/2000 + +-- gg - shop.c: Del noted the + 'show shop' header was at the bottom of pages. + +-- gg - utils.c: get_line(): "Andrey Fidrya" + has files without a \n on the last line. + +11/15/2000 + +-- gg - act.other.c: do_quit: !GET_INVIS_LEV is redundant. + +1/17/2001 + +-- gg - db.c: load_zones(): More accurate counting based in part + on suggestions by Rick Glover. Also added SYSERR. + +-- gg - act.offensive.c: do_order(): No "order followers". Based + on reports from Andrey Fidrya. We'll need similar fixes + for other areas and can turn it back on then. + +-- gg - db.c: file_to_string(): Check for empty files or we corrupt + memory. From "Bob Castillo" . Also + took care of duplicated feof() test. + +1/25/2001 + +-- gg - spells.h, magic.c, spell_parser.c, constants.h, constants.c: + spell_wear_off_msg[] died. It moved to spell_info[] and I + fixed 3 mispelings in the process. (That was on purpose.) + +-- gg - Makefile.in: magic.c depends on constants.h + +-- gg - comm.h: Move PAGE_(WIDTH|LENGTH) from modify.c for computations + using page_string(). Needed by the shop code. + +-- gg - mobact.c: Fixed MOB_AGGR and MOB_AGGR_TO_ALIGN logic. Any + aggressive mobs also aggressive_to_alignment weren't properly + attacking everybody, just the alignment. + +-- gg - objsave.c: Crash_load(): Plurality. + +-- gg - structs.h: Formatting and comment adjustment on CON_ and MOB_. + +-- gg - comm.c: close_socket(): Make "closing link" message accurate. + +-- gg - generic_find(): Fix for '2.bread' with one on the ground and + one in your inventory. + +2/18/2001 + +-- gg - comm.c: perform_socket_read(): Handle ECONNRESET by booting + the person as we do for a 0 length read. + +3/4/2001 + +-- gg - db.c, db.h: fread_string(): Doesn't modify 'error'. + +-- gg - util/shopconv.c: fread_string(): Fix horrible buffer overrun + as well as making the return codes not pretend to be ok. + +-- gg - shop.c: read_shop_message(): Fix think-o on fread_string's + string parameter. + +-- gg - handler.c: get_obj_vis(): Make sure 'number' isn't NULL. + extract_char(): Extensively rearranged. + +-- gg - handler.c: get_obj_vis(): Really support numbering. + +-- gg - act.wizard.c: find_target_room(): Cleanup and extend to + find location of objects worn or carried. + +-- gg - db.c: load_zones(): Skip first 3 lines to avoid mistaking + zone name for a command. + +-- gg - boards.c: init_boards(): -1 => NOWHERE + +-- gg - comm.c: game_loop(): Use RL_SEC more. + heartbeat(): More PULSE_* constants. + +-- gg - structs.h: PULSE_* constants, OPT_USEC explanation. + +-- gg - handler.c: extract_char(): Should only be one switch + target, abort on finding it. Also adjusted comment. + +3/10/2001 + +-- gg - class.c: invalid_class(): Reformatted so people + can actually read it. + +-- gg - utils.h: ANA/SANA: No 'Y'. (Compare to 'AN') + From: Peter Ajamian + +3/18/2001 + +-- gg - handler.[ch], structs.h, comm.c, act.offensive.c, + fight.c: New delayed extraction sequence to avoid + dangling pointer crashes. Index: circle/FAQ diff -u circle/FAQ:1.12 circle/FAQ:1.13 --- circle/FAQ:1.12 Sat Aug 28 10:09:35 1999 +++ circle/FAQ Sat Dec 2 07:52:44 2000 @@ -385,7 +385,7 @@ George Greer If the FTP site is down, please try one of the mirrors and then contact Alex -at his alternate address since he will be +at his alternate address since he will be able to find out the situation. There is also a code snippets site at: http://developer.circlemud.org/snippets/ @@ -431,7 +431,7 @@ or unsubscription requests to the list in general. There are hundreds of people on the list, and it will only irritate a ton of people who have no power to remove you from the list. Read the Mailing List FAQ -(http://democracy.queensu.ca/~fletcher/Circle/list_faq.html) for more +(http://qsilver.queensu.ca/~fletchra/Circle/list_faq.html) for more information. Index: circle/bin/vms_circlemud.com diff -u circle/bin/vms_circlemud.com:1.1 circle/bin/vms_circlemud.com:1.2 --- circle/bin/vms_circlemud.com:1.1 Fri May 28 20:31:32 1999 +++ circle/bin/vms_circlemud.com Wed Mar 7 01:30:44 2001 @@ -1,10 +1,7 @@ $! $! VMS_CIRCLEMUD.COM $! Written By: Robert Alan Byer -$! Vice-President -$! A-Com Computing, Inc. -$! ByerRA@aol.com -$! byer@mail.all-net.net +$! byer@mail.ourservers.net $! $! This command procedure is called from [-]VMS_AUTORUN.COM to run CIRCLE.EXE $! as a standalone detached process. @@ -40,7 +37,7 @@ $! $! Define The Symbol For CIRCLE.EXE $! -$ CIRCLE :== $CIRCLEMUD_BIN:CIRCLE.EXE +$ CIRCLE :== $CIRCLEMUD_ROOT:[BIN]CIRCLE.EXE $! $! Run CircleMUD. $! Index: circle/bin/vms_circlemud_utils.com diff -u circle/bin/vms_circlemud_utils.com:1.1 circle/bin/vms_circlemud_utils.com:1.2 --- circle/bin/vms_circlemud_utils.com:1.1 Fri May 28 20:31:32 1999 +++ circle/bin/vms_circlemud_utils.com Wed Mar 7 01:30:44 2001 @@ -1,10 +1,7 @@ $! $! VMS_CIRCLEMUD_UTILS.COM $! Written By: Robert Alan Byer -$! Vice-President -$! A-Com Computing, Inc. -$! ByerRA@aol.com -$! byer@mail.all-net.net +$! byer@mail.ourservers.net $! $! Define The CircleMUD Symbols. $! Index: circle/doc/README.CYGWIN diff -u circle/doc/README.CYGWIN:1.3 circle/doc/README.CYGWIN:1.4 --- circle/doc/README.CYGWIN:1.3 Fri Jan 21 21:11:14 2000 +++ circle/doc/README.CYGWIN Sun Jan 23 19:44:18 2000 @@ -32,14 +32,14 @@ 3) Download and uncompress the latest version of CircleMUD according to the instructions in the main README file. (The FTP site is ftp.circlemud.org, in the pub/CircleMUD directory). Make sure that if you have downloaded the - "zipped" version (circle30bpl17.zip, or example), that you use an unzip + "zipped" version (circle30bpl18.zip, or example), that you use an unzip program which can handle long file names to unzip it (like the Win32 version of Info-Zip's "unzip"). Otherwise, download ther "tarred, gzipped" version - (circle30bpl17.tar.gz), and extract the files using the versions of tar and + (circle30bpl18.tar.gz), and extract the files using the versions of tar and gunzip which come with the full Cygwin package. 4) Start the "bash" shell and go to the directory where you have extracted - CircleMUD (we will assume "C:\circle30bpl17", or "/circle30bpl17" from + CircleMUD (we will assume "C:\circle30bpl18", or "/circle30bpl18" from within bash). DO NOT go into the "src" directory yet. 5) Run the shell script "./configure". This will automatically detect @@ -51,9 +51,9 @@ an executable, you can also try "sh configure", "sh ./configure", "bash configure" and "bash ./configure" until one of them works. -6) NOW change to the /circle30bpl17/src directory, and type "make", and watch +6) NOW change to the /circle30bpl18/src directory, and type "make", and watch CircleMUD and the additional utilies included in the Circle distribution - automatically being compiled and placed in /circle30bpl17/bin. + automatically being compiled and placed in /circle30bpl18/bin. 7) Make sure your TCP/IP stack is installed, correctly configured, and running. If you are already using TCP/IP applications from your Windows machine such @@ -68,7 +68,7 @@ YOU MUST INSTALL AND CONFIGURE YOUR TCP/IP STACK, EVEN IF YOU ARE NOT CONNECTED TO THE INTERNET. -8) Go back to /circle30bpl17, and run the MUD either directly by typing +8) Go back to /circle30bpl18, and run the MUD either directly by typing "bin/circle", or by using the "./autorun" script. 9) Start a telnet program (SEE NOTE BELOW). Open a connection to your @@ -105,7 +105,7 @@ answered in this README file, or in other documents included in the CircleMUD distribution. If you are still having problems and you're *sure* that this your question is not answered in this document or in one of the others files -in the /circle30bpl17/doc directory, try reading the CircleMUD FAQ at +in the /circle30bpl18/doc directory, try reading the CircleMUD FAQ at ftp://ftp.circlemud.org/pub/CircleMUD/FAQ. If all else fails, you can send me or Jeremy Elson mail for help. Note, however, that if you ask me any question that is answered in these documents, all we'll do is mail you the appropriate Index: circle/doc/README.VMS diff -u circle/doc/README.VMS:1.4 circle/doc/README.VMS:1.5 --- circle/doc/README.VMS:1.4 Fri Jul 9 23:07:14 1999 +++ circle/doc/README.VMS Mon Mar 5 04:45:29 2001 @@ -1,8 +1,7 @@ - This is directions for compiling & linking CircleMUD for OpenVMS. Additional documentation can be found at. - http://www.levitte.org/~byerra/ + http://www.ourservers.net/openvms_ports/ I have personally tested this port on both VAX and Alpha with OpenVMS v7.0 and DEC C v7.0 and Multinet TCP/IP using UCX emulation. @@ -80,5 +79,4 @@ BIN directory and it will create the VMS symbols for the utilities. If you have any problems, questions, comments, feel free to e-mail me at -ByerRA@aol.com and I'll try my best to answer them all. - +byer@mail.ourservers.net and I'll try my best to answer them all. Index: circle/doc/license.doc diff -u circle/doc/license.doc:1.2 circle/doc/license.doc:1.4 --- circle/doc/license.doc:1.2 Tue Oct 28 21:16:11 1997 +++ circle/doc/license.doc Sun Mar 18 19:04:44 2001 @@ -119,6 +119,9 @@ --Jeremy Elson +CircleMUD 3 -- Copyright (C) 1994-2001, The CircleMUD Group +Other portions copyright by authors as noted in ChangeLog and source code. + =========================================================================== Index: circle/doc/OLD-DOCS/comm.doc diff -u circle/doc/OLD-DOCS/comm.doc:1.1.1.1 circle/doc/OLD-DOCS/comm.doc:1.2 --- circle/doc/OLD-DOCS/comm.doc:1.1.1.1 Tue Feb 6 12:24:02 1996 +++ circle/doc/OLD-DOCS/comm.doc Mon Sep 18 07:53:51 2000 @@ -97,6 +97,14 @@ $F - Processes the string pointed to by vict_obj with fname() prior to printing. + $u - Processes the buffer and uppercases the first letter of the previous + word (the word immediately prior to the control code). If there is + no previous word, no action is taken. -- CircleMUD addition (09/18/00) + + $U - Processes the buffer and uppercases the first letter of the following + word (the word immediately after to the control code). If there is + no following word, no action is taken. -- CircleMUD addition (09/18/00) + $$ - Print the character '$'. HIDE_INVISIBLE Index: circle/lib/misc/messages diff -u circle/lib/misc/messages:1.3 circle/lib/misc/messages:1.4 --- circle/lib/misc/messages:1.3 Sat Jun 20 10:12:47 1998 +++ circle/lib/misc/messages Thu Mar 30 13:26:00 2000 @@ -165,7 +165,7 @@ You watch the pained expression on $N's face as you hit $M with your harm spell. You grimace in pain as $n's harm spell strikes you. A large grin crosses $n's face as $s harm spell causes $N grievous pain. -Harm a god? Are you serious? Of course $N avoids is casually. +Harm a god? Are you serious? Of course $N avoids it casually. $n tries to harm you. Poor sod. What a buffoon! $n looks somewhat perturbed as $N ignores the recently cast harm spell. Index: circle/lib/misc/socials diff -u circle/lib/misc/socials:1.1.1.1 circle/lib/misc/socials:1.3 --- circle/lib/misc/socials:1.1.1.1 Sun Mar 10 20:47:19 1996 +++ circle/lib/misc/socials Mon Sep 18 07:49:13 2000 @@ -125,7 +125,7 @@ $n cuddles $N. $n cuddles you. They aren't here. -You must feel very cuddly indeed.. :) +You must feel very cuddly indeed. :) # curse 0 0 @@ -167,9 +167,9 @@ You reach but come away empty. :( $n reaches out for an embrace, but no one is there. You embrace $M warmly. -$n embraces $N warmly. -$n embraces you warmly. -Alas, your embracee is not here. +$n embraces $N warmly. +$n embraces you warmly. +Alas, your embracee is not here. You embrace yourself?? $n wraps his arms around himself for a warm self-embrace. @@ -562,8 +562,8 @@ You snarl like a viscious animal. $n snarls like a cornered, viscious animal. You snarl at $M angrily. Control yourself! -$n snarls angrily at $N. $e seems incapable of controlling $mself. -$n snarls viciously at you. $s self-control seems to have gone bananas. +$n snarls angrily at $N. $e$u seems incapable of controlling $mself. +$n snarls viciously at you. $U$s self-control seems to have gone bananas. Eh? Who? Not here, my friend. You snarl at yourself, obviously suffering from schizophrenia. $n snarls at $mself, and suddenly looks very frightened. @@ -656,7 +656,7 @@ stroke 0 0 Whose thigh would you like to stroke? # -You gently stroke $s inner thigh. +You gently stroke $S inner thigh. $n gently strokes $N's inner thigh... hmm... $n gently strokes your inner thigh with feathery touches. That person is not within reach. @@ -697,7 +697,7 @@ You taunt the nothing in front of you. $n taunts something that seems to be right in front of $m. You taunt $M, to your own delight. -$n taunts $N rather insultingly. $n seems to enjoy it tremendously. +$n taunts $N rather insultingly. $U$n seems to enjoy it tremendously. $n taunts you. It really hurts your feelings. Hmmmmmmm.....nope, no one by that name here. You taunt yourself, almost making you cry...:( Index: circle/lib/text/help/info.hlp diff -u circle/lib/text/help/info.hlp:1.6 circle/lib/text/help/info.hlp:1.10 --- circle/lib/text/help/info.hlp:1.6 Thu Jun 18 08:56:08 1998 +++ circle/lib/text/help/info.hlp Thu Feb 1 19:47:40 2001 @@ -22,34 +22,37 @@ CircleMUD. Limbo -- DikuMud +River Island Of Minos -- Mahatma of HexOynx God Simplex -- CircleMUD, modified by Taz of Tazmania -Rome -- Onivel of JediMUD -King Welmar's Castle -- CircleMUD* -Newbie Zone -- Maynard of StrangeMUD +The Straight Path -- Steppin of ChicagoMUD The High Tower Of Magic -- Skylar of SillyMUD* -Midgaard -- DikuMUD +Midgaard -- DikuMud The Three Of Swords -- C.A.W. Miden'Nir -- Copper II, modified by VampLestat of MercMUD* The Chessboard -- Exxon of SillyMUD -Mount Moria -- DikuMUD* +Mount Moria -- Redferne of DikuMud* The Great Eastern Desert -- Rorschach The Drow City -- Rorschach The City Of Thalos -- Rorschach The Great Pyramid -- Andersen of HexOynx* New Thalos -- Duke Of SillyMUD* -The Haon-Dor Forest -- DikuMUD, modified by Derkhil of CircleMUD +The Haon-Dor Forest -- Quifael of DikuMud, extended by by Derkhil + of CircleMUD The Orc Enclave -- C.A.W. -Rand's Tower -- C.A.W. -The Dwarven Kingdom -- DikuMUD -The Sewers -- DikuMUD Arachnos -- Mahatma of HexOynx -River Island Of Minos -- Mahatma of HexOynx -Redferne's Residence -- DikuMUD, modified by Cyron of VieMUD +Rand's Tower -- C.A.W. +The Dwarven Kingdom -- Depeche of DikuMud +The Sewers -- Redferne of DikuMud +Redferne's Residence -- DikuMud, modified by Cyron of VieMud +Rome -- Onivel of JediMUD +King Welmar's Castle -- CircleMUD* +Newbie Zone -- Maynard of StrangeMUD -All those marked with * have been heavily modified by Furry of VieMUD +All those marked with * have been heavily modified by Furry of VieMud C.A.W. stands for the Curious Areas Workshop. For more information -mail furry@viemud.org +mail . +See also: CREDITS # BOARDS @@ -374,7 +377,7 @@ CIRCLE CIRCLEMUD CREDITS C I R C L E M U D 3 . 0 -CircleMUD was developed from DikuMUD (Gamma 0.0) by Jeremy "Ras" Elson at +CircleMUD was developed from DikuMud (Gamma 0.0) by Jeremy "Ras" Elson at Johns Hopkins University's Department of Computer Science. All code unique to CircleMUD is protected under a copyright by the Trustees of the Johns Hopkins University. @@ -394,7 +397,7 @@ for porting it to OS/2, and Jack Patton and Steffen Haeuser for the Amiga port. -- Bill Bogstad and Tim Stearns for allowing Circle to exist at JHU. - -- The DikuMUD folk, and the good old WhatMUD implementors Dave & Justin, + -- The DikuMud folk, and the good old WhatMUD implementors Dave & Justin, for starting the ball rolling. -- Bryan Jolson, Steven Lacher, Cat Stanton, and Naved Surve, for being there in the very early days of Circle's development. @@ -412,5 +415,7 @@ (write "subscribe circle ") --Jeremy Elson (jelson@circlemud.org) + +See also: AREAS # $ Index: circle/lib/world/README diff -u circle/lib/world/README:1.2 circle/lib/world/README:1.3 --- circle/lib/world/README:1.2 Tue Oct 28 21:16:13 1997 +++ circle/lib/world/README Thu Feb 1 19:18:55 2001 @@ -1,40 +1,35 @@ -CircleMUD 3.0 - World Files, Beta Version 12 -furry@circlemud.org +CircleMUD 3.0 - World Files Contained in this lovely archive is the present shape of the -world for Circle 3.0. I have put everything into ascii flags -for easy addition and removal of flags. I have also finally -gotten around to changing all the shops to the new versions -(they make good examples since I tried to include a bit of -everything, from wandering shops to shops that don't like -certain alignments or classes) I would like to get some -feedback on the work I've done thus far... ie... do you like -it? Don't you? Why do/don't you like it? That kind of -thing. Also, if it is at all possible, could you email me -your typos (and possibly bugs for world bugs) file so that I -can correct those problems before the Gamma release of Circle -3.0. - - The zone files have been reformatted so that each has comments -(my style of commenting, so that I know what is s'posed to be -going on (= ) All the wld files have been properly indented to -three spaces in (for consistency mostly and it was easier re-doing -about a third of the descripts...) A couple of areas have been -shifted around and there have been a few area additions so far with -the potential of more to come (see if you can figure out what they -are, shouldn't be too hard (= ) Many typos and 'bugs' have been -corrected thus far, but I'm sure that more exist yet, so please -send me a listing of the ones you find. - - I thank you for your time, and please direct all comments to: - -furry@circlemud.org - -Also, please note the 'zone.lst' file in this directory, which shows -all of the zone numbers that are in use, and what is using them. -Finally, full credit should be in all of the zone files (please -leave it there in case you ever release your mud code and world), -and can also be found in 'info.hlp' under 'AREAS ZONES' which gives -a current list of zones used in CircleMUD. Please ensure that all -credits in there remain, and if you add new areas, please credit -them properly. +world for Circle 3.0. Everything should be in the form of ASCII +flags for easy addition and removal of flags. All of the shop +files are in the CircleMUD 3.0 style (and they make good examples +since there is a bit of everything, from wandering shops through +to shops that dislike certain alignments or classes). + + Feedback on the world is more than welcome. This includes +listing things that people like and things that people do not +like. Why do you like it or dislike it? + + The zone files have been formatted into a consistent format +with comments and ordering. This allows readers of the files to +have a much quicker grasp of what is going on in the file. All +of the world files have been indented with three (3) characters +to begin all paragraphs. This makes the overall format of the +world much more similar. + + If you are comparing the world to the CircleMUD 2.x world, you +will notice that some areas have been removed, others have been +added, and some have been shifted about a little bit. + + Also, please note the 'zone.lst' file in this directory, which +shows all of the zone numbers that are currently in use, and what +is using them. Finally, full credit should be in all of the zone +files (please leave it there in case you ever release your mud code +and world), and can also be found in 'info.hlp' under 'AREAS ZONES' +which gives a current list of zones used in CircleMUD. Please ensure +that all credits in there remain, and if you add new areas, please +credit them properly. + +Furry/Alex Fletcher + Index: circle/lib/world/README.CAW diff -u circle/lib/world/README.CAW:1.1 circle/lib/world/README.CAW:1.2 --- circle/lib/world/README.CAW:1.1 Tue Oct 28 21:16:13 1997 +++ circle/lib/world/README.CAW Sat Dec 2 07:48:19 2000 @@ -19,8 +19,8 @@ There is one exception, one only. Caw exists as an entity on VieMud mud, our pre-release testing grounds. If you need to get in contact with us for any reason, you can reach us on VieMud, directly at -, or at our web page at: -http://democracy.queensu.ca/~fletcher/VieMud/Caw/ +, or at our web page at: +http://qsilver.queensu.ca/~fletchra/Caw/ We welcome criticism, ideas, challenges, bug/typo reports, and advice. If you use one of our areas in your mud, and want to be put on our Index: circle/lib/world/mob/0.mob diff -u circle/lib/world/mob/0.mob:1.2 circle/lib/world/mob/0.mob:1.3 --- circle/lib/world/mob/0.mob:1.2 Tue May 18 18:02:02 1999 +++ circle/lib/world/mob/0.mob Thu Mar 30 12:35:58 2000 @@ -62,16 +62,5 @@ 1 0 0 1d1+1 1d1+1 0 0 8 8 0 -#99 -death reaper~ -Death~ -Death the Grim Reaper is observing you silently from empty eye sockets. -~ -The dark-robed skeletal figure radiates an unendurable coldness. -~ -belnopqr dfhkp 0 S -30 0 -10 1d1+665 10d15+20 -0 500000 -8 8 0 $~ Index: circle/lib/world/mob/120.mob diff -u circle/lib/world/mob/120.mob:1.2 circle/lib/world/mob/120.mob:1.3 --- circle/lib/world/mob/120.mob:1.2 Tue Oct 28 21:16:13 1997 +++ circle/lib/world/mob/120.mob Thu Jan 18 04:51:50 2001 @@ -250,7 +250,7 @@ most innocent visitors, and likely to take offense of anyone with less than pure intentions. ~ -abfikl d 990 E +abikl d 990 E 18 2 0 3d6+220 1d6+6 5000 35000 8 8 1 @@ -366,7 +366,7 @@ transcend the plane of the physical, and could easily kill an unprepared mortal. ~ -abefilnopqr dhkp 1000 E +abeilnopqr dhkp 1000 E 34 0 -10 20d15+950 8d6+50 250000 550000 8 8 1 Index: circle/lib/world/mob/25.mob diff -u circle/lib/world/mob/25.mob:1.2 circle/lib/world/mob/25.mob:1.3 --- circle/lib/world/mob/25.mob:1.2 Tue Oct 28 21:16:13 1997 +++ circle/lib/world/mob/25.mob Thu Jan 18 04:51:50 2001 @@ -666,7 +666,7 @@ ~ He looks quite peaceful. ~ -abcfgijl dkh 0 S +abcgijl dkh 0 S 30 -10 -20 30d30+300 2d5+20 15350 150000 8 8 1 @@ -702,7 +702,7 @@ ~ The Master glares at you. ~ -abcfgjkl dkh -1000 S +abcgjkl dkh -1000 S 30 -10 -20 30d30+300 2d5+20 22100 150000 8 8 1 @@ -736,7 +736,7 @@ ~ He looks like a self-righteous bastard. ~ -abcfgikl dkh 1000 S +abcgikl dkh 1000 S 30 -10 -20 30d30+300 2d5+20 21900 150000 8 8 1 Index: circle/lib/world/mob/30.mob diff -u circle/lib/world/mob/30.mob:1.1.1.1 circle/lib/world/mob/30.mob:1.2 --- circle/lib/world/mob/30.mob:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/mob/30.mob Thu Mar 30 12:08:00 2000 @@ -455,7 +455,7 @@ ~ The kitten looks like a cute, little, fierce fighter. ~ -bc 0 0 E +bco 0 0 E 1 20 9 1d6+11 1d4+0 0 100 8 8 0 @@ -468,7 +468,7 @@ ~ The puppy looks like a cute, little, fierce fighter. ~ -bc 0 0 E +bco 0 0 E 1 20 9 1d6+13 1d4+0 0 125 8 8 0 @@ -481,7 +481,7 @@ ~ The beagle looks like a fierce fighter. ~ -bc 0 0 E +bco 0 0 E 2 19 8 1d12+22 1d6+0 0 200 8 8 0 @@ -494,7 +494,7 @@ ~ The rottweiler looks like a strong, fierce fighter. ~ -bc 0 0 E +bco 0 0 E 3 18 7 1d12+35 1d7+0 0 800 8 8 0 @@ -507,7 +507,7 @@ ~ The wolf looks like a strong, fearless fighter. ~ -bc 0 0 E +bco 0 0 E 4 17 6 1d12+47 1d8+0 0 1600 8 8 0 Index: circle/lib/world/mob/33.mob diff -u circle/lib/world/mob/33.mob:1.1.1.1 circle/lib/world/mob/33.mob:1.2 --- circle/lib/world/mob/33.mob:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/mob/33.mob Thu Jan 18 04:51:50 2001 @@ -215,7 +215,7 @@ nearly every bit of him is covered with grime, dust, dirt and decay. His sword is polished and cleaned though... ~ -cfhjk 0 -500 S +chjk 0 -500 S 16 5 -20 3d5+195 2d8+3 1000 25000 8 8 1 @@ -230,7 +230,7 @@ (boy is this guy DIRTY!!!) ~ -bfjk 0 -500 S +bjk 0 -500 S 18 3 -30 3d5+220 3d6+2 2400 32000 8 8 1 Index: circle/lib/world/mob/35.mob diff -u circle/lib/world/mob/35.mob:1.1.1.1 circle/lib/world/mob/35.mob:1.2 --- circle/lib/world/mob/35.mob:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/mob/35.mob Thu Jan 18 04:51:50 2001 @@ -6,7 +6,7 @@ This huge winged creature looks really menacing as it circles only inches above your head, flapping its wings and squawking very loudly. ~ -bfgjq 0 -700 S +bgjq 0 -700 S 8 13 3 2d10+90 2d6+1 0 3575 8 8 0 @@ -30,7 +30,7 @@ The goblin lieutenant is rather angry, and looking for one of his men to beat up upon, but maybe you will do just fine... ~ -fgjlm dk -600 S +gjlm dk -600 S 7 15 3 1d12+100 2d5+1 300 2000 8 8 1 @@ -42,7 +42,7 @@ The leader doesn't look too happy that you have found him here. He grabs for his shortsword and lunges for your neck. ~ -bcfjlm dk -900 S +bcjlm dk -900 S 9 10 1 1d12+120 2d5+3 1000 8000 8 8 1 Index: circle/lib/world/mob/50.mob diff -u circle/lib/world/mob/50.mob:1.2 circle/lib/world/mob/50.mob:1.3 --- circle/lib/world/mob/50.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/50.mob Thu Jan 18 04:51:50 2001 @@ -166,7 +166,7 @@ ~ The shaman shoots spores into the air. ~ -acfil dhk 950 S +acil dhk 950 S 14 7 1 1d12+173 2d7+2 2500 18000 8 8 1 Index: circle/lib/world/mob/52.mob diff -u circle/lib/world/mob/52.mob:1.2 circle/lib/world/mob/52.mob:1.3 --- circle/lib/world/mob/52.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/52.mob Thu Jan 18 04:51:50 2001 @@ -19,7 +19,7 @@ This is a creature with the upper torso of a beautiful woman, but the lower body of a four-legged beast. She licks her lips as she looks at you greedily. ~ -acfgj 0 -1000 S +acgj 0 -1000 S 12 12 3 1d10+120 2d5+1 1500 10500 8 8 2 @@ -104,7 +104,7 @@ It is a big chunk of rock that has been magically formed into a giant stone creature. He stands here still guarding the city. ~ -bfilnopqr dfk 800 S +bilnopqr dfk 800 S 25 0 -5 6d6+500 4d7+3 4250 145000 8 8 0 Index: circle/lib/world/mob/54.mob diff -u circle/lib/world/mob/54.mob:1.2 circle/lib/world/mob/54.mob:1.3 --- circle/lib/world/mob/54.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/54.mob Thu Jan 18 04:51:50 2001 @@ -556,7 +556,7 @@ lower body of a four-legged beast. She licks her lips as she looks at you greedily. ~ -cfj 0 -500 S +cj 0 -500 S 12 12 3 1d10+120 2d5+1 1500 10500 8 8 2 @@ -578,7 +578,7 @@ ~ You see a large wealthy man in red robes smiling at you. ~ -befilno dhk 200 S +beilno dhk 200 S 10 5 -4 6d6+830 1d6+0 1200 25000 5 5 1 @@ -637,7 +637,7 @@ ~ You see the all-knowing Allah. ~ -abefiklnopqr dhks 1000 S +abeiklnopqr dhks 1000 S 11 0 0 2d3+2300 2d20+20 0 45000 5 5 0 Index: circle/lib/world/mob/60.mob diff -u circle/lib/world/mob/60.mob:1.1.1.1 circle/lib/world/mob/60.mob:1.2 --- circle/lib/world/mob/60.mob:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/mob/60.mob Thu Jan 18 04:51:50 2001 @@ -30,7 +30,7 @@ The bear is a big, brown, furry animal with very large claws and very sharp teeth. It doesn't resemble those cute little dolls from toy shops at all. ~ -fgk 0 -50 S +fg 0 -50 S 8 13 3 1d12+98 2d6+2 0 4000 4 8 0 Index: circle/lib/world/mob/61.mob diff -u circle/lib/world/mob/61.mob:1.2 circle/lib/world/mob/61.mob:1.3 --- circle/lib/world/mob/61.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/61.mob Thu Jan 18 04:51:50 2001 @@ -108,7 +108,7 @@ huge, hairy legs that would give it a tremendous speed on almost any surface if it wasn't so immensely fat. Its large, bulbous eyes stare back at you. ~ -abfgjl dfkp -1000 S +abgjl dfkp -1000 S 15 6 1 1d12+185 2d8+3 0 31000 8 8 2 @@ -133,7 +133,7 @@ The druid looks quite old. You would think of him as venerable but yet you know he would be a tough foe. ~ -abfij dfk 0 S +abij dfk 0 S 19 2 0 1d12+236 3d6+4 5000 45000 8 8 1 Index: circle/lib/world/mob/63.mob diff -u circle/lib/world/mob/63.mob:1.2 circle/lib/world/mob/63.mob:1.3 --- circle/lib/world/mob/63.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/63.mob Thu Jan 18 04:51:50 2001 @@ -17,7 +17,7 @@ ~ Old, scaly, but still with a lot of bite in him left. ~ -abcfjkl dk -1000 S +abcjkl dk -1000 S 24 0 -3 5d4+450 4d7+7 20000 120000 8 8 1 @@ -134,7 +134,7 @@ He delves deeper into you as you stare at him. Only those free of taint will be allowed to remain here safely. ~ -abcfil dk 1000 S +abcil dk 1000 S 25 0 -1 1d12+600 2d8+8 16000 125000 8 8 1 @@ -159,7 +159,7 @@ fangs of normal spiders, but then, as you realize, she does not need them. ~ -abcfjnolq dfhkp -1000 S +abcjnolq dfhkp -1000 S 26 0 -2 6d10+650 1d8+25 30000 155000 8 8 2 @@ -174,7 +174,7 @@ magical energies. She will never give up here fight against evil, though, and will continue her work in whatever manner presents itself. ~ -abcfilno dk 1000 S +abcilno dk 1000 S 26 0 -4 10d8+2500 4d4+22 15000 170000 8 8 2 Index: circle/lib/world/mob/72.mob diff -u circle/lib/world/mob/72.mob:1.2 circle/lib/world/mob/72.mob:1.3 --- circle/lib/world/mob/72.mob:1.2 Tue Oct 28 21:16:14 1997 +++ circle/lib/world/mob/72.mob Thu Jan 18 04:51:50 2001 @@ -20,7 +20,7 @@ and carrying a large mace in its hand. In the center of its head are four large tentacles with very sharp points. ~ -acefjklm dfk -600 S +acejklm dfk -600 S 8 13 2 1d10+100 2d4+3 400 4500 8 8 0 @@ -45,7 +45,7 @@ The wererat is about four feet tall. It looks very much like rat, except that it is standing. ~ -cfgjlk k -700 S +cgjlk k -700 S 6 15 3 4d6+69 2d4+2 50 1500 8 8 0 Index: circle/lib/world/mob/79.mob diff -u circle/lib/world/mob/79.mob:1.1.1.1 circle/lib/world/mob/79.mob:1.2 --- circle/lib/world/mob/79.mob:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/mob/79.mob Thu Jan 18 04:51:50 2001 @@ -7,7 +7,7 @@ blue and silver. He looks VERY strong, as he stands here, ready to help the innocent. ~ -abcfilno dhk 1000 S +abcilno dhk 1000 S 26 0 -2 10d8+550 2d6+16 31570 170000 8 8 1 Index: circle/lib/world/obj/0.obj diff -u circle/lib/world/obj/0.obj:1.1 circle/lib/world/obj/0.obj:1.3 --- circle/lib/world/obj/0.obj:1.1 Tue Oct 28 22:06:36 1997 +++ circle/lib/world/obj/0.obj Fri Jul 7 17:07:58 2000 @@ -28,19 +28,4 @@ The waybread is the traditional feed of elves when travelling, they call it lembas. It is said to refresh the weary traveler greatly. ~ -#99 -scythe death~ -the Scythe of Death~ -The Scythe of Death rests heavily on the ground.~ -~ -5 cdjkmno 8193 -0 15 15 5 -40 0 50000 -E -scythe death~ -It is a very heavy scythe. The grey handle is made from hard wood and the -long iron blade is completely smooth from countless years of use. It feels -cold to the touch. -~ $~ - Index: circle/lib/world/obj/120.obj diff -u circle/lib/world/obj/120.obj:1.1 circle/lib/world/obj/120.obj:1.2 --- circle/lib/world/obj/120.obj:1.1 Tue Oct 28 22:06:36 1997 +++ circle/lib/world/obj/120.obj Sat Jan 29 13:27:03 2000 @@ -321,7 +321,7 @@ A 1 -2 #12032 -beer mug~ +mug beer~ a mug~ A frosty mug has been left on the ground here.~ ~ Index: circle/lib/world/obj/25.obj diff -u circle/lib/world/obj/25.obj:1.4 circle/lib/world/obj/25.obj:1.5 --- circle/lib/world/obj/25.obj:1.4 Fri Jun 4 07:21:44 1999 +++ circle/lib/world/obj/25.obj Sat Jan 29 13:28:31 2000 @@ -405,7 +405,7 @@ 750 0 -1 0 9 750 50 #2545 -tea cup brew herbal~ +cup brew herbal tea~ a herbal brew~ A herbal brew is here.~ ~ Index: circle/lib/world/obj/30.obj diff -u circle/lib/world/obj/30.obj:1.2 circle/lib/world/obj/30.obj:1.3 --- circle/lib/world/obj/30.obj:1.2 Fri Jun 4 07:58:08 1999 +++ circle/lib/world/obj/30.obj Sat Jan 29 13:32:11 2000 @@ -1,5 +1,5 @@ #3000 -beer barrel~ +barrel beer~ a barrel~ A beer barrel has been left here.~ ~ @@ -7,7 +7,7 @@ 50 50 1 0 65 300 100 #3001 -beer bottle~ +bottle beer~ a bottle~ A beer bottle has been left here.~ ~ @@ -15,7 +15,7 @@ 8 8 1 0 10 20 8 #3002 -ale bottle dark~ +bottle dark ale~ a bottle~ A dark bottle of ale has been left here.~ ~ @@ -23,7 +23,7 @@ 8 8 3 0 10 10 3 #3003 -firebreather bottle~ +bottle firebreather~ a firebreather~ A firebreather has been left here.~ ~ @@ -31,7 +31,7 @@ 8 8 7 0 10 50 17 #3004 -local bottle~ +bottle local~ a bottle~ A dark bottle has been left here.~ ~ Index: circle/lib/world/obj/31.obj diff -u circle/lib/world/obj/31.obj:1.1 circle/lib/world/obj/31.obj:1.2 --- circle/lib/world/obj/31.obj:1.1 Tue Oct 28 22:06:37 1997 +++ circle/lib/world/obj/31.obj Sat Jan 29 13:32:11 2000 @@ -1,5 +1,5 @@ #3100 -tea cup~ +cup tea~ a cup~ A cup has been set here.~ ~ @@ -11,7 +11,7 @@ It is a small simple cup. ~ #3101 -coffee cup~ +cup coffee~ a cup~ A cup has been set here.~ ~ @@ -23,7 +23,7 @@ It is a small simple cup. ~ #3102 -water cup~ +cup water~ a cup~ A cup has been set here.~ ~ @@ -35,7 +35,7 @@ It is a large simple cup. ~ #3103 -water bottle~ +bottle water~ a bottle~ A bottle of Evian natural spring water is here.~ ~ @@ -53,7 +53,7 @@ It is a large, clean bottle. There is a large label pasted on the side. ~ #3104 -water canteen~ +canteen water~ a canteen~ A canteen has been set on the ground here.~ ~ Index: circle/lib/world/obj/33.obj diff -u circle/lib/world/obj/33.obj:1.2 circle/lib/world/obj/33.obj:1.3 --- circle/lib/world/obj/33.obj:1.2 Fri Jun 4 07:23:56 1999 +++ circle/lib/world/obj/33.obj Sat Jan 29 13:32:11 2000 @@ -263,7 +263,7 @@ The seams are delicately sewn with a enruned thread... ~ #3319 -beer glass~ +glass beer~ a glass~ A glass of beer sits forgotten here.~ ~ @@ -276,7 +276,7 @@ be too much stuff floating in it. ~ #3320 -ale glass mead~ +glass mead ale~ a glass~ A big glass of mead sits here, cool and frosty.~ ~ @@ -288,7 +288,7 @@ Looks good. Looks warm. Doesn't matter; it still looks good. ~ #3321 -whisky shot~ +shot whisky~ a shot~ A shot of whisky is sitting here.~ ~ Index: circle/lib/world/obj/50.obj diff -u circle/lib/world/obj/50.obj:1.1 circle/lib/world/obj/50.obj:1.2 --- circle/lib/world/obj/50.obj:1.1 Tue Oct 28 22:06:37 1997 +++ circle/lib/world/obj/50.obj Sat Jan 29 13:35:00 2000 @@ -49,7 +49,7 @@ 0 1 4 7 5 300 60 #5006 -water cactus cup~ +cactus cup water~ a small cactus cup~ A small cactus cup lies on the ground.~ ~ Index: circle/lib/world/obj/54.obj diff -u circle/lib/world/obj/54.obj:1.3 circle/lib/world/obj/54.obj:1.4 --- circle/lib/world/obj/54.obj:1.3 Fri Jun 4 07:25:13 1999 +++ circle/lib/world/obj/54.obj Sat Jan 29 13:35:00 2000 @@ -523,7 +523,7 @@ 4 0 0 0 1 4 10 #5467 -whisky glass liquor blue oasis~ +glass liquor blue oasis whisky~ a glass~ A glass of blue alcohol rests here.~ ~ @@ -531,7 +531,7 @@ 5 5 5 0 1 1800 10 #5468 -wine glass~ +glass wine~ a glass~ A glass rests here.~ ~ @@ -539,7 +539,7 @@ 1 1 2 0 1 3800 10 #5469 -ale bottle grog~ +bottle grog ale~ a bottle of grog~ A bottle lies here.~ ~ @@ -611,7 +611,7 @@ This dark blue potion has a small label on it reading 'Restoration' ~ #5475 -beer bottle scorpion flaming~ +bottle scorpion flaming beer~ a flaming scorpion~ A bottle of strong beer lies here.~ ~ @@ -619,7 +619,7 @@ 5 5 1 0 1 500 10 #5476 -beer barrel~ +barrel beer~ a barrel~ A barrel of beer lies here.~ ~ @@ -627,7 +627,7 @@ 10 10 1 0 15 900 50 #5477 -whisky shot~ +shot whisky~ a shot~ A shot of strong liquor lies here.~ ~ Index: circle/lib/world/obj/60.obj diff -u circle/lib/world/obj/60.obj:1.1 circle/lib/world/obj/60.obj:1.2 --- circle/lib/world/obj/60.obj:1.1 Tue Oct 28 22:06:38 1997 +++ circle/lib/world/obj/60.obj Sat Jan 29 13:35:00 2000 @@ -159,7 +159,7 @@ ~ #6013 -water barrel~ +barrel water~ a barrel~ A water barrel has been left here.~ ~ Index: circle/lib/world/obj/64.obj diff -u circle/lib/world/obj/64.obj:1.2 circle/lib/world/obj/64.obj:1.3 --- circle/lib/world/obj/64.obj:1.2 Fri Jun 4 07:25:41 1999 +++ circle/lib/world/obj/64.obj Sat Jan 29 13:35:00 2000 @@ -178,7 +178,7 @@ 500 13 0 0 0 0 0 #6419 -water basin water~ +basin water~ a water basin~ A basin filled with crisp, clean water is here.~ ~ Index: circle/lib/world/obj/79.obj diff -u circle/lib/world/obj/79.obj:1.1 circle/lib/world/obj/79.obj:1.2 --- circle/lib/world/obj/79.obj:1.1 Tue Oct 28 22:06:39 1997 +++ circle/lib/world/obj/79.obj Sat Jan 29 13:27:46 2000 @@ -275,7 +275,7 @@ rose. ~ #7921 -water barrel~ +barrel water~ a barrel~ A water barrel has been left here.~ ~ Index: circle/lib/world/shp/120.shp diff -u circle/lib/world/shp/120.shp:1.1.1.1 circle/lib/world/shp/120.shp:1.2 --- circle/lib/world/shp/120.shp:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/shp/120.shp Fri Nov 3 14:18:42 2000 @@ -125,9 +125,9 @@ -1 %s We don't have that item in stock right now.~ %s I don't think you have that item.~ +%s Hmmmm... if I was in a good mood, I'd consider it. But I'm not.~ %s The Emperor's tax collector just came. I don't have the cash. Sorry.~ %s NO CREDIT! We don't even take the Renaissance Express card!~ -%s Hmmmm. I'll give you %d for that... while I'm in a good mood.~ %s That will be %d coins. Enjoy!~ %s You'll get %d coins for that.~ 2 Index: circle/lib/world/wld/0.wld diff -u circle/lib/world/wld/0.wld:1.1.1.1 circle/lib/world/wld/0.wld:1.2 --- circle/lib/world/wld/0.wld:1.1.1.1 Sat Apr 13 17:07:29 1996 +++ circle/lib/world/wld/0.wld Thu Mar 30 12:36:13 2000 @@ -34,42 +34,4 @@ ~ 0 -1 3048 S -#99 -The Realm Of The Dead~ - You are standing on an immense, grey stone floor that stretches as far -as you can see in all directions. Rough winds plunging from the dark, -starless sky tear savagely at your fragile body. -~ -0 dj 0 -D0 -The hard floor seems to go on forever. -~ -~ -0 -1 99 -D1 -The hard floor seems to go on forever. -~ -~ -0 -1 99 -D2 -The hard floor seems to go on forever. -~ -~ -0 -1 99 -D3 -The hard floor seems to go on forever. -~ -~ -0 -1 99 -E -floor~ -The stone floor is the same shade of grey as the sky and is completely plain -and unscratched. It is probably too hard for anything to leave as much as a -scratch on it. -~ -E -sky wind winds~ -Cold winds plunge ceaselessly at you from the dark, cloudless sky. -~ -S $ Index: circle/lib/world/wld/186.wld diff -u circle/lib/world/wld/186.wld:1.1.1.1 circle/lib/world/wld/186.wld:1.2 --- circle/lib/world/wld/186.wld:1.1.1.1 Sat Apr 13 17:07:30 1996 +++ circle/lib/world/wld/186.wld Fri Dec 15 17:44:07 2000 @@ -677,10 +677,10 @@ ~ 0 -1 18641 D2 -The hall extends to the south where it seems to darken somewhat. +The hall extends to the south where it seems to lighten somewhat. ~ ~ -0 -1 18603 +0 -1 18644 E statue~ Upon closer inspection you see that the statue has a small plaque affixed Index: circle/lib/world/wld/25.wld diff -u circle/lib/world/wld/25.wld:1.1.1.1 circle/lib/world/wld/25.wld:1.2 --- circle/lib/world/wld/25.wld:1.1.1.1 Sat Apr 13 17:07:30 1996 +++ circle/lib/world/wld/25.wld Sun Dec 17 06:23:50 2000 @@ -646,7 +646,7 @@ your lungs burst from lack of oxygen. Just as you feel your life fading, you notice a change in direction... and are sucked under by a rip tide. ~ -25 adg 0 +25 abdg 0 S #2530 The Hallway~ Index: circle/lib/world/wld/50.wld diff -u circle/lib/world/wld/50.wld:1.2 circle/lib/world/wld/50.wld:1.3 --- circle/lib/world/wld/50.wld:1.2 Tue Oct 28 21:16:15 1997 +++ circle/lib/world/wld/50.wld Mon Dec 4 05:12:00 2000 @@ -825,7 +825,7 @@ D2 Sand as far as the eye can see. ~ -~ +~ 0 -1 5041 D3 The pyramid can be seen across the sands to the west. Index: circle/lib/world/wld/61.wld diff -u circle/lib/world/wld/61.wld:1.1.1.1 circle/lib/world/wld/61.wld:1.2 --- circle/lib/world/wld/61.wld:1.1.1.1 Sat Apr 13 17:07:30 1996 +++ circle/lib/world/wld/61.wld Sat Dec 2 07:54:09 2000 @@ -1344,5 +1344,4 @@ ~ 0 -1 6154 S -#99999 $~ Index: circle/lib/world/zon/0.zon diff -u circle/lib/world/zon/0.zon:1.1.1.1 circle/lib/world/zon/0.zon:1.3 --- circle/lib/world/zon/0.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/0.zon Sat Dec 2 07:58:12 2000 @@ -4,9 +4,6 @@ * * Mobiles M 0 1 1 1 Puff -M 0 99 1 99 Death -E 1 99 1 16 Scythe * S -#99999 $~ Index: circle/lib/world/zon/15.zon diff -u circle/lib/world/zon/15.zon:1.1 circle/lib/world/zon/15.zon:1.2 --- circle/lib/world/zon/15.zon:1.1 Tue Oct 28 21:16:16 1997 +++ circle/lib/world/zon/15.zon Sat Dec 2 07:58:12 2000 @@ -51,6 +51,5 @@ G 1 1507 1 Ethereal Flame * S -#99999 $~ Index: circle/lib/world/zon/25.zon diff -u circle/lib/world/zon/25.zon:1.1.1.1 circle/lib/world/zon/25.zon:1.2 --- circle/lib/world/zon/25.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/25.zon Sat Dec 2 07:58:12 2000 @@ -195,9 +195,9 @@ O 0 2507 2 2533 Broom O 0 2507 2 2533 Broom O 0 2508 1 2579 Cabinet -P 1 3020 999 2508 Dagger -P 1 3021 999 2508 Small Sword -P 1 3022 999 2508 Long Sword +P 1 3020 100 2508 Dagger +P 1 3021 100 2508 Small Sword +P 1 3022 100 2508 Long Sword O 0 2509 1 2579 Bar Of Silver O 0 2510 1 2579 Bar Of Gold O 0 2511 1 2579 Bar Of Mithral Index: circle/lib/world/zon/31.zon diff -u circle/lib/world/zon/31.zon:1.1.1.1 circle/lib/world/zon/31.zon:1.2 --- circle/lib/world/zon/31.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/31.zon Sat Dec 2 07:47:04 2000 @@ -1,6 +1,6 @@ #31 Southern part of Midgaard~ -3199 40 2 +3299 40 2 * * Cityguards from zone 30 M 0 3060 20 3111 Cityguard Index: circle/lib/world/zon/33.zon diff -u circle/lib/world/zon/33.zon:1.2 circle/lib/world/zon/33.zon:1.3 --- circle/lib/world/zon/33.zon:1.2 Tue Oct 28 21:16:16 1997 +++ circle/lib/world/zon/33.zon Sat Dec 2 07:47:04 2000 @@ -3,8 +3,8 @@ 3399 30 2 * * Created by Amanda Eterniale & Builder_5 of C.A.W. -* Official C.A.W. site: http://democracy.queensu.ca/~fletcher/VieMud/Caw/ -* Mail Address: fletcher@democracy.queensu.ca +* Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ +* Mail Address: fletchra@qsilver.queensu.ca * * Mobiles M 0 3300 2 3346 Farmer Index: circle/lib/world/zon/40.zon diff -u circle/lib/world/zon/40.zon:1.1.1.1 circle/lib/world/zon/40.zon:1.3 --- circle/lib/world/zon/40.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/40.zon Tue Feb 13 05:08:35 2001 @@ -80,8 +80,8 @@ M 0 4107 1 4119 Kobold G 1 4104 10 Slime * Doors -D 0 4119 1 1 Secret Passage -D 0 4121 3 1 +D 0 4119 3 1 Secret Passage +D 0 4121 1 1 * * North Of Mountain -- Wilderness * @@ -90,5 +90,4 @@ M 0 4058 1 4044 Hill Giant * S -#99999 $~ Index: circle/lib/world/zon/54.zon diff -u circle/lib/world/zon/54.zon:1.2 circle/lib/world/zon/54.zon:1.3 --- circle/lib/world/zon/54.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/54.zon Sat Dec 2 07:58:12 2000 @@ -13,72 +13,72 @@ M 0 5403 1 5546 Thief Guildmaster M 0 5404 1 5401 Receptionist M 0 5405 1 5402 Old Withered Mage/Bartender - Shopkeeper -G 1 5467 900 Glass Of Blue Oasis -G 1 5468 900 Glass Of Wine -G 1 5469 900 Bottle Of Grog +G 1 5467 100 Glass Of Blue Oasis +G 1 5468 100 Glass Of Wine +G 1 5469 100 Bottle Of Grog M 0 5406 1 5402 Brother John M 0 5407 1 5403 Panhandler M 0 5408 1 5404 Panhandler M 0 5409 20 5410 Beggar M 0 5410 1 5535 Baker - Shopkeeper -G 1 5440 888 Hunk Of Cheese -G 1 5441 888 Bread -G 1 5442 888 Some Dry Rations -G 1 5443 888 Some Iron Rations -G 1 5445 888 Some Nuts -G 1 5491 888 Sesame Seed +G 1 5440 100 Hunk Of Cheese +G 1 5441 100 Bread +G 1 5442 100 Some Dry Rations +G 1 5443 100 Some Iron Rations +G 1 5445 100 Some Nuts +G 1 5491 100 Sesame Seed M 0 5411 1 5528 Shopkeeper - Shopkeeper -G 1 5434 888 Sack -G 1 5435 888 Oil Lamp -G 1 5436 888 Backpack -G 1 5437 888 Basket -G 1 5438 888 Belt Pouch -G 1 5439 888 Candle +G 1 5434 100 Sack +G 1 5435 100 Oil Lamp +G 1 5436 100 Backpack +G 1 5437 100 Basket +G 1 5438 100 Belt Pouch +G 1 5439 100 Candle M 0 5412 1 5521 Banker M 0 5413 1 5514 Ahkeem The Tailor - Shopkeeper -G 1 5446 999 Belt -G 1 5447 999 Hiking Boots -G 1 5448 999 Fur Cloak -G 1 5449 999 Girdle -G 1 5450 999 Pair Of Hose -G 1 5451 999 Common Robe -G 1 5452 999 Embroidered Robe -G 1 5453 999 Sandals -G 1 5454 999 Sash -G 1 5455 999 Silk Jacket -E 1 5483 999 16 Sewing Shears +G 1 5446 100 Belt +G 1 5447 100 Hiking Boots +G 1 5448 100 Fur Cloak +G 1 5449 100 Girdle +G 1 5450 100 Pair Of Hose +G 1 5451 100 Common Robe +G 1 5452 100 Embroidered Robe +G 1 5453 100 Sandals +G 1 5454 100 Sash +G 1 5455 100 Silk Jacket +E 1 5483 100 16 Sewing Shears M 0 5414 1 5515 Vera The Veggie Lady - Shopkeeper -G 1 5456 999 Egg -G 1 5457 999 Carrot -G 1 5458 999 Tomatoe -G 1 5459 999 Fig -G 1 5460 999 Some Dates +G 1 5456 100 Egg +G 1 5457 100 Carrot +G 1 5458 100 Tomatoe +G 1 5459 100 Fig +G 1 5460 100 Some Dates M 0 5415 1 5522 Butch The Meatcutter - Shopkeeper -G 1 5461 888 Leg Of Lamb -G 1 5462 888 Side Of Beef -G 1 5463 888 Whole Chicken -E 1 5484 888 16 Meat Cleaver +G 1 5461 100 Leg Of Lamb +G 1 5462 100 Side Of Beef +G 1 5463 100 Whole Chicken +E 1 5484 100 16 Meat Cleaver M 0 5416 1 5529 Abdul The Armorer - Shopkeeper -G 1 5415 998 Suit Of Banded Mail -G 1 5416 998 Suit Of Brigandine -G 1 5417 998 Suit Of Field Plate -G 1 5418 998 Suit Of Ringmail -G 1 5419 998 Suit Of Splintmail -G 1 5420 998 Wooden Shield -G 1 5421 888 Splinted Shield +G 1 5415 100 Suit Of Banded Mail +G 1 5416 100 Suit Of Brigandine +G 1 5417 100 Suit Of Field Plate +G 1 5418 100 Suit Of Ringmail +G 1 5419 100 Suit Of Splintmail +G 1 5420 100 Wooden Shield +G 1 5421 100 Splinted Shield M 0 5417 1 5536 Igor The Weaponsmith - Shopkeeper -G 1 5403 998 Morningstar -G 1 5404 998 Awl-Pike -G 1 5405 998 Bardiche -G 1 5406 998 Bec De Corbine -G 1 5407 998 Bill-Guisarme -G 1 5408 998 Fauchard -G 1 5409 998 Glaive -G 1 5410 998 Guisarme -G 1 5411 998 Sickle -G 1 5412 998 Two-Handed Bastard Sword -G 1 5413 998 Scimitar -G 1 5414 998 Rapier +G 1 5403 100 Morningstar +G 1 5404 100 Awl-Pike +G 1 5405 100 Bardiche +G 1 5406 100 Bec De Corbine +G 1 5407 100 Bill-Guisarme +G 1 5408 100 Fauchard +G 1 5409 100 Glaive +G 1 5410 100 Guisarme +G 1 5411 100 Sickle +G 1 5412 100 Two-Handed Bastard Sword +G 1 5413 100 Scimitar +G 1 5414 100 Rapier M 0 5418 1 5432 Cassandra - Shopkeeper G 1 5464 20 Salted Herring G 1 5465 20 Muscle @@ -253,9 +253,9 @@ G 1 3060 100 Raft G 1 3061 100 Canoe M 0 5466 1 5544 Blacksmith - Shopkeeper -G 1 5487 989 Horse Shoe -G 1 5488 989 Saddle -G 1 5489 989 Riding Crop +G 1 5487 100 Horse Shoe +G 1 5488 100 Saddle +G 1 5489 100 Riding Crop M 0 5467 6 5545 Horse M 0 5467 6 5545 Horse M 0 5467 6 5545 Horse @@ -279,17 +279,17 @@ M 0 5477 1 5601 Giant Hornet M 0 5478 1 5583 Pegasus M 0 5479 1 5523 Elvria - Shopkeeper -G 1 5470 888 Glowing Blue Vial -G 1 5471 888 Deep-Green Potion -G 1 5472 888 Crystal Clear Potion -G 1 5473 888 Off White Potion -G 1 5474 888 Dark Blue Potion +G 1 5470 100 Glowing Blue Vial +G 1 5471 100 Deep-Green Potion +G 1 5472 100 Crystal Clear Potion +G 1 5473 100 Off White Potion +G 1 5474 100 Dark Blue Potion M 0 5480 1 5524 Braheem - Shopkeeper -G 1 5478 888 Scroll Of Recall -G 1 5479 888 Grey-Silver Wand -G 1 5480 888 Wand Of Glinting Yellow -G 1 5481 888 Wand Of Oak -G 1 5482 888 Pink Wand +G 1 5478 100 Scroll Of Recall +G 1 5479 100 Grey-Silver Wand +G 1 5480 100 Wand Of Glinting Yellow +G 1 5481 100 Wand Of Oak +G 1 5482 100 Pink Wand M 0 5481 1 5504 High Priest M 0 5482 15 5407 Royal Guard M 0 5482 15 5408 Royal Guard @@ -300,22 +300,22 @@ M 0 5482 15 5450 Royal Guard M 0 5482 15 5452 Royal Guard M 0 5483 1 5538 Patch The Bartender - Shopkeeper -G 1 5475 989 Flaming Scorpion -G 1 5476 989 Barrel Of Beer -G 1 5477 989 Shot Of Whisky +G 1 5475 100 Flaming Scorpion +G 1 5476 100 Barrel Of Beer +G 1 5477 100 Shot Of Whisky M 0 5484 1 5537 Stitch, The Leather Dude - Shopkeeper -G 1 5422 989 Buckler -G 1 5423 989 Leather Jacket -G 1 5424 989 Leather Sleeves -G 1 5425 989 Leather Cap -G 1 5426 989 Leather Pants -G 1 5427 989 Leather Gloves -G 1 5428 989 Padded Leather Boots -G 1 5429 989 Studded Leather Jacket -G 1 5430 989 Studded Leather Sleeves -G 1 5431 989 Studded Leather Pants -G 1 5432 989 Studded Leather Gloves -G 1 5433 989 Leather Shield +G 1 5422 100 Buckler +G 1 5423 100 Leather Jacket +G 1 5424 100 Leather Sleeves +G 1 5425 100 Leather Cap +G 1 5426 100 Leather Pants +G 1 5427 100 Leather Gloves +G 1 5428 100 Padded Leather Boots +G 1 5429 100 Studded Leather Jacket +G 1 5430 100 Studded Leather Sleeves +G 1 5431 100 Studded Leather Pants +G 1 5432 100 Studded Leather Gloves +G 1 5433 100 Leather Shield M 0 5485 1 5578 Gardener M 0 5486 1 5583 Nightmare M 0 5487 1 5596 Wolverine Index: circle/lib/world/zon/62.zon diff -u circle/lib/world/zon/62.zon:1.2 circle/lib/world/zon/62.zon:1.3 --- circle/lib/world/zon/62.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/62.zon Sat Dec 2 07:47:04 2000 @@ -3,8 +3,8 @@ 6299 20 2 * * Created by Builder_5 & Serene of C.A.W. -* Official C.A.W. site: http://democracy.queensu.ca/~fletcher/VieMud/Caw/ -* Mail Address: fletcher@democracy.queensu.ca +* Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ +* Mail Address: fletchra@qsilver.queensu.ca * * Mobiles M 0 6200 3 6219 Deer Index: circle/lib/world/zon/64.zon diff -u circle/lib/world/zon/64.zon:1.2 circle/lib/world/zon/64.zon:1.3 --- circle/lib/world/zon/64.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/64.zon Sat Dec 2 07:47:04 2000 @@ -3,8 +3,8 @@ 6499 20 1 * * Created by Amanda Eterniale of C.A.W. -* Official C.A.W. site: http://democracy.queensu.ca/~fletcher/VieMud/Caw/ -* Mail Address: fletcher@democracy.queensu.ca +* Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ +* Mail Address: fletchra@qsilver.queensu.ca * * Mobiles M 0 6400 3 6400 Goats Index: circle/lib/world/zon/79.zon diff -u circle/lib/world/zon/79.zon:1.1.1.1 circle/lib/world/zon/79.zon:1.2 --- circle/lib/world/zon/79.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/79.zon Thu Mar 30 12:35:28 2000 @@ -30,9 +30,11 @@ O 0 7908 40 7907 Waybread R 0 7908 7921 O 0 7921 10 7908 Water Barrel +R 0 7903 7904 O 0 7904 1 7903 Chest P 1 7903 1 7904 Money P 1 7909 4 7904 Golden Ring +R 0 7913 7905 O 1 7905 1 7913 Chest P 1 7906 5 7905 P 1 7912 3 7905 Chaos Helmet Index: circle/src/Makefile.in diff -u circle/src/Makefile.in:1.13 circle/src/Makefile.in:1.14 --- circle/src/Makefile.in:1.13 Thu Jun 3 15:51:17 1999 +++ circle/src/Makefile.in Thu Jan 25 16:38:56 2001 @@ -159,7 +159,8 @@ limits.o: limits.c conf.h sysdep.h structs.h utils.h spells.h comm.h db.h \ handler.h $(CC) -c $(CFLAGS) limits.c -magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h +magic.o: magic.c conf.h sysdep.h structs.h utils.h comm.h spells.h handler.h db.h \ + constants.h $(CC) -c $(CFLAGS) magic.c mail.o: mail.c conf.h sysdep.h structs.h utils.h comm.h db.h interpreter.h \ handler.h mail.h Index: circle/src/Makefile.lcc diff -u circle/src/Makefile.lcc:1.5 circle/src/Makefile.lcc:1.6 --- circle/src/Makefile.lcc:1.5 Mon Aug 30 19:12:01 1999 +++ circle/src/Makefile.lcc Sun Jan 23 19:43:14 2000 @@ -1,4 +1,4 @@ -# Makefile for LCC-Win32 compile of CircleMUD 3.0bpl17 +# Makefile for LCC-Win32 compile of CircleMUD 3.0 # Created by Eric Jones (mailto:fpicard@mindless.com) # 08/31/98 @@ -6,13 +6,13 @@ # to \LCC instead of \LCCPUB as in older versions # Added DISTDIR variable to allow for an easy way to change # where Circle is located, plus will allow for changes in the -# path between versions (e.g. bpl17 is circle30bpl17) +# path between versions (e.g. bplZZ is circle30bplZZ) # With addition of new variables as replacements for old # hard-coded paths, display lines will be less than 80 columns # thus less clutter on the screen during the make LCCDIR=c:\lccpub -DISTDIR=c:\circle30bpl17 +DISTDIR=c:\circle30bpl18 CFLAGS=-c -I$(LCCDIR)\include -DLCC_WIN32 CC=lcc OBJS=\ Index: circle/src/act.comm.c diff -u circle/src/act.comm.c:1.18 circle/src/act.comm.c:1.19 --- circle/src/act.comm.c:1.18 Sun Jan 23 13:24:53 2000 +++ circle/src/act.comm.c Thu Jan 25 16:50:43 2001 @@ -151,9 +151,9 @@ if (!*buf || !*buf2) send_to_char("Who do you wish to tell what??\r\n", ch); - else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, FIND_CHAR_WORLD))) + else if (GET_LEVEL(ch) < LVL_IMMORT && !(vict = get_player_vis(ch, buf, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); - else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, FIND_CHAR_WORLD))) + else if (GET_LEVEL(ch) >= LVL_IMMORT && !(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); else if (is_tell_ok(ch, vict)) perform_tell(ch, vict, buf2); @@ -227,7 +227,7 @@ if (!*buf || !*buf2) { sprintf(buf, "Whom do you want to %s.. and what??\r\n", action_sing); send_to_char(buf, ch); - } else if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) + } else if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) send_to_char(NOPERSON, ch); else if (vict == ch) send_to_char("You can't get your mouth close enough to your ear...\r\n", ch); @@ -266,18 +266,18 @@ return; } if (*penname) { /* there were two arguments */ - if (!(paper = get_obj_in_list_vis(ch, papername, ch->carrying))) { + if (!(paper = get_obj_in_list_vis(ch, papername, NULL, ch->carrying))) { sprintf(buf, "You have no %s.\r\n", papername); send_to_char(buf, ch); return; } - if (!(pen = get_obj_in_list_vis(ch, penname, ch->carrying))) { + if (!(pen = get_obj_in_list_vis(ch, penname, NULL, ch->carrying))) { sprintf(buf, "You have no %s.\r\n", penname); send_to_char(buf, ch); return; } } else { /* there was one arg.. let's see what we can find */ - if (!(paper = get_obj_in_list_vis(ch, papername, ch->carrying))) { + if (!(paper = get_obj_in_list_vis(ch, papername, NULL, ch->carrying))) { sprintf(buf, "There is no %s in your inventory.\r\n", papername); send_to_char(buf, ch); return; @@ -346,7 +346,7 @@ send_to_char("You will never be godly enough to do that!\r\n", ch); return; } - if ((vict = get_char_vis(ch, arg, FIND_CHAR_WORLD)) != NULL) { + if ((vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD)) != NULL) { act(buf, FALSE, ch, 0, vict, TO_VICT); if (PRF_FLAGGED(ch, PRF_NOREPEAT)) send_to_char(OK, ch); Index: circle/src/act.informative.c diff -u circle/src/act.informative.c:1.28 circle/src/act.informative.c:1.33 --- circle/src/act.informative.c:1.28 Thu Jan 20 16:16:03 2000 +++ circle/src/act.informative.c Thu Jan 25 16:50:43 2001 @@ -91,6 +91,15 @@ /* * This function screams bitvector... -gg 6/45/98 + * + * A lot of "grep" later: + * Mode 0: Object description, and auras. + * Mode 1: Object short description and auras. + * Mode 2: Object short description and auras. + * Mode 3: Object short description. (Unused) + * Mode 4: Object short description and auras. (Unused) + * Mode 5: Notes, drink containers, fountains. + * Mode 6: Auras. */ void show_obj_to_char(struct obj_data * object, struct char_data * ch, int mode) @@ -833,24 +842,39 @@ sprintf(buf, "It is %d o'clock %s, on ", ((time_info.hours % 12 == 0) ? 12 : ((time_info.hours) % 12)), ((time_info.hours >= 12) ? "pm" : "am")); + + day = time_info.day + 1; /* day in [1..35] */ - /* 35 days in a month */ - weekday = ((35 * time_info.month) + time_info.day + 1) % 7; + /* 35 days in a month, 7 days a week */ + weekday = ((35 * time_info.month) + day) % 7; strcat(buf, weekdays[weekday]); strcat(buf, "\r\n"); send_to_char(buf, ch); - day = time_info.day + 1; /* day in [1..35] */ + /* + * Peter Ajamian supplied the following as a fix + * for a bug introduced in the ordinal display that caused 11, 12, and 13 + * to be incorrectly displayed as 11st, 12nd, and 13rd. Nate Winters + * had already submitted a fix, but it hard-coded a + * limit on ordinal display which I want to avoid. -dak + */ - if ((day % 10) == 1) - suf = "st"; - else if ((day % 10) == 2) - suf = "nd"; - else if ((day % 10) == 3) - suf = "rd"; - else - suf = "th"; + suf = "th"; + + if (((day % 100) / 10) != 1) { + switch (day % 10) { + case 1: + suf = "st"; + break; + case 2: + suf = "nd"; + break; + case 3: + suf = "rd"; + break; + } + } sprintf(buf, "The %d%s Day of the %s, Year %d.\r\n", day, suf, month_name[(int) time_info.month], time_info.year); @@ -1441,7 +1465,7 @@ one_argument(argument, buf); - if (!(victim = get_char_vis(ch, buf, FIND_CHAR_ROOM))) { + if (!(victim = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) { send_to_char("Consider killing who?\r\n", ch); return; } @@ -1489,7 +1513,7 @@ one_argument(argument, buf); if (*buf) { - if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) + if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) send_to_char(NOPERSON, ch); else diag_char_to_char(vict, ch); @@ -1658,7 +1682,7 @@ one_argument(argument, arg); if (*arg) { - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_WORLD)) || IS_NPC(vict)) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD)) || IS_NPC(vict)) { send_to_char("Who is that?\r\n", ch); return; } Index: circle/src/act.item.c diff -u circle/src/act.item.c:1.30 circle/src/act.item.c:1.36 --- circle/src/act.item.c:1.30 Wed Nov 24 17:58:14 1999 +++ circle/src/act.item.c Thu Jan 25 16:50:43 2001 @@ -138,7 +138,7 @@ send_to_char("You'd better open it first!\r\n", ch); else { if (obj_dotmode == FIND_INDIV) { /* put */ - if (!(obj = get_obj_in_list_vis(ch, theobj, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, theobj, NULL, ch->carrying))) { sprintf(buf, "You aren't carrying %s %s.\r\n", AN(theobj), theobj); send_to_char(buf, ch); } else if (obj == cont) @@ -148,7 +148,7 @@ while(obj && howmany--) { next_obj = obj->next_content; perform_put(ch, obj, cont); - obj = get_obj_in_list_vis(ch, theobj, next_obj); + obj = get_obj_in_list_vis(ch, theobj, NULL, next_obj); } } } else { @@ -198,7 +198,6 @@ if (GET_OBJ_TYPE(obj) != ITEM_MONEY || value <= 0) return; - obj_from_char(obj); extract_obj(obj); GET_GOLD(ch) += value; @@ -240,15 +239,15 @@ if (OBJVAL_FLAGGED(cont, CONT_CLOSED)) act("$p is closed.", FALSE, ch, cont, 0, TO_CHAR); else if (obj_dotmode == FIND_INDIV) { - if (!(obj = get_obj_in_list_vis(ch, arg, cont->contains))) { + if (!(obj = get_obj_in_list_vis(ch, arg, NULL, cont->contains))) { sprintf(buf, "There doesn't seem to be %s %s in $p.", AN(arg), arg); act(buf, FALSE, ch, cont, 0, TO_CHAR); } else { struct obj_data *obj_next; - while(obj && howmany--) { + while (obj && howmany--) { obj_next = obj->next_content; perform_get_from_container(ch, obj, cont, mode); - obj = get_obj_in_list_vis(ch, arg, obj_next); + obj = get_obj_in_list_vis(ch, arg, NULL, obj_next); } } } else { @@ -298,7 +297,7 @@ dotmode = find_all_dots(arg); if (dotmode == FIND_INDIV) { - if (!(obj = get_obj_in_list_vis(ch, arg, world[ch->in_room].contents))) { + if (!(obj = get_obj_in_list_vis(ch, arg, NULL, world[ch->in_room].contents))) { sprintf(buf, "You don't see %s %s here.\r\n", AN(arg), arg); send_to_char(buf, ch); } else { @@ -306,7 +305,7 @@ while(obj && howmany--) { obj_next = obj->next_content; perform_get_from_room(ch, obj); - obj = get_obj_in_list_vis(ch, arg, obj_next); + obj = get_obj_in_list_vis(ch, arg, NULL, obj_next); } } } else { @@ -547,12 +546,12 @@ else if (!*arg) { sprintf(buf, "What do you want to %s %d of?\r\n", sname, multi); send_to_char(buf, ch); - } else if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + } else if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have any %ss.\r\n", arg); send_to_char(buf, ch); } else { do { - next_obj = get_obj_in_list_vis(ch, arg, obj->next_content); + next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content); amount += perform_drop(ch, obj, mode, sname, RDR); obj = next_obj; } while (obj && --multi); @@ -582,17 +581,17 @@ send_to_char(buf, ch); return; } - if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have any %ss.\r\n", arg); send_to_char(buf, ch); } while (obj) { - next_obj = get_obj_in_list_vis(ch, arg, obj->next_content); + next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content); amount += perform_drop(ch, obj, mode, sname, RDR); obj = next_obj; } } else { - if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); } else @@ -638,7 +637,7 @@ if (!*arg) { send_to_char("To who?\r\n", ch); return (NULL); - } else if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) { + } else if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) { send_to_char(NOPERSON, ch); return (NULL); } else if (vict == ch) { @@ -694,12 +693,12 @@ send_to_char(buf, ch); } else if (!(vict = give_find_vict(ch, argument))) { return; - } else if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + } else if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have any %ss.\r\n", arg); send_to_char(buf, ch); } else { while (obj && amount--) { - next_obj = get_obj_in_list_vis(ch, arg, obj->next_content); + next_obj = get_obj_in_list_vis(ch, arg, NULL, obj->next_content); perform_give(ch, vict, obj); obj = next_obj; } @@ -710,7 +709,7 @@ return; dotmode = find_all_dots(arg); if (dotmode == FIND_INDIV) { - if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); } else @@ -759,27 +758,55 @@ void name_from_drinkcon(struct obj_data * obj) { - int i; - char *new_name; + char *new_name, *cur_name, *next; + const char *liqname; + int liqlen, cpylen; + + if (!obj || (GET_OBJ_TYPE(obj) != ITEM_DRINKCON && GET_OBJ_TYPE(obj) != ITEM_FOUNTAIN)) + return; + + liqname = drinknames[GET_OBJ_VAL(obj, 2)]; + if (!isname(liqname, obj->name)) { + log("SYSERR: Can't remove liquid '%s' from '%s' (%d) item.", liqname, obj->name, obj->item_number); + return; + } + + liqlen = strlen(liqname); + CREATE(new_name, char, strlen(obj->name) - strlen(liqname)); /* +1 for NUL, -1 for space */ + + for (cur_name = obj->name; cur_name; cur_name = next) { + if (*cur_name == ' ') + cur_name++; + + if ((next = strchr(cur_name, ' '))) + cpylen = next - cur_name; + else + cpylen = strlen(cur_name); - for (i = 0; (*((obj->name) + i) != ' ') && (*((obj->name) + i) != '\0'); i++); + if (!strn_cmp(cur_name, liqname, liqlen)) + continue; - if (*((obj->name) + i) == ' ') { - new_name = str_dup((obj->name) + i + 1); - if (GET_OBJ_RNUM(obj) < 0 || obj->name != obj_proto[GET_OBJ_RNUM(obj)].name) - free(obj->name); - obj->name = new_name; + if (*new_name) + strcat(new_name, " "); + strncat(new_name, cur_name, cpylen); } + + if (GET_OBJ_RNUM(obj) < 0 || obj->name != obj_proto[GET_OBJ_RNUM(obj)].name) + free(obj->name); + obj->name = new_name; } -void name_to_drinkcon(struct obj_data * obj, int type) +void name_to_drinkcon(struct obj_data *obj, int type) { char *new_name; + if (!obj || (GET_OBJ_TYPE(obj) != ITEM_DRINKCON && GET_OBJ_TYPE(obj) != ITEM_FOUNTAIN)) + return; + CREATE(new_name, char, strlen(obj->name) + strlen(drinknames[type]) + 2); - sprintf(new_name, "%s %s", drinknames[type], obj->name); + sprintf(new_name, "%s %s", obj->name, drinknames[type]); if (GET_OBJ_RNUM(obj) < 0 || obj->name != obj_proto[GET_OBJ_RNUM(obj)].name) free(obj->name); obj->name = new_name; @@ -803,8 +830,8 @@ send_to_char("Drink from what?\r\n", ch); return; } - if (!(temp = get_obj_in_list_vis(ch, arg, ch->carrying))) { - if (!(temp = get_obj_in_list_vis(ch, arg, world[ch->in_room].contents))) { + if (!(temp = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { + if (!(temp = get_obj_in_list_vis(ch, arg, NULL, world[ch->in_room].contents))) { send_to_char("You can't find it!\r\n", ch); return; } else @@ -877,7 +904,7 @@ if (GET_COND(ch, FULL) > 20) send_to_char("You are full.\r\n", ch); - if (GET_OBJ_VAL(temp, 3)) { /* The shit was poisoned ! */ + if (GET_OBJ_VAL(temp, 3)) { /* The crap was poisoned ! */ send_to_char("Oops, it tasted rather strange!\r\n", ch); act("$n chokes and utters some strange sounds.", TRUE, ch, 0, 0, TO_ROOM); @@ -891,9 +918,9 @@ /* empty the container, and no longer poison. */ GET_OBJ_VAL(temp, 1) -= amount; if (!GET_OBJ_VAL(temp, 1)) { /* The last bit */ + name_from_drinkcon(temp); GET_OBJ_VAL(temp, 2) = 0; GET_OBJ_VAL(temp, 3) = 0; - name_from_drinkcon(temp); } return; } @@ -915,7 +942,7 @@ send_to_char("Eat what?\r\n", ch); return; } - if (!(food = get_obj_in_list_vis(ch, arg, ch->carrying))) { + if (!(food = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); return; @@ -949,7 +976,7 @@ send_to_char("You are full.\r\n", ch); if (GET_OBJ_VAL(food, 3) && (GET_LEVEL(ch) < LVL_IMMORT)) { - /* The shit was poisoned ! */ + /* The crap was poisoned ! */ send_to_char("Oops, that tasted rather strange!\r\n", ch); act("$n coughs and utters some strange sounds.", FALSE, ch, 0, 0, TO_ROOM); @@ -985,7 +1012,7 @@ send_to_char("From what do you want to pour?\r\n", ch); return; } - if (!(from_obj = get_obj_in_list_vis(ch, arg1, ch->carrying))) { + if (!(from_obj = get_obj_in_list_vis(ch, arg1, NULL, ch->carrying))) { send_to_char("You can't find it!\r\n", ch); return; } @@ -999,7 +1026,7 @@ send_to_char("What do you want to fill? And what are you filling it from?\r\n", ch); return; } - if (!(to_obj = get_obj_in_list_vis(ch, arg1, ch->carrying))) { + if (!(to_obj = get_obj_in_list_vis(ch, arg1, NULL, ch->carrying))) { send_to_char("You can't find it!\r\n", ch); return; } @@ -1011,7 +1038,7 @@ act("What do you want to fill $p from?", FALSE, ch, to_obj, 0, TO_CHAR); return; } - if (!(from_obj = get_obj_in_list_vis(ch, arg2, world[ch->in_room].contents))) { + if (!(from_obj = get_obj_in_list_vis(ch, arg2, NULL, world[ch->in_room].contents))) { sprintf(buf, "There doesn't seem to be %s %s here.\r\n", AN(arg2), arg2); send_to_char(buf, ch); return; @@ -1036,14 +1063,14 @@ weight_change_object(from_obj, -GET_OBJ_VAL(from_obj, 1)); /* Empty */ + name_from_drinkcon(from_obj); GET_OBJ_VAL(from_obj, 1) = 0; GET_OBJ_VAL(from_obj, 2) = 0; GET_OBJ_VAL(from_obj, 3) = 0; - name_from_drinkcon(from_obj); return; } - if (!(to_obj = get_obj_in_list_vis(ch, arg2, ch->carrying))) { + if (!(to_obj = get_obj_in_list_vis(ch, arg2, NULL, ch->carrying))) { send_to_char("You can't find it!\r\n", ch); return; } @@ -1091,10 +1118,10 @@ if (GET_OBJ_VAL(from_obj, 1) < 0) { /* There was too little */ GET_OBJ_VAL(to_obj, 1) += GET_OBJ_VAL(from_obj, 1); amount += GET_OBJ_VAL(from_obj, 1); + name_from_drinkcon(from_obj); GET_OBJ_VAL(from_obj, 1) = 0; GET_OBJ_VAL(from_obj, 2) = 0; GET_OBJ_VAL(from_obj, 3) = 0; - name_from_drinkcon(from_obj); } /* Then the poison boogie */ GET_OBJ_VAL(to_obj, 3) = @@ -1233,13 +1260,12 @@ { int where = -1; - /* \r to prevent explicit wearing. Don't use \n, it's end-of-array marker. */ const char *keywords[] = { - "\r!RESERVED!", + "!RESERVED!", "finger", - "\r!RESERVED!", + "!RESERVED!", "neck", - "\r!RESERVED!", + "!RESERVED!", "body", "head", "legs", @@ -1250,9 +1276,9 @@ "about", "waist", "wrist", - "\r!RESERVED!", - "\r!RESERVED!", - "\r!RESERVED!", + "!RESERVED!", + "!RESERVED!", + "!RESERVED!", "\n" }; @@ -1315,12 +1341,12 @@ send_to_char("Wear all of what?\r\n", ch); return; } - if (!(obj = get_obj_in_list_vis(ch, arg1, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, arg1, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have any %ss.\r\n", arg1); send_to_char(buf, ch); } else while (obj) { - next_obj = get_obj_in_list_vis(ch, arg1, obj->next_content); + next_obj = get_obj_in_list_vis(ch, arg1, NULL, obj->next_content); if ((where = find_eq_pos(ch, obj, 0)) >= 0) perform_wear(ch, obj, where); else @@ -1328,7 +1354,7 @@ obj = next_obj; } } else { - if (!(obj = get_obj_in_list_vis(ch, arg1, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, arg1, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg1), arg1); send_to_char(buf, ch); } else { @@ -1350,7 +1376,7 @@ if (!*arg) send_to_char("Wield what?\r\n", ch); - else if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + else if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); } else { @@ -1373,7 +1399,7 @@ if (!*arg) send_to_char("Hold what?\r\n", ch); - else if (!(obj = get_obj_in_list_vis(ch, arg, ch->carrying))) { + else if (!(obj = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf, ch); } else { Index: circle/src/act.movement.c diff -u circle/src/act.movement.c:1.20 circle/src/act.movement.c:1.21 --- circle/src/act.movement.c:1.20 Thu Mar 4 22:47:45 1999 +++ circle/src/act.movement.c Thu Jan 25 16:50:43 2001 @@ -642,7 +642,7 @@ if (*arg) { if (GET_POS(ch) == POS_SLEEPING) send_to_char("Maybe you should wake yourself up first.\r\n", ch); - else if ((vict = get_char_vis(ch, arg, FIND_CHAR_ROOM)) == NULL) + else if ((vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM)) == NULL) send_to_char(NOPERSON, ch); else if (vict == ch) self = 1; @@ -679,7 +679,7 @@ one_argument(argument, buf); if (*buf) { - if (!(leader = get_char_vis(ch, buf, FIND_CHAR_ROOM))) { + if (!(leader = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) { send_to_char(NOPERSON, ch); return; } Index: circle/src/act.offensive.c diff -u circle/src/act.offensive.c:1.22 circle/src/act.offensive.c:1.24 --- circle/src/act.offensive.c:1.22 Thu Mar 4 22:47:46 1999 +++ circle/src/act.offensive.c Sun Mar 18 18:58:58 2001 @@ -54,7 +54,7 @@ if (!*arg) send_to_char("Whom do you wish to assist?\r\n", ch); - else if (!(helpee = get_char_vis(ch, arg, FIND_CHAR_ROOM))) + else if (!(helpee = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) send_to_char(NOPERSON, ch); else if (helpee == ch) send_to_char("You can't help yourself any more than this!\r\n", ch); @@ -95,7 +95,7 @@ if (!*arg) send_to_char("Hit who?\r\n", ch); - else if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) + else if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) send_to_char("They don't seem to be here.\r\n", ch); else if (vict == ch) { send_to_char("You hit yourself...OUCH!.\r\n", ch); @@ -139,7 +139,7 @@ if (!*arg) { send_to_char("Kill who?\r\n", ch); } else { - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) send_to_char("They aren't here.\r\n", ch); else if (ch == vict) send_to_char("Your mother would be so sad.. :(\r\n", ch); @@ -166,7 +166,7 @@ one_argument(argument, buf); - if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) { send_to_char("Backstab who?\r\n", ch); return; } @@ -207,7 +207,6 @@ } - ACMD(do_order) { char name[MAX_INPUT_LENGTH], message[MAX_INPUT_LENGTH]; @@ -220,11 +219,10 @@ if (!*name || !*message) send_to_char("Order who to do what?\r\n", ch); - else if (!(vict = get_char_vis(ch, name, FIND_CHAR_ROOM)) && !is_abbrev(name, "followers")) + else if (!(vict = get_char_vis(ch, name, NULL, FIND_CHAR_ROOM)) && !is_abbrev(name, "followers")) send_to_char("That person isn't here.\r\n", ch); else if (ch == vict) send_to_char("You obviously suffer from skitzofrenia.\r\n", ch); - else { if (AFF_FLAGGED(ch, AFF_CHARM)) { send_to_char("Your superior would not aprove of you giving orders.\r\n", ch); @@ -243,7 +241,7 @@ } } else { /* This is order "followers" */ sprintf(buf, "$n issues the order '%s'.", message); - act(buf, FALSE, ch, 0, vict, TO_ROOM); + act(buf, FALSE, ch, 0, 0, TO_ROOM); org_room = ch->in_room; @@ -316,7 +314,7 @@ send_to_char("You need to wield a weapon to make it a success.\r\n", ch); return; } - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) { if (FIGHTING(ch) && IN_ROOM(ch) == IN_ROOM(FIGHTING(ch))) { vict = FIGHTING(ch); } else { @@ -366,7 +364,7 @@ one_argument(argument, arg); - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) { send_to_char("Whom do you want to rescue?\r\n", ch); return; } @@ -422,7 +420,7 @@ } one_argument(argument, arg); - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) { if (FIGHTING(ch) && IN_ROOM(ch) == IN_ROOM(FIGHTING(ch))) { vict = FIGHTING(ch); } else { Index: circle/src/act.other.c diff -u circle/src/act.other.c:1.31 circle/src/act.other.c:1.33 --- circle/src/act.other.c:1.31 Sun Jul 4 20:55:50 1999 +++ circle/src/act.other.c Thu Jan 25 18:01:22 2001 @@ -72,8 +72,6 @@ ACMD(do_quit) { - struct descriptor_data *d, *next_d; - if (IS_NPC(ch) || !ch->desc) return; @@ -87,23 +85,16 @@ } else { int loadroom = ch->in_room; - if (!GET_INVIS_LEV(ch)) - act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM); + act("$n has left the game.", TRUE, ch, 0, 0, TO_ROOM); sprintf(buf, "%s has quit the game.", GET_NAME(ch)); mudlog(buf, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(ch)), TRUE); send_to_char("Goodbye, friend.. Come back soon!\r\n", ch); - /* - * kill off all sockets connected to the same player as the one who is - * trying to quit. Helps to maintain sanity as well as prevent duping. + /* We used to check here for duping attempts, but we may as well + * do it right in extract_char(), since there is no check if a + * player rents out and it can leave them in an equally screwy + * situation. */ - for (d = descriptor_list; d; d = next_d) { - next_d = d->next; - if (d == ch->desc) - continue; - if (d->character && (GET_IDNUM(d->character) == GET_IDNUM(ch))) - STATE(d) = CON_DISCONNECT; - } if (free_rent) Crash_rentsave(ch, 0); @@ -229,7 +220,7 @@ two_arguments(argument, obj_name, vict_name); - if (!(vict = get_char_vis(ch, vict_name, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, vict_name, NULL, FIND_CHAR_ROOM))) { send_to_char("Steal what from who?\r\n", ch); return; } else if (vict == ch) { @@ -256,7 +247,7 @@ if (str_cmp(obj_name, "coins") && str_cmp(obj_name, "gold")) { - if (!(obj = get_obj_in_list_vis(ch, obj_name, vict->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, obj_name, NULL, vict->carrying))) { for (eq_pos = 0; eq_pos < NUM_WEARS; eq_pos++) if (GET_EQ(vict, eq_pos) && @@ -457,7 +448,7 @@ return; } - if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) + if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) send_to_char(NOPERSON, ch); else if ((vict->master != ch) && (vict != ch)) act("$N must follow you to enter your group.", FALSE, ch, 0, vict, TO_CHAR); @@ -503,7 +494,7 @@ send_to_char("You disband the group.\r\n", ch); return; } - if (!(tch = get_char_vis(ch, buf, FIND_CHAR_ROOM))) { + if (!(tch = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) { send_to_char("There is no such person!\r\n", ch); return; } @@ -659,7 +650,7 @@ switch (subcmd) { case SCMD_RECITE: case SCMD_QUAFF: - if (!(mag_item = get_obj_in_list_vis(ch, arg, ch->carrying))) { + if (!(mag_item = get_obj_in_list_vis(ch, arg, NULL, ch->carrying))) { sprintf(buf2, "You don't seem to have %s %s.\r\n", AN(arg), arg); send_to_char(buf2, ch); return; Index: circle/src/act.social.c diff -u circle/src/act.social.c:1.15 circle/src/act.social.c:1.16 --- circle/src/act.social.c:1.15 Tue May 4 20:53:29 1999 +++ circle/src/act.social.c Thu Jan 25 16:50:43 2001 @@ -109,7 +109,7 @@ act(action->others_no_arg, action->hide, ch, 0, 0, TO_ROOM); return; } - if (!(vict = get_char_vis(ch, buf, FIND_CHAR_ROOM))) { + if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM))) { send_to_char(action->not_found, ch); send_to_char("\r\n", ch); } else if (vict == ch) { @@ -137,7 +137,7 @@ one_argument(argument, arg); if (*arg) { - if (!(victim = get_char_vis(ch, arg, FIND_CHAR_ROOM))) + if (!(victim = get_char_vis(ch, arg, NULL, FIND_CHAR_ROOM))) send_to_char("Can't hear you!\r\n", ch); else { if (victim != ch) { Index: circle/src/act.wizard.c diff -u circle/src/act.wizard.c:1.41 circle/src/act.wizard.c:1.44 --- circle/src/act.wizard.c:1.41 Sun Jan 23 12:28:04 2000 +++ circle/src/act.wizard.c Mon Mar 5 04:44:48 2001 @@ -129,7 +129,7 @@ send_to_char("Send what to who?\r\n", ch); return; } - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_WORLD))) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) { send_to_char(NOPERSON, ch); return; } @@ -148,10 +148,7 @@ /* take a string, and return an rnum.. used for goto, at, etc. -je 4/6/93 */ room_rnum find_target_room(struct char_data * ch, char *rawroomstr) { - room_vnum tmp; - room_rnum location; - struct char_data *target_mob; - struct obj_data *target_obj; + room_rnum location = NOWHERE; char roomstr[MAX_INPUT_LENGTH]; one_argument(rawroomstr, roomstr); @@ -160,44 +157,58 @@ send_to_char("You must supply a room number or name.\r\n", ch); return (NOWHERE); } + if (isdigit(*roomstr) && !strchr(roomstr, '.')) { - tmp = atoi(roomstr); - if ((location = real_room(tmp)) < 0) { + if ((location = real_room((room_vnum)atoi(roomstr))) == NOWHERE) { send_to_char("No room exists with that number.\r\n", ch); return (NOWHERE); } - } else if ((target_mob = get_char_vis(ch, roomstr, FIND_CHAR_WORLD)) != NULL) - location = target_mob->in_room; - else if ((target_obj = get_obj_vis(ch, roomstr)) != NULL) { - if (target_obj->in_room != NOWHERE) - location = target_obj->in_room; - else { - send_to_char("That object is not available.\r\n", ch); - return (NOWHERE); - } } else { - send_to_char("No such creature or object around.\r\n", ch); - return (NOWHERE); - } - - /* a location has been found -- if you're < GRGOD, check restrictions. */ - if (GET_LEVEL(ch) < LVL_GRGOD) { - if (ROOM_FLAGGED(location, ROOM_GODROOM)) { - send_to_char("You are not godly enough to use that room!\r\n", ch); - return (NOWHERE); - } - if (ROOM_FLAGGED(location, ROOM_PRIVATE) && - world[location].people && world[location].people->next_in_room) { - send_to_char("There's a private conversation going on in that room.\r\n", ch); - return (NOWHERE); + struct char_data *target_mob; + struct obj_data *target_obj; + char *mobobjstr = roomstr; + int num; + + num = get_number(&mobobjstr); + if ((target_mob = get_char_vis(ch, mobobjstr, &num, FIND_CHAR_WORLD)) != NULL) { + if ((location = target_mob->in_room) == NOWHERE) { + send_to_char("That character is currently lost.\r\n", ch); + return (NOWHERE); + } + } else if ((target_obj = get_obj_vis(ch, mobobjstr, &num)) != NULL) { + if (target_obj->in_room != NOWHERE) + location = target_obj->in_room; + else if (target_obj->carried_by && target_obj->carried_by->in_room != NOWHERE) + location = target_obj->carried_by->in_room; + else if (target_obj->worn_by && target_obj->worn_by->in_room != NOWHERE) + location = target_obj->worn_by->in_room; + + if (location == NOWHERE) { + send_to_char("That object is currently not in a room.\r\n", ch); + return (NOWHERE); + } } - if (ROOM_FLAGGED(location, ROOM_HOUSE) && - !House_can_enter(ch, GET_ROOM_VNUM(location))) { - send_to_char("That's private property -- no trespassing!\r\n", ch); + + if (location == NOWHERE) { + send_to_char("Nothing exists by that name.\r\n", ch); return (NOWHERE); } } - return (location); + + /* a location has been found -- if you're >= GRGOD, no restrictions. */ + if (GET_LEVEL(ch) >= LVL_GRGOD) + return (location); + + if (ROOM_FLAGGED(location, ROOM_GODROOM)) + send_to_char("You are not godly enough to use that room!\r\n", ch); + else if (ROOM_FLAGGED(location, ROOM_PRIVATE) && world[location].people && world[location].people->next_in_room) + send_to_char("There's a private conversation going on in that room.\r\n", ch); + else if (ROOM_FLAGGED(location, ROOM_HOUSE) && !House_can_enter(ch, GET_ROOM_VNUM(location))) + send_to_char("That's private property -- no trespassing!\r\n", ch); + else + return (location); + + return (NOWHERE); } @@ -271,7 +282,7 @@ if (!*buf) send_to_char("Whom do you wish to transfer?\r\n", ch); else if (str_cmp("all", buf)) { - if (!(victim = get_char_vis(ch, buf, FIND_CHAR_WORLD))) + if (!(victim = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); else if (victim == ch) send_to_char("That doesn't make much sense, does it?\r\n", ch); @@ -320,7 +331,7 @@ if (!*buf) send_to_char("Whom do you wish to teleport?\r\n", ch); - else if (!(victim = get_char_vis(ch, buf, FIND_CHAR_WORLD))) + else if (!(victim = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); else if (victim == ch) send_to_char("Use 'goto' to teleport yourself.\r\n", ch); @@ -844,7 +855,7 @@ if (!*buf2) send_to_char("Stats on which mobile?\r\n", ch); else { - if ((victim = get_char_vis(ch, buf2, FIND_CHAR_WORLD)) != NULL) + if ((victim = get_char_vis(ch, buf2, NULL, FIND_CHAR_WORLD)) != NULL) do_stat_character(ch, victim); else send_to_char("No such mobile around.\r\n", ch); @@ -853,7 +864,7 @@ if (!*buf2) { send_to_char("Stats on which player?\r\n", ch); } else { - if ((victim = get_player_vis(ch, buf2, FIND_CHAR_WORLD)) != NULL) + if ((victim = get_player_vis(ch, buf2, NULL, FIND_CHAR_WORLD)) != NULL) do_stat_character(ch, victim); else send_to_char("No such player around.\r\n", ch); @@ -882,23 +893,26 @@ if (!*buf2) send_to_char("Stats on which object?\r\n", ch); else { - if ((object = get_obj_vis(ch, buf2)) != NULL) + if ((object = get_obj_vis(ch, buf2, NULL)) != NULL) do_stat_object(ch, object); else send_to_char("No such object around.\r\n", ch); } } else { + char *name = buf1; + int number = get_number(&name); + if ((object = get_object_in_equip_vis(ch, buf1, ch->equipment, &tmp)) != NULL) do_stat_object(ch, object); - else if ((object = get_obj_in_list_vis(ch, buf1, ch->carrying)) != NULL) + else if ((object = get_obj_in_list_vis(ch, buf1, &number, ch->carrying)) != NULL) do_stat_object(ch, object); - else if ((victim = get_char_vis(ch, buf1, FIND_CHAR_ROOM)) != NULL) + else if ((victim = get_char_vis(ch, buf1, &number, FIND_CHAR_ROOM)) != NULL) do_stat_character(ch, victim); - else if ((object = get_obj_in_list_vis(ch, buf1, world[ch->in_room].contents)) != NULL) + else if ((object = get_obj_in_list_vis(ch, buf1, &number, world[ch->in_room].contents)) != NULL) do_stat_object(ch, object); - else if ((victim = get_char_vis(ch, buf1, FIND_CHAR_WORLD)) != NULL) + else if ((victim = get_char_vis(ch, buf1, &number, FIND_CHAR_WORLD)) != NULL) do_stat_character(ch, victim); - else if ((object = get_obj_vis(ch, buf1)) != NULL) + else if ((object = get_obj_vis(ch, buf1, &number)) != NULL) do_stat_object(ch, object); else send_to_char("Nothing around by that name.\r\n", ch); @@ -961,7 +975,7 @@ if (!*arg) stop_snooping(ch); - else if (!(victim = get_char_vis(ch, arg, FIND_CHAR_WORLD))) + else if (!(victim = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) send_to_char("No such person around.\r\n", ch); else if (!victim->desc) send_to_char("There's no link.. nothing to snoop.\r\n", ch); @@ -1003,7 +1017,7 @@ send_to_char("You're already switched.\r\n", ch); else if (!*arg) send_to_char("Switch with who?\r\n", ch); - else if (!(victim = get_char_vis(ch, arg, FIND_CHAR_WORLD))) + else if (!(victim = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) send_to_char("No such character.\r\n", ch); else if (ch == victim) send_to_char("Hee hee... we are jolly funny today, eh?\r\n", ch); @@ -1158,7 +1172,7 @@ if (*buf) { /* argument supplied. destroy single object * or char */ - if ((vict = get_char_vis(ch, buf, FIND_CHAR_ROOM)) != NULL) { + if ((vict = get_char_vis(ch, buf, NULL, FIND_CHAR_ROOM)) != NULL) { if (!IS_NPC(vict) && (GET_LEVEL(ch) <= GET_LEVEL(vict))) { send_to_char("Fuuuuuuuuu!\r\n", ch); return; @@ -1175,7 +1189,7 @@ } } extract_char(vict); - } else if ((obj = get_obj_in_list_vis(ch, buf, world[ch->in_room].contents)) != NULL) { + } else if ((obj = get_obj_in_list_vis(ch, buf, NULL, world[ch->in_room].contents)) != NULL) { act("$n destroys $p.", FALSE, ch, obj, 0, TO_ROOM); extract_obj(obj); } else { @@ -1243,7 +1257,7 @@ two_arguments(argument, name, level); if (*name) { - if (!(victim = get_char_vis(ch, name, FIND_CHAR_WORLD))) { + if (!(victim = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) { send_to_char("That player is not here.\r\n", ch); return; } @@ -1322,7 +1336,7 @@ one_argument(argument, buf); if (!*buf) send_to_char("Whom do you wish to restore?\r\n", ch); - else if (!(vict = get_char_vis(ch, buf, FIND_CHAR_WORLD))) + else if (!(vict = get_char_vis(ch, buf, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); else { GET_HIT(vict) = GET_MAX_HIT(vict); @@ -1368,9 +1382,6 @@ { struct char_data *tch; - if (IS_NPC(ch)) - return; - for (tch = world[ch->in_room].people; tch; tch = tch->next_in_room) { if (tch == ch) continue; @@ -1624,7 +1635,7 @@ if (!*arg || !*to_force) send_to_char("Whom do you wish to force do what?\r\n", ch); else if ((GET_LEVEL(ch) < LVL_GRGOD) || (str_cmp("all", arg) && str_cmp("room", arg))) { - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_WORLD))) + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) send_to_char(NOPERSON, ch); else if (!IS_NPC(vict) && GET_LEVEL(ch) <= GET_LEVEL(vict)) send_to_char("No, no, no!\r\n", ch); @@ -1826,7 +1837,7 @@ if (!*arg) send_to_char("Yes, but for whom?!?\r\n", ch); - else if (!(vict = get_char_vis(ch, arg, FIND_CHAR_WORLD))) + else if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) send_to_char("There is no such player.\r\n", ch); else if (IS_NPC(vict)) send_to_char("You can't do that to a mob!\r\n", ch); @@ -2578,12 +2589,12 @@ /* find the target */ if (!is_file) { if (is_player) { - if (!(vict = get_player_vis(ch, name, FIND_CHAR_WORLD))) { + if (!(vict = get_player_vis(ch, name, NULL, FIND_CHAR_WORLD))) { send_to_char("There is no such player.\r\n", ch); return; } } else { /* is_mob */ - if (!(vict = get_char_vis(ch, name, FIND_CHAR_WORLD))) { + if (!(vict = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) { send_to_char("There is no such creature.\r\n", ch); return; } Index: circle/src/boards.c diff -u circle/src/boards.c:1.17 circle/src/boards.c:1.18 --- circle/src/boards.c:1.17 Wed Dec 9 23:48:16 1998 +++ circle/src/boards.c Wed Mar 7 01:39:51 2001 @@ -124,7 +124,7 @@ } for (i = 0; i < NUM_OF_BOARDS; i++) { - if ((BOARD_RNUM(i) = real_object(BOARD_VNUM(i))) == -1) { + if ((BOARD_RNUM(i) = real_object(BOARD_VNUM(i))) == NOTHING) { log("SYSERR: Fatal board error: board vnum %d does not exist!", BOARD_VNUM(i)); fatal_error = 1; Index: circle/src/build_circlemud.com diff -u circle/src/build_circlemud.com:1.1 circle/src/build_circlemud.com:1.3 --- circle/src/build_circlemud.com:1.1 Fri Jul 9 23:23:57 1999 +++ circle/src/build_circlemud.com Wed Mar 7 01:31:12 2001 @@ -1,10 +1,7 @@ $! $! BUILD_CIRCLEMUD.COM $! Written By: Robert Alan Byer -$! Vice-President -$! A-Com Computing, Inc. -$! ByerRA@aol.com -$! byer@mail.all-net.net +$! byer@mail.ourservers.net $! $! This script checks the file names and then compiles and links CircleMUD for $! OpenVMS using DEC C and the DEC C TCP/IP socket routines. @@ -389,36 +386,53 @@ $! $! The File Dosen't Exist So Check To See If The CONF.H_VMS File Exists. $! -$ IF (F$SEARCH("SYS$DISK:[]CONF.H_VMS").EQS."") +$ IF (F$SEARCH("SYS$DISK:[]CONF.H_VMS").NES."") $ THEN $! -$! The CONF.H_VMS File Dosen't Exist, So Tell The User. +$! Copy CONF.H_VMS To CONF.H. $! -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "The file CONF.H_VMS dosen't exist. This file is" -$ WRITE SYS$OUTPUT "necessary to compile CircleMUD and is distributed" -$ WRITE SYS$OUTPUT "with the source code." -$ WRITE SYS$OUTPUT "" -$ WRITE SYS$OUTPUT "Since the CONF.H_VMS file is distributed with the" -$ WRITE SYS$OUPTUT "source files I recomend that you unpack the files" -$ WRITE SYS$OUPTUT "again or get a new source distribution." -$ WRITE SYS$OUPTUT "" +$ COPY SYS$DISK:[]CONF.H_VMS SYS$DISK:[]CONF.H $! -$! Since We Can't Compile Without This File, Just EXIT. +$! Else.... $! -$ EXIT +$ ELSE $! -$! Else... +$! Check To See If The CONF_H.VMS File Exists. $! -$ ELSE +$ IF (F$SEARCH("SYS$DISK:[]CONF_H.VMS").NES."") +$ THEN $! -$! Copy CONF.H_VMS to CONF.H. +$! Copy CONF_H.VMS To CONF.H. $! -$ COPY SYS$DISK:[]CONF.H_VMS SYS$DISK:[]CONF.H +$ COPY SYS$DISK:[]CONF_H.VMS SYS$DISK:[]CONF.H +$! +$! Else... $! -$! End The CONF.H_VMS Check. +$ ELSE $! -$ ENDIF +$! The CONF.H_VMS And The CONF_H.VMS File Dosen't Exist, So Tell The User. +$! +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "The file CONF.H_VMS or CONF_H.VMS dosen't exist. This file is" +$ WRITE SYS$OUTPUT "necessary to compile CircleMUD and is distributed" +$ WRITE SYS$OUTPUT "with the source code." +$ WRITE SYS$OUTPUT "" +$ WRITE SYS$OUTPUT "Since the CONF.H_VMS or CONF_H.VMS file is distributed with the" +$ WRITE SYS$OUTPUT "source files I recomend that you unpack the files" +$ WRITE SYS$OUTPUT "again or get a new source distribution." +$ WRITE SYS$OUTPUT "" +$! +$! Since We Can't Compile Without This File, Just EXIT. +$! +$ EXIT +$! +$! Time To End The CONF_H.VMS File Check. +$! +$ ENDIF +$! +$! Time To End The CONF.H_VMS File Check. +$! +$ ENDIF $! $! End The CONF.H Check. $! Index: circle/src/class.c diff -u circle/src/class.c:1.17 circle/src/class.c:1.19 --- circle/src/class.c:1.17 Sun May 9 17:06:50 1999 +++ circle/src/class.c Sun Mar 18 05:15:42 2001 @@ -1605,15 +1605,21 @@ * invalid_class is used by handler.c to determine if a piece of equipment is * usable by a particular class, based on the ITEM_ANTI_{class} bitvectors. */ +int invalid_class(struct char_data *ch, struct obj_data *obj) +{ + if (IS_OBJ_STAT(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) + return 1; -int invalid_class(struct char_data *ch, struct obj_data *obj) { - if ((IS_OBJ_STAT(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) || - (IS_OBJ_STAT(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) || - (IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) || - (IS_OBJ_STAT(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch))) - return 1; - else - return 0; + if (IS_OBJ_STAT(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) + return 1; + + if (IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) + return 1; + + if (IS_OBJ_STAT(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch)) + return 1; + + return 0; } Index: circle/src/comm.c diff -u circle/src/comm.c:1.80 circle/src/comm.c:1.88 --- circle/src/comm.c:1.80 Sun Jan 23 12:21:32 2000 +++ circle/src/comm.c Sun Mar 18 18:58:58 2001 @@ -391,6 +391,12 @@ log("SYSERR: WinSock not available!"); exit(1); } + + /* + * 4 = stdin, stdout, stderr, mother_desc. Windows might + * keep sockets and files separate, in which case this isn't + * necessary, but we will err on the side of caution. + */ if ((wsaData.iMaxSockets - 4) < max_players) { max_players = wsaData.iMaxSockets - 4; } @@ -761,9 +767,9 @@ } /* If we missed more than 30 seconds worth of pulses, just do 30 secs */ - if (missed_pulses > (30 * PASSES_PER_SEC)) { + if (missed_pulses > 30 RL_SEC) { log("SYSERR: Missed %d seconds worth of pulses.", missed_pulses / PASSES_PER_SEC); - missed_pulses = 30 * PASSES_PER_SEC; + missed_pulses = 30 RL_SEC; } /* Now execute the heartbeat functions */ @@ -771,7 +777,7 @@ heartbeat(++pulse); /* Roll pulse over after 10 hours */ - if (pulse >= (600 * 60 * PASSES_PER_SEC)) + if (pulse >= (10 * 60 * 60 * PASSES_PER_SEC)) pulse = 0; #ifdef CIRCLE_UNIX @@ -786,13 +792,13 @@ { static int mins_since_crashsave = 0; - if (!(pulse % (30 * PASSES_PER_SEC))) + if (!(pulse % PULSE_SANITY)) sanity_check(); if (!(pulse % PULSE_ZONE)) zone_update(); - if (!(pulse % (15 * PASSES_PER_SEC))) /* 15 seconds */ + if (!(pulse % PULSE_IDLEPWD)) /* 15 seconds */ check_idle_passwords(); if (!(pulse % PULSE_MOBILE)) @@ -807,15 +813,18 @@ point_update(); fflush(player_fl); } - if (auto_save && !(pulse % (60 * PASSES_PER_SEC))) { /* 1 minute */ + if (auto_save && !(pulse % PULSE_AUTOSAVE)) { /* 1 minute */ if (++mins_since_crashsave >= autosave_time) { mins_since_crashsave = 0; Crash_save_all(); House_save_all(); } } - if (!(pulse % (5 * 60 * PASSES_PER_SEC))) /* 5 minutes */ + if (!(pulse % PULSE_USAGE)) record_usage(); + + /* Every pulse! Don't want them to stink the place up... */ + extract_pending_chars(); } @@ -1180,7 +1189,7 @@ return (0); } -int new_descriptor(int s) +int new_descriptor(socket_t s) { socket_t desc; int sockets_connected = 0; @@ -1540,6 +1549,11 @@ return (0); #endif +#ifdef ECONNRESET + if (errno == ECONNRESET) + return (-1); +#endif + #endif /* CIRCLE_WINDOWS */ /* @@ -1802,13 +1816,14 @@ free(d->str); } if (STATE(d) == CON_PLAYING || STATE(d) == CON_DISCONNECT) { - act("$n has lost $s link.", TRUE, d->character, 0, 0, TO_ROOM); - if (!IS_NPC(d->character)) { - save_char(d->character, NOWHERE); - sprintf(buf, "Closing link to: %s.", GET_NAME(d->character)); - mudlog(buf, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(d->character)), TRUE); - } - d->character->desc = NULL; + struct char_data *link_challenged = d->original ? d->original : d->character; + + /* We are guaranteed to have a person. */ + act("$n has lost $s link.", TRUE, link_challenged, 0, 0, TO_ROOM); + save_char(link_challenged, NOWHERE); + sprintf(buf, "Closing link to: %s.", GET_NAME(link_challenged)); + mudlog(buf, NRM, MAX(LVL_IMMORT, GET_INVIS_LEV(link_challenged)), TRUE); + link_challenged->desc = NULL; } else { sprintf(buf, "Losing player: %s.", GET_NAME(d->character) ? GET_NAME(d->character) : ""); @@ -2118,7 +2133,8 @@ const void *vict_obj, const struct char_data *to) { const char *i = NULL; - char lbuf[MAX_STRING_LENGTH], *buf; + char lbuf[MAX_STRING_LENGTH], *buf, *j; + bool uppercasenext = FALSE; buf = lbuf; @@ -2173,6 +2189,18 @@ case 'F': CHECK_NULL(vict_obj, fname((const char *) vict_obj)); break; + /* uppercase previous word */ + case 'u': + for (j=buf; j > lbuf && !isspace((int) *(j-1)); j--); + if (j != buf) + *j = UPPER(*j); + i = ""; + break; + /* uppercase next word */ + case 'U': + uppercasenext = TRUE; + i = ""; + break; case '$': i = "$"; break; @@ -2183,10 +2211,21 @@ break; } while ((*buf = *(i++))) + { + if (uppercasenext && !isspace((int) *buf)) + { + *buf = UPPER(*buf); + uppercasenext = FALSE; + } buf++; + } orig++; - } else if (!(*(buf++) = *(orig++))) + } else if (!(*(buf++) = *(orig++))) { break; + } else if (uppercasenext && !isspace((int) *(buf-1))) { + *(buf-1) = UPPER(*(buf-1)); + uppercasenext = FALSE; + } } *(--buf) = '\r'; Index: circle/src/comm.h diff -u circle/src/comm.h:1.9 circle/src/comm.h:1.10 --- circle/src/comm.h:1.9 Mon Jan 25 09:47:55 1999 +++ circle/src/comm.h Thu Jan 25 16:44:32 2001 @@ -34,9 +34,12 @@ int write_to_descriptor(socket_t desc, const char *txt); void write_to_q(const char *txt, struct txt_q *queue, int aliased); void write_to_output(const char *txt, struct descriptor_data *d); -void page_string(struct descriptor_data *d, char *str, int keep_internal); void string_add(struct descriptor_data *d, char *str); void string_write(struct descriptor_data *d, char **txt, size_t len, long mailto, void *data); + +#define PAGE_LENGTH 22 +#define PAGE_WIDTH 80 +void page_string(struct descriptor_data *d, char *str, int keep_internal); #define SEND_TO_Q(messg, desc) write_to_output((messg), desc) Index: circle/src/constants.c diff -u circle/src/constants.c:1.14 circle/src/constants.c:1.18 --- circle/src/constants.c:1.14 Sat Aug 28 21:12:23 1999 +++ circle/src/constants.c Sat Feb 10 19:25:46 2001 @@ -15,7 +15,7 @@ #include "interpreter.h" /* alias_data */ cpp_extern const char *circlemud_version = - "CircleMUD, version 3.00 beta patchlevel 17"; + "CircleMUD, version 3.00 beta patchlevel 18"; /* strings corresponding to ordinals/bitvectors in structs.h ***********/ @@ -40,12 +40,12 @@ const char *room_bits[] = { "DARK", "DEATH", - "!MOB", + "NO_MOB", "INDOORS", "PEACEFUL", "SOUNDPROOF", - "!TRACK", - "!MAGIC", + "NO_TRACK", + "NO_MAGIC", "TUNNEL", "PRIVATE", "GODROOM", @@ -78,8 +78,8 @@ "Mountains", "Water (Swim)", "Water (No Swim)", - "Underwater", "In Flight", + "Underwater", "\n" }; @@ -126,8 +126,8 @@ "NOTITLE", "DELETED", "LOADRM", - "!WIZL", - "!DEL", + "NO_WIZL", + "NO_DEL", "INVST", "CRYO", "\n" @@ -149,11 +149,11 @@ "AGGR_NEUTRAL", "MEMORY", "HELPER", - "!CHARM", - "!SUMMN", - "!SLEEP", - "!BASH", - "!BLIND", + "NO_CHARM", + "NO_SUMMN", + "NO_SLEEP", + "NO_BASH", + "NO_BLIND", "\n" }; @@ -163,24 +163,24 @@ "BRIEF", "COMPACT", "DEAF", - "!TELL", + "NO_TELL", "D_HP", "D_MANA", "D_MOVE", "AUTOEX", - "!HASS", + "NO_HASS", "QUEST", "SUMN", - "!REP", + "NO_REP", "LIGHT", "C1", "C2", - "!WIZ", + "NO_WIZ", "L1", "L2", - "!AUC", - "!GOS", - "!GTZ", + "NO_AUC", + "NO_GOS", + "NO_GTZ", "RMFLG", "\n" }; @@ -204,7 +204,7 @@ "PROT-EVIL", "PROT-GOOD", "SLEEP", - "!TRACK", + "NO_TRACK", "UNUSED", "UNUSED", "SNEAK", @@ -344,21 +344,21 @@ const char *extra_bits[] = { "GLOW", "HUM", - "!RENT", - "!DONATE", - "!INVIS", + "NO_RENT", + "NO_DONATE", + "NO_INVIS", "INVISIBLE", "MAGIC", - "!DROP", + "NO_DROP", "BLESS", - "!GOOD", - "!EVIL", - "!NEUTRAL", - "!MAGE", - "!CLERIC", - "!THIEF", - "!WARRIOR", - "!SELL", + "ANTI_GOOD", + "ANTI_EVIL", + "ANTI_NEUTRAL", + "ANTI_MAGE", + "ANTI_CLERIC", + "ANTI_THIEF", + "ANTI_WARRIOR", + "NO_SELL", "\n" }; @@ -708,71 +708,11 @@ }; - -const char *spell_wear_off_msg[] = { - "RESERVED DB.C", /* 0 */ - "You feel less protected.", /* 1 */ - "!Teleport!", - "You feel less righteous.", - "You feel a cloak of blindness disolve.", - "!Burning Hands!", /* 5 */ - "!Call Lightning", - "You feel more self-confident.", - "You feel your strength return.", - "!Clone!", - "!Color Spray!", /* 10 */ - "!Control Weather!", - "!Create Food!", - "!Create Water!", - "!Cure Blind!", - "!Cure Critic!", /* 15 */ - "!Cure Light!", - "You feel more optimistic.", - "You feel less aware.", - "Your eyes stop tingling.", - "The detect magic wears off.",/* 20 */ - "The detect poison wears off.", - "!Dispel Evil!", - "!Earthquake!", - "!Enchant Weapon!", - "!Energy Drain!", /* 25 */ - "!Fireball!", - "!Harm!", - "!Heal!", - "You feel yourself exposed.", - "!Lightning Bolt!", /* 30 */ - "!Locate object!", - "!Magic Missile!", - "You feel less sick.", - "You feel less protected.", - "!Remove Curse!", /* 35 */ - "The white aura around your body fades.", - "!Shocking Grasp!", - "You feel less tired.", - "You feel weaker.", - "!Summon!", /* 40 */ - "!Ventriloquate!", - "!Word of Recall!", - "!Remove Poison!", - "You feel less aware of your suroundings.", - "!Animate Dead!", /* 45 */ - "!Dispel Good!", - "!Group Armor!", - "!Group Heal!", - "!Group Recall!", - "Your night vision seems to fade.", /* 50 */ - "Your feet seem less boyant.", - "!UNUSED!" -}; - - - const char *npc_class_types[] = { "Normal", "Undead", "\n" }; - int rev_dir[] = Index: circle/src/constants.h diff -u circle/src/constants.h:1.2 circle/src/constants.h:1.3 --- circle/src/constants.h:1.2 Sun May 9 21:57:16 1999 +++ circle/src/constants.h Thu Jan 25 16:36:18 2001 @@ -21,7 +21,6 @@ extern const char *drinknames[]; extern const char *color_liquid[]; extern const char *fullness[]; -extern const char *spell_wear_off_msg[]; extern const char *npc_class_types[]; extern const char *weekdays[]; extern const char *month_name[]; Index: circle/src/db.c diff -u circle/src/db.c:1.53 circle/src/db.c:1.58 --- circle/src/db.c:1.53 Sun Jan 23 13:24:53 2000 +++ circle/src/db.c Mon Mar 5 05:04:51 2001 @@ -445,16 +445,18 @@ return; } - for (; !feof(player_fl);) { + for (;;) { fread(&dummy, sizeof(struct char_file_u), 1, player_fl); - if (!feof(player_fl)) { /* new record */ - nr++; - CREATE(player_table[nr].name, char, strlen(dummy.name) + 1); - for (i = 0; - (*(player_table[nr].name + i) = LOWER(*(dummy.name + i))); i++); - player_table[nr].id = dummy.char_specials_saved.idnum; - top_idnum = MAX(top_idnum, dummy.char_specials_saved.idnum); - } + if (feof(player_fl)) + break; + + /* new record */ + nr++; + CREATE(player_table[nr].name, char, strlen(dummy.name) + 1); + for (i = 0; (*(player_table[nr].name + i) = LOWER(*(dummy.name + i))); i++) + ; + player_table[nr].id = dummy.char_specials_saved.idnum; + top_idnum = MAX(top_idnum, dummy.char_specials_saved.idnum); } top_of_p_file = top_of_p_table = nr; @@ -1195,6 +1197,10 @@ AFF_FLAGS(mob_proto + i) = asciiflag_conv(f2); GET_ALIGNMENT(mob_proto + i) = t[2]; + /* AGGR_TO_ALIGN is ignored if the mob is AGGRESSIVE. */ + if (MOB_FLAGGED(mob_proto + i, MOB_AGGRESSIVE) && MOB_FLAGGED(mob_proto + i, MOB_AGGR_GOOD | MOB_AGGR_EVIL | MOB_AGGR_NEUTRAL)) + log("SYSERR: Mob #%d both Aggressive and Aggressive_to_Alignment.", nr); + switch (UPPER(letter)) { case 'S': /* Simple monsters */ parse_simple_mob(mob_f, i, nr); @@ -1353,7 +1359,7 @@ top_of_objt = i++; return (line); default: - log("SYSERR: Format error in %s", buf2); + log("SYSERR: Format error in (%c): %s", *line, buf2); exit(1); } } @@ -1371,8 +1377,15 @@ strcpy(zname, zonename); + /* Skip first 3 lines lest we mistake the zone name for a command. */ + for (tmp = 0; tmp < 3; tmp++) + get_line(fl, buf); + + /* More accurate count. Previous was always 4 or 5 too high. -gg 2001/1/17 */ while (get_line(fl, buf)) - num_of_cmds++; /* this should be correct within 3 or so */ + if ((strchr("MOGEPDR", buf[0]) && buf[1] == ' ') || (buf[0] == 'S' && buf[1] == '\0')) + num_of_cmds++; + rewind(fl); if (num_of_cmds == 0) { @@ -1439,6 +1452,11 @@ cmd_no++; } + if (num_of_cmds != cmd_no + 1) { + log("SYSERR: Zone command count mismatch for %s. Estimated: %d, Actual: %d", zname, num_of_cmds, cmd_no + 1); + exit(1); + } + top_of_zone_table = zone++; } @@ -1822,10 +1840,8 @@ break; case 'R': /* rem obj from room */ - if ((obj = get_obj_in_list_num(ZCMD.arg2, world[ZCMD.arg1].contents)) != NULL) { - obj_from_room(obj); + if ((obj = get_obj_in_list_num(ZCMD.arg2, world[ZCMD.arg1].contents)) != NULL) extract_obj(obj); - } last_cmd = 1; break; @@ -2195,7 +2211,7 @@ /* read and allocate space for a '~'-terminated string from a given file */ -char *fread_string(FILE * fl, char *error) +char *fread_string(FILE * fl, const char *error) { char buf[MAX_STRING_LENGTH], tmp[512], *rslt; register char *point; @@ -2385,7 +2401,8 @@ int file_to_string(const char *name, char *buf) { FILE *fl; - char tmp[READ_SIZE+3]; + char tmp[READ_SIZE + 3]; + int len; *buf = '\0'; @@ -2393,21 +2410,22 @@ log("SYSERR: reading %s: %s", name, strerror(errno)); return (-1); } - do { - fgets(tmp, READ_SIZE, fl); - tmp[strlen(tmp) - 1] = '\0'; /* take off the trailing \n */ + + for (;;) { + if (!fgets(tmp, READ_SIZE, fl)) /* EOF check */ + break; + if ((len = strlen(tmp)) > 0) + tmp[len - 1] = '\0'; /* take off the trailing \n */ strcat(tmp, "\r\n"); - if (!feof(fl)) { - if (strlen(buf) + strlen(tmp) + 1 > MAX_STRING_LENGTH) { - log("SYSERR: %s: string too big (%d max)", name, - MAX_STRING_LENGTH); - *buf = '\0'; - return (-1); - } - strcat(buf, tmp); + if (strlen(buf) + strlen(tmp) + 1 > MAX_STRING_LENGTH) { + log("SYSERR: %s: string too big (%d max)", name, MAX_STRING_LENGTH); + *buf = '\0'; + fclose(fl); + return (-1); } - } while (!feof(fl)); + strcat(buf, tmp); + } fclose(fl); @@ -2669,13 +2687,11 @@ switch (GET_OBJ_TYPE(obj)) { case ITEM_DRINKCON: { - char onealias[MAX_INPUT_LENGTH], *space = strchr(obj->name, ' '); - int offset = space ? space - obj->name : strlen(obj->name); + char onealias[MAX_INPUT_LENGTH], *space = strrchr(obj->name, ' '); - strncpy(onealias, obj->name, offset); - onealias[offset] = '\0'; + strcpy(onealias, space ? space + 1 : obj->name); if (search_block(onealias, drinknames, TRUE) < 0 && (error = TRUE)) - log("SYSERR: Object #%d (%s) doesn't have drink type as first alias. (%s)", + log("SYSERR: Object #%d (%s) doesn't have drink type as last alias. (%s)", GET_OBJ_VNUM(obj), obj->short_description, obj->name); } /* Fall through. */ Index: circle/src/db.h diff -u circle/src/db.h:1.12 circle/src/db.h:1.13 --- circle/src/db.h:1.12 Sun May 9 17:06:20 1999 +++ circle/src/db.h Sun Mar 4 18:47:08 2001 @@ -100,7 +100,7 @@ int create_entry(char *name); void zone_update(void); room_rnum real_room(room_vnum vnum); -char *fread_string(FILE *fl, char *error); +char *fread_string(FILE *fl, const char *error); long get_id_by_name(char *name); char *get_name_by_id(long id); Index: circle/src/fight.c diff -u circle/src/fight.c:1.19 circle/src/fight.c:1.20 --- circle/src/fight.c:1.19 Sun May 9 17:05:46 1999 +++ circle/src/fight.c Sun Mar 18 18:58:58 2001 @@ -640,10 +640,14 @@ int damage(struct char_data * ch, struct char_data * victim, int dam, int attacktype) { if (GET_POS(victim) <= POS_DEAD) { + /* This is "normal"-ish now with delayed extraction. -gg 3/15/2001 */ + if (PLR_FLAGGED(victim, PLR_NOTDEADYET) || MOB_FLAGGED(victim, MOB_NOTDEADYET)) + return (-1); + log("SYSERR: Attempt to damage corpse '%s' in room #%d by '%s'.", GET_NAME(victim), GET_ROOM_VNUM(IN_ROOM(victim)), GET_NAME(ch)); die(victim); - return (0); /* -je, 7/7/92 */ + return (-1); /* -je, 7/7/92 */ } /* peaceful rooms */ Index: circle/src/graph.c diff -u circle/src/graph.c:1.13 circle/src/graph.c:1.14 --- circle/src/graph.c:1.13 Thu Mar 4 22:47:47 1999 +++ circle/src/graph.c Thu Jan 25 16:50:43 2001 @@ -171,7 +171,7 @@ return; } /* The person can't see the victim. */ - if (!(vict = get_char_vis(ch, arg, FIND_CHAR_WORLD))) { + if (!(vict = get_char_vis(ch, arg, NULL, FIND_CHAR_WORLD))) { send_to_char("No one is around by that name.\r\n", ch); return; } Index: circle/src/handler.c diff -u circle/src/handler.c:1.19 circle/src/handler.c:1.26 --- circle/src/handler.c:1.19 Sun Jul 4 20:29:37 1999 +++ circle/src/handler.c Sun Mar 18 18:58:58 2001 @@ -20,6 +20,9 @@ #include "interpreter.h" #include "spells.h" +/* local vars */ +int extractions_pending = 0; + /* external vars */ extern struct char_data *combat_list; extern struct room_data *world; @@ -337,10 +340,11 @@ void affect_join(struct char_data * ch, struct affected_type * af, bool add_dur, bool avg_dur, bool add_mod, bool avg_mod) { - struct affected_type *hjp; + struct affected_type *hjp, *next; bool found = FALSE; - for (hjp = ch->affected; !found && hjp; hjp = hjp->next) { + for (hjp = ch->affected; !found && hjp; hjp = next) { + next = hjp->next; if ((hjp->type == af->type) && (hjp->location == af->location)) { if (add_dur) @@ -641,20 +645,22 @@ /* search a room for a char, and return a pointer if found.. */ -struct char_data *get_char_room(char *name, room_rnum room) +struct char_data *get_char_room(char *name, int *number, room_rnum room) { struct char_data *i; - int j = 0, number; - char tmpname[MAX_INPUT_LENGTH]; - char *tmp = tmpname; + int num; - strcpy(tmp, name); - if (!(number = get_number(&tmp))) + if (!number) { + number = # + num = get_number(&name); + } + + if (*number == 0) return (NULL); - for (i = world[room].people; i && (j <= number); i = i->next_in_room) - if (isname(tmp, i->player.name)) - if (++j == number) + for (i = world[room].people; i && *number; i = i->next_in_room) + if (isname(name, i->player.name)) + if (--(*number) == 0) return (i); return (NULL); @@ -841,41 +847,68 @@ } - /* Extract a ch completely from the world, and leave his stuff behind */ -void extract_char(struct char_data * ch) +void extract_char_final(struct char_data *ch) { struct char_data *k, *temp; - struct descriptor_data *t_desc; + struct descriptor_data *d; struct obj_data *obj; - int i, freed = 0; + int i; - if (!IS_NPC(ch) && !ch->desc) { - for (t_desc = descriptor_list; t_desc; t_desc = t_desc->next) - if (t_desc->original == ch) - do_return(t_desc->character, NULL, 0, 0); - } if (ch->in_room == NOWHERE) { - log("SYSERR: NOWHERE extracting char %s. (%s, extract_char)", - GET_NAME(ch), __FILE__); + log("SYSERR: NOWHERE extracting char %s. (%s, extract_char_final)", + GET_NAME(ch), __FILE__); exit(1); } - if (ch->followers || ch->master) - die_follower(ch); - /* Forget snooping, if applicable */ + /* + * We're booting the character of someone who has switched so first we + * need to stuff them back into their own body. This will set ch->desc + * we're checking below this loop to the proper value. + */ + if (!IS_NPC(ch) && !ch->desc) { + for (d = descriptor_list; d; d = d->next) + if (d->original == ch) { + do_return(d->character, NULL, 0, 0); + break; + } + } + if (ch->desc) { - if (ch->desc->snooping) { - ch->desc->snooping->snoop_by = NULL; - ch->desc->snooping = NULL; - } - if (ch->desc->snoop_by) { - SEND_TO_Q("Your victim is no longer among us.\r\n", - ch->desc->snoop_by); - ch->desc->snoop_by->snooping = NULL; - ch->desc->snoop_by = NULL; + /* + * This time we're extracting the body someone has switched into + * (not the body of someone switching as above) so we need to put + * the switcher back to their own body. + * + * If this body is not possessed, the owner won't have a + * body after the removal so dump them to the main menu. + */ + if (ch->desc->original) + do_return(ch, NULL, 0, 0); + else { + /* + * Now we boot anybody trying to log in with the same character, to + * help guard against duping. CON_DISCONNECT is used to close a + * descriptor without extracting the d->character associated with it, + * for being link-dead, so we want CON_CLOSE to clean everything up. + * If we're here, we know it's a player so no IS_NPC check required. + */ + for (d = descriptor_list; d; d = d->next) { + if (d == ch->desc) + continue; + if (d->character && GET_IDNUM(ch) == GET_IDNUM(d->character)) + STATE(d) = CON_CLOSE; + } + STATE(ch->desc) = CON_MENU; + SEND_TO_Q(MENU, ch->desc); } } + + /* On with the character's assets... */ + + if (ch->followers || ch->master) + die_follower(ch); + /* transfer objects to room, if any */ while (ch->carrying) { obj = ch->carrying; @@ -902,40 +935,94 @@ /* pull the char from the list */ REMOVE_FROM_LIST(ch, character_list, next); - if (ch->desc && ch->desc->original) - do_return(ch, NULL, 0, 0); - - if (!IS_NPC(ch)) { - save_char(ch, NOWHERE); - Crash_delete_crashfile(ch); - } else { - if (GET_MOB_RNUM(ch) > -1) /* if mobile */ + if (IS_NPC(ch)) { + if (GET_MOB_RNUM(ch) >= 0) /* prototyped */ mob_index[GET_MOB_RNUM(ch)].number--; - clearMemory(ch); /* Only NPC's can have memory */ + clearMemory(ch); free_char(ch); - freed = 1; + } else { + save_char(ch, NOWHERE); + Crash_delete_crashfile(ch); + /* Don't free, we're a player in the menu now. */ } +} - if (!freed && ch->desc != NULL) { - STATE(ch->desc) = CON_MENU; - SEND_TO_Q(MENU, ch->desc); - } else { /* if a player gets purged from within the game */ - if (!freed) - free_char(ch); - } + +/* + * Q: Why do we do this? + * A: Because trying to iterate over the character + * list with 'ch = ch->next' does bad things if + * the current character happens to die. The + * trivial workaround of 'vict = next_vict' + * doesn't work if the _next_ person in the list + * gets killed, for example, by an area spell. + * + * Q: Why do we leave them on the character_list? + * A: Because code doing 'vict = vict->next' would + * get really confused otherwise. + */ +void extract_char(struct char_data *ch) +{ + if (IS_NPC(ch)) + SET_BIT(MOB_FLAGS(ch), MOB_NOTDEADYET); + else + SET_BIT(PLR_FLAGS(ch), PLR_NOTDEADYET); + + extractions_pending++; } +/* + * I'm not particularly pleased with the MOB/PLR + * hoops that have to be jumped through but it + * hardly calls for a completely new variable. + * Ideally it would be its own list, but that + * would change the '->next' pointer, potentially + * confusing some code. Ugh. -gg 3/15/2001 + */ +void extract_pending_chars(void) +{ + struct char_data *vict, *next_vict; + + if (extractions_pending < 0) + log("SYSERR: Negative (%d) extractions pending.", extractions_pending); + + for (vict = character_list; vict && extractions_pending; vict = next_vict) { + next_vict = vict->next; + + if (MOB_FLAGGED(vict, MOB_NOTDEADYET)) + REMOVE_BIT(MOB_FLAGS(vict), MOB_NOTDEADYET); + else if (PLR_FLAGGED(vict, PLR_NOTDEADYET)) + REMOVE_BIT(PLR_FLAGS(vict), PLR_NOTDEADYET); + else + continue; + + extract_char_final(vict); + extractions_pending--; + } + + if (extractions_pending > 0) + log("SYSERR: Couldn't find %d extractions as counted.", extractions_pending); + + extractions_pending = 0; +} + /* *********************************************************************** * Here follows high-level versions of some earlier routines, ie functions* * which incorporate the actual player-data *. *********************************************************************** */ -struct char_data *get_player_vis(struct char_data * ch, char *name, int inroom) +struct char_data *get_player_vis(struct char_data * ch, char *name, int *number, int inroom) { struct char_data *i; + int num; + + if (!number) { + number = # + num = get_number(&name); + } for (i = character_list; i; i = i->next) { if (IS_NPC(i)) @@ -946,6 +1033,8 @@ continue; if (!CAN_SEE(ch, i)) continue; + if (--(*number) != 0) + continue; return (i); } @@ -953,119 +1042,135 @@ } -struct char_data *get_char_room_vis(struct char_data * ch, char *name) +struct char_data *get_char_room_vis(struct char_data *ch, char *name, int *number) { struct char_data *i; - int j = 0, number; - char tmpname[MAX_INPUT_LENGTH]; - char *tmp = tmpname; + int num; + + if (!number) { + number = # + num = get_number(&name); + } /* JE 7/18/94 :-) :-) */ if (!str_cmp(name, "self") || !str_cmp(name, "me")) return (ch); /* 0. means PC with name */ - strcpy(tmp, name); - if (!(number = get_number(&tmp))) - return (get_player_vis(ch, tmp, FIND_CHAR_ROOM)); + if (*number == 0) + return (get_player_vis(ch, name, NULL, FIND_CHAR_ROOM)); - for (i = world[ch->in_room].people; i && j <= number; i = i->next_in_room) - if (isname(tmp, i->player.name)) + for (i = world[ch->in_room].people; i && *number; i = i->next_in_room) + if (isname(name, i->player.name)) if (CAN_SEE(ch, i)) - if (++j == number) + if (--(*number) == 0) return (i); return (NULL); } -struct char_data *get_char_vis(struct char_data * ch, char *name, int where) +struct char_data *get_char_world_vis(struct char_data * ch, char *name, int *number) { struct char_data *i; - int j = 0, number; - char tmpname[MAX_INPUT_LENGTH]; - char *tmp = tmpname; - - /* check the room first */ - if (where == FIND_CHAR_ROOM) - return get_char_room_vis(ch, name); - else if (where == FIND_CHAR_WORLD) { - if ((i = get_char_room_vis(ch, name)) != NULL) - return (i); + int num; - strcpy(tmp, name); - if (!(number = get_number(&tmp))) - return get_player_vis(ch, tmp, 0); - - for (i = character_list; i && (j <= number); i = i->next) - if (isname(tmp, i->player.name) && CAN_SEE(ch, i)) - if (++j == number) - return (i); + if (!number) { + number = # + num = get_number(&name); } + if ((i = get_char_room_vis(ch, name, number)) != NULL) + return (i); + + if (*number == 0) + return get_player_vis(ch, name, NULL, 0); + + for (i = character_list; i && *number; i = i->next) { + if (ch->in_room == i->in_room) + continue; + if (!isname(name, i->player.name)) + continue; + if (!CAN_SEE(ch, i)) + continue; + if (--(*number) != 0) + continue; + + return (i); + } return (NULL); } +struct char_data *get_char_vis(struct char_data * ch, char *name, int *number, int where) +{ + if (where == FIND_CHAR_ROOM) + return get_char_room_vis(ch, name, number); + else if (where == FIND_CHAR_WORLD) + return get_char_world_vis(ch, name, number); + else + return (NULL); +} + -struct obj_data *get_obj_in_list_vis(struct char_data * ch, char *name, - struct obj_data * list) +struct obj_data *get_obj_in_list_vis(struct char_data * ch, char *name, int *number, struct obj_data * list) { struct obj_data *i; - int j = 0, number; - char tmpname[MAX_INPUT_LENGTH]; - char *tmp = tmpname; + int num; + + if (!number) { + number = # + num = get_number(&name); + } - strcpy(tmp, name); - if (!(number = get_number(&tmp))) + if (*number == 0) return (NULL); - for (i = list; i && (j <= number); i = i->next_content) - if (isname(tmp, i->name)) + for (i = list; i && *number; i = i->next_content) + if (isname(name, i->name)) if (CAN_SEE_OBJ(ch, i)) - if (++j == number) + if (--(*number) == 0) return (i); return (NULL); } - - /* search the entire world for an object, and return a pointer */ -struct obj_data *get_obj_vis(struct char_data * ch, char *name) +struct obj_data *get_obj_vis(struct char_data * ch, char *name, int *number) { struct obj_data *i; - int j = 0, number; - char tmpname[MAX_INPUT_LENGTH]; - char *tmp = tmpname; + int num; + + if (!number) { + number = # + num = get_number(&name); + } + + if (*number == 0) + return (NULL); /* scan items carried */ - if ((i = get_obj_in_list_vis(ch, name, ch->carrying)) != NULL) + if ((i = get_obj_in_list_vis(ch, name, number, ch->carrying)) != NULL) return (i); /* scan room */ - if ((i = get_obj_in_list_vis(ch, name, world[ch->in_room].contents)) != NULL) + if ((i = get_obj_in_list_vis(ch, name, number, world[ch->in_room].contents)) != NULL) return (i); - strcpy(tmp, name); - if ((number = get_number(&tmp)) == 0) - return (NULL); - /* ok.. no luck yet. scan the entire obj list */ - for (i = object_list; i && (j <= number); i = i->next) - if (isname(tmp, i->name)) + for (i = object_list; i && *number; i = i->next) + if (isname(name, i->name)) if (CAN_SEE_OBJ(ch, i)) - if (++j == number) + if (--(*number) == 0) return (i); return (NULL); } - -struct obj_data *get_object_in_equip_vis(struct char_data * ch, - char *arg, struct obj_data * equipment[], int *j) +/* Hm, number deficient... */ +struct obj_data *get_object_in_equip_vis(struct char_data * ch, char *arg, struct obj_data *equipment[], int *j) { for ((*j) = 0; (*j) < NUM_WEARS; (*j)++) if (equipment[(*j)]) @@ -1077,46 +1182,40 @@ } -char *money_desc(int amount) +const char *money_desc(int amount) { - static char buf[128]; + int cnt; + struct { + int limit; + const char *description; + } money_table[] = { + { 1, "a gold coin" }, + { 10, "a tiny pile of gold coins" }, + { 20, "a handful of gold coins" }, + { 75, "a little pile of gold coins" }, + { 200, "a small pile of gold coins" }, + { 1000, "a pile of gold coins" }, + { 5000, "a big pile of gold coins" }, + { 10000, "a large heap of gold coins" }, + { 20000, "a huge mound of gold coins" }, + { 75000, "an enormous mound of gold coins" }, + { 150000, "a small mountain of gold coins" }, + { 250000, "a mountain of gold coins" }, + { 500000, "a huge mountain of gold coins" }, + { 1000000, "an enormous mountain of gold coins" }, + { 0, NULL }, + }; if (amount <= 0) { log("SYSERR: Try to create negative or 0 money (%d).", amount); return (NULL); } - if (amount == 1) - strcpy(buf, "a gold coin"); - else if (amount <= 10) - strcpy(buf, "a tiny pile of gold coins"); - else if (amount <= 20) - strcpy(buf, "a handful of gold coins"); - else if (amount <= 75) - strcpy(buf, "a little pile of gold coins"); - else if (amount <= 200) - strcpy(buf, "a small pile of gold coins"); - else if (amount <= 1000) - strcpy(buf, "a pile of gold coins"); - else if (amount <= 5000) - strcpy(buf, "a big pile of gold coins"); - else if (amount <= 10000) - strcpy(buf, "a large heap of gold coins"); - else if (amount <= 20000) - strcpy(buf, "a huge mound of gold coins"); - else if (amount <= 75000) - strcpy(buf, "an enormous mound of gold coins"); - else if (amount <= 150000) - strcpy(buf, "a small mountain of gold coins"); - else if (amount <= 250000) - strcpy(buf, "a mountain of gold coins"); - else if (amount <= 500000) - strcpy(buf, "a huge mountain of gold coins"); - else if (amount <= 1000000) - strcpy(buf, "an enormous mountain of gold coins"); - else - strcpy(buf, "an absolutely colossal mountain of gold coins"); + + for (cnt = 0; money_table[cnt].limit; cnt++) + if (amount <= money_table[cnt].limit) + return (money_table[cnt].description); - return (buf); + return ("an absolutely colossal mountain of gold coins"); } @@ -1195,8 +1294,9 @@ int generic_find(char *arg, bitvector_t bitvector, struct char_data * ch, struct char_data ** tar_ch, struct obj_data ** tar_obj) { - int i, found; - char name[256]; + int i, found, number; + char name_val[256]; + char *name = name_val; *tar_ch = NULL; *tar_obj = NULL; @@ -1205,36 +1305,44 @@ if (!*name) return (0); + if (!(number = get_number(&name))) + return (0); if (IS_SET(bitvector, FIND_CHAR_ROOM)) { /* Find person in room */ - if ((*tar_ch = get_char_vis(ch, name, FIND_CHAR_ROOM)) != NULL) + if ((*tar_ch = get_char_room_vis(ch, name, &number)) != NULL) return (FIND_CHAR_ROOM); } + if (IS_SET(bitvector, FIND_CHAR_WORLD)) { - if ((*tar_ch = get_char_vis(ch, name, FIND_CHAR_WORLD)) != NULL) + if ((*tar_ch = get_char_world_vis(ch, name, &number)) != NULL) return (FIND_CHAR_WORLD); } + if (IS_SET(bitvector, FIND_OBJ_EQUIP)) { for (found = FALSE, i = 0; i < NUM_WEARS && !found; i++) - if (GET_EQ(ch, i) && isname(name, GET_EQ(ch, i)->name)) { + if (GET_EQ(ch, i) && isname(name, GET_EQ(ch, i)->name) && --number == 0) { *tar_obj = GET_EQ(ch, i); found = TRUE; } if (found) return (FIND_OBJ_EQUIP); } + if (IS_SET(bitvector, FIND_OBJ_INV)) { - if ((*tar_obj = get_obj_in_list_vis(ch, name, ch->carrying)) != NULL) + if ((*tar_obj = get_obj_in_list_vis(ch, name, &number, ch->carrying)) != NULL) return (FIND_OBJ_INV); } + if (IS_SET(bitvector, FIND_OBJ_ROOM)) { - if ((*tar_obj = get_obj_in_list_vis(ch, name, world[ch->in_room].contents)) != NULL) + if ((*tar_obj = get_obj_in_list_vis(ch, name, &number, world[ch->in_room].contents)) != NULL) return (FIND_OBJ_ROOM); } + if (IS_SET(bitvector, FIND_OBJ_WORLD)) { - if ((*tar_obj = get_obj_vis(ch, name))) + if ((*tar_obj = get_obj_vis(ch, name, &number))) return (FIND_OBJ_WORLD); } + return (0); } Index: circle/src/handler.h diff -u circle/src/handler.h:1.9 circle/src/handler.h:1.11 --- circle/src/handler.h:1.9 Thu Mar 4 22:47:47 1999 +++ circle/src/handler.h Sun Mar 18 18:58:58 2001 @@ -20,7 +20,7 @@ /* utility */ -char *money_desc(int amount); +const char *money_desc(int amount); struct obj_data *create_money(int amount); int isname(const char *str, const char *namelist); char *fname(const char *namelist); @@ -50,24 +50,23 @@ /* ******* characters ********* */ -struct char_data *get_char_room(char *name, room_rnum room); +struct char_data *get_char_room(char *name, int *number, room_rnum room); struct char_data *get_char_num(mob_rnum nr); -struct char_data *get_char(char *name); void char_from_room(struct char_data *ch); void char_to_room(struct char_data *ch, room_rnum room); void extract_char(struct char_data *ch); +void extract_pending_chars(void); /* find if character can see */ -struct char_data *get_char_room_vis(struct char_data *ch, char *name); -struct char_data *get_player_vis(struct char_data *ch, char *name, int inroom); - -struct char_data *get_char_vis(struct char_data *ch, char *name, int where); -struct obj_data *get_obj_in_list_vis(struct char_data *ch, char *name, -struct obj_data *list); -struct obj_data *get_obj_vis(struct char_data *ch, char *name); -struct obj_data *get_object_in_equip_vis(struct char_data *ch, -char *arg, struct obj_data *equipment[], int *j); +struct char_data *get_player_vis(struct char_data *ch, char *name, int *number, int inroom); +struct char_data *get_char_vis(struct char_data *ch, char *name, int *number, int where); +struct char_data *get_char_room_vis(struct char_data *ch, char *name, int *number); +struct char_data *get_char_world_vis(struct char_data *ch, char *name, int *number); + +struct obj_data *get_obj_in_list_vis(struct char_data *ch, char *name, int *number, struct obj_data *list); +struct obj_data *get_obj_vis(struct char_data *ch, char *name, int *number); +struct obj_data *get_object_in_equip_vis(struct char_data *ch, char *arg, struct obj_data *equipment[], int *j); /* find all dots */ Index: circle/src/interpreter.c diff -u circle/src/interpreter.c:1.23 circle/src/interpreter.c:1.25 --- circle/src/interpreter.c:1.23 Sun Jan 23 13:24:53 2000 +++ circle/src/interpreter.c Thu Jan 25 15:29:58 2001 @@ -844,6 +844,15 @@ { register int i, l; + /* We used to have \r as the first character on certain array items to + * prevent the explicit choice of that point. It seems a bit silly to + * dump control characters into arrays to prevent that, so we'll just + * check in here to see if the first character of the argument is '!', + * and if so, just blindly return a '-1' for not found. - ae. + */ + if (*arg == '!') + return (-1); + /* Make into lower case, and get length of string */ for (l = 0; *(arg + l); l++) *(arg + l) = LOWER(*(arg + l)); @@ -1026,7 +1035,7 @@ * * that was dumb. it shouldn't be symmetrical. JE 5/1/95 * - * returnss 1 if arg1 is an abbreviation of arg2 + * returns 1 if arg1 is an abbreviation of arg2 */ int is_abbrev(const char *arg1, const char *arg2) { Index: circle/src/magic.c diff -u circle/src/magic.c:1.21 circle/src/magic.c:1.24 --- circle/src/magic.c:1.21 Wed Mar 17 09:45:22 1999 +++ circle/src/magic.c Thu Jan 25 16:36:18 2001 @@ -19,6 +19,7 @@ #include "handler.h" #include "db.h" #include "interpreter.h" +#include "constants.h" extern struct room_data *world; extern struct obj_data *object_list; @@ -30,7 +31,6 @@ extern int mini_mud; extern int pk_allowed; -extern char *spell_wear_off_msg[]; byte saving_throws(int class_num, int type, int level); /* class.c */ void clearMemory(struct char_data * ch); @@ -95,8 +95,8 @@ if ((af->type > 0) && (af->type <= MAX_SPELLS)) if (!af->next || (af->next->type != af->type) || (af->next->duration > 0)) - if (*spell_wear_off_msg[af->type]) { - send_to_char(spell_wear_off_msg[af->type], i); + if (spell_info[af->type].wear_off_msg) { + send_to_char(spell_info[af->type].wear_off_msg, i); send_to_char("\r\n", i); } affect_remove(i, af); @@ -148,18 +148,12 @@ return (FALSE); } if (extract) { - if (item0 < 0) { - obj_from_char(obj0); + if (item0 < 0) extract_obj(obj0); - } - if (item1 < 0) { - obj_from_char(obj1); + if (item1 < 0) extract_obj(obj1); - } - if (item2 < 0) { - obj_from_char(obj2); + if (item2 < 0) extract_obj(obj2); - } } if (verbose) { send_to_char("A puff of smoke rises from your pack.\r\n", ch); @@ -718,7 +712,7 @@ "There are no such creatures.\r\n", "Uh oh...\r\n", "Oh dear.\r\n", - "Oh shit!\r\n", + "Gosh durnit!\r\n", "The elements resist!\r\n", "You failed.\r\n", "There is no corpse!\r\n" Index: circle/src/mobact.c diff -u circle/src/mobact.c:1.10 circle/src/mobact.c:1.11 --- circle/src/mobact.c:1.10 Sun May 9 17:04:33 1999 +++ circle/src/mobact.c Thu Jan 25 16:46:34 2001 @@ -99,10 +99,10 @@ continue; if (MOB_FLAGGED(ch, MOB_WIMPY) && AWAKE(vict)) continue; - if (!MOB_FLAGGED(ch, MOB_AGGR_TO_ALIGN) || - (MOB_FLAGGED(ch, MOB_AGGR_EVIL) && IS_EVIL(vict)) || - (MOB_FLAGGED(ch, MOB_AGGR_NEUTRAL) && IS_NEUTRAL(vict)) || - (MOB_FLAGGED(ch, MOB_AGGR_GOOD) && IS_GOOD(vict))) { + if (MOB_FLAGGED(ch, MOB_AGGRESSIVE ) || + (MOB_FLAGGED(ch, MOB_AGGR_EVIL ) && IS_EVIL(vict)) || + (MOB_FLAGGED(ch, MOB_AGGR_NEUTRAL) && IS_NEUTRAL(vict)) || + (MOB_FLAGGED(ch, MOB_AGGR_GOOD ) && IS_GOOD(vict))) { hit(ch, vict, TYPE_UNDEFINED); found = TRUE; } Index: circle/src/modify.c diff -u circle/src/modify.c:1.22 circle/src/modify.c:1.23 --- circle/src/modify.c:1.22 Sun Jan 23 12:26:56 2000 +++ circle/src/modify.c Thu Jan 25 16:50:43 2001 @@ -199,7 +199,7 @@ return; } - if (!(vict = get_char_vis(ch, name, FIND_CHAR_WORLD))) { + if (!(vict = get_char_vis(ch, name, NULL, FIND_CHAR_WORLD))) { send_to_char(NOPERSON, ch); return; } @@ -273,9 +273,6 @@ * for CircleMUD. All functions below are his. --JE 8 Mar 96 * *********************************************************************/ - -#define PAGE_LENGTH 22 -#define PAGE_WIDTH 80 /* Traverse down the string until the begining of the next page has been * reached. Return NULL if this is the last page of the string. Index: circle/src/objsave.c diff -u circle/src/objsave.c:1.25 circle/src/objsave.c:1.26 --- circle/src/objsave.c:1.25 Sun Aug 1 17:41:35 1999 +++ circle/src/objsave.c Thu Jan 25 16:47:24 2001 @@ -609,8 +609,9 @@ } /* Little hoarding check. -gg 3/1/98 */ - sprintf(fname, "%s (level %d) has %d objects (max %d).", - GET_NAME(ch), GET_LEVEL(ch), num_objs, max_obj_save); + sprintf(fname, "%s (level %d) has %d object%s (max %d).", + GET_NAME(ch), GET_LEVEL(ch), num_objs, + num_objs != 1 ? "s" : "", max_obj_save); mudlog(fname, NRM, MAX(GET_INVIS_LEV(ch), LVL_GOD), TRUE); /* turn this into a crash file by re-writing the control block */ Index: circle/src/shop.c diff -u circle/src/shop.c:1.24 circle/src/shop.c:1.26 --- circle/src/shop.c:1.24 Wed May 26 12:32:37 1999 +++ circle/src/shop.c Sun Mar 4 18:49:40 2001 @@ -594,7 +594,7 @@ struct obj_data *obj; int result; - if (!(obj = get_obj_in_list_vis(ch, name, ch->carrying))) { + if (!(obj = get_obj_in_list_vis(ch, name, NULL, ch->carrying))) { if (msg) { sprintf(buf, shop_index[shop_nr].no_such_item2, GET_NAME(ch)); do_tell(keeper, buf, cmd_tell, 0); @@ -1048,6 +1048,45 @@ } +char *read_shop_message(int mnum, room_vnum shr, FILE *shop_f, const char *why) +{ + int cht, ss = 0, ds = 0, err = 0; + char *tbuf; + + if (!(tbuf = fread_string(shop_f, why))) + return (NULL); + + for (cht = 0; tbuf[cht]; cht++) { + if (tbuf[cht] != '%') + continue; + + if (tbuf[cht + 1] == 's') + ss++; + else if (tbuf[cht + 1] == 'd' && (mnum == 5 || mnum == 6)) { + if (ss == 0) { + log("SYSERR: Shop #%d has %%d before %%s, message #%d.", shr, mnum); + err++; + } + ds++; + } else if (tbuf[cht + 1] != '%') { + log("SYSERR: Shop #%d has invalid format '%%%c' in message #%d.", shr, tbuf[cht + 1], mnum); + err++; + } + } + + if (ss > 1 || ds > 1) { + log("SYSERR: Shop #%d has too many specifiers for message #%d. %%s=%d %%d=%d", shr, mnum, ss, ds); + err++; + } + + if (err) { + free(tbuf); + return (NULL); + } + return (tbuf); +} + + void boot_the_shops(FILE * shop_f, char *filename, int rec_count) { char *buf, buf2[150]; @@ -1083,13 +1122,13 @@ SHOP_BUYWORD(top_shop, count) = BUY_WORD(list[count]); } - shop_index[top_shop].no_such_item1 = fread_string(shop_f, buf2); - shop_index[top_shop].no_such_item2 = fread_string(shop_f, buf2); - shop_index[top_shop].do_not_buy = fread_string(shop_f, buf2); - shop_index[top_shop].missing_cash1 = fread_string(shop_f, buf2); - shop_index[top_shop].missing_cash2 = fread_string(shop_f, buf2); - shop_index[top_shop].message_buy = fread_string(shop_f, buf2); - shop_index[top_shop].message_sell = fread_string(shop_f, buf2); + shop_index[top_shop].no_such_item1 = read_shop_message(0, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].no_such_item2 = read_shop_message(1, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].do_not_buy = read_shop_message(2, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].missing_cash1 = read_shop_message(3, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].missing_cash2 = read_shop_message(4, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].message_buy = read_shop_message(5, SHOP_NUM(top_shop), shop_f, buf2); + shop_index[top_shop].message_sell = read_shop_message(6, SHOP_NUM(top_shop), shop_f, buf2); read_line(shop_f, "%d", &SHOP_BROKE_TEMPER(top_shop)); read_line(shop_f, "%d", &SHOP_BITVECTOR(top_shop)); read_line(shop_f, "%hd", &SHOP_KEEPER(top_shop)); @@ -1165,9 +1204,9 @@ { int shop_nr; - strcpy(buf, "\r\n"); + *buf = '\0'; for (shop_nr = 0; shop_nr <= top_shop; shop_nr++) { - if (!(shop_nr % 19)) { + if (!(shop_nr % (PAGE_LENGTH - 2))) { strcat(buf, " ## Virtual Where Keeper Buy Sell Customers\r\n"); strcat(buf, "---------------------------------------------------------\r\n"); } Index: circle/src/spec_procs.c diff -u circle/src/spec_procs.c:1.21 circle/src/spec_procs.c:1.24 --- circle/src/spec_procs.c:1.21 Sun May 9 17:09:24 1999 +++ circle/src/spec_procs.c Thu Jan 25 16:50:43 2001 @@ -339,6 +339,8 @@ return; if (GET_LEVEL(victim) >= LVL_IMMORT) return; + if (!CAN_SEE(ch, victim)) + return; if (AWAKE(victim) && (number(0, GET_LEVEL(ch)) == 0)) { act("You discover that $n has $s hands in your wallet.", FALSE, ch, 0, victim, TO_VICT); @@ -626,6 +628,8 @@ if (CMD_IS("list")) { send_to_char("Available pets are:\r\n", ch); for (pet = world[pet_room].people; pet; pet = pet->next_in_room) { + if (!IS_NPC(pet)) + continue; sprintf(buf, "%8d - %s\r\n", PET_PRICE(pet), GET_NAME(pet)); send_to_char(buf, ch); } @@ -634,7 +638,7 @@ two_arguments(argument, buf, pet_name); - if (!(pet = get_char_room(buf, pet_room))) { + if (!(pet = get_char_room(buf, NULL, pet_room)) || !IS_NPC(pet)) { send_to_char("There is no such pet!\r\n", ch); return (TRUE); } Index: circle/src/spell_parser.c diff -u circle/src/spell_parser.c:1.23 circle/src/spell_parser.c:1.24 --- circle/src/spell_parser.c:1.23 Fri Jul 9 23:22:39 1999 +++ circle/src/spell_parser.c Thu Jan 25 16:36:18 2001 @@ -29,7 +29,7 @@ /* local functions */ void say_spell(struct char_data * ch, int spellnum, struct char_data * tch, struct obj_data * tobj); -void spello(int spl, const char *name, int max_mana, int min_mana, int mana_change, int minpos, int targets, int violent, int routines); +void spello(int spl, const char *name, int max_mana, int min_mana, int mana_change, int minpos, int targets, int violent, int routines, const char *wearoff); int mag_manacost(struct char_data * ch, int spellnum); ACMD(do_cast); void unused_spell(int spl); @@ -560,15 +560,15 @@ target = TRUE; } else if (t != NULL && *t) { if (!target && (IS_SET(SINFO.targets, TAR_CHAR_ROOM))) { - if ((tch = get_char_vis(ch, t, FIND_CHAR_ROOM)) != NULL) + if ((tch = get_char_vis(ch, t, NULL, FIND_CHAR_ROOM)) != NULL) target = TRUE; } if (!target && IS_SET(SINFO.targets, TAR_CHAR_WORLD)) - if ((tch = get_char_vis(ch, t, FIND_CHAR_WORLD)) != NULL) + if ((tch = get_char_vis(ch, t, NULL, FIND_CHAR_WORLD)) != NULL) target = TRUE; if (!target && IS_SET(SINFO.targets, TAR_OBJ_INV)) - if ((tobj = get_obj_in_list_vis(ch, t, ch->carrying)) != NULL) + if ((tobj = get_obj_in_list_vis(ch, t, NULL, ch->carrying)) != NULL) target = TRUE; if (!target && IS_SET(SINFO.targets, TAR_OBJ_EQUIP)) { @@ -579,11 +579,11 @@ } } if (!target && IS_SET(SINFO.targets, TAR_OBJ_ROOM)) - if ((tobj = get_obj_in_list_vis(ch, t, world[IN_ROOM(ch)].contents)) != NULL) + if ((tobj = get_obj_in_list_vis(ch, t, NULL, world[IN_ROOM(ch)].contents)) != NULL) target = TRUE; if (!target && IS_SET(SINFO.targets, TAR_OBJ_WORLD)) - if ((tobj = get_obj_vis(ch, t)) != NULL) + if ((tobj = get_obj_vis(ch, t, NULL)) != NULL) target = TRUE; } else { /* if target string is empty */ @@ -673,7 +673,7 @@ /* Assign the spells on boot up */ void spello(int spl, const char *name, int max_mana, int min_mana, - int mana_change, int minpos, int targets, int violent, int routines) + int mana_change, int minpos, int targets, int violent, int routines, const char *wearoff) { int i; @@ -687,6 +687,7 @@ spell_info[spl].violent = violent; spell_info[spl].routines = routines; spell_info[spl].name = name; + spell_info[spl].wear_off_msg = wearoff; } @@ -706,7 +707,7 @@ spell_info[spl].name = unused_spellname; } -#define skillo(skill, name) spello(skill, name, 0, 0, 0, 0, 0, 0, 0); +#define skillo(skill, name) spello(skill, name, 0, 0, 0, 0, 0, 0, 0, NULL); /* @@ -763,159 +764,209 @@ /* Do not change the loop above. */ spello(SPELL_ANIMATE_DEAD, "animate dead", 35, 10, 3, POS_STANDING, - TAR_OBJ_ROOM, FALSE, MAG_SUMMONS); + TAR_OBJ_ROOM, FALSE, MAG_SUMMONS, + NULL); spello(SPELL_ARMOR, "armor", 30, 15, 3, POS_FIGHTING, - TAR_CHAR_ROOM, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, + "You feel less protected."); spello(SPELL_BLESS, "bless", 35, 5, 3, POS_STANDING, - TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS); + TAR_CHAR_ROOM | TAR_OBJ_INV, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS, + "You feel less righteous."); spello(SPELL_BLINDNESS, "blindness", 35, 25, 1, POS_STANDING, - TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_NOT_SELF, FALSE, MAG_AFFECTS, + "You feel a cloak of blindness dissolve."); spello(SPELL_BURNING_HANDS, "burning hands", 30, 10, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_CALL_LIGHTNING, "call lightning", 40, 25, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_CHARM, "charm person", 75, 50, 2, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL); + TAR_CHAR_ROOM | TAR_NOT_SELF, TRUE, MAG_MANUAL, + "You feel more self-confident."); spello(SPELL_CHILL_TOUCH, "chill touch", 30, 10, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_AFFECTS, + "You feel your strength return."); spello(SPELL_CLONE, "clone", 80, 65, 5, POS_STANDING, - TAR_SELF_ONLY, FALSE, MAG_SUMMONS); + TAR_SELF_ONLY, FALSE, MAG_SUMMONS, + NULL); spello(SPELL_COLOR_SPRAY, "color spray", 30, 15, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_CONTROL_WEATHER, "control weather", 75, 25, 5, POS_STANDING, - TAR_IGNORE, FALSE, MAG_MANUAL); + TAR_IGNORE, FALSE, MAG_MANUAL, + NULL); spello(SPELL_CREATE_FOOD, "create food", 30, 5, 4, POS_STANDING, - TAR_IGNORE, FALSE, MAG_CREATIONS); + TAR_IGNORE, FALSE, MAG_CREATIONS, + NULL); spello(SPELL_CREATE_WATER, "create water", 30, 5, 4, POS_STANDING, - TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL); + TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, MAG_MANUAL, + NULL); spello(SPELL_CURE_BLIND, "cure blind", 30, 5, 2, POS_STANDING, - TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_UNAFFECTS, + NULL); spello(SPELL_CURE_CRITIC, "cure critic", 30, 10, 2, POS_FIGHTING, - TAR_CHAR_ROOM, FALSE, MAG_POINTS); + TAR_CHAR_ROOM, FALSE, MAG_POINTS, + NULL); spello(SPELL_CURE_LIGHT, "cure light", 30, 10, 2, POS_FIGHTING, - TAR_CHAR_ROOM, FALSE, MAG_POINTS); + TAR_CHAR_ROOM, FALSE, MAG_POINTS, + NULL); spello(SPELL_CURSE, "curse", 80, 50, 2, POS_STANDING, - TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS); + TAR_CHAR_ROOM | TAR_OBJ_INV, TRUE, MAG_AFFECTS | MAG_ALTER_OBJS, + "You feel more optimistic."); spello(SPELL_DETECT_ALIGN, "detect alignment", 20, 10, 2, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "You feel less aware."); spello(SPELL_DETECT_INVIS, "detect invisibility", 20, 10, 2, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "Your eyes stop tingling."); spello(SPELL_DETECT_MAGIC, "detect magic", 20, 10, 2, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "The detect magic wears off."); spello(SPELL_DETECT_POISON, "detect poison", 15, 5, 1, POS_STANDING, - TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL); + TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, + "The detect poison wears off."); spello(SPELL_DISPEL_EVIL, "dispel evil", 40, 25, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_DISPEL_GOOD, "dispel good", 40, 25, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_EARTHQUAKE, "earthquake", 40, 25, 3, POS_FIGHTING, - TAR_IGNORE, TRUE, MAG_AREAS); + TAR_IGNORE, TRUE, MAG_AREAS, + NULL); spello(SPELL_ENCHANT_WEAPON, "enchant weapon", 150, 100, 10, POS_STANDING, - TAR_OBJ_INV, FALSE, MAG_MANUAL); + TAR_OBJ_INV, FALSE, MAG_MANUAL, + NULL); spello(SPELL_ENERGY_DRAIN, "energy drain", 40, 25, 1, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE | MAG_MANUAL, + NULL); spello(SPELL_GROUP_ARMOR, "group armor", 50, 30, 2, POS_STANDING, - TAR_IGNORE, FALSE, MAG_GROUPS); + TAR_IGNORE, FALSE, MAG_GROUPS, + NULL); spello(SPELL_FIREBALL, "fireball", 40, 30, 2, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_GROUP_HEAL, "group heal", 80, 60, 5, POS_STANDING, - TAR_IGNORE, FALSE, MAG_GROUPS); + TAR_IGNORE, FALSE, MAG_GROUPS, + NULL); spello(SPELL_HARM, "harm", 75, 45, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_HEAL, "heal", 60, 40, 3, POS_FIGHTING, - TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_POINTS | MAG_UNAFFECTS, + NULL); spello(SPELL_INFRAVISION, "infravision", 25, 10, 1, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "Your night vision seems to fade."); spello(SPELL_INVISIBLE, "invisibility", 35, 25, 1, POS_STANDING, - TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS); + TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_AFFECTS | MAG_ALTER_OBJS, + "You feel yourself exposed."); spello(SPELL_LIGHTNING_BOLT, "lightning bolt", 30, 15, 1, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_LOCATE_OBJECT, "locate object", 25, 20, 1, POS_STANDING, - TAR_OBJ_WORLD, FALSE, MAG_MANUAL); + TAR_OBJ_WORLD, FALSE, MAG_MANUAL, + NULL); spello(SPELL_MAGIC_MISSILE, "magic missile", 25, 10, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_POISON, "poison", 50, 20, 3, POS_STANDING, TAR_CHAR_ROOM | TAR_NOT_SELF | TAR_OBJ_INV, TRUE, - MAG_AFFECTS | MAG_ALTER_OBJS); + MAG_AFFECTS | MAG_ALTER_OBJS, + "You feel less sick."); spello(SPELL_PROT_FROM_EVIL, "protection from evil", 40, 10, 3, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "You feel less protected."); spello(SPELL_REMOVE_CURSE, "remove curse", 45, 25, 5, POS_STANDING, TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_EQUIP, FALSE, - MAG_UNAFFECTS | MAG_ALTER_OBJS); + MAG_UNAFFECTS | MAG_ALTER_OBJS, + NULL); spello(SPELL_REMOVE_POISON, "remove poison", 40, 8, 4, POS_STANDING, - TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_UNAFFECTS | MAG_ALTER_OBJS); + TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_UNAFFECTS | MAG_ALTER_OBJS, + NULL); spello(SPELL_SANCTUARY, "sanctuary", 110, 85, 5, POS_STANDING, - TAR_CHAR_ROOM, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, + "The white aura around your body fades."); spello(SPELL_SENSE_LIFE, "sense life", 20, 10, 2, POS_STANDING, - TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM | TAR_SELF_ONLY, FALSE, MAG_AFFECTS, + "You feel less aware of your surroundings."); spello(SPELL_SHOCKING_GRASP, "shocking grasp", 30, 15, 3, POS_FIGHTING, - TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE); + TAR_CHAR_ROOM | TAR_FIGHT_VICT, TRUE, MAG_DAMAGE, + NULL); spello(SPELL_SLEEP, "sleep", 40, 25, 5, POS_STANDING, - TAR_CHAR_ROOM, TRUE, MAG_AFFECTS); + TAR_CHAR_ROOM, TRUE, MAG_AFFECTS, + "You feel less tired."); spello(SPELL_STRENGTH, "strength", 35, 30, 1, POS_STANDING, - TAR_CHAR_ROOM, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, + "You feel weaker."); spello(SPELL_SUMMON, "summon", 75, 50, 3, POS_STANDING, - TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL); + TAR_CHAR_WORLD | TAR_NOT_SELF, FALSE, MAG_MANUAL, + NULL); spello(SPELL_TELEPORT, "teleport", 75, 50, 3, POS_STANDING, - TAR_CHAR_ROOM, FALSE, MAG_MANUAL); + TAR_CHAR_ROOM, FALSE, MAG_MANUAL, + NULL); spello(SPELL_WATERWALK, "waterwalk", 40, 20, 2, POS_STANDING, - TAR_CHAR_ROOM, FALSE, MAG_AFFECTS); + TAR_CHAR_ROOM, FALSE, MAG_AFFECTS, + "Your feet seem less buoyant."); spello(SPELL_WORD_OF_RECALL, "word of recall", 20, 10, 2, POS_FIGHTING, - TAR_CHAR_ROOM, FALSE, MAG_MANUAL); + TAR_CHAR_ROOM, FALSE, MAG_MANUAL, + NULL); /* NON-castable spells should appear below here. */ spello(SPELL_IDENTIFY, "identify", 0, 0, 0, 0, - TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL); + TAR_CHAR_ROOM | TAR_OBJ_INV | TAR_OBJ_ROOM, FALSE, MAG_MANUAL, + NULL); /* * These spells are currently not used, not implemented, and not castable. @@ -923,19 +974,24 @@ */ spello(SPELL_FIRE_BREATH, "fire breath", 0, 0, 0, POS_SITTING, - TAR_IGNORE, TRUE, 0); + TAR_IGNORE, TRUE, 0, + NULL); spello(SPELL_GAS_BREATH, "gas breath", 0, 0, 0, POS_SITTING, - TAR_IGNORE, TRUE, 0); + TAR_IGNORE, TRUE, 0, + NULL); spello(SPELL_FROST_BREATH, "frost breath", 0, 0, 0, POS_SITTING, - TAR_IGNORE, TRUE, 0); + TAR_IGNORE, TRUE, 0, + NULL); spello(SPELL_ACID_BREATH, "acid breath", 0, 0, 0, POS_SITTING, - TAR_IGNORE, TRUE, 0); + TAR_IGNORE, TRUE, 0, + NULL); spello(SPELL_LIGHTNING_BREATH, "lightning breath", 0, 0, 0, POS_SITTING, - TAR_IGNORE, TRUE, 0); + TAR_IGNORE, TRUE, 0, + NULL); /* * Declaration of skills - this actually doesn't do anything except Index: circle/src/spells.c diff -u circle/src/spells.c:1.17 circle/src/spells.c:1.18 --- circle/src/spells.c:1.17 Mon Dec 14 23:04:10 1998 +++ circle/src/spells.c Mon Jul 3 03:50:25 2000 @@ -95,7 +95,7 @@ do { to_room = number(0, top_of_world); - } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE | ROOM_DEATH)); + } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE | ROOM_DEATH | ROOM_GODROOM)); act("$n slowly fades out of existence and is gone.", FALSE, victim, 0, 0, TO_ROOM); Index: circle/src/spells.h diff -u circle/src/spells.h:1.7 circle/src/spells.h:1.8 --- circle/src/spells.h:1.7 Tue Feb 16 12:42:27 1999 +++ circle/src/spells.h Thu Jan 25 16:36:18 2001 @@ -176,6 +176,7 @@ byte violent; int targets; /* See below for use with TAR_XXX */ const char *name; + const char *wear_off_msg; }; /* Possible Targets: Index: circle/src/structs.h diff -u circle/src/structs.h:1.30 circle/src/structs.h:1.34 --- circle/src/structs.h:1.30 Thu Jan 20 16:20:16 2000 +++ circle/src/structs.h Sun Mar 18 18:58:58 2001 @@ -17,7 +17,7 @@ * You are supposed to compare this with the macro CIRCLEMUD_VERSION() * in utils.h. See there for usage. */ -#define _CIRCLEMUD 0x030011 /* Major/Minor/Patchlevel - MMmmPP */ +#define _CIRCLEMUD 0x030012 /* Major/Minor/Patchlevel - MMmmPP */ /* * If you want equipment to be automatically equipped to the same place @@ -153,6 +153,7 @@ #define PLR_NODELETE (1 << 13) /* Player shouldn't be deleted */ #define PLR_INVSTART (1 << 14) /* Player should enter game wizinvis */ #define PLR_CRYO (1 << 15) /* Player is cryo-saved (purge prog) */ +#define PLR_NOTDEADYET (1 << 16) /* (R) Player being extracted. */ /* Mobile flags: used by char_data.char_specials.act */ @@ -161,12 +162,12 @@ #define MOB_SCAVENGER (1 << 2) /* Mob picks up stuff on the ground */ #define MOB_ISNPC (1 << 3) /* (R) Automatically set on all Mobs */ #define MOB_AWARE (1 << 4) /* Mob can't be backstabbed */ -#define MOB_AGGRESSIVE (1 << 5) /* Mob hits players in the room */ +#define MOB_AGGRESSIVE (1 << 5) /* Mob auto-attacks everybody nearby */ #define MOB_STAY_ZONE (1 << 6) /* Mob shouldn't wander out of zone */ #define MOB_WIMPY (1 << 7) /* Mob flees if severely injured */ -#define MOB_AGGR_EVIL (1 << 8) /* auto attack evil PC's */ -#define MOB_AGGR_GOOD (1 << 9) /* auto attack good PC's */ -#define MOB_AGGR_NEUTRAL (1 << 10) /* auto attack neutral PC's */ +#define MOB_AGGR_EVIL (1 << 8) /* Auto-attack any evil PC's */ +#define MOB_AGGR_GOOD (1 << 9) /* Auto-attack any good PC's */ +#define MOB_AGGR_NEUTRAL (1 << 10) /* Auto-attack any neutral PC's */ #define MOB_MEMORY (1 << 11) /* remember attackers if attacked */ #define MOB_HELPER (1 << 12) /* attack PCs fighting other NPCs */ #define MOB_NOCHARM (1 << 13) /* Mob can't be charmed */ @@ -174,6 +175,7 @@ #define MOB_NOSLEEP (1 << 15) /* Mob can't be slept */ #define MOB_NOBASH (1 << 16) /* Mob can't be bashed (e.g. trees) */ #define MOB_NOBLIND (1 << 17) /* Mob can't be blinded */ +#define MOB_NOTDEADYET (1 << 18) /* (R) Mob being extracted. */ /* Preference flags: used by char_data.player_specials.pref */ @@ -228,24 +230,24 @@ /* Modes of connectedness: used by descriptor_data.state */ -#define CON_PLAYING 0 /* Playing - Nominal state */ -#define CON_CLOSE 1 /* Disconnecting */ -#define CON_GET_NAME 2 /* By what name ..? */ -#define CON_NAME_CNFRM 3 /* Did I get that right, x? */ -#define CON_PASSWORD 4 /* Password: */ -#define CON_NEWPASSWD 5 /* Give me a password for x */ -#define CON_CNFPASSWD 6 /* Please retype password: */ -#define CON_QSEX 7 /* Sex? */ -#define CON_QCLASS 8 /* Class? */ -#define CON_RMOTD 9 /* PRESS RETURN after MOTD */ -#define CON_MENU 10 /* Your choice: (main menu) */ -#define CON_EXDESC 11 /* Enter a new description: */ -#define CON_CHPWD_GETOLD 12 /* Changing passwd: get old */ -#define CON_CHPWD_GETNEW 13 /* Changing passwd: get new */ -#define CON_CHPWD_VRFY 14 /* Verify new password */ -#define CON_DELCNF1 15 /* Delete confirmation 1 */ -#define CON_DELCNF2 16 /* Delete confirmation 2 */ -#define CON_DISCONNECT 17 /* In-game disconnection */ +#define CON_PLAYING 0 /* Playing - Nominal state */ +#define CON_CLOSE 1 /* User disconnect, remove character. */ +#define CON_GET_NAME 2 /* By what name ..? */ +#define CON_NAME_CNFRM 3 /* Did I get that right, x? */ +#define CON_PASSWORD 4 /* Password: */ +#define CON_NEWPASSWD 5 /* Give me a password for x */ +#define CON_CNFPASSWD 6 /* Please retype password: */ +#define CON_QSEX 7 /* Sex? */ +#define CON_QCLASS 8 /* Class? */ +#define CON_RMOTD 9 /* PRESS RETURN after MOTD */ +#define CON_MENU 10 /* Your choice: (main menu) */ +#define CON_EXDESC 11 /* Enter a new description: */ +#define CON_CHPWD_GETOLD 12 /* Changing passwd: get old */ +#define CON_CHPWD_GETNEW 13 /* Changing passwd: get new */ +#define CON_CHPWD_VRFY 14 /* Verify new password */ +#define CON_DELCNF1 15 /* Delete confirmation 1 */ +#define CON_DELCNF2 16 /* Delete confirmation 2 */ +#define CON_DISCONNECT 17 /* In-game link loss (leave character) */ /* Character equipment positions: used as index for char_data.equipment[] */ /* NOTE: Don't confuse these constants with the ITEM_ bitvectors @@ -448,13 +450,25 @@ #define NUM_OF_DIRS 6 /* number of directions in a room (nsewud) */ #define MAGIC_NUMBER (0x06) /* Arbitrary number that won't be in a string */ -#define OPT_USEC 100000 /* 10 passes per second */ +/* + * OPT_USEC determines how many commands will be processed by the MUD per + * second and how frequently it does socket I/O. A low setting will cause + * actions to be executed more frequently but will increase overhead due to + * more cycling to check. A high setting (e.g. 1 Hz) may upset your players + * as actions (such as large speedwalking chains) take longer to be executed. + * You shouldn't need to adjust this. + */ +#define OPT_USEC 100000 /* 10 passes per second */ #define PASSES_PER_SEC (1000000 / OPT_USEC) #define RL_SEC * PASSES_PER_SEC #define PULSE_ZONE (10 RL_SEC) #define PULSE_MOBILE (10 RL_SEC) -#define PULSE_VIOLENCE (2 RL_SEC) +#define PULSE_VIOLENCE ( 2 RL_SEC) +#define PULSE_AUTOSAVE (60 RL_SEC) +#define PULSE_IDLEPWD (15 RL_SEC) +#define PULSE_SANITY (30 RL_SEC) +#define PULSE_USAGE (5 * 60 RL_SEC) /* 5 mins */ /* Variables for the output buffering system */ #define MAX_SOCK_BUF (12 * 1024) /* Size of kernel's sock buf */ Index: circle/src/utils.c diff -u circle/src/utils.c:1.25 circle/src/utils.c:1.28 --- circle/src/utils.c:1.25 Sun Jul 4 20:47:20 1999 +++ circle/src/utils.c Thu Jan 25 16:50:43 2001 @@ -168,8 +168,11 @@ time_t ct = time(0); char *time_s = asctime(localtime(&ct)); - if (logfile == NULL) + if (logfile == NULL) { puts("SYSERR: Using log() before stream was initialized!"); + return; + } + if (format == NULL) format = "SYSERR: log() received a NULL format."; @@ -213,7 +216,7 @@ if (str == NULL) return; /* eh, oh well. */ if (file) - log(str); + log("%s", str); if (level < 0) return; @@ -451,15 +454,19 @@ { char temp[256]; int lines = 0; + int sl; do { - fgets(temp, 256, fl); - if (feof(fl)) + if (!fgets(temp, 256, fl)) return (0); lines++; } while (*temp == '*' || *temp == '\n'); + + /* Last line of file doesn't always have a \n, but it should. */ + sl = strlen(temp); + if (sl > 0 && temp[sl - 1] == '\n') + temp[sl - 1] = '\0'; - temp[strlen(temp) - 1] = '\0'; strcpy(buf, temp); return (lines); } @@ -548,15 +555,20 @@ * * XXX: Wonder if flushing streams includes sockets? */ +extern FILE *player_fl; void core_dump_real(const char *who, int line) { log("SYSERR: Assertion failed at %s:%d!", who, line); +#if 0 /* By default, let's not litter. */ #if defined(CIRCLE_UNIX) - /* These would be duplicated otherwise... */ + /* These would be duplicated otherwise...make very sure. */ fflush(stdout); fflush(stderr); fflush(logfile); + fflush(player_fl); + /* Everything, just in case, for the systems that support it. */ + fflush(NULL); /* * Kill the child so the debugger or script doesn't think the MUD @@ -564,5 +576,6 @@ */ if (fork() == 0) abort(); +#endif #endif } Index: circle/src/utils.h diff -u circle/src/utils.h:1.34 circle/src/utils.h:1.37 --- circle/src/utils.h:1.34 Sat Mar 13 16:59:47 1999 +++ circle/src/utils.h Sat Mar 10 17:06:47 2001 @@ -124,6 +124,7 @@ #define ISNEWL(ch) ((ch) == '\n' || (ch) == '\r') #define IF_STR(st) ((st) ? (st) : "\0") +/* See also: ANA, SANA */ #define AN(string) (strchr("aeiouAEIOU", *string) ? "an" : "a") @@ -191,7 +192,7 @@ #define ROOM_FLAGS(loc) (world[(loc)].room_flags) #define SPELL_ROUTINES(spl) (spell_info[spl].routines) -/* See http://www.circlemud.org/~greerga/todo.009 to eliminate MOB_ISNPC. */ +/* See http://www.circlemud.org/~greerga/todo/todo.009 to eliminate MOB_ISNPC. */ #define IS_NPC(ch) (IS_SET(MOB_FLAGS(ch), MOB_ISNPC)) #define IS_MOB(ch) (IS_NPC(ch) && GET_MOB_RNUM(ch) >= 0) @@ -314,7 +315,7 @@ #define GET_MOB_SPEC(ch) (IS_MOB(ch) ? mob_index[(ch)->nr].func : NULL) #define GET_MOB_RNUM(mob) ((mob)->nr) #define GET_MOB_VNUM(mob) (IS_MOB(mob) ? \ - mob_index[GET_MOB_RNUM(mob)].vnum : -1) + mob_index[GET_MOB_RNUM(mob)].vnum : NOBODY) #define GET_DEFAULT_POS(ch) ((ch)->mob_specials.default_pos) #define MEMORY(ch) ((ch)->mob_specials.memory) @@ -365,7 +366,7 @@ #define GET_OBJ_TIMER(obj) ((obj)->obj_flags.timer) #define GET_OBJ_RNUM(obj) ((obj)->item_number) #define GET_OBJ_VNUM(obj) (GET_OBJ_RNUM(obj) >= 0 ? \ - obj_index[GET_OBJ_RNUM(obj)].vnum : -1) + obj_index[GET_OBJ_RNUM(obj)].vnum : NOTHING) #define IS_OBJ_STAT(obj,stat) (IS_SET((obj)->obj_flags.extra_flags,stat)) #define IS_CORPSE(obj) (GET_OBJ_TYPE(obj) == ITEM_CONTAINER && \ GET_OBJ_VAL((obj), 3) == 1) @@ -389,8 +390,8 @@ #define HSSH(ch) (GET_SEX(ch) ? (GET_SEX(ch)==SEX_MALE ? "he" :"she") : "it") #define HMHR(ch) (GET_SEX(ch) ? (GET_SEX(ch)==SEX_MALE ? "him":"her") : "it") -#define ANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "An" : "A") -#define SANA(obj) (strchr("aeiouyAEIOUY", *(obj)->name) ? "an" : "a") +#define ANA(obj) (strchr("aeiouAEIOU", *(obj)->name) ? "An" : "A") +#define SANA(obj) (strchr("aeiouAEIOU", *(obj)->name) ? "an" : "a") /* Various macros building up to CAN_SEE */ Index: circle/src/util/shopconv.c diff -u circle/src/util/shopconv.c:1.5 circle/src/util/shopconv.c:1.6 --- circle/src/util/shopconv.c:1.5 Mon Aug 24 19:12:40 1998 +++ circle/src/util/shopconv.c Sun Mar 4 18:48:51 2001 @@ -13,23 +13,21 @@ puts(x); } -char *fread_string(FILE * fl, char *error) +char *fread_string(FILE * fl, const char *error) { - char buf[MAX_STRING_LENGTH], tmp[500]; - char *rslt; - register char *point; + char buf[MAX_STRING_LENGTH], tmp[512], *rslt, *point; int flag; *buf = '\0'; do { - if (!fgets(tmp, MAX_STRING_LENGTH, fl)) { + if (!fgets(tmp, sizeof(tmp), fl)) { printf("fread_string: format error at or near %s\n", error); - exit(0); + exit(1); } if (strlen(tmp) + strlen(buf) > MAX_STRING_LENGTH) { printf("SYSERR: fread_string: string too large (shopconv.c)"); - exit(0); + exit(1); } else strcat(buf, tmp); @@ -49,7 +47,7 @@ CREATE(rslt, char, strlen(buf) + 1); strcpy(rslt, buf); } else - rslt = 0; + rslt = NULL; return (rslt); }