Index: circle/ChangeLog diff -u circle/ChangeLog:1.158 circle/ChangeLog:1.181 --- circle/ChangeLog:1.158 Sun Mar 18 18:59:11 2001 +++ circle/ChangeLog Tue Aug 14 21:50:43 2001 @@ -1,6 +1,8 @@ Release history: +Version 3.00 beta pl19 release: August 14, 2001 +Version 3.00 beta pl18 release: March 18, 2001 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 @@ -8,7 +10,6 @@ Version 3.00 beta pl13a release: June 4, 1998 Version 3.00 beta pl13 release: June 1, 1998 Version 3.00 beta pl12 release: October 29, 1997 -Version 3.00 beta pl12 release: October 29, 1997 Version 3.00 beta pl11 release: April 14, 1996 Version 3.00 beta pl10 release: March 11, 1996 Version 3.00 beta pl9 release: February 6, 1996 @@ -3060,6 +3061,13 @@ -- gg - lib/world/obj/0.obj: An extra ~ escaped the removal of object #99. +10/27/2000 + +-- ae - act.informative.c: Fixed do_time() with the fix submitted by Nate + Winters that corrected the output on the 11th, + 12th, and 13th of a month (it used to output '11st', '12nd', and + '13rd'. Not so good really. + 11/3/2000 -- gg - shop.c: Del noted the @@ -3072,6 +3080,26 @@ -- gg - act.other.c: do_quit: !GET_INVIS_LEV is redundant. +9/18/2000 + +-- ae - comm.c: Added in $u and $U act() codes to perform_act(). These allow + the user to uppercase the first letter of the previous ($u) or next + ($U) word. For example, from the social for 'snarl': + $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. + In the old style, these would have come out as: + George snarls angrily at Daniel. he seems incapable of controlling himself. + George snarls angrily at you. his self-control seems to have gone bananas. + In the new, we get: + George snarls angrily at Daniel. He seems incapable of controlling himself. + George snarls angrily at you. His self-control seems to have gone bananas. + This comes a little bit closer to proper sentence output and looks + much nicer to boot. + +12/07/2000 + +-- ae - Removed some 'offensive' language from act.item.c and magic.c. + 1/17/2001 -- gg - db.c: load_zones(): More accurate counting based in part @@ -3109,6 +3137,19 @@ -- gg - generic_find(): Fix for '2.bread' with one on the ground and one in your inventory. +-- ae - spec_procs.c: Added a CAN_SEE() check into npc_steal() to stop mobs + with the thief special from stealing from people that they can't even + see. Reported by Vladimir Prelovac + +1/26/2001 + +-- ae - act.other.c: Shifted the checking for duping into extract_char(). I + was toying and discovered that renting out skips all of the dup checks + that we had in and so does dieing. Whoops. Also, we were setting the + state of the descriptor to CON_DISCONNECT when that state is used + everywhere else for players that have the state of CON_PLAYING, so I + changed that to CON_CLOSE. (also note 'handler.c') + 2/18/2001 -- gg - comm.c: perform_socket_read(): Handle ECONNRESET by booting @@ -3135,7 +3176,7 @@ -- 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 - boards.c: init_boards(): -1 => NOTHING -- gg - comm.c: game_loop(): Use RL_SEC more. heartbeat(): More PULSE_* constants. @@ -3158,3 +3199,333 @@ -- gg - handler.[ch], structs.h, comm.c, act.offensive.c, fight.c: New delayed extraction sequence to avoid dangling pointer crashes. + +-- gg - Released patchlevel 18. + +******** Patchlevel 19 *************************************************** + +3/18/2001 + +-- gg - constants.c, structs.h, Makefile.lcc, doc/README.CYGWIN: + Welcome to bpl19. + +5/1/2001 + +-- ae - Changed some '256' notes to READ_SIZE (db.c) or MAX_INPUT_LENGTH + (mail.c and handler.c). These are to keep the consistency across + functions, etc. + +-- ae - act.item.c: Removed a check for too many objects from the beginning + of do_get(). As pointed out by Vladimir Prelovac + , + 1. If there isn't anything to get you still get that message + 2. The check is already made at the appropriate time in all the other + functions that do_get() calls (in can_take_obj()). + +-- ae - constants.c: We forgot the string for the NOTDEADYET flags. Oops. + Added in 'DEAD' (with comments) for completeness. + +5/8/2001 + +-- ae - Makefile.in: Modified makefile (and added htmlheaders/footers) to + allow for cxref data creation more readily. + +5/9/2001 + +-- ae - Del submitted a 'bug' (wording problem) with a chunk in + act.movement.c that has to do with ROOM_TUNNEL. There are two + options for fixing it, so I chose the middle ground: adding a + config variable for it to config.c. This variable (tunnel_size) + indicates how large the tunnel is and defaults to 2. + +5/10/2001 + +-- ae - act.wizard.c: Added in code to remove holylight, syslog, and + nohassle when wiz+ are demoted below level 31 with do_advance(). + +-- ae - fight.c: If we don't have a fight message to send (ie, suffering, + poison, etc), then don't send the colours, and don't try to send + the message that we don't have. Reported by Andrey Fidrya + + +-- ae - db.c: This fixes a possible overflow problem in pfiles by truncating + the description if it is too long. Reported by Andrey Fidrya + + +-- ae - We had a reference to SKILL_PUNCH (#136), but in the base code, + 'punch' is an action, not a skill. Not only that, but we don't + even reference it in the lib/ anywhere. (spells.h, spell_parser.c) + +5/16/2001 + +-- ae - coding.doc: Added in a section 4 (special procedures) that was + submitted to us ages ago by Luis Pedro Passos Carvalho + . Unfortunately, due to problems with the CDP, + it languished. We just have to remember to keep the text when we + get the CDP up and running again. + +5/18/2001 + +-- gg - Global: IS_OBJ_STAT -> OBJ_FLAGGED for consistency with + MOB_FLAGGED and OBJ_FLAGGED. + +-- gg - Global: Moved a bunch of global variables to db.h. + +-- gg - act.informative.c, db.c, handler.c, interpreter.c, mobact.c, + random.c: Remove 'register' keyword, let the compiler figure + out what is best. + +-- gg - castle.c: Fix "zones are 100 rooms" assumption. + +-- gg - class.c: Fix trailing comma in prac_params[]. + From: Del + +-- gg - constants.c: Fix "the Day of the Great Gods" capitalization. + From: Carlos Myers + +-- gg - mail.c: scan_file(): Mail file is binary, open as such. + From: Marc Lank + +-- gg - interpeter.c: ACMD(do_info) and ACMD(do_offer) don't exist. + From: Del + +-- gg - magic.c: mag_points(): Rename 'hit' to 'healing' to avoid + the function named hit(). + +-- gg - shop.c: Added missing read_shop_message() declaration. + +-- gg - shop.h: Removed unused GET_OBJ_NUM() macro. + +-- gg - utils.h: Remove IF_STR(), make OBJWEAR_FLAGGED use the + GET_OBJ_WEAR information. + +-- gg - act.item.c: Removed superfluous '*next_obj'. (See the + function variable declaration section.) + +-- gg - act.wizard.c, db.c, db.h: Removed the stupid + "zone number * 100 = starting room" assumptions. + + ||| ----- ----- ----- NOTE ----- ----- ----- NOTE ----- ----- ----- ||| + + This now means you can have zones spanning anywhere, including over + each other. You can have zone #5 going from room 1354 to 2139. + That doesn't prevent zone #10 from going from 936 to 1734. We DO + NOT check for overlap. Why? Because it can be useful. No longer + are you restrained to having a zone repopulate when no one is in + the whole place, now you can do room by room (up to the limit of + 32,767 zones) for some places within a zone. In short, you no + longer have to think of a "zone" in the same way any longer. Now + it's simply a collection of loading commands for mobs/objs when a + timer fires and/or no one is in it. + + ||| ----- ----- ----- NOTE ----- ----- ----- NOTE ----- ----- ----- ||| + +-- gg - castle.c: Fixed zone*100 assumptions. + db.c: Added real_zone() for castle changes. + Changed -1's in real_mobile and real_object appropriately. + +-- gg - comm.c: close_socket(): Move NULL assignment up to fix mobile switching + problem upon disconnection. (The switched into mobile still "busy" even + though you reconnect after a drop.) + +-- gg - comm.h: USING_LARGE/USING_SMALL: Not used, removed. + +-- ae - zone file update: The zone files were all updated to suit the top + and bottom indicators put into the code. + +-- gg - db.c: load_zones(): See warning: + + ///// WARNING \\\\\ + The powers-that-be decided to change the format of the zone files + to be more reasonable with the 'bottom room' number. + + TopRoom Lifespan ResetMode => BottomRoom TopRoom Lifespan ResetMode + + Stock zones will be updated but you will need to change your own + zones by hand or your MUD will error out and not restart. + \\\\\ WARNING ///// + +-- gg - graph.c: VALID_EDGE prototype. + +-- gg - act.informative.c, constants.c, constants.h: where[] -> wear_where[] + +5/22/2001 + +-- ae - class.c: changed 'return 1', and 'return 0' to 'return TRUE' and + 'return FALSE' respectively. This brings it into the same context + as some of the other similar functions. + +5/23/2001 + +-- gg - act.item.c, act.wizard.c, handler.c, handler.h: Fix missing number + (5.Y) support for equipment due to generic_find() fix. + +6/14/2001 + +-- gg - utils.c: dice(): Use number(). + number(): Add rand() comment. + +-- gg - comm.c: init_game(): Save the MUD time on shutdown. + db.c: reset_time(): Load beginning time from lib/etc/time. + db.h: TIME_FILE: "lib/etc/time" + utils.c: mud_time_to_secs(): New. + +-- gg - db.c: interpret_espec()/parse_espec(): Finalize behavior + of Boolean options. (i.e., don't crash) + +-- gg - db.c: parse_mobile(): Clear MOB_NOTDEADYET flag on load. + +-- gg - act.informative.c: sort_commands(): YUCK! Removed the + wacky sorted command structure in favor of a new + one both smaller and more to the point. Also + killed YetAnotherBubbleSort(tm) in the process. + ACMD(do_commands): Your brain will no longer stare at + the 'if' statement and go 'Duh?'. Also fixed an + extra \r\n pair on even multiples of 7. + +-- gg - act.offensive.c: ACMD(do_order): Del + spotted an apparent left-over from Diku, 'org_room'. + Other than 'order followers cast 'teleport' leader', + I'm not sure what it was supposed to do...but it's + gone now. + +-- gg - boards.c: Board_display_msg()/Board_remove_msg(): Use + !is_number instead of !isdigit to prevent commands + like 'remove 2.ring' from affecting the messages on + a board instead. + +-- gg - objsave.c: Crash_idlesave(): Make the GET_EQ() loop match + the one in Crash_crashsave(), instead of saving the + first object in your inventory for every object you + currently had equipped. + +-- gg - db.c: parse_simple_mob(), parse_mobile(), parse_object(): + Use more macros wherever already defined for them. + +-- gg - objsave.c: Crash_delete_crashfile(), Crash_clean_file(), + Crash_listrent(): If we can't read the rent_info + information, punt early before we use garbage. + Also fixed yet another '> -1' => NOTHING issue. + +-- gg - act.wizard.c: do_stat(): 'stat file character' isn't on + the character list; use extract_char_final(). + +-- gg - act.informative.c: do_examine(): Fix not being able to + examine the inside of a 2.foo container. + +-- gg - handler.c: extract_pending_chars(): O(n^2) -> O(n) + +6/25/2001 + +-- ae - handler.c: we forgot to add GET_CHA to affect_total(), noted + by Del . + +-- ae - autorun: Peter Ajamian submitted a new autorun that is much more + configurable and robust. Information on it is contained + autorun.README and the old autorun is still available as + autorun.sh + +6/26/2001 + +-- ae - db.c: Changed the order of the available zone commands in + load_zone() to match the order of the switch statement + in reset_zone(). This makes it easier to double check + the lists against one another. Also added a comment to + each location pointing out that additions need to be made + to both locations if a new zone command is added. + +6/27/2001 + +-- ae - act.wizard.c, class.c: Todd Laycock + pointed out that with some 'careful' use of the advance + command at the wrong time, people could end up snooping + those of a higher level, and possibly introduce a nice + little 'snoop loop'. The addition of a 'snoop_check()' + routine that checks for higher/equal levels of snoopers + or snoop_bys and stops snooping if this is found was + introduced and is called from advance_level(). + +-- ae - shop.c: Rick Glover pointed out that the code + in shopping_list() would rarely (if ever) give the correct + results if someone was listing for an object and none were + found. This code chunk got rewritten and a check for any + objects found was added. + +-- ae - *.c: Reformatted code to match what we do elsewhere (ie rather + than 'struct blah * data', we generally use + 'struct blah *data'. + +-- ae - modify.c: Peter Ajamian submitted a patch + that would fix the occasional strange behaviour of the + prompt sometimes overwrites the last line of paged text in + compact mode. + +-- ae - mail.c: The postmaster will no longer allow you to send mail to + deleted characters. This is done with a check called + mail_recip_ok() which loads the character (if he exists) and + checks for the PLR_DELETED flag. Other checks can be added + as desired. Noted by Bob Castillo + +-- ae - handler.c: Andrey Fidrya pointed out that + while we check to ensure that a mob's prey is still in + the world, that memory has the potential to be reassigned + when the prey leaves the world. As such, in the + extract_char_final() routine, we scan the world for those + hunting the char being extracted and stop the hunt. + +-- ae - act.wizard.c: In the continuing series of bugs reported by + Andrey Fidrya , 'stat file ' + (when done on a player in-game) will turf his objsave + file. Anyhow, the pfile should be the same as the in-game + character regardless, so we may as well just stat the + character and avoid the rent eating problem entirely. + +7/1/2001 -- gcc 3.0 warning day. Part 1. + +-- gg - act.informative.c: Prototype sort_commands_helper. + +-- gg - comm.c: main(); db.c: parse_room(), fread_string(): + Fix bad usages of variable argument functions. + +-- gg - act.informative.c: do_users(): Fix up 'format' usage so it's more + concise and gcc can check the arguments to sprintf(). + +-- gg - ChangeLog: Fix bpl12 being released twice. + +-- gg - ban.c: do_ban(): Change to allow gcc to check arguments to + variable argument functions. + +-- gg - comm.c, utils.h: Move mud_time_to_secs() prototype. + +7/11/2001 + +-- gg - comm.c: Must not ever do function calls from an interrupt + handler without making sure every function they call are + reentrant. Think of the server as multi-threaded for it. + +7/24/2001 + +-- gg - db.c: Remove useless 'rec_count' increment. + +7/26/2001 + +-- gg - handler.c: extract_pending_chars(): Avoid free()'d memory + when a chain of people die. + +-- gg - comm.c, db.c: Save MUD time every 30 minutes and at + shutdown using save_mud_time(). + +8/2/2001 + +-- gg - comm.c: new_descriptor(): Useless memset() removed. + +8/14/2001 + +-- gg - act.informative.c: show_obj_to_char(): Die! Die! Die! + All callers updated to new SHOW_OBJ_{LONG,SHORT,ACTION} + mode parameters. + show_obj_modifiers(): Split out of show_obj_to_char() + for stuff like "(invisible)" and "humming sound." + act.comm.c, structs.h: MAX_NOTE_LENGTH moved. + +-- gg - Released patchlevel 19. Index: circle/FAQ diff -u circle/FAQ:1.13 circle/FAQ:1.14 --- circle/FAQ:1.13 Sat Dec 2 07:52:44 2000 +++ circle/FAQ Wed May 16 09:47:50 2001 @@ -159,7 +159,7 @@ 6. CircleMUD 3.0 Questions - 6.1 Are there any bugs in patch level 16? + 6.1 Are there any bugs in patch level 18? 6.2 How do I access Online Creation? @@ -277,7 +277,8 @@ The latest full release of Circle is 2.20, released on November 17, 1993. -Currently 3.0 is in beta, at patch level 16, released on August 28, 1999. +Currently 3.0 is in beta, at patch level 18, released on March 18, 2001 +(3/18/2001, get it?). 1.5. What is the history of CircleMUD? @@ -289,7 +290,7 @@ o Version 2.11: September 19, 1993 o Version 2.20: November 17, 1993 -Version 3.00 is currently in beta right now and is up to patchlevel 16. The +Version 3.00 is currently in beta right now and is up to patchlevel 18. The final release is due out Real Soon Now(tm). Don't bother posting requests for it. It will be out when Jeremy gets it done, and it will be announced on the mailing list and the newsgroup rec.games.mud.diku. @@ -1140,7 +1141,7 @@ In /etc/rc.d/rc.local find where things like sendmail and (maybe) gpm are started. Add something like: -cd /home/mudlogin/circlebpl16/ +cd /home/mudlogin/circlebpl18/ su mudlogin -c ./autorun & cd @@ -1250,7 +1251,7 @@ 6. CircleMUD 3.0 Questions -6.1. Are there any bugs in patch level 16? +6.1. Are there any bugs in patch level 18? There are no bugs. Only features. Seriously though, if perchance you find a bug, please mail it (along with a possible fix) to the bugs database Index: circle/autorun diff -u circle/autorun:1.3 circle/autorun:1.5 --- circle/autorun:1.3 Wed Aug 26 15:55:03 1998 +++ circle/autorun Tue Jun 26 04:28:42 2001 @@ -2,6 +2,7 @@ # # CircleMUD 3.0 autorun script # Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson +# New log rotating code contributed by Peter Ajamian # Copyright (c) 1996 The Trustees of The Johns Hopkins University # All Rights Reserved # See license.doc for more information @@ -38,43 +39,112 @@ # of all flags). FLAGS='-q' +# Number of syslog.# files to keep in the log directory. +BACKLOGS=6 + +# Each record in the following variable contains information for one log file. +# The fields are filename:maxlines:pattern where filename is the name of the +# log file, maxlines is the maximum number of lines in the file (0 for +# unlimited) and pattern is a pattern which must be matched for a line to get +# copied from syslog to this log file. +LOGFILES=' +delete:0:self-delete +dts:0:death trap +rip:0:killed +restarts:0:Running +levels:0:advanced +rentgone:0:equipment lost +usage:0:usage +newplayers:0:new player +errors:0:SYSERR +godcmds:0:(GC) +badpws:0:Bad PW +' + +# The following is the number of lines in syslog.CRASH. Set to 0 to disable +# crashlogs. +LEN_CRASHLOG=30 + ############################################################################# +############# +# Functions # +############# + +# The proc_syslog function will grep the logs for the various different info +# and rotate the logs in the log directory. +proc_syslog () { + # Return if there's no syslog + if ! [ -s syslog ]; then return; fi + + # Create the crashlog + if [ -n "$LEN_CRASHLOG" -a "$LEN_CRASHLOG" -gt 0 ]; then + tail -n $LEN_CRASHLOG syslog > syslog.CRASH + fi + + # Append to the specialty logfiles and truncate to maximum length if + # applicable + OLD_IFS=$IFS + IFS=' +' + for rec in $LOGFILES; do + name=log/`echo $rec|cut -f 1 -d:` + len=`echo $rec|cut -f 2 -d:` + pattern=`echo $rec|cut -f 3- -d:` + + fgrep $pattern syslog >> $name + if [ $len -gt 0 ]; then + temp=`mktemp $name.XXXXXX` + tail -n $len $name > $temp + mv -f $temp $name + fi + done + IFS=$OLD_IFS + + # Find the # to set the new log file to. + if [ -s log/syslog.$BACKLOGS ]; then + declare -i newlog=$BACKLOGS+1 + else + declare -i newlog=1 + while [ -s log/syslog.$newlog ]; do newlog=$newlog+1; done + fi + + # Rotate the logs. + declare -i y=2 + while [ $y -lt $newlog ]; do + declare -i x=$y-1 + mv -f log/syslog.$y log/syslog.$x + y=$y+1 + done + mv -f syslog log/syslog.$newlog +} + + +######## +# Main # +######## + +# Check to see if there is a syslog which would indicate that autorun +# was improperly killed (ie maybe the system was rebooted or ?). +if [ -s syslog ]; then + echo Improper shutdown of autorun detected, rotating syslogs before startup. >> syslog + proc_syslog +fi + +# The main loop while ( : ) do DATE=`date` - echo "autorun starting game $DATE" >> syslog + echo "autorun starting game $DATE" > syslog echo "running bin/circle $FLAGS $PORT" >> syslog bin/circle $FLAGS $PORT >> syslog 2>&1 - tail -30 syslog > syslog.CRASH - - fgrep "self-delete" syslog >> log/delete - fgrep "death trap" syslog >> log/dts - fgrep "killed" syslog >> log/rip - fgrep "Running" syslog >> log/restarts - fgrep "advanced" syslog >> log/levels - fgrep "equipment lost" syslog >> log/rentgone - fgrep "usage" syslog >> log/usage - fgrep "new player" syslog >> log/newplayers - fgrep "SYSERR" syslog >> log/errors - fgrep "(GC)" syslog >> log/godcmds - fgrep "Bad PW" syslog >> log/badpws - - rm log/syslog.1 - mv log/syslog.2 log/syslog.1 - mv log/syslog.3 log/syslog.2 - mv log/syslog.4 log/syslog.3 - mv log/syslog.5 log/syslog.4 - mv log/syslog.6 log/syslog.5 - mv syslog log/syslog.6 - touch syslog - if [ -r .killscript ]; then DATE=`date`; echo "autoscript killed $DATE" >> syslog rm .killscript + proc_syslog exit fi @@ -82,11 +152,13 @@ sleep 60 else rm .fastboot - sleep 5 fi while [ -r pause ]; do sleep 60 done + + proc_syslog + sleep 5 done Index: circle/autorun.README diff -u /dev/null circle/autorun.README:1.1 --- /dev/null Tue Aug 14 21:55:15 2001 +++ circle/autorun.README Mon Jun 25 11:28:38 2001 @@ -0,0 +1,29 @@ +From: Peter Ajamian + +This is something I did a few weeks ago but didn't get around to +submitting it until now. Basically There have always been a few things +about the autorun script which have always irked me, this "improved" +version is my attempt to correct those deficiencies as well as to add a +little bit of extra functionality to the script. The script addresses +the following deficiencies: +- syslog rotation: When a new MUD is started an error is produced + during the syslog rotation after the first 6 times the MUD is run. This + is because there is no check for the existance of the files being + rotated. +- autorun crashes append to log instead of rotating: If autorun crashes, + or is manually killed, or a server reboot is done without first shutting + down the MUD then the new syslog will continue to append to the old one + instead of rotating the syslogs and starting a fresh one. This is + because the syslogs are currently rotated only _after_ the mud is + properly shut down. To correct for this I have allowed for syslog + rotation before the MUD boots as well. Also this script will detect + improper shutdown of autorun and make a note in the syslog before + rotating them. +- Better customization of grep-generated logs: Various options have been + added to the autorun script to allow for easy customization of + grep-generated logs. See the comments in the script for details. + +You may want to do some compatibility testing on varying platforms +because this uses various commands that were are not present in the +current autorun (cut, mktemp, and maybe others I can't think of now). +This script also uses functions. Index: circle/autorun.sh diff -u /dev/null circle/autorun.sh:1.1 --- /dev/null Tue Aug 14 21:55:15 2001 +++ circle/autorun.sh Mon Jun 25 11:28:38 2001 @@ -0,0 +1,92 @@ +#!/bin/sh +# +# CircleMUD 3.0 autorun script +# Contributions by Fred Merkel, Stuart Lamble, and Jeremy Elson +# Copyright (c) 1996 The Trustees of The Johns Hopkins University +# All Rights Reserved +# See license.doc for more information +# +############################################################################# +# +# This script can be used to run CircleMUD over and over again (i.e., have it +# automatically reboot if it crashes). It will run the game, and copy some +# of the more useful information from the system logs to the 'log' directory +# for safe keeping. +# +# You can control the operation of this script by creating and deleting files +# in Circle's root directory, either manually or by using the 'shutdown' +# command from within the MUD. +# +# Creating a file called .fastboot makes the script wait only 5 seconds +# between reboot attempts instead of the usual 60. If you want a quick +# reboot, use the "shutdown reboot" command from within the MUD. +# +# Creating a file called .killscript makes the script terminate (i.e., stop +# rebooting the MUD). If you want to shut down the MUD and make it stay +# shut down, use the "shutdown die" command from within the MUD. +# +# Finally, if a file called pause exists, the script will not reboot the MUD +# again until pause is removed. This is useful if you want to turn the MUD +# off for a couple of minutes and then bring it back up without killing the +# script. Type "shutdown pause" from within the MUD to activate this feature. +# + +# The port on which to run the MUD +PORT=4000 + +# Default flags to pass to the MUD server (see admin.txt for a description +# of all flags). +FLAGS='-q' + +############################################################################# + +while ( : ) do + + DATE=`date` + echo "autorun starting game $DATE" >> syslog + echo "running bin/circle $FLAGS $PORT" >> syslog + + bin/circle $FLAGS $PORT >> syslog 2>&1 + + tail -30 syslog > syslog.CRASH + + fgrep "self-delete" syslog >> log/delete + fgrep "death trap" syslog >> log/dts + fgrep "killed" syslog >> log/rip + fgrep "Running" syslog >> log/restarts + fgrep "advanced" syslog >> log/levels + fgrep "equipment lost" syslog >> log/rentgone + fgrep "usage" syslog >> log/usage + fgrep "new player" syslog >> log/newplayers + fgrep "SYSERR" syslog >> log/errors + fgrep "(GC)" syslog >> log/godcmds + fgrep "Bad PW" syslog >> log/badpws + + rm log/syslog.1 + mv log/syslog.2 log/syslog.1 + mv log/syslog.3 log/syslog.2 + mv log/syslog.4 log/syslog.3 + mv log/syslog.5 log/syslog.4 + mv log/syslog.6 log/syslog.5 + mv syslog log/syslog.6 + touch syslog + + if [ -r .killscript ]; then + DATE=`date`; + echo "autoscript killed $DATE" >> syslog + rm .killscript + exit + fi + + if [ ! -r .fastboot ]; then + sleep 60 + else + rm .fastboot + sleep 5 + fi + + while [ -r pause ]; do + sleep 60 + done + +done Index: circle/doc/README.BORLAND diff -u circle/doc/README.BORLAND:1.2 circle/doc/README.BORLAND:1.3 --- circle/doc/README.BORLAND:1.2 Wed Oct 28 17:17:41 1998 +++ circle/doc/README.BORLAND Thu May 24 05:37:10 2001 @@ -8,7 +8,8 @@ These instructions will not work using Turbo C++, or the 4.0 versions of Borland C++ as those two products were geared twoards DOS and Windows 3.xx. -It will most likely work with versions 5.00 and 5.02 of Borland C++ compilers. +It will most likely work with versions 5.00, 5.02, and 5.5 of the Borland +C++ compilers. Boot up your Windows 95 machine. @@ -18,16 +19,29 @@ (Type) rename conf.h.win conf.h (Enter) +** BORLAND 5.5 ** +If you are using Borland C++ 5.5, a couple of extra changes need to be +made at this time. First you have to make sure the bin directory of the +tools is in your path. You can add the following line to your autoexec.bat +to have it automatically added to your path or you can type it at a DOS +prompt: + path = %path%;c:\borland\bcc55\bin + +(Type) make -fmakefile.bcc55 (Enter) + +** BORLAND 5.1 ** (Type) make -fmakefile.bcc (Enter) - Something to note here is that this makefile - assumes that you have installed Borland C++ 5.01 +** End Version Specifics ** + + Something to note here is that these makefile + assume that you have installed Borland C++ 5.x to the C: drive. If you have installed it to - another drive you will have to open up - Makefile.bcc in a text editor and find and - replace all C:\ references to the drive letter - it has been installed to. - + another drive you will have to open up the correct + Makefile in a text editor and find and replace + all C:\ references to the drive letter it has + been installed to. + (Type) move circle.exe ..\ (Enter) (Type) cd .. (Enter) @@ -48,4 +62,5 @@ Pat yourself on the back. --- -Mundi King 98-07-03 +Mundi King 1998-07-03 +Updated for 5.5: 2000-06-28 Index: circle/doc/README.CYGWIN diff -u circle/doc/README.CYGWIN:1.4 circle/doc/README.CYGWIN:1.5 --- circle/doc/README.CYGWIN:1.4 Sun Jan 23 19:44:18 2000 +++ circle/doc/README.CYGWIN Sun Mar 18 19:39:25 2001 @@ -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 (circle30bpl18.zip, or example), that you use an unzip + "zipped" version (circle30bpl19.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 - (circle30bpl18.tar.gz), and extract the files using the versions of tar and + (circle30bpl19.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:\circle30bpl18", or "/circle30bpl18" from + CircleMUD (we will assume "C:\circle30bpl19", or "/circle30bpl19" 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 /circle30bpl18/src directory, and type "make", and watch +6) NOW change to the /circle30bpl19/src directory, and type "make", and watch CircleMUD and the additional utilies included in the Circle distribution - automatically being compiled and placed in /circle30bpl18/bin. + automatically being compiled and placed in /circle30bpl19/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 /circle30bpl18, and run the MUD either directly by typing +8) Go back to /circle30bpl19, 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 /circle30bpl18/doc directory, try reading the CircleMUD FAQ at +in the /circle30bpl19/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.WIN diff -u circle/doc/README.WIN:1.6 circle/doc/README.WIN:1.7 --- circle/doc/README.WIN:1.6 Sun Aug 22 15:56:50 1999 +++ circle/doc/README.WIN Wed May 9 05:44:04 2001 @@ -19,6 +19,8 @@ compiler, you can just download this one off the net and get Circle up and running in no time. Read the file README.CYGWIN (submitted by David Goldstein ). + Please note however that the CYGWIN system is not recommended + for those unfamiliar with the Unix environment. 2. Microsoft Visual C++ version 4.x -- read the file README.MSVC4 Index: circle/doc/building.txt diff -u circle/doc/building.txt:1.1 circle/doc/building.txt:1.3 --- circle/doc/building.txt:1.1 Tue Oct 28 21:16:10 1997 +++ circle/doc/building.txt Tue Aug 14 21:49:06 2001 @@ -1568,7 +1568,7 @@ ______________________________________________________________________ # ~ - + {zero or more zone commands} S ______________________________________________________________________ @@ -1588,11 +1588,14 @@ A label given to the zone so that it can be identified in system logs. + Bottom Room Number + The lowest numbered room belonging to this zone. For zone N, + this should be a larger number than TopRoom(zone N-1). + Top Room Number The highest numbered room belonging to this zone. A room with - virtual number V belongs to zone N if TopRoom(zone N-1) < V <= - TopRoom(zone N) for all N > 0. Rooms belong to zone 0 if their - number is between 0 and the top of zone 0. + virtual number V belongs to zone N if BottomRoom(zone N) <= V <= + TopRoom(zone N) for all N > 0. Lifespan The number of real-time minutes between zone resets for this Index: circle/doc/coding.doc diff -u circle/doc/coding.doc:1.1.1.1 circle/doc/coding.doc:1.3 --- circle/doc/coding.doc:1.1.1.1 Tue Feb 6 12:24:02 1996 +++ circle/doc/coding.doc Thu May 17 07:50:51 2001 @@ -13,9 +13,9 @@ Summary: A guide to writing C code for use with CircleMUD. Includes a description of commonly used functions, tips on how to add new commands and -spells, and other commonly asked coding questions. Good familiarity with both -C and UNIX is assumed, although system-level UNIX C programming skill not -required. +spells, and other commonly asked coding questions. Good familiarity with +both C and UNIX is assumed, although system-level UNIX C programming skill +not required. Area-building not covered (see building.doc). Intended Audience: @@ -48,6 +48,8 @@ 4.4. The Special Procedure Function Header 4.5. The Special Procedure Return Value +Note: Section 4 written by Luis Pedro Passos Carvalho + --------------------------------------------------------------------------- @@ -292,7 +294,6 @@ practical code examples. - 2.2. The Way Things Work -- Overview 2.3. CircleMUD's Global Variables 2.4. Frequently Used Functions @@ -309,8 +310,123 @@ 4. Writing Special Procedures + + Special procedures are the way to give life to your world. Through +special procedures you can, for instance, make Mobiles react to player +actions, fight inteligently,etc. + Using special procedures, your virtual world is not just a bunch of +monsters, objects and rooms, reduced to a number of statistics. Just like +good descriptions add atmosphere to the world, good use of special +procedures adds flesh and life to the world. + Several special procedures are provided with stock CircleMud which you +can use to create your own and get used to the mechanics of special +procedures. These special procedures can be found in castle.c and +spec_procs.c. They range from very simple procedures, like puff (pulsed +special procedure) or bank (command-driven special procedure), to very +complex procedures like the guildmaster. + In this chapter, false refers to the value 0 and true to any non-zero +value. + 4.1. Overview of Special Procedures -4.2. Pulsed vs. Command-Drive Special Procedures + + Special procedures are nothing more than C functions, which are +associated to mobiles, objects and rooms. + In the standard version of CircleMUD, special procedures are defined +and assigned at compile time and cannot be changed or reassigned during +runtime. + +4.2. Pulsed vs. Command-Driven Special Procedures + + Special procedures are called at three points in code: the command +interpreter (command-driven special procedures), the game heartbeat and the +violence code (pulsed special procedures). + There is no information kept to know if the special procedure is +pulsed or command-driven, other than the behaviour of the special procedure +itself. When creating a special procedure you must keep in mind that it will +be called in each of the three places and must therefore be prepared to react +to all situations accordingly. + In the next two sub-sections we will present both types of special +procedures, and in the third sub-section we'll explain how to diferentiate +the three types of call. + +4.2.1. Pulsed Special Procedures + + Every tick, the function heartbeat goes through the list of mobiles +and the list of objects, updating everyone of them. If a mobile or an object +as a special procedure associated to it, that special procedure is run with +the parameters cmd and argument set to 0 and NULL respectively. The NULL +used to be sent as an empty string (""), but this was changed in 3.0bpl19. + When there is a fight, the special procedure of a fighting mobile is +called once per round with the same arguments. + +4.2.2. Command Driven Special Procedures + + Whenever a player issues a command, the command interpreter tries to +identify it in the Master Command Table. If it succeeds, before running the +command associated in the table, it checks for special procedures in the +following order: + * room the player is in; + * objects in the player's equipment (does not enter the containers); + * objects in the player's inventory (does not enter the containers); + * mobiles in the room; + * objects in the room floor; + The first special procedure to succeed and return true finishes the +interpreting of the command. + If no special procedure returned true or no special procedure was +found, then the command interpreter runs the procedure specified in the +Master Command Table. + +4.2.3. Preparing for all occurrences + + In order to make your special procedure react accordingly to all the +different places where the special procedure can be called you need to +distinguish those places. The way to do it is through the parameters. + Whenever cmd is 0, the special procedure has been called as a pulsed +special procedure, otherwise it's a command-driven special procedure. + To detect if the procedure was called through the violence code, it +is a pulsed special procedure and IS_FIGHTING(me) must be true. Of course, +this only has meaning for a mobile special procedure. + 4.3. Relating Special Procedures to Objects, Mobiles, and Rooms + + The special procedures are assigned to the prototypes of the objects +and mobiles, not to the instances themselves. There are functions provided +to assign the special procedures: + * ASSIGNMOB(,) + * ASSIGNOBJ(,) + * ASSIGNROOM(,) + Stock CircleMUD also provides a place where to put all the special +procedure assignments: the functions assign_mobiles, assign_objects and +assign_rooms in spec_assign.c. + 4.4. The Special Procedure Function Header + + The function header of any special procedure is defined in the macro +SPECIAL() and is as follows: + int ()(struct char_data *ch, void *me, int cmd, char *argument) +where is the name of the special procedure. + The parameters to the function are: + ch : Character that issued the command to command interpreter that + triggered this special procedure. + me : The mobile, object or room to which the special procedure is + given. + cmd : The command that ch issued as recognized by the command + interpreter, or zero if the special procedure is being called + by the pulse code. + argument : The command that the played has introduced at the prompt + or an empty string if the special procedure is being + called by the pulse code. + 4.5. The Special Procedure Return Value + + The return value of a special procedure is looked at only by the +command interpreter and has meaning only for command-driven special +procedures. Pulsed special procedures should always return false. + A command-driven special procedure can return two values: + false : The procedure did not process the command given and it + should be processed in the standard way by the command + interpreter. + true : The procedure reacted to the command given and so, the + command interpreter should ignore it. + + Index: circle/lib/etc/.cvsignore diff -u circle/lib/etc/.cvsignore:1.2 circle/lib/etc/.cvsignore:1.4 --- circle/lib/etc/.cvsignore:1.2 Tue Jun 30 21:35:54 1998 +++ circle/lib/etc/.cvsignore Tue Aug 14 18:02:14 2001 @@ -1,2 +1,5 @@ +hcontrol players plrmail +badsites +board.immort Index: circle/lib/world/zone.lst diff -u circle/lib/world/zone.lst:1.2 circle/lib/world/zone.lst:1.3 --- circle/lib/world/zone.lst:1.2 Tue Oct 28 21:16:13 1997 +++ circle/lib/world/zone.lst Fri May 18 11:41:09 2001 @@ -2,11 +2,11 @@ ************** 0 - Limbo - Internal 54 - New Thalos -9 - The River Island 55 - New Thalos -12 - God Simplex 56 - New Thalos Wilderness +9 - The River Island 55 - New Thalos (Cont) +12 - God Simplex 56 - New Thalos (Cont) 15 - The Straight Path 60 - Haon-Dor-Light Forest 25 - High Tower Of Sorcery 61 - Haon-Dor-Dark Forest -26 - High Tower Of Sorcery 62 - Orc Enclave +26 - High Tower Of Sorcery (Cont) 62 - Orc Enclave 30 - Midgaard City 63 - Arachnos 31 - Midgaard City 64 - Rand's Tower 32 - Midgaard River 65 - Dwarven Kingdom @@ -14,7 +14,7 @@ 35 - Miden'nir 71 - Sewers 36 - Chessboard 72 - Sewers 40 - Moria 73 - Sewers -41 - Moria 79 - Redferne's Residence +41 - Moria (Cont) 79 - Redferne's Residence 50 - Great Eastern Desert 120 - Rome 51 - Drow City 150 - King Welmar's Castle 52 - Old Thalos 186 - Newbie Zone Index: circle/lib/world/wld/186.wld diff -u circle/lib/world/wld/186.wld:1.2 circle/lib/world/wld/186.wld:1.3 --- circle/lib/world/wld/186.wld:1.2 Fri Dec 15 17:44:07 2000 +++ circle/lib/world/wld/186.wld Fri May 18 11:15:41 2001 @@ -868,5 +868,4 @@ They are constructed of smooth, beautiful marble. ~ S - $ Index: circle/lib/world/wld/25.wld diff -u circle/lib/world/wld/25.wld:1.2 circle/lib/world/wld/25.wld:1.3 --- circle/lib/world/wld/25.wld:1.2 Sun Dec 17 06:23:50 2000 +++ circle/lib/world/wld/25.wld Fri May 18 11:15:42 2001 @@ -3323,5 +3323,4 @@ ~ 0 -1 3001 S - $ Index: circle/lib/world/wld/33.wld diff -u circle/lib/world/wld/33.wld:1.1.1.1 circle/lib/world/wld/33.wld:1.2 --- circle/lib/world/wld/33.wld:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/wld/33.wld Fri May 18 11:15:42 2001 @@ -1526,4 +1526,3 @@ 0 -1 3374 S $ - Index: circle/lib/world/wld/36.wld diff -u circle/lib/world/wld/36.wld:1.1.1.1 circle/lib/world/wld/36.wld:1.2 --- circle/lib/world/wld/36.wld:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/wld/36.wld Fri May 18 11:15:42 2001 @@ -1594,5 +1594,4 @@ marble square~ 2 3615 3660 S - $ Index: circle/lib/world/wld/40.wld diff -u circle/lib/world/wld/40.wld:1.1.1.1 circle/lib/world/wld/40.wld:1.2 --- circle/lib/world/wld/40.wld:1.1.1.1 Sat Apr 13 17:07:30 1996 +++ circle/lib/world/wld/40.wld Fri May 18 11:15:42 2001 @@ -1916,4 +1916,3 @@ 0 -1 4118 S $ - Index: circle/lib/world/wld/50.wld diff -u circle/lib/world/wld/50.wld:1.3 circle/lib/world/wld/50.wld:1.4 --- circle/lib/world/wld/50.wld:1.3 Mon Dec 4 05:12:00 2000 +++ circle/lib/world/wld/50.wld Fri May 18 11:15:42 2001 @@ -1481,4 +1481,3 @@ 0 -1 5009 S $ - Index: circle/lib/world/wld/53.wld diff -u circle/lib/world/wld/53.wld:1.1.1.1 circle/lib/world/wld/53.wld:1.2 --- circle/lib/world/wld/53.wld:1.1.1.1 Sat Apr 13 17:07:30 1996 +++ circle/lib/world/wld/53.wld Fri May 18 11:15:42 2001 @@ -1463,4 +1463,3 @@ 0 -1 5358 S $~ - Index: circle/lib/world/wld/54.wld diff -u circle/lib/world/wld/54.wld:1.2 circle/lib/world/wld/54.wld:1.3 --- circle/lib/world/wld/54.wld:1.2 Tue Oct 28 21:16:16 1997 +++ circle/lib/world/wld/54.wld Fri May 18 11:15:42 2001 @@ -5164,5 +5164,4 @@ grate~ 1 -1 5698 S - $ Index: circle/lib/world/wld/62.wld diff -u circle/lib/world/wld/62.wld:1.1.1.1 circle/lib/world/wld/62.wld:1.2 --- circle/lib/world/wld/62.wld:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/wld/62.wld Fri May 18 11:15:42 2001 @@ -1484,4 +1484,3 @@ 1 6200 6266 S $ - Index: circle/lib/world/wld/64.wld diff -u circle/lib/world/wld/64.wld:1.1.1.1 circle/lib/world/wld/64.wld:1.2 --- circle/lib/world/wld/64.wld:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/wld/64.wld Fri May 18 11:15:42 2001 @@ -843,4 +843,3 @@ 0 -1 6444 S $ - Index: circle/lib/world/zon/0.zon diff -u circle/lib/world/zon/0.zon:1.3 circle/lib/world/zon/0.zon:1.4 --- circle/lib/world/zon/0.zon:1.3 Sat Dec 2 07:58:12 2000 +++ circle/lib/world/zon/0.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #0 Limbo - Internal~ -99 10 2 +0 99 10 2 * * Mobiles M 0 1 1 1 Puff Index: circle/lib/world/zon/12.zon diff -u circle/lib/world/zon/12.zon:1.1.1.1 circle/lib/world/zon/12.zon:1.2 --- circle/lib/world/zon/12.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/12.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #12 God Simplex~ -1299 10 2 +1200 1299 10 2 * * Edited and added to by Taz of Tazmania * Index: circle/lib/world/zon/120.zon diff -u circle/lib/world/zon/120.zon:1.1.1.1 circle/lib/world/zon/120.zon:1.2 --- circle/lib/world/zon/120.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/120.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #120 Rome~ -12099 45 2 +12000 12099 45 2 * * Created by Onivel of Jedi * Index: circle/lib/world/zon/15.zon diff -u circle/lib/world/zon/15.zon:1.2 circle/lib/world/zon/15.zon:1.3 --- circle/lib/world/zon/15.zon:1.2 Sat Dec 2 07:58:12 2000 +++ circle/lib/world/zon/15.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #15 The Straight Path~ -1599 10 2 +1500 1599 10 2 * * By Steppin, Originally For ChicagoMUD 4-94 * Hopefully Final Version For JediMUD 12-95 Index: circle/lib/world/zon/150.zon diff -u circle/lib/world/zon/150.zon:1.2 circle/lib/world/zon/150.zon:1.3 --- circle/lib/world/zon/150.zon:1.2 Tue Oct 28 21:16:16 1997 +++ circle/lib/world/zon/150.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #150 King Welmar's Castle~ -15099 120 2 +15000 15099 120 2 * * Created by Pjotr and Sapowox of CircleMUD * Index: circle/lib/world/zon/186.zon diff -u circle/lib/world/zon/186.zon:1.1.1.1 circle/lib/world/zon/186.zon:1.2 --- circle/lib/world/zon/186.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/186.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #186 Newbie Zone~ -18699 10 2 +18600 18699 10 2 * * Created by Maynard of StrangeMUD * Index: circle/lib/world/zon/25.zon diff -u circle/lib/world/zon/25.zon:1.2 circle/lib/world/zon/25.zon:1.3 --- circle/lib/world/zon/25.zon:1.2 Sat Dec 2 07:58:12 2000 +++ circle/lib/world/zon/25.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #25 The High Tower Of Magic~ -2699 20 2 +2500 2699 20 2 * * Created for SillyMUD by Skylar * Index: circle/lib/world/zon/26.zon diff -u circle/lib/world/zon/26.zon:1.1.1.1 circle/lib/world/zon/26.zon:removed --- circle/lib/world/zon/26.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/26.zon Tue Aug 14 21:55:15 2001 @@ -1,9 +0,0 @@ -#26 -The High Tower Of Magic II~ -2699 0 0 -* -* This may be an empty zone file, but don't use the zone since the -* world and objects files are already in use. (= -* -S -$ Index: circle/lib/world/zon/30.zon diff -u circle/lib/world/zon/30.zon:1.1.1.1 circle/lib/world/zon/30.zon:1.2 --- circle/lib/world/zon/30.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/30.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #30 Northern Midgaard Main City~ -3099 15 2 +3000 3099 15 2 * * Mobiles M 0 3000 1 3033 Wizard Shop Keeper Index: circle/lib/world/zon/31.zon diff -u circle/lib/world/zon/31.zon:1.2 circle/lib/world/zon/31.zon:1.3 --- circle/lib/world/zon/31.zon:1.2 Sat Dec 2 07:47:04 2000 +++ circle/lib/world/zon/31.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #31 Southern part of Midgaard~ -3299 40 2 +3100 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.3 circle/lib/world/zon/33.zon:1.4 --- circle/lib/world/zon/33.zon:1.3 Sat Dec 2 07:47:04 2000 +++ circle/lib/world/zon/33.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #33 The Three Of Swords~ -3399 30 2 +3300 3399 30 2 * * Created by Amanda Eterniale & Builder_5 of C.A.W. * Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ Index: circle/lib/world/zon/35.zon diff -u circle/lib/world/zon/35.zon:1.1.1.1 circle/lib/world/zon/35.zon:1.2 --- circle/lib/world/zon/35.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/35.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #35 Miden'Nir~ -3599 60 2 +3500 3599 60 2 * * Created by Copper II DikuMUD * Index: circle/lib/world/zon/36.zon diff -u circle/lib/world/zon/36.zon:1.1.1.1 circle/lib/world/zon/36.zon:1.2 --- circle/lib/world/zon/36.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/36.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #36 The Chessboard of Midgaard~ -3699 10 1 +3600 3699 10 1 * * Created for SillyMud by Exxon * Index: circle/lib/world/zon/40.zon diff -u circle/lib/world/zon/40.zon:1.3 circle/lib/world/zon/40.zon:1.5 --- circle/lib/world/zon/40.zon:1.3 Tue Feb 13 05:08:35 2001 +++ circle/lib/world/zon/40.zon Fri May 18 11:39:18 2001 @@ -1,6 +1,6 @@ #40 -Moria, Levels 1-2~ -4199 20 2 +Mines of Moria~ +4000 4198 20 2 * * Created for DikuMud * Heavily rewritten descriptions for CircleMud by Furry Index: circle/lib/world/zon/41.zon diff -u circle/lib/world/zon/41.zon:1.1.1.1 circle/lib/world/zon/41.zon:removed --- circle/lib/world/zon/41.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/41.zon Tue Aug 14 21:55:15 2001 @@ -1,9 +0,0 @@ -#41 -Moria, Level 3~ -4199 0 0 -* -* This may be an empty zone file, but don't use the zone since the -* world and objects files are already in use. (= -* -S -$ Index: circle/lib/world/zon/50.zon diff -u circle/lib/world/zon/50.zon:1.2 circle/lib/world/zon/50.zon:1.3 --- circle/lib/world/zon/50.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/50.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #50 The Great Eastern Desert~ -5099 30 2 +5000 5099 30 2 * * Created by Rorschach of Alfa * Index: circle/lib/world/zon/51.zon diff -u circle/lib/world/zon/51.zon:1.2 circle/lib/world/zon/51.zon:1.3 --- circle/lib/world/zon/51.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/51.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #51 Drow City~ -5199 30 1 +5100 5199 30 1 * * Created by Rorschach of Alfa * Index: circle/lib/world/zon/52.zon diff -u circle/lib/world/zon/52.zon:1.2 circle/lib/world/zon/52.zon:1.3 --- circle/lib/world/zon/52.zon:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/52.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #52 The City Of Thalos~ -5299 15 2 +5200 5299 15 2 * * Created by Rorschach of Alfa * Index: circle/lib/world/zon/53.zon diff -u circle/lib/world/zon/53.zon:1.1.1.1 circle/lib/world/zon/53.zon:1.2 --- circle/lib/world/zon/53.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/53.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #53 The Great Pyramid~ -5399 20 2 +5300 5399 20 2 * * Created by Andersen of HexOynx. * Index: circle/lib/world/zon/54.zon diff -u circle/lib/world/zon/54.zon:1.3 circle/lib/world/zon/54.zon:1.4 --- circle/lib/world/zon/54.zon:1.3 Sat Dec 2 07:58:12 2000 +++ circle/lib/world/zon/54.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #54 New Thalos~ -5699 20 2 +5400 5699 20 2 * * Created by Duke and Conner of SillyMud * Index: circle/lib/world/zon/55.zon diff -u circle/lib/world/zon/55.zon:1.1.1.1 circle/lib/world/zon/55.zon:removed --- circle/lib/world/zon/55.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/55.zon Tue Aug 14 21:55:15 2001 @@ -1,9 +0,0 @@ -#55 -New Thalos, Continued~ -5699 0 0 -* -* This may be an empty zone file, but don't use the zone since the -* world and objects files are already in use. (= -* -S -$ Index: circle/lib/world/zon/56.zon diff -u circle/lib/world/zon/56.zon:1.1.1.1 circle/lib/world/zon/56.zon:removed --- circle/lib/world/zon/56.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/56.zon Tue Aug 14 21:55:15 2001 @@ -1,9 +0,0 @@ -#56 -New Thalos Wilderness~ -5699 0 0 -* -* This may be an empty zone file, but don't use the zone since the -* world and objects files are already in use. (= -* -S -$ Index: circle/lib/world/zon/60.zon diff -u circle/lib/world/zon/60.zon:1.1.1.1 circle/lib/world/zon/60.zon:1.2 --- circle/lib/world/zon/60.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/60.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #60 Haon-Dor, Light Forest~ -6099 13 2 +6000 6099 13 2 * * Mobiles M 0 6000 1 6009 John The Lumberjack Index: circle/lib/world/zon/61.zon diff -u circle/lib/world/zon/61.zon:1.1.1.1 circle/lib/world/zon/61.zon:1.2 --- circle/lib/world/zon/61.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/61.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #61 Haon-Dor, Dark Forest~ -6199 30 2 +6100 6199 30 2 * Mobiles M 0 6100 2 6116 Vicious Warg M 0 6100 2 6116 Vicious Warg Index: circle/lib/world/zon/62.zon diff -u circle/lib/world/zon/62.zon:1.3 circle/lib/world/zon/62.zon:1.4 --- circle/lib/world/zon/62.zon:1.3 Sat Dec 2 07:47:04 2000 +++ circle/lib/world/zon/62.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #62 The Orc Enclave~ -6299 20 2 +6200 6299 20 2 * * Created by Builder_5 & Serene of C.A.W. * Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ Index: circle/lib/world/zon/63.zon diff -u circle/lib/world/zon/63.zon:1.1.1.1 circle/lib/world/zon/63.zon:1.2 --- circle/lib/world/zon/63.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/63.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #63 Arachnos~ -6399 34 2 +6300 6399 34 2 * * Created by Mahatma of HexOynx * Index: circle/lib/world/zon/64.zon diff -u circle/lib/world/zon/64.zon:1.3 circle/lib/world/zon/64.zon:1.4 --- circle/lib/world/zon/64.zon:1.3 Sat Dec 2 07:47:04 2000 +++ circle/lib/world/zon/64.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #64 Rand's Tower~ -6499 20 1 +6400 6499 20 1 * * Created by Amanda Eterniale of C.A.W. * Official C.A.W. site: http://qsilver.queensu.ca/~fletchra/Caw/ Index: circle/lib/world/zon/65.zon diff -u circle/lib/world/zon/65.zon:1.1.1.1 circle/lib/world/zon/65.zon:1.2 --- circle/lib/world/zon/65.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/65.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #65 The Dwarven Kingdom~ -6599 40 2 +6500 6599 40 2 * * Mobiles M 0 6500 11 6505 Dwarf Guard Index: circle/lib/world/zon/70.zon diff -u circle/lib/world/zon/70.zon:1.1.1.1 circle/lib/world/zon/70.zon:1.2 --- circle/lib/world/zon/70.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/70.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #70 The Sewer, First Level~ -7099 15 2 +7000 7099 15 2 * * Mobiles M 0 7001 9 7041 The Mean Bat Index: circle/lib/world/zon/71.zon diff -u circle/lib/world/zon/71.zon:1.1.1.1 circle/lib/world/zon/71.zon:1.2 --- circle/lib/world/zon/71.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/71.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #71 The Second Sewer~ -7199 20 2 +7100 7199 20 2 * * Mobiles M 0 7004 3 7102 The Earth Beetle Index: circle/lib/world/zon/72.zon diff -u circle/lib/world/zon/72.zon:1.1.1.1 circle/lib/world/zon/72.zon:1.2 --- circle/lib/world/zon/72.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/72.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #72 The Sewer Maze~ -7399 25 2 +7200 7299 25 2 * * Mobiles M 0 7200 1 7201 Master Mindflayer Index: circle/lib/world/zon/73.zon diff -u circle/lib/world/zon/73.zon:1.1.1.1 circle/lib/world/zon/73.zon:1.2 --- circle/lib/world/zon/73.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/73.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #73 The Tunnels In The Sewer~ -7399 25 2 +7300 7399 25 2 * * Mobiles M 0 7040 1 7328 The Red Dragon Index: circle/lib/world/zon/79.zon diff -u circle/lib/world/zon/79.zon:1.2 circle/lib/world/zon/79.zon:1.3 --- circle/lib/world/zon/79.zon:1.2 Thu Mar 30 12:35:28 2000 +++ circle/lib/world/zon/79.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #79 Redferne's Residence~ -7999 50 2 +7900 7999 50 2 * * Created for DikuMud * Index: circle/lib/world/zon/9.zon diff -u circle/lib/world/zon/9.zon:1.1.1.1 circle/lib/world/zon/9.zon:1.2 --- circle/lib/world/zon/9.zon:1.1.1.1 Sat Apr 13 17:07:31 1996 +++ circle/lib/world/zon/9.zon Fri May 18 11:12:57 2001 @@ -1,6 +1,6 @@ #9 River Island Of Minos~ -999 39 1 +900 999 39 1 * * Created by Mahatma of HexOynx * Index: circle/lib/world/zon/index diff -u circle/lib/world/zon/index:1.2 circle/lib/world/zon/index:1.3 --- circle/lib/world/zon/index:1.2 Tue Oct 28 21:16:17 1997 +++ circle/lib/world/zon/index Fri May 18 11:12:57 2001 @@ -3,21 +3,17 @@ 12.zon 15.zon 25.zon -26.zon 30.zon 31.zon 33.zon 35.zon 36.zon 40.zon -41.zon 50.zon 51.zon 52.zon 53.zon 54.zon -55.zon -56.zon 60.zon 61.zon 62.zon Index: circle/src/Makefile.bcc55 diff -u /dev/null circle/src/Makefile.bcc55:1.1 --- /dev/null Tue Aug 14 21:55:15 2001 +++ circle/src/Makefile.bcc55 Thu May 24 05:37:13 2001 @@ -0,0 +1,329 @@ +# For Borland C++ 5.5 +# +# Borland C++ IDE generated makefile +# Generated 12/26/97 at 5:04:53 AM +# +.AUTODEPEND + + +# +# Borland C++ tools +# +IMPLIB = Implib +BCC32 = Bcc32 +BCC32I = Bcc32i +TLINK32 = ILink32 +TLIB = TLib +BRC32 = Brc32 +TASM32 = Tasm32 +# +# IDE macros +# + + +# +# Options +# +IDE_LinkFLAGS32 = -LC:\BORLAND\BCC55\LIB +LinkerLocalOptsAtC32_circledexe = -Tpe -ap -c +ResLocalOptsAtC32_circledexe = +BLocalOptsAtC32_circledexe = +CompInheritOptsAt_circledexe = -IC:\BORLAND\BCC55\INCLUDE; +LinkerInheritOptsAt_circledexe = -x +LinkerOptsAt_circledexe = $(LinkerLocalOptsAtC32_circledexe) +ResOptsAt_circledexe = $(ResLocalOptsAtC32_circledexe) +BOptsAt_circledexe = $(BLocalOptsAtC32_circledexe) + +# +# Dependency List +# +Dep_circle = \ + circle.exe + +circle : BccW32.cfg $(Dep_circle) + echo MakeNode + +Dep_circledexe = \ + alias.obj\ + act.comm.obj\ + act.movement.obj\ + act.item.obj\ + act.informative.obj\ + act.offensive.obj\ + act.other.obj\ + boards.obj\ + ban.obj\ + act.wizard.obj\ + act.social.obj\ + castle.obj\ + class.obj\ + db.obj\ + constants.obj\ + config.obj\ + comm.obj\ + fight.obj\ + graph.obj\ + limits.obj\ + interpreter.obj\ + house.obj\ + handler.obj\ + magic.obj\ + mail.obj\ + olc.obj\ + objsave.obj\ + modify.obj\ + mobact.obj\ + random.obj\ + shop.obj\ + spells.obj\ + spell_parser.obj\ + spec_procs.obj\ + spec_assign.obj\ + utils.obj\ + weather.obj + +circle.exe : $(Dep_circledexe) + $(TLINK32) @&&| + /v $(IDE_LinkFLAGS32) $(LinkerOptsAt_circledexe) $(LinkerInheritOptsAt_circledexe) + +C:\BORLAND\BCC55\LIB\c0x32.obj+ +alias.obj+ +act.comm.obj+ +act.movement.obj+ +act.item.obj+ +act.informative.obj+ +act.offensive.obj+ +act.other.obj+ +boards.obj+ +ban.obj+ +act.wizard.obj+ +act.social.obj+ +castle.obj+ +class.obj+ +db.obj+ +constants.obj+ +config.obj+ +comm.obj+ +fight.obj+ +graph.obj+ +limits.obj+ +interpreter.obj+ +house.obj+ +handler.obj+ +magic.obj+ +mail.obj+ +olc.obj+ +objsave.obj+ +modify.obj+ +mobact.obj+ +random.obj+ +shop.obj+ +spells.obj+ +spell_parser.obj+ +spec_procs.obj+ +spec_assign.obj+ +utils.obj+ +weather.obj +$<,$* +C:\BORLAND\BCC55\LIB\import32.lib+ +C:\BORLAND\BCC55\LIB\cw32i.lib + +| +alias.obj : alias.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ alias.c +| + +act.comm.obj : act.comm.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.comm.c +| + +act.movement.obj : act.movement.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.movement.c +| + +act.item.obj : act.item.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.item.c +| + +act.informative.obj : act.informative.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.informative.c +| + +act.offensive.obj : act.offensive.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.offensive.c +| + +act.other.obj : act.other.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.other.c +| + +boards.obj : boards.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ boards.c +| + +ban.obj : ban.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ ban.c +| + +act.wizard.obj : act.wizard.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.wizard.c +| + +act.social.obj : act.social.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ act.social.c +| + +castle.obj : castle.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ castle.c +| + +class.obj : class.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ class.c +| + +db.obj : db.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ db.c +| + +constants.obj : constants.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ constants.c +| + +config.obj : config.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ config.c +| + +comm.obj : comm.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ comm.c +| + +fight.obj : fight.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ fight.c +| + +graph.obj : graph.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ graph.c +| + +limits.obj : limits.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ limits.c +| + +interpreter.obj : interpreter.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ interpreter.c +| + +house.obj : house.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ house.c +| + +handler.obj : handler.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ handler.c +| + +magic.obj : magic.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ magic.c +| + +mail.obj : mail.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mail.c +| + +olc.obj : olc.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ olc.c +| + +objsave.obj : objsave.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ objsave.c +| + +modify.obj : modify.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ modify.c +| + +mobact.obj : mobact.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ mobact.c +| + +random.obj : random.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ random.c +| + +shop.obj : shop.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ shop.c +| + +spells.obj : spells.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spells.c +| + +spell_parser.obj : spell_parser.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spell_parser.c +| + +spec_procs.obj : spec_procs.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_procs.c +| + +spec_assign.obj : spec_assign.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ spec_assign.c +| + +utils.obj : utils.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ utils.c +| + +weather.obj : weather.c + $(BCC32) -P- -c @&&| + $(CompOptsAt_circledexe) $(CompInheritOptsAt_circledexe) -o$@ weather.c +| + +# Compiler configuration file +BccW32.cfg : + Copy &&| +-w +-R +-v +-vi +-H +-H=circle.csm +-WC +-g0 +| $@ + + Index: circle/src/Makefile.in diff -u circle/src/Makefile.in:1.14 circle/src/Makefile.in:1.15 --- circle/src/Makefile.in:1.14 Thu Jan 25 16:38:56 2001 +++ circle/src/Makefile.in Tue May 8 11:35:49 2001 @@ -85,11 +85,11 @@ @echo Creating .h.html files... @for file in *.h ; do \ echo $$file ; \ - cat /home/jelson/mud/htmlh-head $$file /home/jelson/mud/htmlh-tail > doc/$$file.html ; \ + cat htmlh-head $$file htmlh-tail > doc/$$file.html ; \ done # Copy over to the html directory - cp doc/*.html /home/jelson/public_html/circle/cdp/cxref - chmod 644 /home/jelson/public_html/circle/cdp/cxref/*.html + #cp doc/*.html $(HOME)/www/cxref + #chmod 644 $(HOME)/www/cxref/*.html # Dependencies for the object files (automagically generated with # gcc -MM) Index: circle/src/Makefile.lcc diff -u circle/src/Makefile.lcc:1.6 circle/src/Makefile.lcc:1.7 --- circle/src/Makefile.lcc:1.6 Sun Jan 23 19:43:14 2000 +++ circle/src/Makefile.lcc Sun Mar 18 19:41:39 2001 @@ -12,7 +12,7 @@ # thus less clutter on the screen during the make LCCDIR=c:\lccpub -DISTDIR=c:\circle30bpl18 +DISTDIR=c:\circle30bpl19 CFLAGS=-c -I$(LCCDIR)\include -DLCC_WIN32 CC=lcc OBJS=\ Index: circle/src/act.comm.c diff -u circle/src/act.comm.c:1.19 circle/src/act.comm.c:1.21 --- circle/src/act.comm.c:1.19 Thu Jan 25 16:50:43 2001 +++ circle/src/act.comm.c Tue Aug 14 17:54:08 2001 @@ -23,9 +23,6 @@ /* extern variables */ extern int level_can_shout; extern int holler_move_cost; -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; -extern struct char_data *character_list; /* local functions */ void perform_tell(struct char_data *ch, struct char_data *vict, char *arg); @@ -244,9 +241,6 @@ } } - - -#define MAX_NOTE_LENGTH 1000 /* arbitrary */ ACMD(do_write) { Index: circle/src/act.informative.c diff -u circle/src/act.informative.c:1.33 circle/src/act.informative.c:1.45 --- circle/src/act.informative.c:1.33 Thu Jan 25 16:50:43 2001 +++ circle/src/act.informative.c Tue Aug 14 17:56:28 2001 @@ -26,10 +26,6 @@ extern struct help_index_element *help_table; extern char *help; extern struct time_info_data time_info; -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; -extern struct char_data *character_list; -extern struct obj_data *object_list; extern char *credits; extern char *news; @@ -44,6 +40,7 @@ /* extern functions */ ACMD(do_action); +ACMD(do_insult); long find_class_bitvector(char arg); int level_exp(int chclass, int level); char *title_male(int chclass, int level); @@ -52,9 +49,11 @@ int compute_armor_class(struct char_data *ch); /* local functions */ -void print_object_location(int num, struct obj_data * obj, struct char_data * ch, int recur); -void show_obj_to_char(struct obj_data * object, struct char_data * ch, int mode); -void list_obj_to_char(struct obj_data * list, struct char_data * ch, int mode, int show); +int sort_commands_helper(const void *a, const void *b); +void print_object_location(int num, struct obj_data *obj, struct char_data *ch, int recur); +void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode); +void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show); +void show_obj_modifiers(struct obj_data *obj, struct char_data *ch); ACMD(do_look); ACMD(do_examine); ACMD(do_gold); @@ -67,8 +66,8 @@ ACMD(do_who); ACMD(do_users); ACMD(do_gen_ps); -void perform_mortal_where(struct char_data * ch, char *arg); -void perform_immort_where(struct char_data * ch, char *arg); +void perform_mortal_where(struct char_data *ch, char *arg); +void perform_immort_where(struct char_data *ch, char *arg); ACMD(do_where); ACMD(do_levels); ACMD(do_consider); @@ -77,72 +76,93 @@ ACMD(do_toggle); void sort_commands(void); ACMD(do_commands); -void diag_char_to_char(struct char_data * i, struct char_data * ch); -void look_at_char(struct char_data * i, struct char_data * ch); -void list_one_char(struct char_data * i, struct char_data * ch); -void list_char_to_char(struct char_data * list, struct char_data * ch); -void do_auto_exits(struct char_data * ch); +void diag_char_to_char(struct char_data *i, struct char_data *ch); +void look_at_char(struct char_data *i, struct char_data *ch); +void list_one_char(struct char_data *i, struct char_data *ch); +void list_char_to_char(struct char_data *list, struct char_data *ch); +void do_auto_exits(struct char_data *ch); ACMD(do_exits); -void look_in_direction(struct char_data * ch, int dir); -void look_in_obj(struct char_data * ch, char *arg); -char *find_exdesc(char *word, struct extra_descr_data * list); -void look_at_target(struct char_data * ch, char *arg); +void look_in_direction(struct char_data *ch, int dir); +void look_in_obj(struct char_data *ch, char *arg); +char *find_exdesc(char *word, struct extra_descr_data *list); +void look_at_target(struct char_data *ch, char *arg); +/* local globals */ +int *cmd_sort_info; -/* - * 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) +/* For show_obj_to_char 'mode'. /-- arbitrary */ +#define SHOW_OBJ_LONG 0 +#define SHOW_OBJ_SHORT 1 +#define SHOW_OBJ_ACTION 2 + + +void show_obj_to_char(struct obj_data *obj, struct char_data *ch, int mode) { - *buf = '\0'; - if ((mode == 0) && object->description) - strcpy(buf, object->description); - else if (object->short_description && ((mode == 1) || - (mode == 2) || (mode == 3) || (mode == 4))) - strcpy(buf, object->short_description); - else if (mode == 5) { - if (GET_OBJ_TYPE(object) == ITEM_NOTE) { - if (object->action_description) { - strcpy(buf, "There is something written upon it:\r\n\r\n"); - strcat(buf, object->action_description); - page_string(ch->desc, buf, 1); + if (!obj || !ch) { + log("SYSERR: NULL pointer in show_obj_to_char(): obj=%p ch=%p", obj, ch); + return; + } + + switch (mode) { + case SHOW_OBJ_LONG: + send_to_char(obj->description, ch); + break; + + case SHOW_OBJ_SHORT: + send_to_char(obj->short_description, ch); + break; + + case SHOW_OBJ_ACTION: + switch (GET_OBJ_TYPE(obj)) { + case ITEM_NOTE: + if (obj->action_description) { + char notebuf[MAX_NOTE_LENGTH + 64]; + sprintf(notebuf, "There is something written on it:\r\n\r\n%.*s", MAX_NOTE_LENGTH, obj->action_description); + page_string(ch->desc, notebuf, TRUE); } else - send_to_char("It's blank.\r\n", ch); + send_to_char("It's blank.\r\n", ch); return; - } else if (GET_OBJ_TYPE(object) != ITEM_DRINKCON) { - strcpy(buf, "You see nothing special.."); - } else /* ITEM_TYPE == ITEM_DRINKCON||FOUNTAIN */ - strcpy(buf, "It looks like a drink container."); - } - if (mode != 3) { - if (IS_OBJ_STAT(object, ITEM_INVISIBLE)) - strcat(buf, " (invisible)"); - if (IS_OBJ_STAT(object, ITEM_BLESS) && AFF_FLAGGED(ch, AFF_DETECT_ALIGN)) - strcat(buf, " ..It glows blue!"); - if (IS_OBJ_STAT(object, ITEM_MAGIC) && AFF_FLAGGED(ch, AFF_DETECT_MAGIC)) - strcat(buf, " ..It glows yellow!"); - if (IS_OBJ_STAT(object, ITEM_GLOW)) - strcat(buf, " ..It has a soft glowing aura!"); - if (IS_OBJ_STAT(object, ITEM_HUM)) - strcat(buf, " ..It emits a faint humming sound!"); + + case ITEM_DRINKCON: + send_to_char("It looks like a drink container.", ch); + break; + + default: + send_to_char("You see nothing special..", ch); + break; + } + break; + + default: + log("SYSERR: Bad display mode (%d) in show_obj_to_char().", mode); + return; } - strcat(buf, "\r\n"); - page_string(ch->desc, buf, TRUE); + + show_obj_modifiers(obj, ch); + send_to_char("\r\n", ch); +} + + +void show_obj_modifiers(struct obj_data *obj, struct char_data *ch) +{ + if (OBJ_FLAGGED(obj, ITEM_INVISIBLE)) + send_to_char(" (invisible)", ch); + + if (OBJ_FLAGGED(obj, ITEM_BLESS) && AFF_FLAGGED(ch, AFF_DETECT_ALIGN)) + send_to_char(" ..It glows blue!", ch); + + if (OBJ_FLAGGED(obj, ITEM_MAGIC) && AFF_FLAGGED(ch, AFF_DETECT_MAGIC)) + send_to_char(" ..It glows yellow!", ch); + + if (OBJ_FLAGGED(obj, ITEM_GLOW)) + send_to_char(" ..It has a soft glowing aura!", ch); + + if (OBJ_FLAGGED(obj, ITEM_HUM)) + send_to_char(" ..It emits a faint humming sound!", ch); } -void list_obj_to_char(struct obj_data * list, struct char_data * ch, int mode, - int show) +void list_obj_to_char(struct obj_data *list, struct char_data *ch, int mode, int show) { struct obj_data *i; bool found = FALSE; @@ -158,7 +178,7 @@ } -void diag_char_to_char(struct char_data * i, struct char_data * ch) +void diag_char_to_char(struct char_data *i, struct char_data *ch) { int percent; @@ -191,7 +211,7 @@ } -void look_at_char(struct char_data * i, struct char_data * ch) +void look_at_char(struct char_data *i, struct char_data *ch) { int j, found; struct obj_data *tmp_obj; @@ -216,8 +236,8 @@ act("$n is using:", FALSE, i, 0, ch, TO_VICT); for (j = 0; j < NUM_WEARS; j++) if (GET_EQ(i, j) && CAN_SEE_OBJ(ch, GET_EQ(i, j))) { - send_to_char(where[j], ch); - show_obj_to_char(GET_EQ(i, j), ch, 1); + send_to_char(wear_where[j], ch); + show_obj_to_char(GET_EQ(i, j), ch, SHOW_OBJ_SHORT); } } if (ch != i && (IS_THIEF(ch) || GET_LEVEL(ch) >= LVL_IMMORT)) { @@ -225,7 +245,7 @@ act("\r\nYou attempt to peek at $s inventory:", FALSE, i, 0, ch, TO_VICT); for (tmp_obj = i->carrying; tmp_obj; tmp_obj = tmp_obj->next_content) { if (CAN_SEE_OBJ(ch, tmp_obj) && (number(0, 20) < GET_LEVEL(ch))) { - show_obj_to_char(tmp_obj, ch, 1); + show_obj_to_char(tmp_obj, ch, SHOW_OBJ_SHORT); found = TRUE; } } @@ -236,7 +256,7 @@ } -void list_one_char(struct char_data * i, struct char_data * ch) +void list_one_char(struct char_data *i, struct char_data *ch) { const char *positions[] = { " is lying here, dead.", @@ -320,7 +340,7 @@ -void list_char_to_char(struct char_data * list, struct char_data * ch) +void list_char_to_char(struct char_data *list, struct char_data *ch) { struct char_data *i; @@ -335,7 +355,7 @@ } -void do_auto_exits(struct char_data * ch) +void do_auto_exits(struct char_data *ch) { int door, slen = 0; @@ -391,7 +411,7 @@ -void look_at_room(struct char_data * ch, int ignore_brief) +void look_at_room(struct char_data *ch, int ignore_brief) { if (!ch->desc) return; @@ -425,7 +445,7 @@ /* now list characters & objects */ send_to_char(CCGRN(ch, C_NRM), ch); - list_obj_to_char(world[ch->in_room].contents, ch, 0, FALSE); + list_obj_to_char(world[ch->in_room].contents, ch, SHOW_OBJ_LONG, FALSE); send_to_char(CCYEL(ch, C_NRM), ch); list_char_to_char(world[ch->in_room].people, ch); send_to_char(CCNRM(ch, C_NRM), ch); @@ -433,7 +453,7 @@ -void look_in_direction(struct char_data * ch, int dir) +void look_in_direction(struct char_data *ch, int dir) { if (EXIT(ch, dir)) { if (EXIT(ch, dir)->general_description) @@ -454,7 +474,7 @@ -void look_in_obj(struct char_data * ch, char *arg) +void look_in_obj(struct char_data *ch, char *arg) { struct obj_data *obj = NULL; struct char_data *dummy = NULL; @@ -488,7 +508,7 @@ break; } - list_obj_to_char(obj->contains, ch, 2, TRUE); + list_obj_to_char(obj->contains, ch, SHOW_OBJ_SHORT, TRUE); } } else { /* item must be a fountain or drink container */ if (GET_OBJ_VAL(obj, 1) <= 0) @@ -509,7 +529,7 @@ -char *find_exdesc(char *word, struct extra_descr_data * list) +char *find_exdesc(char *word, struct extra_descr_data *list) { struct extra_descr_data *i; @@ -529,7 +549,7 @@ * Thanks to Angus Mezick for the * suggested fix to this problem. */ -void look_at_target(struct char_data * ch, char *arg) +void look_at_target(struct char_data *ch, char *arg) { int bits, found = FALSE, j, fnum, i = 0; struct char_data *found_char = NULL; @@ -598,9 +618,11 @@ /* If an object was found back in generic_find */ if (bits) { if (!found) - show_obj_to_char(found_obj, ch, 5); /* Show no-description */ - else - show_obj_to_char(found_obj, ch, 6); /* Find hum, glow etc */ + show_obj_to_char(found_obj, ch, SHOW_OBJ_ACTION); + else { + show_obj_modifiers(found_obj, ch); + send_to_char("\r\n", ch); + } } else if (!found) send_to_char("You do not see that here.\r\n", ch); } @@ -651,6 +673,7 @@ { struct char_data *tmp_char; struct obj_data *tmp_object; + char tempsave[MAX_INPUT_LENGTH]; one_argument(argument, arg); @@ -658,7 +681,9 @@ send_to_char("Examine what?\r\n", ch); return; } - look_at_target(ch, arg); + + /* look_at_target() eats the number. */ + look_at_target(ch, strcpy(tempsave, arg)); generic_find(arg, FIND_OBJ_INV | FIND_OBJ_ROOM | FIND_CHAR_ROOM | FIND_OBJ_EQUIP, ch, &tmp_char, &tmp_object); @@ -806,7 +831,7 @@ ACMD(do_inventory) { send_to_char("You are carrying:\r\n", ch); - list_obj_to_char(ch->carrying, ch, 1, TRUE); + list_obj_to_char(ch->carrying, ch, SHOW_OBJ_SHORT, TRUE); } @@ -818,11 +843,11 @@ for (i = 0; i < NUM_WEARS; i++) { if (GET_EQ(ch, i)) { if (CAN_SEE_OBJ(ch, GET_EQ(ch, i))) { - send_to_char(where[i], ch); - show_obj_to_char(GET_EQ(ch, i), ch, 1); + send_to_char(wear_where[i], ch); + show_obj_to_char(GET_EQ(ch, i), ch, SHOW_OBJ_SHORT); found = TRUE; } else { - send_to_char(where[i], ch); + send_to_char(wear_where[i], ch); send_to_char("Something.\r\n", ch); found = TRUE; } @@ -1102,7 +1127,6 @@ ACMD(do_users) { - const char *format = "%3d %-7s %-12s %-14s %-3s %-8s "; char line[200], line2[220], idletime[10], classname[20]; char state[30], *timeptr, mode; char name_search[MAX_INPUT_LENGTH], host_search[MAX_INPUT_LENGTH]; @@ -1220,16 +1244,11 @@ else strcpy(idletime, ""); - if (d->character && d->character->player.name) { - if (d->original) - sprintf(line, format, d->desc_num, classname, - d->original->player.name, state, idletime, timeptr); - else - sprintf(line, format, d->desc_num, classname, - d->character->player.name, state, idletime, timeptr); - } else - sprintf(line, format, d->desc_num, " - ", "UNDEFINED", - state, idletime, timeptr); + sprintf(line, "%3d %-7s %-12s %-14s %-3s %-8s ", d->desc_num, classname, + d->original && d->original->player.name ? d->original->player.name : + d->character && d->character->player.name ? d->character->player.name : + "UNDEFINED", + state, idletime, timeptr); if (d->host && *d->host) sprintf(line + strlen(line), "[%s]\r\n", d->host); @@ -1299,10 +1318,10 @@ } -void perform_mortal_where(struct char_data * ch, char *arg) +void perform_mortal_where(struct char_data *ch, char *arg) { - register struct char_data *i; - register struct descriptor_data *d; + struct char_data *i; + struct descriptor_data *d; if (!*arg) { send_to_char("Players in your Zone\r\n--------------------\r\n", ch); @@ -1335,7 +1354,7 @@ } -void print_object_location(int num, struct obj_data * obj, struct char_data * ch, +void print_object_location(int num, struct obj_data *obj, struct char_data *ch, int recur) { if (num > 0) @@ -1369,10 +1388,10 @@ -void perform_immort_where(struct char_data * ch, char *arg) +void perform_immort_where(struct char_data *ch, char *arg) { - register struct char_data *i; - register struct obj_data *k; + struct char_data *i; + struct obj_data *k; struct descriptor_data *d; int num = 0, found = 0; @@ -1627,50 +1646,28 @@ } -struct sort_struct { - int sort_pos; - byte is_social; -} *cmd_sort_info = NULL; - -int num_of_cmds; +int sort_commands_helper(const void *a, const void *b) +{ + return strcmp(cmd_info[*(const int *)a].command, cmd_info[*(const int *)b].command); +} void sort_commands(void) { - int a, b, tmp; - - num_of_cmds = 0; + int a, num_of_cmds = 0; - /* - * first, count commands (num_of_commands is actually one greater than the - * number of commands; it inclues the '\n'. - */ - while (*cmd_info[num_of_cmds].command != '\n') + while (cmd_info[num_of_cmds].command[0] != '\n') num_of_cmds++; + num_of_cmds++; /* \n */ - /* create data array */ - CREATE(cmd_sort_info, struct sort_struct, num_of_cmds); + CREATE(cmd_sort_info, int, num_of_cmds); - /* initialize it */ - for (a = 1; a < num_of_cmds; a++) { - cmd_sort_info[a].sort_pos = a; - cmd_sort_info[a].is_social = (cmd_info[a].command_pointer == do_action); - } - - /* the infernal special case */ - cmd_sort_info[find_command("insult")].is_social = TRUE; - - /* Sort. 'a' starts at 1, not 0, to remove 'RESERVED' */ - for (a = 1; a < num_of_cmds - 1; a++) - for (b = a + 1; b < num_of_cmds; b++) - if (strcmp(cmd_info[cmd_sort_info[a].sort_pos].command, - cmd_info[cmd_sort_info[b].sort_pos].command) > 0) { - tmp = cmd_sort_info[a].sort_pos; - cmd_sort_info[a].sort_pos = cmd_sort_info[b].sort_pos; - cmd_sort_info[b].sort_pos = tmp; - } -} + for (a = 0; a < num_of_cmds; a++) + cmd_sort_info[a] = a; + /* Don't sort the RESERVED or \n entries. */ + qsort(cmd_sort_info + 1, num_of_cmds - 2, sizeof(int), sort_commands_helper); +} ACMD(do_commands) @@ -1704,19 +1701,22 @@ vict == ch ? "you" : GET_NAME(vict)); /* cmd_num starts at 1, not 0, to remove 'RESERVED' */ - for (no = 1, cmd_num = 1; cmd_num < num_of_cmds; cmd_num++) { - i = cmd_sort_info[cmd_num].sort_pos; - if (cmd_info[i].minimum_level >= 0 && - GET_LEVEL(vict) >= cmd_info[i].minimum_level && - (cmd_info[i].minimum_level >= LVL_IMMORT) == wizhelp && - (wizhelp || socials == cmd_sort_info[i].is_social)) { - sprintf(buf + strlen(buf), "%-11s", cmd_info[i].command); - if (!(no % 7)) - strcat(buf, "\r\n"); - no++; - } + for (no = 1, cmd_num = 1; cmd_info[cmd_sort_info[cmd_num]].command[0] != '\n'; cmd_num++) { + i = cmd_sort_info[cmd_num]; + + if (cmd_info[i].minimum_level < 0 || GET_LEVEL(vict) < cmd_info[i].minimum_level) + continue; + + if ((cmd_info[i].minimum_level >= LVL_IMMORT) != wizhelp) + continue; + + if (!wizhelp && socials != (cmd_info[i].command_pointer == do_action || cmd_info[i].command_pointer == do_insult)) + continue; + + sprintf(buf + strlen(buf), "%-11s%s", cmd_info[i].command, no++ % 7 == 0 ? "\r\n" : ""); } - strcat(buf, "\r\n"); + if (no % 7 != 1) + strcat(buf, "\r\n"); send_to_char(buf, ch); } Index: circle/src/act.item.c diff -u circle/src/act.item.c:1.36 circle/src/act.item.c:1.42 --- circle/src/act.item.c:1.36 Thu Jan 25 16:50:43 2001 +++ circle/src/act.item.c Thu Jun 28 08:03:52 2001 @@ -27,29 +27,27 @@ extern room_rnum donation_room_2; /* uncomment if needed! */ extern room_rnum donation_room_3; /* uncomment if needed! */ #endif -extern struct obj_data *obj_proto; -extern struct room_data *world; /* local functions */ -int can_take_obj(struct char_data * ch, struct obj_data * obj); -void get_check_money(struct char_data * ch, struct obj_data * obj); -int perform_get_from_room(struct char_data * ch, struct obj_data * obj); -void get_from_room(struct char_data * ch, char *arg, int amount); -void perform_give_gold(struct char_data * ch, struct char_data * vict, int amount); -void perform_give(struct char_data * ch, struct char_data * vict, struct obj_data * obj); -int perform_drop(struct char_data * ch, struct obj_data * obj, byte mode, const char *sname, room_rnum RDR); -void perform_drop_gold(struct char_data * ch, int amount, byte mode, room_rnum RDR); -struct char_data *give_find_vict(struct char_data * ch, char *arg); -void weight_change_object(struct obj_data * obj, int weight); -void perform_put(struct char_data * ch, struct obj_data * obj, struct obj_data * cont); -void name_from_drinkcon(struct obj_data * obj); -void get_from_container(struct char_data * ch, struct obj_data * cont, char *arg, int mode, int amount); -void name_to_drinkcon(struct obj_data * obj, int type); -void wear_message(struct char_data * ch, struct obj_data * obj, int where); -void perform_wear(struct char_data * ch, struct obj_data * obj, int where); -int find_eq_pos(struct char_data * ch, struct obj_data * obj, char *arg); -void perform_get_from_container(struct char_data * ch, struct obj_data * obj, struct obj_data * cont, int mode); -void perform_remove(struct char_data * ch, int pos); +int can_take_obj(struct char_data *ch, struct obj_data *obj); +void get_check_money(struct char_data *ch, struct obj_data *obj); +int perform_get_from_room(struct char_data *ch, struct obj_data *obj); +void get_from_room(struct char_data *ch, char *arg, int amount); +void perform_give_gold(struct char_data *ch, struct char_data *vict, int amount); +void perform_give(struct char_data *ch, struct char_data *vict, struct obj_data *obj); +int perform_drop(struct char_data *ch, struct obj_data *obj, byte mode, const char *sname, room_rnum RDR); +void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_rnum RDR); +struct char_data *give_find_vict(struct char_data *ch, char *arg); +void weight_change_object(struct obj_data *obj, int weight); +void perform_put(struct char_data *ch, struct obj_data *obj, struct obj_data *cont); +void name_from_drinkcon(struct obj_data *obj); +void get_from_container(struct char_data *ch, struct obj_data *cont, char *arg, int mode, int amount); +void name_to_drinkcon(struct obj_data *obj, int type); +void wear_message(struct char_data *ch, struct obj_data *obj, int where); +void perform_wear(struct char_data *ch, struct obj_data *obj, int where); +int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg); +void perform_get_from_container(struct char_data *ch, struct obj_data *obj, struct obj_data *cont, int mode); +void perform_remove(struct char_data *ch, int pos); ACMD(do_remove); ACMD(do_put); ACMD(do_get); @@ -63,8 +61,8 @@ ACMD(do_grab); -void perform_put(struct char_data * ch, struct obj_data * obj, - struct obj_data * cont) +void perform_put(struct char_data *ch, struct obj_data *obj, + struct obj_data *cont) { if (GET_OBJ_WEIGHT(cont) + GET_OBJ_WEIGHT(obj) > GET_OBJ_VAL(cont, 0)) act("$p won't fit in $P.", FALSE, ch, obj, cont, TO_CHAR); @@ -75,7 +73,7 @@ act("$n puts $p in $P.", TRUE, ch, obj, cont, TO_ROOM); /* Yes, I realize this is strange until we have auto-equip on rent. -gg */ - if (IS_OBJ_STAT(obj, ITEM_NODROP) && !IS_OBJ_STAT(cont, ITEM_NODROP)) { + if (OBJ_FLAGGED(obj, ITEM_NODROP) && !OBJ_FLAGGED(cont, ITEM_NODROP)) { SET_BIT(GET_OBJ_EXTRA(cont), ITEM_NODROP); act("You get a strange feeling as you put $p in $P.", FALSE, ch, obj, cont, TO_CHAR); @@ -144,7 +142,6 @@ } else if (obj == cont) send_to_char("You attempt to fold it into itself, but fail.\r\n", ch); else { - struct obj_data *next_obj; while(obj && howmany--) { next_obj = obj->next_content; perform_put(ch, obj, cont); @@ -175,7 +172,7 @@ -int can_take_obj(struct char_data * ch, struct obj_data * obj) +int can_take_obj(struct char_data *ch, struct obj_data *obj) { if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) { act("$p: you can't carry that many items.", FALSE, ch, obj, 0, TO_CHAR); @@ -191,7 +188,7 @@ } -void get_check_money(struct char_data * ch, struct obj_data * obj) +void get_check_money(struct char_data *ch, struct obj_data *obj) { int value = GET_OBJ_VAL(obj, 0); @@ -211,8 +208,8 @@ } -void perform_get_from_container(struct char_data * ch, struct obj_data * obj, - struct obj_data * cont, int mode) +void perform_get_from_container(struct char_data *ch, struct obj_data *obj, + struct obj_data *cont, int mode) { if (mode == FIND_OBJ_INV || can_take_obj(ch, obj)) { if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) @@ -228,7 +225,7 @@ } -void get_from_container(struct char_data * ch, struct obj_data * cont, +void get_from_container(struct char_data *ch, struct obj_data *cont, char *arg, int mode, int howmany) { struct obj_data *obj, *next_obj; @@ -275,7 +272,7 @@ } -int perform_get_from_room(struct char_data * ch, struct obj_data * obj) +int perform_get_from_room(struct char_data *ch, struct obj_data *obj) { if (can_take_obj(ch, obj)) { obj_from_room(obj); @@ -289,7 +286,7 @@ } -void get_from_room(struct char_data * ch, char *arg, int howmany) +void get_from_room(struct char_data *ch, char *arg, int howmany) { struct obj_data *obj, *next_obj; int dotmode, found = 0; @@ -347,9 +344,7 @@ argument = two_arguments(argument, arg1, arg2); one_argument(argument, arg3); - if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) - send_to_char("Your arms are already full!\r\n", ch); - else if (!*arg1) + if (!*arg1) send_to_char("Get what?\r\n", ch); else if (!*arg2) get_from_room(ch, arg1, 1); @@ -412,7 +407,7 @@ } -void perform_drop_gold(struct char_data * ch, int amount, +void perform_drop_gold(struct char_data *ch, int amount, byte mode, room_rnum RDR) { struct obj_data *obj; @@ -451,12 +446,12 @@ #define VANISH(mode) ((mode == SCMD_DONATE || mode == SCMD_JUNK) ? \ " It vanishes in a puff of smoke!" : "") -int perform_drop(struct char_data * ch, struct obj_data * obj, +int perform_drop(struct char_data *ch, struct obj_data *obj, byte mode, const char *sname, room_rnum RDR) { int value; - if (IS_OBJ_STAT(obj, ITEM_NODROP)) { + if (OBJ_FLAGGED(obj, ITEM_NODROP)) { sprintf(buf, "You can't %s $p, it must be CURSED!", sname); act(buf, FALSE, ch, obj, 0, TO_CHAR); return (0); @@ -467,7 +462,7 @@ act(buf, TRUE, ch, obj, 0, TO_ROOM); obj_from_char(obj); - if ((mode == SCMD_DONATE) && IS_OBJ_STAT(obj, ITEM_NODONATE)) + if ((mode == SCMD_DONATE) && OBJ_FLAGGED(obj, ITEM_NODONATE)) mode = SCMD_JUNK; switch (mode) { @@ -607,10 +602,10 @@ } -void perform_give(struct char_data * ch, struct char_data * vict, - struct obj_data * obj) +void perform_give(struct char_data *ch, struct char_data *vict, + struct obj_data *obj) { - if (IS_OBJ_STAT(obj, ITEM_NODROP)) { + if (OBJ_FLAGGED(obj, ITEM_NODROP)) { act("You can't let go of $p!! Yeech!", FALSE, ch, obj, 0, TO_CHAR); return; } @@ -630,7 +625,7 @@ } /* utility function for give */ -struct char_data *give_find_vict(struct char_data * ch, char *arg) +struct char_data *give_find_vict(struct char_data *ch, char *arg) { struct char_data *vict; @@ -648,7 +643,7 @@ } -void perform_give_gold(struct char_data * ch, struct char_data * vict, +void perform_give_gold(struct char_data *ch, struct char_data *vict, int amount) { if (amount <= 0) { @@ -734,7 +729,7 @@ -void weight_change_object(struct obj_data * obj, int weight) +void weight_change_object(struct obj_data *obj, int weight) { struct obj_data *tmp_obj; struct char_data *tmp_ch; @@ -756,7 +751,7 @@ -void name_from_drinkcon(struct obj_data * obj) +void name_from_drinkcon(struct obj_data *obj) { char *new_name, *cur_name, *next; const char *liqname; @@ -1134,7 +1129,7 @@ -void wear_message(struct char_data * ch, struct obj_data * obj, int where) +void wear_message(struct char_data *ch, struct obj_data *obj, int where) { const char *wear_messages[][2] = { {"$n lights $p and holds it.", @@ -1198,7 +1193,7 @@ -void perform_wear(struct char_data * ch, struct obj_data * obj, int where) +void perform_wear(struct char_data *ch, struct obj_data *obj, int where) { /* * ITEM_WEAR_TAKE is used for objects that do not require special bits @@ -1256,7 +1251,7 @@ -int find_eq_pos(struct char_data * ch, struct obj_data * obj, char *arg) +int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg) { int where = -1; @@ -1418,13 +1413,13 @@ -void perform_remove(struct char_data * ch, int pos) +void perform_remove(struct char_data *ch, int pos) { struct obj_data *obj; if (!(obj = GET_EQ(ch, pos))) log("SYSERR: perform_remove: bad pos %d passed.", pos); - else if (IS_OBJ_STAT(obj, ITEM_NODROP)) + else if (OBJ_FLAGGED(obj, ITEM_NODROP)) act("You can't remove $p, it must be CURSED!", FALSE, ch, obj, 0, TO_CHAR); else if (IS_CARRYING_N(ch) >= CAN_CARRY_N(ch)) act("$p: you can't carry that many items!", FALSE, ch, obj, 0, TO_CHAR); @@ -1475,8 +1470,7 @@ } } } else { - /* Returns object pointer but we don't need it, just true/false. */ - if (!get_object_in_equip_vis(ch, arg, ch->equipment, &i)) { + if ((i = get_obj_pos_in_equip_vis(ch, arg, NULL, ch->equipment)) < 0) { sprintf(buf, "You don't seem to be using %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.21 circle/src/act.movement.c:1.25 --- circle/src/act.movement.c:1.21 Thu Jan 25 16:50:43 2001 +++ circle/src/act.movement.c Thu Jun 28 08:03:52 2001 @@ -22,17 +22,15 @@ #include "house.h" #include "constants.h" -/* external vars */ -extern struct room_data *world; -extern struct char_data *character_list; -extern struct descriptor_data *descriptor_list; -extern struct index_data *obj_index; -/* external functs */ +/* external variables */ +extern int tunnel_size; + +/* external functions */ void add_follower(struct char_data *ch, struct char_data *leader); int special(struct char_data *ch, int cmd, char *arg); void death_cry(struct char_data *ch); -int find_eq_pos(struct char_data * ch, struct obj_data * obj, char *arg); +int find_eq_pos(struct char_data *ch, struct obj_data *obj, char *arg); /* local functions */ int has_boat(struct char_data *ch); @@ -137,8 +135,11 @@ } } if (ROOM_FLAGGED(EXIT(ch, dir)->to_room, ROOM_TUNNEL) && - num_pc_in_room(&(world[EXIT(ch, dir)->to_room])) > 1) { - send_to_char("There isn't enough room there for more than one person!\r\n", ch); + num_pc_in_room(&(world[EXIT(ch, dir)->to_room])) >= tunnel_size) { + if (tunnel_size > 1) + send_to_char("There isn't enough room for you to go there!\r\n", ch); + else + send_to_char("There isn't enough room there for more than one person!\r\n", ch); return (0); } /* Mortals and low level gods cannot enter greater god rooms. */ Index: circle/src/act.offensive.c diff -u circle/src/act.offensive.c:1.24 circle/src/act.offensive.c:1.27 --- circle/src/act.offensive.c:1.24 Sun Mar 18 18:58:58 2001 +++ circle/src/act.offensive.c Thu Jun 28 08:03:52 2001 @@ -21,13 +21,11 @@ #include "spells.h" /* extern variables */ -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; extern int pk_allowed; /* extern functions */ -void raw_kill(struct char_data * ch); -void check_killer(struct char_data * ch, struct char_data * vict); +void raw_kill(struct char_data *ch); +void check_killer(struct char_data *ch, struct char_data *vict); int compute_armor_class(struct char_data *ch); /* local functions */ @@ -211,7 +209,6 @@ { char name[MAX_INPUT_LENGTH], message[MAX_INPUT_LENGTH]; bool found = FALSE; - room_rnum org_room; struct char_data *vict; struct follow_type *k; @@ -243,10 +240,8 @@ sprintf(buf, "$n issues the order '%s'.", message); act(buf, FALSE, ch, 0, 0, TO_ROOM); - org_room = ch->in_room; - for (k = ch->followers; k; k = k->next) { - if (org_room == k->follower->in_room) + if (IN_ROOM(ch) == IN_ROOM(k->follower)) if (AFF_FLAGGED(k->follower, AFF_CHARM)) { found = TRUE; command_interpreter(k->follower, message); Index: circle/src/act.other.c diff -u circle/src/act.other.c:1.33 circle/src/act.other.c:1.35 --- circle/src/act.other.c:1.33 Thu Jan 25 18:01:22 2001 +++ circle/src/act.other.c Thu Jun 28 08:03:52 2001 @@ -25,11 +25,8 @@ #include "constants.h" /* extern variables */ -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; extern struct spell_info_type spell_info[]; -extern struct index_data *mob_index; -extern char *class_abbrevs[]; +extern const char *class_abbrevs[]; extern int free_rent; extern int pt_allowed; extern int max_filesize; @@ -38,14 +35,14 @@ extern int track_through_doors; /* extern procedures */ -void list_skills(struct char_data * ch); -void appear(struct char_data * ch); +void list_skills(struct char_data *ch); +void appear(struct char_data *ch); void write_aliases(struct char_data *ch); void perform_immort_vis(struct char_data *ch); SPECIAL(shop_keeper); ACMD(do_gen_comm); -void die(struct char_data * ch); -void Crash_rentsave(struct char_data * ch, int cost); +void die(struct char_data *ch); +void Crash_rentsave(struct char_data *ch, int cost); /* local functions */ ACMD(do_quit); Index: circle/src/act.social.c diff -u circle/src/act.social.c:1.16 circle/src/act.social.c:1.18 --- circle/src/act.social.c:1.16 Thu Jan 25 16:50:43 2001 +++ circle/src/act.social.c Thu Jun 28 08:03:52 2001 @@ -20,15 +20,12 @@ #include "db.h" #include "spells.h" -/* extern variables */ -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; /* local globals */ static int list_top = -1; /* local functions */ -char *fread_action(FILE * fl, int nr); +char *fread_action(FILE *fl, int nr); int find_action(int cmd); ACMD(do_action); ACMD(do_insult); @@ -178,7 +175,7 @@ } -char *fread_action(FILE * fl, int nr) +char *fread_action(FILE *fl, int nr) { char buf[MAX_STRING_LENGTH]; Index: circle/src/act.wizard.c diff -u circle/src/act.wizard.c:1.44 circle/src/act.wizard.c:1.52 --- circle/src/act.wizard.c:1.44 Mon Mar 5 04:44:48 2001 +++ circle/src/act.wizard.c Fri Jun 29 06:21:38 2001 @@ -24,13 +24,6 @@ /* external vars */ extern FILE *player_fl; -extern struct room_data *world; -extern struct char_data *character_list; -extern struct obj_data *object_list; -extern struct descriptor_data *descriptor_list; -extern struct index_data *mob_index; -extern struct index_data *obj_index; -extern struct zone_data *zone_table; extern struct attack_hit_type attack_hit_text[]; extern char *class_abbrevs[]; extern time_t boot_time; @@ -48,7 +41,7 @@ /* extern functions */ int level_exp(int chclass, int level); -void show_shops(struct char_data * ch, char *value); +void show_shops(struct char_data *ch, char *value); void hcontrol_list_houses(struct char_data *ch); void do_start(struct char_data *ch); void appear(struct char_data *ch); @@ -61,18 +54,18 @@ void perform_immort_invis(struct char_data *ch, int level); ACMD(do_echo); ACMD(do_send); -room_rnum find_target_room(struct char_data * ch, char *rawroomstr); +room_rnum find_target_room(struct char_data *ch, char *rawroomstr); ACMD(do_at); ACMD(do_goto); ACMD(do_trans); ACMD(do_teleport); ACMD(do_vnum); -void do_stat_room(struct char_data * ch); -void do_stat_object(struct char_data * ch, struct obj_data * j); -void do_stat_character(struct char_data * ch, struct char_data * k); +void do_stat_room(struct char_data *ch); +void do_stat_object(struct char_data *ch, struct obj_data *j); +void do_stat_character(struct char_data *ch, struct char_data *k); ACMD(do_stat); ACMD(do_shutdown); -void stop_snooping(struct char_data * ch); +void stop_snooping(struct char_data *ch); ACMD(do_snoop); ACMD(do_switch); ACMD(do_return); @@ -146,7 +139,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_rnum find_target_room(struct char_data *ch, char *rawroomstr) { room_rnum location = NOWHERE; char roomstr[MAX_INPUT_LENGTH]; @@ -371,7 +364,7 @@ -void do_stat_room(struct char_data * ch) +void do_stat_room(struct char_data *ch) { struct extra_descr_data *desc; struct room_data *rm = &world[ch->in_room]; @@ -473,7 +466,7 @@ -void do_stat_object(struct char_data * ch, struct obj_data * j) +void do_stat_object(struct char_data *ch, struct obj_data *j) { int i, found; obj_vnum vnum; @@ -647,7 +640,7 @@ } -void do_stat_character(struct char_data * ch, struct char_data * k) +void do_stat_character(struct char_data *ch, struct char_data *k) { int i, i2, found = 0; struct obj_data *j; @@ -842,7 +835,6 @@ struct char_data *victim; struct obj_data *object; struct char_file_u tmp_store; - int tmp; half_chop(argument, buf1, buf2); @@ -870,12 +862,14 @@ send_to_char("No such player around.\r\n", ch); } } else if (is_abbrev(buf1, "file")) { - if (!*buf2) { + if (!*buf2) send_to_char("Stats on which player?\r\n", ch); - } else { + else if ((victim = get_player_vis(ch, buf2, NULL, FIND_CHAR_WORLD)) != NULL) + do_stat_character(ch, victim); + else { CREATE(victim, struct char_data, 1); clear_char(victim); - if (load_char(buf2, &tmp_store) > -1) { + if (load_char(buf2, &tmp_store) >= 0) { store_to_char(&tmp_store, victim); victim->player.time.logon = tmp_store.last_logon; char_to_room(victim, 0); @@ -883,7 +877,7 @@ send_to_char("Sorry, you can't do that.\r\n", ch); else do_stat_character(ch, victim); - extract_char(victim); + extract_char_final(victim); } else { send_to_char("There is no such player.\r\n", ch); free(victim); @@ -902,7 +896,7 @@ char *name = buf1; int number = get_number(&name); - if ((object = get_object_in_equip_vis(ch, buf1, ch->equipment, &tmp)) != NULL) + if ((object = get_obj_in_equip_vis(ch, buf1, &number, ch->equipment)) != NULL) do_stat_object(ch, object); else if ((object = get_obj_in_list_vis(ch, buf1, &number, ch->carrying)) != NULL) do_stat_object(ch, object); @@ -951,8 +945,28 @@ send_to_char("Unknown shutdown option.\r\n", ch); } + +void snoop_check(struct char_data *ch) +{ + /* This short routine is to ensure that characters that happen + * to be snooping (or snooped) and get advanced/demoted will + * not be snooping/snooped someone of a higher/lower level (and + * thus, not entitled to be snooping. + */ + if (ch->desc->snooping && + (GET_LEVEL(ch->desc->snooping->character) >= GET_LEVEL(ch))) { + ch->desc->snooping->snoop_by = NULL; + ch->desc->snooping = NULL; + } + + if (ch->desc->snoop_by && + (GET_LEVEL(ch) >= GET_LEVEL(ch->desc->snoop_by->character))) { + ch->desc->snoop_by->snooping = NULL; + ch->desc->snoop_by = NULL; + } +} -void stop_snooping(struct char_data * ch) +void stop_snooping(struct char_data *ch) { if (!ch->desc->snooping) send_to_char("You aren't snooping anyone.\r\n", ch); @@ -1321,13 +1335,19 @@ log("(GC) %s has advanced %s to level %d (from %d)", GET_NAME(ch), GET_NAME(victim), newlevel, oldlevel); + if (newlevel < LVL_IMMORT) { + /* If they are no longer an immortal, let's remove some of the + * nice immortal only flags, shall we? + */ + REMOVE_BIT(PRF_FLAGS(ch), PRF_LOG1 | PRF_LOG2); + REMOVE_BIT(PRF_FLAGS(ch), PRF_NOHASSLE | PRF_HOLYLIGHT); + } + gain_exp_regardless(victim, level_exp(GET_CLASS(victim), newlevel) - GET_EXP(victim)); save_char(victim, NOWHERE); } - - ACMD(do_restore) { struct char_data *vict; @@ -1827,7 +1847,6 @@ /* * General fn for wizcommands of the sort: cmd */ - ACMD(do_wizutil) { struct char_data *vict; @@ -1942,10 +1961,11 @@ void print_zone_to_buf(char *bufptr, zone_rnum zone) { - sprintf(bufptr, "%s%3d %-30.30s Age: %3d; Reset: %3d (%1d); Top: %5d\r\n", + sprintf(bufptr, "%s%3d %-30.30s Age: %3d; Reset: %3d (%1d); Range: %5d-%5d\r\n", bufptr, zone_table[zone].number, zone_table[zone].name, zone_table[zone].age, zone_table[zone].lifespan, - zone_table[zone].reset_mode, zone_table[zone].top); + zone_table[zone].reset_mode, + zone_table[zone].bot, zone_table[zone].top); } Index: circle/src/ban.c diff -u circle/src/ban.c:1.10 circle/src/ban.c:1.13 --- circle/src/ban.c:1.10 Sat Oct 10 15:04:19 1998 +++ circle/src/ban.c Sat Jun 30 23:56:52 2001 @@ -19,13 +19,13 @@ #include "handler.h" #include "db.h" +/* local globals */ struct ban_list_element *ban_list = NULL; -extern struct descriptor_data *descriptor_list; /* local functions */ void load_banned(void); int isbanned(char *hostname); -void _write_one_node(FILE * fp, struct ban_list_element * node); +void _write_one_node(FILE *fp, struct ban_list_element *node); void write_ban_list(void); ACMD(do_ban); ACMD(do_unban); @@ -99,7 +99,7 @@ } -void _write_one_node(FILE * fp, struct ban_list_element * node) +void _write_one_node(FILE *fp, struct ban_list_element *node) { if (node) { _write_one_node(fp, node->next); @@ -124,10 +124,10 @@ } +#define BAN_LIST_FORMAT "%-25.25s %-8.8s %-10.10s %-16.16s\r\n" ACMD(do_ban) { - char flag[MAX_INPUT_LENGTH], site[MAX_INPUT_LENGTH], - format[MAX_INPUT_LENGTH], *nextchar, *timestr; + char flag[MAX_INPUT_LENGTH], site[MAX_INPUT_LENGTH], *nextchar, *timestr; int i; struct ban_list_element *ban_node; @@ -138,14 +138,13 @@ send_to_char("No sites are banned.\r\n", ch); return; } - strcpy(format, "%-25.25s %-8.8s %-10.10s %-16.16s\r\n"); - sprintf(buf, format, + sprintf(buf, BAN_LIST_FORMAT, "Banned Site Name", "Ban Type", "Banned On", "Banned By"); send_to_char(buf, ch); - sprintf(buf, format, + sprintf(buf, BAN_LIST_FORMAT, "---------------------------------", "---------------------------------", "---------------------------------", @@ -159,8 +158,9 @@ strcpy(site, timestr); } else strcpy(site, "Unknown"); - sprintf(buf, format, ban_node->site, ban_types[ban_node->type], site, - ban_node->name); + + sprintf(buf, BAN_LIST_FORMAT, ban_node->site, ban_types[ban_node->type], + site, ban_node->name); send_to_char(buf, ch); } return; @@ -203,6 +203,7 @@ send_to_char("Site banned.\r\n", ch); write_ban_list(); } +#undef BAN_LIST_FORMAT ACMD(do_unban) Index: circle/src/boards.c diff -u circle/src/boards.c:1.18 circle/src/boards.c:1.21 --- circle/src/boards.c:1.18 Wed Mar 7 01:39:51 2001 +++ circle/src/boards.c Thu Jun 28 08:03:52 2001 @@ -59,9 +59,6 @@ /* Board appearance order. */ #define NEWEST_AT_TOP FALSE -extern struct room_data *world; -extern struct descriptor_data *descriptor_list; - /* format: vnum, read lvl, write lvl, remove lvl, filename, 0 at end Be sure to also change NUM_OF_BOARDS in board.h @@ -76,7 +73,7 @@ /* local functions */ SPECIAL(gen_board); int find_slot(void); -int find_board(struct char_data * ch); +int find_board(struct char_data *ch); void init_boards(void); char *msg_storage[INDEX_SIZE]; @@ -100,7 +97,7 @@ /* search the room ch is standing in to find which board he's looking at */ -int find_board(struct char_data * ch) +int find_board(struct char_data *ch) { struct obj_data *obj; int i; @@ -182,7 +179,7 @@ } -int Board_write_message(int board_type, struct char_data * ch, char *arg, struct obj_data *board) +int Board_write_message(int board_type, struct char_data *ch, char *arg, struct obj_data *board) { char *tmstr; time_t ct; @@ -232,7 +229,7 @@ } -int Board_show_board(int board_type, struct char_data * ch, char *arg, struct obj_data *board) +int Board_show_board(int board_type, struct char_data *ch, char *arg, struct obj_data *board) { int i; char tmp[MAX_STRING_LENGTH], buf[MAX_STRING_LENGTH]; @@ -285,7 +282,7 @@ } -int Board_display_msg(int board_type, struct char_data * ch, char *arg, struct obj_data *board) +int Board_display_msg(int board_type, struct char_data *ch, char *arg, struct obj_data *board) { char number[MAX_STRING_LENGTH], buffer[MAX_STRING_LENGTH]; int msg, ind; @@ -295,9 +292,9 @@ return (0); if (isname(number, board->name)) /* so "read board" works */ return (Board_show_board(board_type, ch, arg, board)); - if (strchr(number, '.')) /* read 2.mail, look 2.sword */ + if (!is_number(number)) /* read 2.mail, look 2.sword */ return (0); - if (!isdigit(*number) || (!(msg = atoi(number)))) + if (!(msg = atoi(number))) return (0); if (GET_LEVEL(ch) < READ_LVL(board_type)) { @@ -342,7 +339,7 @@ } -int Board_remove_msg(int board_type, struct char_data * ch, char *arg, struct obj_data *board) +int Board_remove_msg(int board_type, struct char_data *ch, char *arg, struct obj_data *board) { int ind, msg, slot_num; char number[MAX_INPUT_LENGTH], buf[MAX_INPUT_LENGTH]; @@ -350,7 +347,7 @@ one_argument(arg, number); - if (!*number || !isdigit(*number)) + if (!*number || !is_number(number)) return (0); if (!(msg = atoi(number))) return (0); Index: circle/src/castle.c diff -u circle/src/castle.c:1.17 circle/src/castle.c:1.20 --- circle/src/castle.c:1.17 Sun Jul 4 20:55:37 1999 +++ circle/src/castle.c Thu Jun 28 08:03:52 2001 @@ -22,15 +22,6 @@ #include "spells.h" -/* external vars */ -extern struct room_data *world; -extern struct char_data *character_list; -extern struct descriptor_data *descriptor_list; -extern struct index_data *mob_index; -extern struct index_data *obj_index; -extern struct time_info_data time_info; -extern int mini_mud; - /* IMPORTANT! The below defined number is the zone number of the Kings Castle. Change it to apply to your chosen zone number. The default zone @@ -38,20 +29,28 @@ in the 8000 series... */ #define Z_KINGS_C 150 + + +/* external variables */ +extern struct time_info_data time_info; +extern int mini_mud; + /* local functions */ -struct char_data *find_npc_by_name(struct char_data * chAtChar, const char *pszName, int iLen); -int block_way(struct char_data * ch, int cmd, char *arg, room_rnum iIn_room, int iProhibited_direction); +mob_vnum castle_virtual(mob_vnum offset); +room_rnum castle_real_room(room_vnum roomoffset); +struct char_data *find_npc_by_name(struct char_data *chAtChar, const char *pszName, int iLen); +int block_way(struct char_data *ch, int cmd, char *arg, room_rnum iIn_room, int iProhibited_direction); void assign_kings_castle(void); -int member_of_staff(struct char_data * chChar); -int member_of_royal_guard(struct char_data * chChar); -struct char_data *find_guard(struct char_data * chAtChar); -struct char_data *get_victim(struct char_data * chAtChar); -int banzaii(struct char_data * ch); -int do_npc_rescue(struct char_data * ch_hero, struct char_data * ch_victim); -int is_trash(struct obj_data * i); -void fry_victim(struct char_data * ch); +int member_of_staff(struct char_data *chChar); +int member_of_royal_guard(struct char_data *chChar); +struct char_data *find_guard(struct char_data *chAtChar); +struct char_data *get_victim(struct char_data *chAtChar); +int banzaii(struct char_data *ch); +int do_npc_rescue(struct char_data *ch_hero, struct char_data *ch_victim); +int is_trash(struct obj_data *i); +void fry_victim(struct char_data *ch); int castle_cleaner(struct char_data *ch, int cmd, int gripe); -int castle_twin_proc(struct char_data *ch, int cmd, char *arg, int ctlnum, char *twinname); +int castle_twin_proc(struct char_data *ch, int cmd, char *arg, int ctlnum, const char *twinname); /**********************************************************************\ @@ -64,18 +63,12 @@ * the King's Castle does not exist. (Writing to mob_index[-1].func) */ #define C_MOB_SPEC(zone,mob) \ - if ((check = real_mobile(((zone)*100)+(mob))) < 0) { \ + if ((check = real_mobile(castle_virtual(mob))) < 0) { \ if (!mini_mud) \ - log("SYSERR: assign_kings_castle(): can't find mob #%d.", ((zone)*100)+(mob)); \ + log("SYSERR: assign_kings_castle(): can't find mob #%d.", castle_virtual(mob)); \ } else \ mob_index[check].func -#define R_MOB(zone, mob) (real_mobile(((zone)*100)+(mob))) -#define R_OBJ(zone, obj) (real_object(((zone)*100)+(obj))) -#define R_ROOM(zone, num) (real_room(((zone)*100)+(num))) - -#define CASTLE_ITEM(item) (Z_KINGS_C*100+(item)) - SPECIAL(CastleGuard); SPECIAL(James); SPECIAL(cleaning); @@ -90,6 +83,25 @@ ACMD(do_gen_door); ACMD(do_follow); +mob_vnum castle_virtual(mob_vnum offset) +{ + zone_rnum zon; + + if ((zon = real_zone(Z_KINGS_C)) == NOWHERE) + return NOWHERE; + + return zone_table[zon].bot + offset; +} + +room_rnum castle_real_room(room_vnum roomoffset) +{ + zone_rnum zon; + + if ((zon = real_zone(Z_KINGS_C)) == NOWHERE) + return NOWHERE; + + return real_room(zone_table[zon].bot + roomoffset); +} /* * Routine: assign_kings_castle @@ -135,7 +147,7 @@ * Used to see if a character is a member of the castle staff. * Used mainly by BANZAI:ng NPC:s. */ -int member_of_staff(struct char_data * chChar) +int member_of_staff(struct char_data *chChar) { int ch_num; @@ -144,16 +156,16 @@ ch_num = GET_MOB_VNUM(chChar); - if (ch_num == CASTLE_ITEM(1)) + if (ch_num == castle_virtual(1)) return (TRUE); - if (ch_num > CASTLE_ITEM(2) && ch_num < CASTLE_ITEM(15)) + if (ch_num > castle_virtual(2) && ch_num < castle_virtual(15)) return (TRUE); - if (ch_num > CASTLE_ITEM(15) && ch_num < CASTLE_ITEM(18)) + if (ch_num > castle_virtual(15) && ch_num < castle_virtual(18)) return (TRUE); - if (ch_num > CASTLE_ITEM(18) && ch_num < CASTLE_ITEM(30)) + if (ch_num > castle_virtual(18) && ch_num < castle_virtual(30)) return (TRUE); return (FALSE); @@ -166,7 +178,7 @@ * Returns TRUE if the character is a guard on duty, otherwise FALSE. * Used by Peter the captain of the royal guard. */ -int member_of_royal_guard(struct char_data * chChar) +int member_of_royal_guard(struct char_data *chChar) { int ch_num; @@ -175,13 +187,13 @@ ch_num = GET_MOB_VNUM(chChar); - if (ch_num == CASTLE_ITEM(3) || ch_num == CASTLE_ITEM(6)) + if (ch_num == castle_virtual(3) || ch_num == castle_virtual(6)) return (TRUE); - if (ch_num > CASTLE_ITEM(7) && ch_num < CASTLE_ITEM(12)) + if (ch_num > castle_virtual(7) && ch_num < castle_virtual(12)) return (TRUE); - if (ch_num > CASTLE_ITEM(23) && ch_num < CASTLE_ITEM(26)) + if (ch_num > castle_virtual(23) && ch_num < castle_virtual(26)) return (TRUE); return (FALSE); @@ -194,7 +206,7 @@ * Returns a pointer to an npc by the given name. * Used by Tim and Tom */ -struct char_data *find_npc_by_name(struct char_data * chAtChar, +struct char_data *find_npc_by_name(struct char_data *chAtChar, const char *pszName, int iLen) { struct char_data *ch; @@ -213,7 +225,7 @@ * Returns the pointer to a guard on duty. * Used by Peter the Captain of the Royal Guard */ -struct char_data *find_guard(struct char_data * chAtChar) +struct char_data *find_guard(struct char_data *chAtChar) { struct char_data *ch; @@ -232,7 +244,7 @@ * fighting someone in the castle staff... * Used by BANZAII-ing characters and King Welmar... */ -struct char_data *get_victim(struct char_data * chAtChar) +struct char_data *get_victim(struct char_data *chAtChar) { struct char_data *ch; int iNum_bad_guys = 0, iVictim; @@ -273,7 +285,7 @@ * Makes a character banzaii on attackers of the castle staff. * Used by Guards, Tim, Tom, Dick, David, Peter, Master, King and Guards. */ -int banzaii(struct char_data * ch) +int banzaii(struct char_data *ch) { struct char_data *chOpponent; @@ -293,7 +305,7 @@ * Makes ch_hero rescue ch_victim. * Used by Tim and Tom */ -int do_npc_rescue(struct char_data * ch_hero, struct char_data * ch_victim) +int do_npc_rescue(struct char_data *ch_hero, struct char_data *ch_victim) { struct char_data *ch_bad_guy; @@ -325,7 +337,7 @@ * Procedure to block a person trying to enter a room. * Used by Tim/Tom at Kings bedroom and Dick/David at treasury. */ -int block_way(struct char_data * ch, int cmd, char *arg, room_rnum iIn_room, +int block_way(struct char_data *ch, int cmd, char *arg, room_rnum iIn_room, int iProhibited_direction) { if (cmd != ++iProhibited_direction) @@ -349,7 +361,7 @@ * Routine to check if an object is trash... * Used by James the Butler and the Cleaning Lady. */ -int is_trash(struct obj_data * i) +int is_trash(struct obj_data *i) { if (!OBJWEAR_FLAGGED(i, ITEM_WEAR_TAKE)) return (FALSE); @@ -367,7 +379,7 @@ * Finds a suitabe victim, and cast some _NASTY_ spell on him. * Used by King Welmar */ -void fry_victim(struct char_data * ch) +void fry_victim(struct char_data *ch) { struct char_data *tch; @@ -435,15 +447,15 @@ static bool move = FALSE; if (!move) { - if (time_info.hours == 8 && ch->in_room == R_ROOM(Z_KINGS_C, 51)) { + if (time_info.hours == 8 && ch->in_room == castle_real_room(51)) { move = TRUE; path = throne_path; index = 0; - } else if (time_info.hours == 21 && ch->in_room == R_ROOM(Z_KINGS_C, 17)) { + } else if (time_info.hours == 21 && ch->in_room == castle_real_room(17)) { move = TRUE; path = bedroom_path; index = 0; - } else if (time_info.hours == 12 && ch->in_room == R_ROOM(Z_KINGS_C, 17)) { + } else if (time_info.hours == 12 && ch->in_room == castle_real_room(17)) { move = TRUE; path = monolog_path; index = 0; @@ -636,7 +648,7 @@ /* * Common routine for the Castle Twins. */ -int castle_twin_proc(struct char_data *ch, int cmd, char *arg, int ctlnum, char *twinname) +int castle_twin_proc(struct char_data *ch, int cmd, char *arg, int ctlnum, const char *twinname) { struct char_data *king, *twin; @@ -644,7 +656,7 @@ return (FALSE); if (cmd) - return block_way(ch, cmd, arg, CASTLE_ITEM(ctlnum), 1); + return block_way(ch, cmd, arg, castle_virtual(ctlnum), 1); if ((king = find_npc_by_name(ch, "King Welmar", 11)) != NULL) { if (!ch->master) @@ -740,7 +752,7 @@ if (!cmd && GET_POS(ch) != POS_FIGHTING) banzaii(ch); - return (block_way(ch, cmd, arg, CASTLE_ITEM(36), 1)); + return (block_way(ch, cmd, arg, castle_virtual(36), 1)); } Index: circle/src/class.c diff -u circle/src/class.c:1.19 circle/src/class.c:1.24 --- circle/src/class.c:1.19 Sun Mar 18 05:15:42 2001 +++ circle/src/class.c Thu Jun 28 08:03:52 2001 @@ -30,12 +30,13 @@ extern int siteok_everyone; /* local functions */ +void snoop_check(struct char_data *ch); int parse_class(char arg); long find_class_bitvector(char arg); byte saving_throws(int class_num, int type, int level); int thaco(int class_num, int level); -void roll_real_abils(struct char_data * ch); -void do_start(struct char_data * ch); +void roll_real_abils(struct char_data *ch); +void do_start(struct char_data *ch); int backstab_mult(int level); int invalid_class(struct char_data *ch, struct obj_data *obj); int level_exp(int chclass, int level); @@ -146,10 +147,10 @@ int prac_params[4][NUM_CLASSES] = { /* MAG CLE THE WAR */ - {95, 95, 85, 80}, /* learned level */ - {100, 100, 12, 12}, /* max per prac */ - {25, 25, 0, 0,}, /* min per pac */ - {SPELL, SPELL, SKILL, SKILL} /* prac name */ + { 95, 95, 85, 80 }, /* learned level */ + { 100, 100, 12, 12 }, /* max per practice */ + { 25, 25, 0, 0 }, /* min per practice */ + { SPELL, SPELL, SKILL, SKILL }, /* prac name */ }; @@ -1397,7 +1398,7 @@ * the best 3 out of 4 rolls of a 6-sided die. Each class then decides * which priority will be given for the best to worst stats. */ -void roll_real_abils(struct char_data * ch) +void roll_real_abils(struct char_data *ch) { int i, j, k, temp; ubyte table[6]; @@ -1465,7 +1466,7 @@ /* Some initializations for characters, including initial skills */ -void do_start(struct char_data * ch) +void do_start(struct char_data *ch) { GET_LEVEL(ch) = 1; GET_EXP(ch) = 1; @@ -1520,7 +1521,7 @@ * This function controls the change to maxmove, maxmana, and maxhp for * each class every time they gain a level. */ -void advance_level(struct char_data * ch) +void advance_level(struct char_data *ch) { int add_hp, add_mana = 0, add_move = 0, i; @@ -1572,6 +1573,7 @@ SET_BIT(PRF_FLAGS(ch), PRF_HOLYLIGHT); } + snoop_check(ch); save_char(ch, NOWHERE); } @@ -1607,22 +1609,20 @@ */ 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; + if (OBJ_FLAGGED(obj, ITEM_ANTI_MAGIC_USER) && IS_MAGIC_USER(ch)) + return TRUE; - if (IS_OBJ_STAT(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) - return 1; + if (OBJ_FLAGGED(obj, ITEM_ANTI_CLERIC) && IS_CLERIC(ch)) + return TRUE; - if (IS_OBJ_STAT(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) - return 1; + if (OBJ_FLAGGED(obj, ITEM_ANTI_WARRIOR) && IS_WARRIOR(ch)) + return TRUE; - if (IS_OBJ_STAT(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch)) - return 1; + if (OBJ_FLAGGED(obj, ITEM_ANTI_THIEF) && IS_THIEF(ch)) + return TRUE; - return 0; + return FALSE; } - - /* Index: circle/src/comm.c diff -u circle/src/comm.c:1.88 circle/src/comm.c:1.97 --- circle/src/comm.c:1.88 Sun Mar 18 18:58:58 2001 +++ circle/src/comm.c Thu Aug 2 21:09:49 2001 @@ -84,7 +84,6 @@ extern int auto_save; /* see config.c */ extern int autosave_time; /* see config.c */ -extern struct room_data *world; /* In db.c */ extern struct time_info_data time_info; /* In db.c */ extern char *help; @@ -101,6 +100,8 @@ int tics = 0; /* for extern checkpointing */ int scheck = 0; /* for syntax checking mode */ struct timeval null_time; /* zero-valued time structure */ +byte reread_wizlist; /* signal: SIGUSR1 */ +byte emergency_unban; /* signal: SIGUSR2 */ FILE *logfile = NULL; /* Where to send the log messages. */ /* functions in this file */ @@ -140,7 +141,7 @@ void setup_log(const char *filename, int fd); int open_logfile(const char *filename, FILE *stderr_fp); #if defined(POSIX) -sigfunc *my_signal(int signo, sigfunc * func); +sigfunc *my_signal(int signo, sigfunc *func); #endif /* extern fcnts */ @@ -301,7 +302,7 @@ * Moved here to distinguish command line options and to show up * in the log if stderr is redirected to a file. */ - log(circlemud_version); + log("%s", circlemud_version); if (chdir(dir) < 0) { perror("SYSERR: Fatal error changing to data directory"); @@ -361,6 +362,9 @@ CLOSE_SOCKET(mother_desc); fclose(player_fl); + log("Saving current MUD time."); + save_mud_time(&time_info); + if (circle_reboot) { log("Rebooting."); exit(52); /* what's so great about HHGTTG, anyhow? */ @@ -776,6 +780,20 @@ while (missed_pulses--) heartbeat(++pulse); + /* Check for any signals we may have received. */ + if (reread_wizlist) { + reread_wizlist = FALSE; + mudlog("Signal received - rereading wizlists.", CMP, LVL_IMMORT, TRUE); + reboot_wizlists(); + } + if (emergency_unban) { + emergency_unban = FALSE; + mudlog("Received SIGUSR2 - completely unrestricting game (emergent)", BRF, LVL_IMMORT, TRUE); + ban_list = NULL; + circle_restrict = 0; + num_invalid = 0; + } + /* Roll pulse over after 10 hours */ if (pulse >= (10 * 60 * 60 * PASSES_PER_SEC)) pulse = 0; @@ -813,6 +831,7 @@ point_update(); fflush(player_fl); } + if (auto_save && !(pulse % PULSE_AUTOSAVE)) { /* 1 minute */ if (++mins_since_crashsave >= autosave_time) { mins_since_crashsave = 0; @@ -820,9 +839,13 @@ House_save_all(); } } + if (!(pulse % PULSE_USAGE)) record_usage(); + if (!(pulse % PULSE_TIMESAVE)) + save_mud_time(&time_info); + /* Every pulse! Don't want them to stink the place up... */ extract_pending_chars(); } @@ -1225,7 +1248,6 @@ } /* create a new descriptor */ CREATE(newd, struct descriptor_data, 1); - memset((char *) newd, 0, sizeof(struct descriptor_data)); /* find the sitename */ if (nameserver_is_slow || !(from = gethostbyaddr((char *) &peer.sin_addr, @@ -1807,14 +1829,16 @@ } if (d->character) { - /* - * Plug memory leak, from Eric Green. - */ + /* If we're switched, this resets the mobile taken. */ + d->character->desc = NULL; + + /* Plug memory leak, from Eric Green. */ if (!IS_NPC(d->character) && PLR_FLAGGED(d->character, PLR_MAILING) && d->str) { if (*(d->str)) free(*(d->str)); free(d->str); } + if (STATE(d) == CON_PLAYING || STATE(d) == CON_DISCONNECT) { struct char_data *link_challenged = d->original ? d->original : d->character; @@ -1823,7 +1847,6 @@ 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) : ""); @@ -1950,18 +1973,13 @@ RETSIGTYPE reread_wizlists(int sig) { - mudlog("Signal received - rereading wizlists.", CMP, LVL_IMMORT, TRUE); - reboot_wizlists(); + reread_wizlist = TRUE; } RETSIGTYPE unrestrict_game(int sig) { - mudlog("Received SIGUSR2 - completely unrestricting game (emergent)", - BRF, LVL_IMMORT, TRUE); - ban_list = NULL; - circle_restrict = 0; - num_invalid = 0; + emergency_unban = TRUE; } #ifdef CIRCLE_UNIX @@ -1974,6 +1992,7 @@ my_signal(SIGCHLD, reap); } +/* Dying anyway... */ RETSIGTYPE checkpointing(int sig) { if (!tics) { @@ -1983,6 +2002,8 @@ tics = 0; } + +/* Dying anyway... */ RETSIGTYPE hupsig(int sig) { log("SYSERR: Received SIGHUP, SIGINT, or SIGTERM. Shutting down..."); @@ -2009,7 +2030,7 @@ #ifndef POSIX #define my_signal(signo, func) signal(signo, func) #else -sigfunc *my_signal(int signo, sigfunc * func) +sigfunc *my_signal(int signo, sigfunc *func) { struct sigaction act, oact; Index: circle/src/comm.h diff -u circle/src/comm.h:1.10 circle/src/comm.h:1.11 --- circle/src/comm.h:1.10 Thu Jan 25 16:44:32 2001 +++ circle/src/comm.h Fri May 18 10:44:58 2001 @@ -43,8 +43,5 @@ #define SEND_TO_Q(messg, desc) write_to_output((messg), desc) -#define USING_SMALL(d) ((d)->output == (d)->small_outbuf) -#define USING_LARGE(d) ((d)->output == (d)->large_outbuf) - typedef RETSIGTYPE sigfunc(int); Index: circle/src/config.c diff -u circle/src/config.c:1.15 circle/src/config.c:1.17 --- circle/src/config.c:1.15 Tue May 18 19:29:31 1999 +++ circle/src/config.c Thu May 17 04:50:31 2001 @@ -63,6 +63,11 @@ /* number of movement points it costs to holler */ int holler_move_cost = 20; +/* how many people can get into a tunnel? The default is two, but there + * is also an alternate message in the case of one person being allowed. + */ +int tunnel_size = 2; + /* exp change limits */ int max_exp_gain = 100000; /* max gainable per kill */ int max_exp_loss = 500000; /* max losable per death */ Index: circle/src/constants.c diff -u circle/src/constants.c:1.18 circle/src/constants.c:1.23 --- circle/src/constants.c:1.18 Sat Feb 10 19:25:46 2001 +++ circle/src/constants.c Fri May 18 11:50:50 2001 @@ -15,7 +15,7 @@ #include "interpreter.h" /* alias_data */ cpp_extern const char *circlemud_version = - "CircleMUD, version 3.00 beta patchlevel 18"; + "CircleMUD, version 3.00 beta patc