diff -c -r --new-file ds2.0r18/INSTALL ds2.0r20b/INSTALL *** ds2.0r18/INSTALL Sun Dec 18 13:13:31 2005 --- ds2.0r20b/INSTALL Wed Apr 5 19:59:01 2006 *************** *** 1,3 **** --- 1,7 ---- + YOU MUST READ THIS URL: http://dead-souls.sourceforge.net/ds-inst-faq.html + + + Then perform the following steps: 1) cd to the directory where all mud files reside. Called $MUDHOME in the rest of this document. *************** *** 37,44 **** 11) You'll get booted out. Reboot the MUD, telnet back in, and you're now running Your Very Own MUD. ! 12) If this doesn't work, please refer to the mudos.org documentation at their website. This procedure works perfectly on SuSE 9.3, SuSE 10, Solaris 8 and Solaris 10, but we can't possibly vouch for every unix flavor and compiler suite out there. If the compile fails, try the local_options file in extra/ ! 13) If there is something actually wrong with this documentation, please visit Frontiers MUD and mudmail Cratylus. Details on this are in the /doc/SUPPORT file. --- 41,51 ---- 11) You'll get booted out. Reboot the MUD, telnet back in, and you're now running Your Very Own MUD. ! 12) If you have problems, review the FAQ: http://dead-souls.sourceforge.net/ds-inst-faq.html ! 13) If this doesn't help, please refer to the mudos.org documentation at their website. This procedure works perfectly on SuSE 9.3, SuSE 10, Solaris 8 and Solaris 10, but we can't possibly vouch for every unix flavor and compiler suite out there. If the compile fails, try the local_options file in extra/ ! ! 14) If there is something actually wrong with this documentation, please visit Frontiers MUD and mudmail Cratylus. Details on this are in the /doc/SUPPORT file. + diff -c -r --new-file ds2.0r18/RELEASE_NOTES ds2.0r20b/RELEASE_NOTES *** ds2.0r18/RELEASE_NOTES Tue Mar 28 23:23:40 2006 --- ds2.0r20b/RELEASE_NOTES Fri Apr 14 18:27:24 2006 *************** *** 1,5 **** ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 25 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. --- 1,88 ---- + ---- 2.0r20 --- + - (hopefully) Fixed rare and peculiar bug that hosed + up logins unpredictably. + - Added the Jonez/Brodbane stargate system. + - Container bug fixed. It is now possible to put + amounts of money into containers and onto surfaces. + - Daemonized snoop system. This permits the logging + of snoop data, unmanned snoop logs, and snooping + multiple players at once. Still slightly buggy, so + please report any problems with it. + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 23 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. diff -c -r --new-file ds2.0r18/bin/startmud ds2.0r20b/bin/startmud *** ds2.0r18/bin/startmud Sat Nov 19 21:08:28 2005 --- ds2.0r20b/bin/startmud Wed Apr 5 19:55:38 2006 *************** *** 1,5 **** --- 1,14 ---- #!/bin/bash + # It has been reported that non-US users have problems + # with some .o files because their systems default to + # commas for decimal notation and not periods. The + # following language exports are fo the benefit of + # people who run into this problem. + export LANG=en_US + export LANGUAGE=en_US + export LC_ALL=en_US + export MUDHOME="" count=1 diff -c -r --new-file ds2.0r18/lib/cfg/timezone.cfg ds2.0r20b/lib/cfg/timezone.cfg *** ds2.0r18/lib/cfg/timezone.cfg Sun Nov 6 01:06:32 2005 --- ds2.0r20b/lib/cfg/timezone.cfg Fri Apr 14 18:27:17 2006 *************** *** 1 **** ! EST \ No newline at end of file --- 1 ---- ! edt \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/cmds/admins/gate.c ds2.0r20b/lib/cmds/admins/gate.c *** ds2.0r18/lib/cmds/admins/gate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/admins/gate.c Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,52 ---- + /** + * modification of code contributed by daelas + * started 2006-04-04 + */ + #include + #include + #include + + // inherit LIB_DAEMON; + inherit LIB_STARGATE; + + mixed cmd(string str) + { + mapping network; + + if (!archp(previous_object())) return 0; + + network = STARGATE_D->getStargates(); + if (str) + { + if (network[lower_case(str)]) + { + write(str+" is part of the Stargate Network.\n"); + } + else + { + write(str+" is not currently part of the Stargate Network.\n"); + } + + } + else + { + write("These are the current Stargate locations in the Network:\n"); + if (!sizeof(network)) + { + message("info", "No locations found.", this_player()); + } + else + { + string buf = ""; + string name; + class stargate info; + + foreach (name, info in network) + { + buf += sprintf("%:-15s %:-10s %s\n", name, info->status, info->destination); + } + write(buf); + } + } + return 1; + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/anglicize.c ds2.0r20b/lib/cmds/creators/anglicize.c *** ds2.0r18/lib/cmds/creators/anglicize.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/anglicize.c Sun Apr 9 23:49:20 2006 *************** *** 0 **** --- 1,41 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + object target; + + if(!str || str == "") str = "me"; + + if(str == "me") str = this_player()->GetKeyName(); + if(!target = present(str, environment(this_player()))){ + write("They're not here."); + return 1; + } + if(!living(target)) { + write("That's not a living thing."); + return 1; + } + if(creatorp(target) && !archp(this_player()) && + target != this_player()){ + write("That's impolite."); + tell_player(target,capitalize(this_player()->GetKeyName())+ + " just tried to anglicize you."); + return 1; + } + + target->SetNativeLanguage("English"); + if(target == this_player()) str = "yourself"; + else str = capitalize(str); + write("You anglicize "+str+"."); + if(target != this_player()) + tell_object(target, capitalize(this_player()->GetKeyName())+" anglicizes you."); + return 1; + } + + void help() { + message("help", "Syntax: anglicize \n\n" + "Make the target's native language English.\n\n", + this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/colors.c ds2.0r20b/lib/cmds/creators/colors.c *** ds2.0r18/lib/cmds/creators/colors.c Wed Dec 7 14:12:58 2005 --- ds2.0r20b/lib/cmds/creators/colors.c Thu Apr 13 21:03:19 2006 *************** *** 3,9 **** inherit LIB_DAEMON; ! void cmd() { write( "%^RED%^RED\n" --- 3,9 ---- inherit LIB_DAEMON; ! int cmd() { write( "%^RED%^RED\n" *************** *** 25,35 **** "%^B_WHITE%^B_WHITE%^RESET%^\n" "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); ! } string GetHelp() { ! return ("Syntax: colors\n\n" ! "Lists all available colors in the corresponding color.\n\n"); } --- 25,36 ---- "%^B_WHITE%^B_WHITE%^RESET%^\n" "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); ! return 1; } string GetHelp() { ! return("Syntax: colors\n\n" ! "Lists all available colors in the corresponding color." ! "\n\n"); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/debug.c ds2.0r20b/lib/cmds/creators/debug.c *** ds2.0r18/lib/cmds/creators/debug.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/debug.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,25 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + int status = this_player()->GetProperty("debug"); + if(!str && !status) str = "on"; + else if(!str && status) str = "off"; + if(str != "on" && str != "off") return 0; + if(str == "on"){ + write("You enable debugging."); + this_player()->SetProperty("debug", 1); + return 1; + } + write("You disable debugging."); + this_player()->SetProperty("debug", 0); + return 1; + } + + void help() { + message("help", "Syntax: debug [on | off]\n\n" + "Allows you to receive debugging information\n\n", + this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/expel.c ds2.0r20b/lib/cmds/creators/expel.c *** ds2.0r18/lib/cmds/creators/expel.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/expel.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,53 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + object ob, *obs; + + if( !args || args == "" ) return "Expel whom?"; + ob = present(args,environment(this_player())); + if(args != "all" && (!ob || !living(ob))){ + + return "Expel only works for living things in your environment."; + } + if(archp(ob) && !archp(this_player())){ + write("You can't expel an admin."); + tell_player(ob, this_player()->GetName()+" just tried to expel you."); + return 1; + } + + if(args == "all"){ + if(archp(this_player())) { + obs = filter(get_livings(environment(this_player())), (: $1 != this_player() :) ); + } + else { + obs = filter(get_livings(environment(this_player())), + (: $1 != this_player() && !archp($1) :) ); + } + } + + else obs = ({ ob }); + + foreach(object nuisance in obs){ + nuisance->eventWimpy(1); + } + + foreach(object nuisance in obs){ + if(environment(nuisance) == environment(this_player())){ + if(creatorp(nuisance)) { + nuisance->eventMoveLiving(homedir(nuisance)+"/workroom"); + } + else nuisance->eventMoveLiving(ROOM_START); + } + } + + return 1; + } + + void help() { + message("help", "Syntax: expel \n\n" + "Forces the specified living thing to leave your environment.\n\n" + "See also: return, goto, move, trans", this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/goto.c ds2.0r20b/lib/cmds/creators/goto.c *** ds2.0r18/lib/cmds/creators/goto.c Mon Jan 23 09:03:35 2006 --- ds2.0r20b/lib/cmds/creators/goto.c Wed Apr 5 19:33:16 2006 *************** *** 43,49 **** "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans.", this_player() ); } --- 43,49 ---- "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans, expel.", this_player() ); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/move.c ds2.0r20b/lib/cmds/creators/move.c *** ds2.0r18/lib/cmds/creators/move.c Mon Nov 7 13:28:38 2005 --- ds2.0r20b/lib/cmds/creators/move.c Wed Apr 5 19:33:16 2006 *************** *** 51,55 **** return ("Syntax: \n\n" "Allows you to move the object you name into the container " "you name.\n\n" ! "See also: trans"); } --- 51,55 ---- return ("Syntax: \n\n" "Allows you to move the object you name into the container " "you name.\n\n" ! "See also: trans, expel, goto, return"); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/trans.c ds2.0r20b/lib/cmds/creators/trans.c *** ds2.0r18/lib/cmds/creators/trans.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/cmds/creators/trans.c Wed Apr 5 19:33:16 2006 *************** *** 34,38 **** void help() { message("help", "Syntax: \n\n" "Brings a living thing to your location.\n\n" ! "See also: return, goto, move", this_player()); } --- 34,38 ---- void help() { message("help", "Syntax: \n\n" "Brings a living thing to your location.\n\n" ! "See also: return, goto, move, expel", this_player()); } diff -c -r --new-file ds2.0r18/lib/cmds/players/date.c ds2.0r20b/lib/cmds/players/date.c *** ds2.0r18/lib/cmds/players/date.c Mon Jan 16 23:01:17 2006 --- ds2.0r20b/lib/cmds/players/date.c Wed Apr 5 19:33:16 2006 *************** *** 8,17 **** #include #include ! mixed cmd(string unused) { string *parts, year, time; int offset, x, hour, min, sec; offset = (int)TIME_D->GetOffset(local_time()[9]); offset += EXTRA_TIME_OFFSET; if(query_os_type() != "windows" ) --- 8,22 ---- #include #include ! mixed cmd(string timezone) { string *parts, year, time; int offset, x, hour, min, sec; + if(timezone && timezone != "" && valid_timezone(timezone)){ + write(local_time(timezone)); + return 1; + } + offset = (int)TIME_D->GetOffset(local_time()[9]); offset += EXTRA_TIME_OFFSET; if(query_os_type() != "windows" ) diff -c -r --new-file ds2.0r18/lib/cmds/players/inventory.c ds2.0r20b/lib/cmds/players/inventory.c *** ds2.0r18/lib/cmds/players/inventory.c Mon Nov 7 13:28:39 2005 --- ds2.0r20b/lib/cmds/players/inventory.c Sun Apr 9 23:49:20 2006 *************** *** 38,46 **** i = sizeof(shorts = keys(borg)); while(i--) ret += capitalize(consolidate(borg[shorts[i]], shorts[i]))+"\n"; message("look", ret, this_player()); ! message("other_action", (string)this_player()->GetName() + " checks " + ! possessive(this_player()) + " possessions.", ! environment(this_player()), ({ this_player() })); } void help() { --- 38,47 ---- i = sizeof(shorts = keys(borg)); while(i--) ret += capitalize(consolidate(borg[shorts[i]], shorts[i]))+"\n"; message("look", ret, this_player()); ! if(!this_player()->GetInvis()) ! message("other_action", (string)this_player()->GetName() + " checks " + ! possessive(this_player()) + " possessions.", ! environment(this_player()), ({ this_player() })); } void help() { diff -c -r --new-file ds2.0r18/lib/cmds/players/language.c ds2.0r20b/lib/cmds/players/language.c *** ds2.0r18/lib/cmds/players/language.c Sat Mar 11 11:13:28 2006 --- ds2.0r20b/lib/cmds/players/language.c Wed Apr 5 19:33:16 2006 *************** *** 12,18 **** write("You speak:"); foreach(string key, int val in FluencyMap){ ! write(key+" with "+val+"% proficiency."); } return 1; --- 12,18 ---- write("You speak:"); foreach(string key, int val in FluencyMap){ ! write(capitalize(key)+" with "+val+"% proficiency."); } return 1; diff -c -r --new-file ds2.0r18/lib/daemon/banish.c ds2.0r20b/lib/daemon/banish.c *** ds2.0r18/lib/daemon/banish.c Mon Jan 16 23:01:42 2006 --- ds2.0r20b/lib/daemon/banish.c Wed Apr 12 23:47:49 2006 *************** *** 5,10 **** --- 5,11 ---- */ #include + #include #include #include #include *************** *** 67,73 **** } static private int valid_access(object ob) { ! return (int)master()->valid_apply( ({ "LAW", "SUPERUSER" }) ); } int valid_cap_name(string cap, string nom) { --- 68,74 ---- } static private int valid_access(object ob) { ! return (int)master()->valid_apply( ({ "ASSIST" }) ); } int valid_cap_name(string cap, string nom) { diff -c -r --new-file ds2.0r18/lib/daemon/include/stargate.h ds2.0r20b/lib/daemon/include/stargate.h *** ds2.0r18/lib/daemon/include/stargate.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/daemon/include/stargate.h Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,19 ---- + #include "/include/stargate.h" + + #ifndef daemon_stargate_h + #define daemon_stargate_h + + void load(); + void save(); + int setStargate(string address, string destination); + class stargate getStargate(string address); + int delStargate(string address); + mapping getStargates(); + int setStatus(string address, string status); + string getStatus(string address); + string getDestination(string address); + string getEndpoint(string address); + int connect(string from, string to); + int disconnect(string from); + + #endif diff -c -r --new-file ds2.0r18/lib/daemon/intermud.c ds2.0r20b/lib/daemon/intermud.c *** ds2.0r18/lib/daemon/intermud.c Tue Mar 28 23:54:03 2006 --- ds2.0r20b/lib/daemon/intermud.c Wed Apr 12 23:47:49 2006 *************** *** 31,39 **** Password = 0; Tries = 0; Banned = ([]); - // There is only one known I3 router as of - // Feb 2006: us-1.i3.intermud.org - //Nameservers = ({ ({ "*gjs", "198.144.203.194 9000" }) }); Nameservers = ({ ({ "*yatmim", "149.152.218.102 23" }) }); MudList = new(class list); ChannelList = new(class list); --- 31,36 ---- *************** *** 44,49 **** --- 41,47 ---- if( file_size( SAVE_INTERMUD __SAVE_EXTENSION__ ) > 0 ) unguarded( (: restore_object, SAVE_INTERMUD, 1 :) ); SetNoClean(1); + tn("INTERMUD_D reloaded."); SetDestructOnClose(1); SetSocketType(MUD); if(DISABLE_INTERMUD == 1){ *************** *** 66,71 **** --- 64,76 ---- mudlib() + " " + mudlib_version(), version(), "LPMud", MUD_STATUS, ADMIN_EMAIL, (mapping)SERVICES_D->GetServices(), ([]) }) ); + tn("INTERMUD_D setup: "+identify( ({ + "startup-req-3", 5, mud_name(), 0, Nameservers[0][0], 0, + Password, MudList->ID, ChannelList->ID, query_host_port(), + PORT_OOB, PORT_UDP, mudlib() + " " + mudlib_version(), + mudlib() + " " + mudlib_version(), version(), "LPMud", + MUD_STATUS, ADMIN_EMAIL, + (mapping)SERVICES_D->GetServices(), ([]) }) ), "red");; } static void eventRead(mixed *packet) { *************** *** 86,93 **** //default : tc("Packet: "+identify(packet)); case "startup-reply": log_file("intermud",identify(packet)); ! if( sizeof(packet) != 8 ) return; /* should send error */ ! if( !sizeof(packet[6]) ) return; if( packet[6][0][0] == Nameservers[0][0] ) { Nameservers = packet[6]; Connected = Nameservers[0][0]; --- 91,105 ---- //default : tc("Packet: "+identify(packet)); case "startup-reply": log_file("intermud",identify(packet)); ! tn("INTERMUD_D: "+identify(packet),"red"); ! if( sizeof(packet) != 8 ) { ! tn("We don't like the mudlist packet size.","red"); ! return; ! } ! if( !sizeof(packet[6]) ) { ! tn("We don't like an absence of packet element 6.","red"); ! return; ! } if( packet[6][0][0] == Nameservers[0][0] ) { Nameservers = packet[6]; Connected = Nameservers[0][0]; *************** *** 100,110 **** } return; case "mudlist": ! if( sizeof(packet) != 8 ) return; ! if( packet[6] == MudList->ID ) return; ! if( packet[2] != Nameservers[0][0] ) return; MudList->ID = packet[6]; foreach(cle, val in packet[7]) { if( !val && MudList->List[cle] != 0 ) map_delete(MudList->List, cle); else if( val ) MudList->List[cle] = val; --- 112,137 ---- } return; case "mudlist": ! tn("INTERMUD_D mudlist received.","red"); ! log_file("mudlist_packet",identify(packet),1); ! if( sizeof(packet) != 8 ) { ! tn("We don't like the mudlist packet size.","red"); ! return; ! } ! if( packet[6] == MudList->ID ) { ! tn("We don't like packet element 6. It is: "+identify(packet[6]),"red"); ! //return; ! tn("We will continue anyway.","red"); ! } ! if( packet[2] != Nameservers[0][0] ) { ! tn("We don't like packet element 2. It is: "+identify(packet[2]),"red"); ! return; ! } ! MudList->ID = packet[6]; foreach(cle, val in packet[7]) { + if(cle) tn("Procesing cle: "+identify(cle),"cyan"); + if(val) tn("Procesing val: "+identify(val)+"\n--\n","cyan"); if( !val && MudList->List[cle] != 0 ) map_delete(MudList->List, cle); else if( val ) MudList->List[cle] = val; *************** *** 166,171 **** --- 193,199 ---- SERVICES_D->eventReceiveTell(packet); break; case "chan-user-reply": + tn("INTERMUD_D: chan-user-reply received.","red"); case "ucache-update": SERVICES_D->eventReceiveUcacheUpdate(packet); break; *************** *** 185,190 **** --- 213,219 ---- SERVICES_D->eventReceiveMailOk(packet); break; case "file": + tn("INTERMUD_D: file packet received.","red"); break; case "error": SERVICES_D->eventReceiveError(packet); *************** *** 205,210 **** --- 234,240 ---- static void eventConnectionFailure() { if( Connected ) return; + tn("INTERMUD_D: CONNECTION FAILED","red"); error("Failed to find a useful name server.\n"); } diff -c -r --new-file ds2.0r18/lib/daemon/preload_check.c ds2.0r20b/lib/daemon/preload_check.c *** ds2.0r18/lib/daemon/preload_check.c Sat Mar 11 11:14:52 2006 --- ds2.0r20b/lib/daemon/preload_check.c Wed Apr 5 19:33:16 2006 *************** *** 8,14 **** static void checkPreloads(){ foreach(string daemon in preloads){ ! if(!find_object(daemon) && daemon != INTERMUD_D) update(daemon); } call_out((: checkPreloads :), 300); --- 8,15 ---- static void checkPreloads(){ foreach(string daemon in preloads){ ! if(!find_object(daemon) && daemon != INTERMUD_D && ! daemon != AUTOEXEC_D) update(daemon); } call_out((: checkPreloads :), 300); diff -c -r --new-file ds2.0r18/lib/daemon/races.c ds2.0r20b/lib/daemon/races.c *** ds2.0r18/lib/daemon/races.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/races.c Sun Apr 9 23:49:20 2006 *************** *** 158,164 **** //tc("hellow"); res = new(class Race); - s = new (class Stat); res->Resistance = ([]); res->Skills = ([]); --- 158,163 ---- *************** *** 255,264 **** break; case "STATS": tmp = explode(replace_string(line, "STATS ",""), ":"); ! s->Average = to_int(tmp[1]); ! s->Class = to_int(tmp[2]); res->Stats[tmp[0]] = s; break; case "LIMB": --- 254,268 ---- break; case "STATS": + tmp = ({}); + s = new (class Stat); tmp = explode(replace_string(line, "STATS ",""), ":"); ! //tc("stat: "+identify(tmp),"yellow"); ! s->Average = copy(to_int(tmp[1])); ! s->Class = copy(to_int(tmp[2])); res->Stats[tmp[0]] = s; + //tc("ihnfcaa: "+(res->Stats[tmp[0]])->Average,"yellow"); + //tc("ihnfcaax2: "+(res->Stats[tmp[0]])->Class,"yellow"); break; case "LIMB": *************** *** 406,411 **** --- 410,417 ---- void SetCharacterRace(string race, mixed array args) { class Race res = Races[race]; mixed array tmp; + mapping StatMap; + string schluss; if( !res || !res->Complete || sizeof(args) != 5 ) return; tmp = ({}); *************** *** 413,420 **** tmp = ({ tmp..., ({ key, val }) }); args[0] = tmp; tmp = ({}); ! foreach(string key, class Stat stat in res->Stats) ! tmp = ({ tmp..., ({ key, stat->Average, stat->Class }) }); args[1] = tmp; args[2] = res->Language; //args[3] = ({ res->Sensitivity[0], res->Sensitivity[1] }); --- 419,434 ---- tmp = ({ tmp..., ({ key, val }) }); args[0] = tmp; tmp = ({}); ! //foreach(string key, class Stat stat in res->Stats){ ! StatMap = copy(res->Stats); ! schluss = ""; ! foreach(schluss in keys(StatMap)){ ! //tc("key: "+identify(StatMap[schluss]),"green"); ! //tc("Average: "+identify(StatMap[schluss]->Average),"green"); ! //tc("Class: "+identify(StatMap[schluss]->Class),"green"); ! tmp = ({ tmp..., ({ schluss, StatMap[schluss]->Average, StatMap[schluss]->Class }) }); ! //tc("SetCharacterRace: "+identify(tmp)); ! } args[1] = tmp; args[2] = res->Language; //args[3] = ({ res->Sensitivity[0], res->Sensitivity[1] }); diff -c -r --new-file ds2.0r18/lib/daemon/services/auth.c ds2.0r20b/lib/daemon/services/auth.c *** ds2.0r18/lib/daemon/services/auth.c Sat Mar 11 11:14:53 2006 --- ds2.0r20b/lib/daemon/services/auth.c Wed Apr 12 23:47:49 2006 *************** *** 13,18 **** --- 13,19 ---- pinger->SetOK(1); } } + tn("Auth reply received from "+packet[2]+".","white"); if(sizeof(pingers)){ foreach(object dude in pingers){ tell_player(dude, packet[2]+" has just replied to a ping request from "+ *************** *** 25,30 **** --- 26,32 ---- void eventReceiveAuthRequest(mixed array packet) { string mudlist = ""; PING_D->SetOK(); + tn("Auth request received from "+packet[2]+".","white"); INTERMUD_D->eventWrite( ({"auth-mud-reply", 5, mud_name(), 0, packet[2], 0, (random(9999) * 10000) + 1138 }) ); if(file_exists("/tmp/muds.txt")) *************** *** 32,38 **** if(!grepp(mudlist,packet[2]) || packet[2] == "DeadSoulsNew" || packet[2] == "DeadSoulsWin"){ write_file("/tmp/muds.txt",packet[2]+"\n"); ! tc("We have a new mud! "+packet[2]+" has joined intermud.","red"); } } --- 34,41 ---- if(!grepp(mudlist,packet[2]) || packet[2] == "DeadSoulsNew" || packet[2] == "DeadSoulsWin"){ write_file("/tmp/muds.txt",packet[2]+"\n"); ! //tc("We have a new mud! "+packet[2]+" has joined intermud.","red"); ! tn("We have a new mud! "+packet[2]+" has joined intermud.","red"); } } diff -c -r --new-file ds2.0r18/lib/daemon/services/channel.c ds2.0r20b/lib/daemon/services/channel.c *** ds2.0r18/lib/daemon/services/channel.c Tue Mar 28 23:23:40 2006 --- ds2.0r20b/lib/daemon/services/channel.c Sun Apr 9 23:49:20 2006 *************** *** 14,19 **** --- 14,20 ---- void eventReceiveChannelWhoReply(mixed array packet) { object ob; + tn("eventReceiveChannelWhoReply: "+identify(packet),"green"); if( file_name(previous_object()) != INTERMUD_D ) return; if( !(ob = find_player(packet[5])) ) return; *************** *** 39,44 **** --- 40,46 ---- ret += entry+", "; } ret = truncate(ret,2); + tn("eventReceiveChannelWhoRequest: "+identify(packet),"green"); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users listening to channel "+packet[6]+". Replying with: %^BOLD%^GREEN%^"+ret+".%^RESET%^\""); } *************** *** 48,53 **** --- 50,56 ---- string visname; int gender; if( file_name(previous_object()) != INTERMUD_D ) return; + tn("eventReceiveChannelUserRequest: "+identify(packet),"green"); if( !(ob = find_player(packet[6])) ) { INTERMUD_D->eventWrite( ({ "error", 5, mud_name(), 0, packet[2], 0, "unk-user", packet[6] + " is not a valid " *************** *** 65,70 **** --- 68,75 ---- } void eventReceiveChannelMessage(mixed array packet) { + tn("eventReceiveChannelMessage: "+identify(packet),"green"); + if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; *************** *** 75,80 **** --- 80,87 ---- } void eventReceiveChannelEmote(mixed array packet) { + tn("eventReceiveChannelEmote: "+identify(packet),"green"); + if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; if( !packet[7] ) return; *************** *** 85,90 **** --- 92,98 ---- void eventReceiveChannelTargettedEmote(mixed array packet) { string target; + tn("eventReceiveChannelTargettedEmote: "+identify(packet),"green"); if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; *************** *** 98,106 **** --- 106,117 ---- varargs void eventSendChannel(string who, string ch, string msg, int emote, string target, string targmsg) { mixed array packet; + mixed array packet_thing = ({ who, ch, msg, emote || "", target || "", targmsg || "" }); string targpl, where; // targpl is target keyname + tn("eventSendChannel raw: "+identify( packet_thing ),"green"); + if( emote ) { if( target && targmsg ) { if( sscanf(target, "%s@%s", targpl, where) != 2 ) { *************** *** 126,131 **** --- 137,143 ---- else packet = ({ "channel-m", 5, mud_name(), convert_name(who), 0, 0, ch, who, msg }); INTERMUD_D->eventWrite(packet); + tn("eventSendChannel processed: "+identify(packet),"green"); } void eventSendChannelWhoRequest(string channel, string mud) { *************** *** 134,139 **** --- 146,152 ---- pl = (string)this_player(1)->GetKeyName(); INTERMUD_D->eventWrite(({ "chan-who-req", 5, mud_name(), pl, mud, 0, channel })); + tn("eventSendChannelWhoRequest: "+identify( ({ "chan-who-req", 5, mud_name(), pl, mud, 0, channel })) , "green"); } void eventRegisterChannels(mapping list) { *************** *** 155,164 **** --- 168,181 ---- else INTERMUD_D->eventWrite(({ "channel-listen", 5, mud_name(), 0, ns, 0, channel, 1 })); } + tn("eventRegisterChannels: "+identify(list),"green"); + } int eventAdministerChannel(string channel, string array additions, string array subs) { + tn("eventAdministerChannel. ","green"); + if( !((int)master()->valid_apply( ({}) )) ) return 0; if( member_array(channel, (string array)INTERMUD_D->GetChannels()) == -1 ) return 0; *************** *** 166,175 **** --- 183,196 ---- (string)this_player(1)->GetKeyName(), (string)INTERMUD_D->GetNameserver(), 0, channel, additions, subs })); + + tn("eventAdministerChannel: "+channel+" "+identify(additions)+" "+identify(subs),"green"); return 1; } int AddChannel(string channel, int privee) { + tn("eventAdministerChannel: "+channel+", "+privee,"green"); + if( !((int)master()->valid_apply( ({}) )) ){ return 0; } *************** *** 185,190 **** --- 206,213 ---- int RemoveChannel(string channel) { //if( !((int)master()->valid_apply( ({}) )) ) return 0; + tn("RemoveChannel: "+identify(channel),"green"); + if( member_array(channel, (string array)INTERMUD_D->GetChannels()) == -1 ){ return 0; } diff -c -r --new-file ds2.0r18/lib/daemon/services/emoteto.c ds2.0r20b/lib/daemon/services/emoteto.c *** ds2.0r18/lib/daemon/services/emoteto.c Mon Nov 7 13:29:14 2005 --- ds2.0r20b/lib/daemon/services/emoteto.c Sun Apr 9 23:49:20 2006 *************** *** 12,17 **** --- 12,18 ---- object ob; string who; + tn("eventReceiveEmote: "+identify(packet), "green"); if( file_name(previous_object()) != INTERMUD_D ) return; who = convert_name(packet[5]); if( !(ob = find_player(who)) || (int)ob->GetInvis() ) { *************** *** 34,39 **** --- 35,41 ---- where = (string)INTERMUD_D->GetMudName(where); INTERMUD_D->eventWrite(({ "emoteto", 5, mud_name(), pl, where, convert_name(who), plc, msg })); + tn("eventSendEmote: "+identify( "emoteto", 5, mud_name(), pl, where,convert_name(who), plc, msg ),"green"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/error.c ds2.0r20b/lib/daemon/services/error.c *** ds2.0r18/lib/daemon/services/error.c Mon Nov 7 13:29:14 2005 --- ds2.0r20b/lib/daemon/services/error.c Sun Apr 9 23:49:20 2006 *************** *** 8,13 **** --- 8,15 ---- object ob; string error_code, mud, target, msg; + tn("ERROR RECEIVED: "+identify(packet)); + if( packet[5] ) { target = convert_name(packet[5]); if( !(ob = find_player(target)) ) return; diff -c -r --new-file ds2.0r18/lib/daemon/services/finger.c ds2.0r20b/lib/daemon/services/finger.c *** ds2.0r18/lib/daemon/services/finger.c Sat Mar 11 11:14:53 2006 --- ds2.0r20b/lib/daemon/services/finger.c Sun Apr 9 23:49:20 2006 *************** *** 26,31 **** --- 26,32 ---- ret = ({ "finger-reply", 5, mud_name(), 0, packet[2], packet[3] }) + ret; INTERMUD_D->eventWrite(ret); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested finger information about "+capitalize(ret[6])+".%^RESET%^\""); + tn("eventReceiveFingerRequest: "+identify(packet),"cyan"); } *************** *** 52,57 **** --- 53,59 ---- fing += "Site: " + (packet[12] ? packet[12] : "Confidential") + "\n"; fing += (packet[14] ? packet[14] : "\n"); ob->eventPrint(fing, MSG_SYSTEM); + tn("eventReceiveFingerReply: "+identify(packet),"cyan"); } void eventSendFingerRequest(string who, string where) { *************** *** 60,63 **** --- 62,66 ---- if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "finger-req", 5, mud_name(), pl, where, 0, who }) ); + tn("eventSendFingerRequest: "+identify( ({ "finger-req", 5, mud_name(), pl, where, 0,who }) ),"cyan"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/locate.c ds2.0r20b/lib/daemon/services/locate.c *** ds2.0r18/lib/daemon/services/locate.c Wed Feb 22 15:29:50 2006 --- ds2.0r20b/lib/daemon/services/locate.c Sun Apr 9 23:49:20 2006 *************** *** 19,24 **** --- 19,25 ---- if( file_name(previous_object()) != INTERMUD_D ) return; tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has issued a locate request for %^BOLD%^YELLOW%^"+capitalize(packet[6])+".%^RESET%^\""); + tn("Locate request received: "+identify(packet),"white"); if( !(ob = find_player(packet[6])) || ob->GetInvis()) return; if( interactive(ob) ) { string array tmp = ({ }); *************** *** 43,48 **** --- 44,50 ---- if( file_name(previous_object()) != INTERMUD_D ) return; if( !stringp(packet[5]) || !(ob = find_player(convert_name(packet[5]))) ) return; + tn("Locate reply received: "+identify(packet),"white"); m = packet[7] + " was just located on " + packet[6] + "."; if( (idl = (int)packet[8]) > 60 ) m += sprintf(" (idle %02d:%02d:%02d)", idl/3600, (idl/60)%60, idl%60); *************** *** 53,59 **** void eventSendLocateRequest(string who) { string pl; ! if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "locate-req", 5, mud_name(), pl, 0, 0, who }) ); } --- 55,62 ---- void eventSendLocateRequest(string who) { string pl; ! mixed *locate_request = ({ "locate-req", 5, mud_name(), pl, 0, 0, who }); if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "locate-req", 5, mud_name(), pl, 0, 0, who }) ); + tn("Locate request being sent: "+identify(locate_request),"white"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/tell.c ds2.0r20b/lib/daemon/services/tell.c *** ds2.0r18/lib/daemon/services/tell.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/services/tell.c Sun Apr 9 23:49:20 2006 *************** *** 14,19 **** --- 14,20 ---- string who; string adverb = ""; + tn("eventReceiveTell: "+identify(packet),"yellow"); if( file_name(previous_object()) != INTERMUD_D ) return; who = convert_name(packet[5]); if( !(ob = find_player(who)) || (int)ob->GetInvis() ) { *************** *** 59,64 **** --- 60,66 ---- this_player(1)->eventPrint("%^BOLD%^RED%^You tell " + capitalize(who) + "@" + where + ":%^RESET%^ " + msg, MSG_CONV); + tn("eventSendTell: "+identify( ({ "tell", 5, mud_name(), pl, where, convert_name(who), plc, msg }) ), "yellow"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/who.c ds2.0r20b/lib/daemon/services/who.c *** ds2.0r18/lib/daemon/services/who.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/services/who.c Sun Apr 9 23:49:20 2006 *************** *** 19,24 **** --- 19,25 ---- foreach(who in packet[6]) list += ({ who[0] + " (" + who[1] + " idle): " + who[2] }); ob->eventPage(list); + tn("eventReceiveWhoReply: "+identify(packet),"blue"); } void eventReceiveWhoRequest(mixed *packet) { *************** *** 34,40 **** ret += entry[0]+", "; } ret = truncate(ret,2); ! tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users currently logged on. Replying with: %^BOLD%^YELLOW%^"+ret+".%^RESET%^\""); } --- 35,41 ---- ret += entry[0]+", "; } ret = truncate(ret,2); ! tn("eventReceiveWhoRequest: "+identify(packet),"blue"); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users currently logged on. Replying with: %^BOLD%^YELLOW%^"+ret+".%^RESET%^\""); } *************** *** 43,48 **** --- 44,50 ---- who = (string)this_player(1)->GetName(); INTERMUD_D->eventWrite(({ "who-req", 5, mud_name(), who, mud, 0 })); + tn("eventSendWhoRequest: "+identify( ({ "who-req", 5, mud_name(), who, mud, 0 })), "blue"); } diff -c -r --new-file ds2.0r18/lib/daemon/stargate.c ds2.0r20b/lib/daemon/stargate.c *** ds2.0r18/lib/daemon/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/daemon/stargate.c Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,185 ---- + /** + * stargate_d : stargate daemon. tracks the entire stargate network. + * started 2006-03-23 by jonez + * + * 2006-03-24, jonez + * - with help from cratylus, changed the daemon so it saves it's state + * whenever there is a change, and tries to load from disk at create + * time. + * 2006-03-28, jonez + * - gate is status is now "idle", "outbound", or "inbound". gate cannot be entered from the inbound side. + */ + + #include + #include + #include "/daemon/include/stargate.h" + + inherit LIB_DAEMON; + + private mapping stargates = ([]); + + static void create() + { + daemon::create(); + SetNoClean(1); + load(); + if (!stargates) stargates = ([]); + } + + void save() + { + unguarded( (: save_object, SAVE_STARGATE, 1 :) ); + tell_player("jonez", "stargate daemon saved itself"); + return; + } + + void load() + { + if (file_size(SAVE_STARGATE __SAVE_EXTENSION__) > 0) + { + tc("stargate save file exists"); + unguarded( (: restore_object, SAVE_STARGATE :) ); + } + tell_player("jonez", "stargate daemon loaded itself"); + return; + } + + int setStargate(string address, string destination) + { + class stargate s = new(class stargate); + + if (address == "" || destination == "") return 1; + + s->status = "idle"; + s->destination = destination; + s->endpoint = 0; + stargates[address] = s; + save(); + return 0; + } + + class stargate getStargate(string address) + { + class stargate s = stargates[address]; + if (!s) return 0; + + tell_player("jonez", sprintf("get: address=%s, status=%s destination=%s endpoint=%s", address, s->status, s->destination, s->endpoint)); + return (class stargate)stargates[address]; + } + + int delStargate(string address) + { + map_delete(stargates, address); + save(); + return 0; + } + + mapping getStargates() + { + /* + string buf = ""; + + foreach(string n, class stargate g in stargates) + { + buf += sprintf("name=%s, status=%s, destination=%s, endpoint=%s; ", n, g->status, g->destination, g->endpoint); + } + return buf; + */ + return copy(stargates); + } + + int setStatus(string address, string status) + { + class stargate s; + s = stargates[address]; + if (!s) return 1; + + s->status = status; + save(); + return 0; + } + + string getStatus(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + + return s->status; + } + + string getDestination(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + return s->destination; + } + + string getEndpoint(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + return s->endpoint; + } + + // return 1 on success, 0 on error + int connect(string from, string to) + { + class stargate t, f; + + tell_player("jonez", sprintf("stargate_d->connect(%s, %s)", from, to)); + + if (from == to) return 0; + + f = stargates[from]; + if (!f) + { + tell_player("jonez", "failed to lookup status of outbound gate"); + return 0; + } + + t = stargates[to]; + if (!t) + { + tell_player("jonez", "failed to lookup status of inbound gate"); + return 0; + } + + tell_player("jonez", sprintf("%s->status=%s, %s->status=%s", from, f->status, to, t->status)); + + if (f->status == "idle" && t->status == "idle") + { + f->endpoint = to; + f->status = "outbound"; + + t->endpoint = from; + t->status = "inbound"; + + save(); + + return 1; + } + return 0; + } + + // return 1 on success, 0 on error + int disconnect(string from) + { + class stargate f; + string endpoint; + + tell_player("jonez", sprintf("stargate_d->disconnect(%s)", from)); + + f = stargates[from]; + if (!f) return 0; + + endpoint = stargates[from]->endpoint; + if (!endpoint) return 0; + + stargates[endpoint]->endpoint = ""; + stargates[endpoint]->status = "idle"; + + stargates[from]->endpoint = ""; + stargates[from]->status = "idle"; + save(); + return 1; + } diff -c -r --new-file ds2.0r18/lib/doc/CREDITS ds2.0r20b/lib/doc/CREDITS *** ds2.0r18/lib/doc/CREDITS Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/doc/CREDITS Wed Apr 5 19:33:16 2006 *************** *** 13,19 **** Brodbane, Ashon, Shadyman, Jonez, Cecil. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, ! Aten, Metiscus, and Alensin for their thoughtful comments and suggestions. Also: Xyzzy He Is Cool --- 13,19 ---- Brodbane, Ashon, Shadyman, Jonez, Cecil. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, ! Aten, Metiscus, Garfield, Javelin, and Alensin for their thoughtful comments and suggestions. Also: Xyzzy He Is Cool diff -c -r --new-file ds2.0r18/lib/doc/RELEASE_NOTES ds2.0r20b/lib/doc/RELEASE_NOTES *** ds2.0r18/lib/doc/RELEASE_NOTES Tue Mar 28 23:23:40 2006 --- ds2.0r20b/lib/doc/RELEASE_NOTES Fri Apr 14 18:27:24 2006 *************** *** 1,5 **** ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 25 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. --- 1,88 ---- + ---- 2.0r20 --- + - (hopefully) Fixed rare and peculiar bug that hosed + up logins unpredictably. + - Added the Jonez/Brodbane stargate system. + - Container bug fixed. It is now possible to put + amounts of money into containers and onto surfaces. + - Daemonized snoop system. This permits the logging + of snoop data, unmanned snoop logs, and snooping + multiple players at once. Still slightly buggy, so + please report any problems with it. + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 23 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. diff -c -r --new-file ds2.0r18/lib/doc/RELEASE_NOTES_HTTP ds2.0r20b/lib/doc/RELEASE_NOTES_HTTP *** ds2.0r18/lib/doc/RELEASE_NOTES_HTTP Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/doc/RELEASE_NOTES_HTTP Wed Apr 12 23:47:49 2006 *************** *** 0 **** --- 1,386 ---- + ---- 2.0r20 (unreleased) --- + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + + ---- 2.0r18 --- + - Changed default intermud router to 149.152.218.102 port 23 + - Added a sanity check in telnet room. + - Fixed bug in Newbie Mansion Quest (thx Jonez). + - Added verb: pulsecheck. + - Fixed bug in delete verb that broke when deleting an + item with a relative include defined. + - Fixed a wielding bug that let you wield a two-handed + weapon AND a one-handed weapon. + - Added more damage types. + - Fixed month bug in timestamp.c. + - Fixed light bug in ROOM_VOID. + + ---- 2.0r17 --- + - Fixed bug that prevented assistant admins from shutting down. + - Added Shadyman's emote doc. + - Tweaked timestamp() (thx, Jonez). + - Tweaked "dest" code (thx, Cecil). + - Added convert_ascii() sefun to stringify ascii codes. + - Added get_random_living() sefun. + - QCS now sanely stops when the target is virtual. + - Players can no longer be hosed by being initfixed. + - Fixed bug that returned conflicting messages if + an intermud tell was received while invis with + voicemail enabled. + - timezone.cfg can now be set to blank with admintool. + - Fixed problem in CHAT_D that restricted local channel + emotes when intermud was set to be restricted. + - Fixed a bug in null currency addition in admintool. + - Smushed another apostrophe problem. This is really ridiculous, I + should just fix the real problem, but it's such a dumb + bug, it's easier to pretend it doesn't exist. + - Added SetCustomXP to /lib/combat so that NPC's can have + expee value independent of that calculated from their level. + - Added SetCustomXP to QCS. + - Wrapped users() efun in a sefun to exclude users without + an environment. + - Removed old, counterproductive intermud update event. + - Added log rotation daemon in /secure/daemon/log.c + - Added a log rotation check every 2 hours. + - Format of timestamp() sefun changed to prevent screwing the + mud when running on Windows and logs rotate. + - Fixed bug in update() sefun. + - Prettified devel mud welcome file and added warning about + submitted code being automatically GPL. + - The title and chfn commands now automatically update finger + info with current data. + - *COMPAT BUSTER* RACES_D re-written (Thanks, Ashon). If you've + added your own races, you'll need to re-add them using the new format. + - /www FAQ material updated. + - Fixed Radagast's training skills, fixed QCS trainer creation. + - Modified telnet room to not permit recursive logins on the + development Dead Souls mud. + - Removed nonexistent boards from boards command. + - Added commands: addraces, removeraces, ascii, resetall, flushobs. + + ---- 2.0r16 --- + - Admin email specified at login now gets sent to config.h. + - New FAQ material added to /www + - If a file exists in /doc/help/races for a specified race, + help will display that file instead of the autogenerated + race body data. + + ---- 2.0r15 --- + - Intermud can be disabled entirely by toggling DISABLE_INTERMUD + in /secure/include/config.h. + - *COMPAT BUSTER* Basic framework for race-based skills in + place. Old races.o files will not work with the new race + data file format expected by RACES_D. + - Fleas and lice examples now unbroken. + - Peer command unbroken. + - Fixed miscellaneous i3 services bugs. + - Tweaked the apostrophe workaround. + - "cd here" now works. + - Added intermud link failure/restoration announcement + to arch room. + - Fixed LIB_READ so that receiving a string for a functional's + return of a GetRead makes that string the text to be read. + - Fixed read bug in /lib/bboard.c. + - Fixed a problem with eval that puked on ASSIST members. + - Fixes and updates made to answering machine. Intermud + tell support added. + - Intermud tells now reach the player if she is invisible. The + tell sender's mud receives an "unknown user" error, and the + player receives an "unknowingly tells you" message. + - Intermud channels can be disabled by toggling + RESTRICTED_INTERMUD in /secure/include/config.h. Exceptions + to this restriction can be made by adding users to + the INTERMUD group using admintool. + - Automatic promotion of new characters to creator status can + be enabled by editing /secure/include/config.h and + toggling AUTO_WIZ. + - Update and runtime errors now attempt to display more helpful + messages to the user, if the user is a creator (Thx, Brodbane). + - Error logs now include timestamps. + - Added trainers to QCS. + - *COMPAT BUSTER*: Trainer skills now have to be specified with + an array, not just a series of strings: + RIGHT: AddTrainingSkills( ({ "alpha", "bravo", "charlie" }) ); + WRONG: AddTrainingSkills( "alpha", "bravo", "charlie" ); + - Fixed error message bug in /lib/trainer.c. + - Fixed chat.c bug that allowed emotes from earmuffed players + to be printed. + - Added languages to say verb. + - Added languages to reading. + - Added commands: language, ping. + - Updated/added various help files. + - Added FAQs (/doc/faq...accessed with the faq command). + - Updated Player's Handbook. + - Miscellaneous header fixes. + - Fixed issues in description.c and look.c that interfered with + having multiple Item elements in objects and having arrays + for keys in Item elements in objects. + - Added IDLE_TIMEOUT to /secure/include/config.h + - Added sefuns: imud_privp, find_inheritors, find_deep_inheritors, + securep. + - Overhauled limb and corpse decay. DECAY_D now handles the + callouts, reducing the number of decaying callouts to 1, regardless + of the number of limbs and corpses lying about. + - Limb ID bug fixed. + - Added tweaks to read verb and faq command submitted by Manchi. + + ---- 2.0r14 --- + - Added barkeeps to QCS. + - Added vendors to QCS. + - Barkeeps now properly handle array keys in menu items. See Lars. + - Updated www directory. + - Abbreviated RELEASE_NOTES: dropped pre-v2 data. + - Added commands: consider, whomuffed. + - Fixed QCS bug that hosed room paths. See "room filenames" notes + in chapter 35 of the Creator's Manual. + - Fixed problem with hobbling 4-legged NPC's. + - Additional docs, helpfiles, updated faqs and expanded QCS chapters. + + ---- 2.0r13 --- + - Numerous minor fixes to commands and lib objects. + - Keepalive daemon implemented to detect when the intermud + connection is down and attempts to restart it. + - Intermud services now supports "auth" packets, somewhat. + - The bk command now also works on objects. + - Added commands: kills, chanban, chanunban, earmuff, unmuff. + - Fixed duplicate handbook bug in encre. + - New cres are no longer forced to quit. + - Fixed parser bug when dealing with identical items in different + containers. + - Added sefuns: query_names, answers_to, add_event, remove_event, + update, local_ctime. + - Fixed events system (see *_event sefuns). + - Non-admins now can't use the dest or trans commands on admins. Note that + if a creator really wants to, she could get around using the commands and + trans or dest you anyway. However, now they can't do it "accidentally". + - The bull shark is no longer drinkable. + - Applied workaround to an apostrophe bug. Full fix pending. + - More sefun documentation. + + ---- 2.0r12 --- + - Fixed function conflict that made "scan -i" fail. + - Tightened up "get" lib code. + - Verbified "zap". + - Added atoi sefun. + - Added LIB_WORN_STORAGE to more gracefully handle wearable containers + like backpacks and such, also added it to QCS. + - QCS: fixed a bug that hosed up armor protection settings. + + ---- 2.0r11 --- + - Added findobs sefun and findobj command. + - Fixed "no steal" item property so thieves can't steal such things. + - Android corpses and severed limbs now decay in their own special way. + - Fixed up the sample flu and cold so they don't permanently affect a + a player's stats. Added a very nasty rage virus. + - Ftpd and httpd now work (Thanks to Duuk @ Haven). To enable them, uncomment + inet in /secure/cfg/preload.cfg. They are UNSUPPORTED, and if they ruin + your life, it's not my problem. System security is on you. + - Added valid_link() to master.c so that link() efun works. An interactive, + privileged, nonforced object is required in the previous_object() stack + to avoid abuse. Do NOT use this functionality unless you know EXACTLY + what you're doing. It probably doesn't work the way you think it does. + Be especially careful not to link privileged files to directories that + unprivileged users have write access to. Windows users should just + forget they read any of this. + - Verbified dest command. Peculiar "desting of nonexistent things" bug + should be dead at long last. + - Golems can have their composition specified. As an example, the combat + dummy is now a wood golem. + - Creatures born without limbs are now able to fight while in their + natural prone position. Creatures who used to have limbs and no longer + do have more limited options. + - SetUnique() now does what common sense requires. + + ---- 2.0r10 --- + - Fixed a problem in the death system that allowed creators to + be undead without quite realizing it. + - Fixed miscellaneous minor gotchas in the sample town. + - Added commands: lightme, quests. + - Tweaked miscellaneous commands. + - Fixed germs, added germ testing lab east of the wiz hall. + + ---- 2.0r9 --- + - Added a channel for kills notices. + - Miscellaneous fixes, tweak, etc. + - Fixed channels bug that changed lognames if someone was listening + to a channel. Now both log. + - Encre now forces the new creator to quit. This is necessary in order + to enable certain characteristics of their new body. + - Fixed a truly vile room bug that leaked objects and memory. + - Added reaper daemon to clean up junk from memory. + - Fixed multiple bugs in lighting system. + - Added light meter to creators' chest. + - Removed roommaker from creators' chest. + - Fixed remaining goto command problem. + - Set EXTRA_TIME_OFFSET in /secure/include/config.h to 0. + - Fixed bug in rescue login. Creators now can use it. + - Reorganized efun man pages and added missing efun and sefun docs. + - Added flying system. + - QCS feature add: you can now add includes and inherits. + - QCS fix: modify delete now works properly. + - Added numerous new directives to QCS. + - Added lib object check and NoModify checks to QCS verbs. + - Fixed object manipulation: creatures without prehensile appendages can + no longer accept or manipulate objects. If a creator somehow + manages to lose both hands they can use the "heal" command to fully + restore themselves. + - Fixed a variety of body related issues with races, created a + menagerie of sample npc's for testing. + - Fixed stealing system, added thief class. + - Miscellaneous lib object fixes and additions (eg SetAction now + takes mixed arrays, new SetPermitLoad lfun on npc's, some npc move + messages fixed, etc). + + ---- 2.0r8 --- + - Added intermud announcements to arch room (/secure/room/arch). + - Fixed bug in targeted intermud emotes. + - Channels now log without needing to have a player listening. + - Admin channel now logs to /secure/log + - Fixed lib/std/book.c bug that failed horribly if there was a hidden + file in the text source directory. + - Extensive code cleanup of unused variables. + - Miscellaneous tweaks to sample domain. + - Added tighter restriction to "no teleport" property in rooms. + - Miscellaneous fixes of verb code. + - Modified wrap() sefun to output truncated text rather than just + error out when buffer overflows. + - Added arch command. + - Added EXTRA_TIME_OFFSET parameter to /secure/include/config.h to + accommodate OS'es with peculiar timekeeping. + - Changed local_options to avoid excessive warning messages in /log/errors. + This is only useful if doing a new install of Dead Souls, or + if you copy local_options from the full distribution and recompile + the driver. For the Windows version, all that is needed is to + copy the new driver.exe over the old one, if you're doing an upgrade. + - Rescue login feature added. If when you try to log in, everything + goes to hell, try logging in adding "_rescue" to your name, which + in my case is: cratylus_rescue + - For admins, eval now writes the temp file to /secure, to avoid + annoying /realms dir permission conflicts. + - Cleaned up goto and dest command ugliness. + - Modified reload command and reload() sefun not to perform recursive + updates by default. This should speed up QCS response time and cut + down on mud-wide lag. + - Added some directives to QCS. + + ---- 2.0r7 --- + - Added sample virtual forest to town area. + - Added intermud list of Dead Souls muds to arch room ("read screen"). + - Added mudtime and ticktock commands, and tweaked the time system. + - Updated documentation. + - Added Tim's imc2 client. Doesn't quite work yet. Suggestions welcome. + - Created ds intermud channels ds and ds_test. Enabled ds for cres + by default (i3 names: dead_souls, dead_test4). + - Balanced/fixed attack spells a bit. + - Fixed QCS bug that prevented barkeeps from having stuff added + to their inventories. + - Made it harder to join the mages (The game is too hard for a + first level mage). + - Fixed a bug that made Herkimer a cheat. + - Applied workaround for a bug in Clepius. + + ---- 2.0r6 --- + - Added manuals and such to first admin logon. + - Cleaned up miscellaneous login quirks. + - Got rid of that pesky elog message at startup. + - Updated news files. + + ---- 2.0r5 --- + - Fixed problem with loading a working handbook on first login. + - Fixed QCS bug of reloading files instead of objects. + - Added CREDITS file. + + ---- 2.0r4 --- + - Nailed down nasty bug that overwrote rooms when creating an enter. + - Fixed a bug in "give" code that prevented giving of money. + - Fixed door bug that prevented proper setting of SetLocked and SetClosed. + - Updated some minor documentation unclarities. + - Modified reload() sefun and update command, as well as LastLocation + settings to avoid unnecesary teleportation when reloading objects. + - Modified donate verb and lib object to behave more sanely. + - QCS code cleanup and tightening, also added inits to templates. + - Tightened up sample town code. + - Added Players Handbook + + ---- 2.0r3 --- + - Added workaround for Windows time-of-day problem. + - Fixed minor QCS issues. + + ---- 2.0r2 --- + - Many QCS fixes and updates. + - Added doors and meals to QCS. + - Added thorough QCS documentation: /doc/manual/chapter31 and above. + + ---- 2.0r1 --- + - Fixed peculiar "multiple doors in a room" bug. + diff -c -r --new-file ds2.0r18/lib/doc/efun/all/explode ds2.0r20b/lib/doc/efun/all/explode *** ds2.0r18/lib/doc/efun/all/explode Mon Jan 23 09:17:12 2006 --- ds2.0r20b/lib/doc/efun/all/explode Thu Apr 13 21:03:32 2006 *************** *** 11,16 **** --- 11,17 ---- by spaces) in the string 'str'. See also: + implode, sscanf, replace_string, strsrch diff -c -r --new-file ds2.0r18/lib/doc/efun/strings/explode ds2.0r20b/lib/doc/efun/strings/explode *** ds2.0r18/lib/doc/efun/strings/explode Mon Jan 23 09:17:12 2006 --- ds2.0r20b/lib/doc/efun/strings/explode Thu Apr 13 21:03:32 2006 *************** *** 11,16 **** --- 11,17 ---- by spaces) in the string 'str'. See also: + implode, sscanf, replace_string, strsrch diff -c -r --new-file ds2.0r18/lib/doc/sefun/debug ds2.0r20b/lib/doc/sefun/debug *** ds2.0r18/lib/doc/sefun/debug Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/doc/sefun/debug Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,28 ---- + + DEBUG(1) DEBUG(1) + + NAME + debug() - Generates messages useful for debugging. + + SYNOPSIS + varargs void debug(mixed msg, mixed var, string color) + + DESCRIPTION + This command sends 'msg' to all users() who have + enabled receipt of debug info with the debug command. The + optional 'var' is stringified and included in the message. + The optional 'color' indicates what color the message + should be. + + EXAMPLE + + In a misbehaving npc: + debug("This npc's skills are: ",this_object()->GetSkills(),"red"); + + LOCATION + /secure/sefun/communications.c + + Author + Cratylus @ Dead Souls + + 1 diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/meal/ale.c ds2.0r20b/lib/domains/Ylsrim/meal/ale.c *** ds2.0r18/lib/domains/Ylsrim/meal/ale.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/meal/ale.c Thu Apr 6 22:53:15 2006 *************** *** 15,20 **** --- 15,21 ---- SetShort("a bottle of ale"); SetLong("A nice bottle of Lars' famous Ylsrim Ale."); SetMass(60); + SetBaseCost("electrum", 20); SetMealType(MEAL_DRINK | MEAL_ALCOHOL); SetStrength(10); SetMealMessages("You drink a wonderful bottle of Ylsrim Ale.", *************** *** 23,25 **** --- 24,29 ---- SetEmptyShort("an empty bottle of Ylsrim Ale"); SetEmptyLong("It is an empty brown bottle that once held some ale."); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/npc/lars.c ds2.0r20b/lib/domains/Ylsrim/npc/lars.c *** ds2.0r18/lib/domains/Ylsrim/npc/lars.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/npc/lars.c Thu Apr 6 22:53:15 2006 *************** *** 31,35 **** // He takes electrum SetLocalCurrency("electrum"); // What he sells ! SetMenuItems(([ "ale" : "/domains/Ylsrim"+ "/meal/ale" ])); } --- 31,40 ---- // He takes electrum SetLocalCurrency("electrum"); // What he sells ! SetMenuItems(([ ! ({ "ale", "beer" }) : "/domains/Ylsrim/meal/ale", ! ])); ! } ! void init(){ ! ::init(); } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/obj/stargate.c ds2.0r20b/lib/domains/Ylsrim/obj/stargate.c *** ds2.0r18/lib/domains/Ylsrim/obj/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/Ylsrim/obj/stargate.c Thu Apr 13 21:12:48 2006 *************** *** 0 **** --- 1,28 ---- + #include + #include + #include "/lib/include/stargate.h" + + inherit LIB_STARGATE; + + int readScreen(); + + void create() + { + ::create(); + setOrigin("tower", "/domains/Ylsrim/room/tower"); + SetRead(([ ({ "screen" }) : (: readScreen :) ]) ); + SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); + } + + void init() + { + ::init(); + } + + int readScreen() + { + write("stargate network status\n"); + write("-----------------------\n"); + write("\n"); + + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/furnace.c ds2.0r20b/lib/domains/Ylsrim/room/furnace.c *** ds2.0r18/lib/domains/Ylsrim/room/furnace.c Mon Jan 23 09:15:29 2006 --- ds2.0r20b/lib/domains/Ylsrim/room/furnace.c Wed Apr 12 23:47:49 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 360, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/pub.c ds2.0r20b/lib/domains/Ylsrim/room/pub.c *** ds2.0r18/lib/domains/Ylsrim/room/pub.c Wed Jan 11 23:08:48 2006 --- ds2.0r20b/lib/domains/Ylsrim/room/pub.c Sun Apr 9 23:49:20 2006 *************** *** 13,31 **** // the menu int readMenu(object who, string str) { string array tmp = ({ sprintf("%:-20s %:-7s", "Drink", "Cost") }); object ob = present("lars"); if( !ob ) { // lars is dead! ! who->eventPrint("The menu is too bloodstained to read."); return 1; } ! foreach(string item in keys(ob->GetMenuItems())) { ! tmp += ({ sprintf("%:-20s %:-7d electrum", capitalize(item), ! ob->GetCost(item)) }); } // show the menu a page at a time ! who->eventPage(tmp, MSG_SYSTEM); // MSG_SYSTEM means ignore blocking return 1; } static void create() { --- 13,37 ---- // the menu int readMenu(object who, string str) { + string array tmp2 = ({}); string array tmp = ({ sprintf("%:-20s %:-7s", "Drink", "Cost") }); object ob = present("lars"); if( !ob ) { // lars is dead! ! this_player()->eventPrint("The menu is too bloodstained to read."); return 1; } ! foreach(string *item in keys(ob->GetMenuItems())) { ! tmp += ({ sprintf("%:-20s %d electrum", capitalize(item[0]), ! to_int(ob->GetCost(item))) }); } + foreach(string element in tmp){ + element = translate(element, this_player()->GetLanguageLevel("Edhellen")); + tmp2 += ({ element }); + } + tmp = tmp2; // show the menu a page at a time ! this_player()->eventPage(tmp, MSG_SYSTEM); // MSG_SYSTEM means ignore blocking return 1; } static void create() { *************** *** 40,45 **** --- 46,55 ---- "with a hodge-podge of writing in all different languages " "covering the wall. A menu of drinks is about the only " "readable thing on the wall. If you read Edhellen."); + SetLanguage("Edhellen"); + SetInventory(([ + "/domains/Ylsrim/npc/lars" : 1, + ])); SetListen("Rowdy party sounds make it hard to hear anything else."); SetSmell("The place smells like it is soaked in ale."); AddItem(({ "tables", "stools" }), "The tables and stools begin " *************** *** 53,59 **** SetObviousExits("e"); SetExits(([ "east" : "/domains/Ylsrim/room/"+ "s_bazaar" ])); // Bring in the Bar Keep - SetInventory(([ "/domains/Ylsrim"+ "/npc/lars" : 1 ])); // make the writing and the menu readable SetRead("writing", (: readMenu :)); SetRead("menu", (: readMenu :)); --- 63,68 ---- diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/tower.c ds2.0r20b/lib/domains/Ylsrim/room/tower.c *** ds2.0r18/lib/domains/Ylsrim/room/tower.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/room/tower.c Thu Apr 13 21:03:39 2006 *************** *** 26,40 **** "heart of the hall." ]) ); SetObviousExits("d"); SetExits( ([ "down" : "/domains/Ylsrim/room/"+ "adv_hall" ]) ); - //AddJump("road", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_INTO); - //AddJump("kaliid road", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_INTO); - //AddJump("tower", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_FROM); - SetJump( ([ - "road" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_INTO }), - "kaliid road" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_INTO }), - "tower" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_FROM }), - ]) ); } void init(){ ::init(); --- 26,35 ---- "heart of the hall." ]) ); SetObviousExits("d"); SetExits( ([ "down" : "/domains/Ylsrim/room/"+ "adv_hall" ]) ); + SetInventory(([ + "/domains/Ylsrim/obj/stargate" : 1, + ])); } void init(){ ::init(); diff -c -r --new-file ds2.0r18/lib/domains/default/armor/robe.c ds2.0r20b/lib/domains/default/armor/robe.c *** ds2.0r18/lib/domains/default/armor/robe.c Sun Jan 29 23:45:31 2006 --- ds2.0r20b/lib/domains/default/armor/robe.c Sun Apr 9 23:49:20 2006 *************** *** 10,20 **** SetAdjectives(({"wizard","wizard's","soft"})); SetShort("a robe"); SetLong("This is a large, comfortable-looking robe, like a wizard might wear. It has many pockets and compartments for holding things."); - SetCanClose(1); - SetMaxCarry(500); SetProperties(([ "no steal" : 1, ])); SetMass(200); SetBaseCost("silver",100); SetDamagePoints(100); --- 10,21 ---- SetAdjectives(({"wizard","wizard's","soft"})); SetShort("a robe"); SetLong("This is a large, comfortable-looking robe, like a wizard might wear. It has many pockets and compartments for holding things."); SetProperties(([ + "gamma" : 3, "no steal" : 1, ])); + SetCanClose(1); + SetMaxCarry(5000); SetMass(200); SetBaseCost("silver",100); SetDamagePoints(100); diff -c -r --new-file ds2.0r18/lib/domains/default/armor/wizard_hat.c ds2.0r20b/lib/domains/default/armor/wizard_hat.c *** ds2.0r18/lib/domains/default/armor/wizard_hat.c Wed Feb 22 15:29:51 2006 --- ds2.0r20b/lib/domains/default/armor/wizard_hat.c Wed Apr 5 19:33:16 2006 *************** *** 12,17 **** --- 12,20 ---- SetLong("This is a large, floppy hat with a wide brim all "+ "around it, and a conical center. It is dark blue in color, "+ "and is decorated with pictures of yellow moons and stars."); + SetProperties(([ + "beta" : 2, + ])); SetMass(50); SetBaseCost("silver",500); SetDamagePoints(100); diff -c -r --new-file ds2.0r18/lib/domains/default/obj/chest.c ds2.0r20b/lib/domains/default/obj/chest.c *** ds2.0r18/lib/domains/default/obj/chest.c Mon Jan 23 08:51:33 2006 --- ds2.0r20b/lib/domains/default/obj/chest.c Thu Apr 6 22:53:15 2006 *************** *** 9,26 **** SetShort("a wooden chest"); SetLong("This is a sturdy wooden chest used to store valuable items."); SetInventory(([ - "/secure/obj/control" : 1, "/domains/default/armor/wizard_hat" : 1, "/domains/default/armor/robe" : 1, "/domains/town/armor/collar" : 1, "/secure/obj/machine" : 1, - "/domains/default/armor/badge" : 1, - "/domains/default/obj/manual" : 1, - "/secure/obj/memo" : 1, - "/domains/default/obj/meter" : 1, - "/domains/town/obj/pack" : 1, "/secure/obj/medtric" : 1, ! "/secure/obj/staff" : 1, ])); SetMass(2000); SetBaseCost(50); --- 9,27 ---- SetShort("a wooden chest"); SetLong("This is a sturdy wooden chest used to store valuable items."); SetInventory(([ "/domains/default/armor/wizard_hat" : 1, + "/domains/town/obj/pack" : 1, + "/domains/default/obj/meter" : 1, + "/domains/default/armor/badge" : 1, "/domains/default/armor/robe" : 1, + "/secure/obj/memo" : 1, + "/domains/default/obj/pinger" : 1, + "/domains/default/obj/manual" : 1, "/domains/town/armor/collar" : 1, + "/secure/obj/staff" : 1, "/secure/obj/machine" : 1, "/secure/obj/medtric" : 1, ! "/secure/obj/control" : 1, ])); SetMass(2000); SetBaseCost(50); diff -c -r --new-file ds2.0r18/lib/domains/default/obj/pinger.c ds2.0r20b/lib/domains/default/obj/pinger.c *** ds2.0r18/lib/domains/default/obj/pinger.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/default/obj/pinger.c Thu Apr 6 22:53:15 2006 *************** *** 0 **** --- 1,59 ---- + #include + #include + inherit LIB_ITEM; + + int count = 0; + int interval = 0; + string keepalive = ""; + + void create(){ + ::create(); + + SetKeyName("pinger"); + SetId( ({"thing"}) ); + SetAdjectives( ({"keepalive"}) ); + SetShort("a keepalive pinger"); + SetLong("This thing can be set to periodically output a string, " + "with the purpose of keeping fickle telnet connections up. " + "\nTo set the interval: interval \n" + "To set the string: keepalive "); + SetNoCondition(1); + SetMass(20); + SetBaseCost("silver",10); + set_heart_beat(1); + SetVendorType(VT_TREASURE); + } + + int SetInterval(string str){ + interval = atoi(str); + if(!intp(interval)){ + write("That is not a valid integer."); + return 1; + } + + write("Interval set to "+interval+" heartbeats."); + return 1; + } + + int SetKeepalive(string str){ + if(!str || str == "") keepalive = "\n"; + else keepalive = str; + write("Keepalive set."); + return 1; + } + + void init(){ + ::init(); + add_action("SetInterval","interval"); + add_action("SetKeepalive","keepalive"); + } + + void heart_beat(){ + count++; + if(interval > 0 && count > interval){ + count = 0; + if(living(environment(this_object()))){ + tell_object(environment(this_object()),keepalive); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/default/room/furnace.c ds2.0r20b/lib/domains/default/room/furnace.c *** ds2.0r18/lib/domains/default/room/furnace.c Fri Mar 24 14:36:36 2006 --- ds2.0r20b/lib/domains/default/room/furnace.c Wed Apr 12 23:47:49 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 60, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/town/npc/bugg.c ds2.0r20b/lib/domains/town/npc/bugg.c *** ds2.0r18/lib/domains/town/npc/bugg.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/npc/bugg.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,25 ---- + #include + + inherit LIB_TEACHER; + void create(){ + teacher::create(); + SetKeyName("bugg"); + SetId( ({"teacher","dwarf","schoolteacher","bugg the schoolteacher"}) ); + SetGender("male"); + SetRace("dwarf"); + SetNativeLanguage("english"); + SetShort("Bugg the schoolteacher"); + SetLong("This is a person whose job it is to teach you things. "+ + "For example, 'ask teacher "+ + "to teach Malkierien' would prompt him to begin teaching a Malkierien "+ + "lesson to you, if he knows the language and you have "+ + "earned sufficient training points. If you lack training points, then "+ + "do some adventuring and earn a level promotion. You will "+ + "then be awarded training points."); + SetLevel(1); + SetLanguage("Malkierien", 100); + AddTeachingLanguages( ({"Malkierien", "English" }) ); + } + void init() { + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/town/obj/fleas.c ds2.0r20b/lib/domains/town/obj/fleas.c *** ds2.0r18/lib/domains/town/obj/fleas.c Sat Mar 11 11:15:11 2006 --- ds2.0r20b/lib/domains/town/obj/fleas.c Wed Apr 12 23:47:50 2006 *************** *** 63,70 **** int eventSuffer(){ int x; x=random(500); ! if(x < 2) environment()->eventForce("sneeze"); ! else if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); --- 63,69 ---- int eventSuffer(){ int x; x=random(500); ! if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); *************** *** 94,106 **** int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+objective(this_player())+"self.", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+objective(this_player())+"self in a frenzy, ripping "+ ! possessive(this_player())+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; --- 93,105 ---- int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+reflexive(victim)+".", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+reflexive(victim)+" in a frenzy, ripping "+ ! possessive(victim)+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; diff -c -r --new-file ds2.0r18/lib/domains/town/obj/lice.c ds2.0r20b/lib/domains/town/obj/lice.c *** ds2.0r18/lib/domains/town/obj/lice.c Sat Mar 11 11:15:11 2006 --- ds2.0r20b/lib/domains/town/obj/lice.c Wed Apr 12 23:47:50 2006 *************** *** 61,68 **** int eventSuffer(){ int x; x=random(500); ! if(x < 2) environment()->eventForce("sneeze"); ! else if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); --- 61,67 ---- int eventSuffer(){ int x; x=random(500); ! if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); *************** *** 92,104 **** int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+objective(this_player())+"self.", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+objective(this_player())+"self in a frenzy, ripping "+ ! possessive(this_player())+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; --- 91,103 ---- int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+reflexive(victim)+".", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+reflexive(victim)+" in a frenzy, ripping "+ ! possessive(victim)+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; diff -c -r --new-file ds2.0r18/lib/domains/town/room/furnace.c ds2.0r20b/lib/domains/town/room/furnace.c *** ds2.0r18/lib/domains/town/room/furnace.c Fri Mar 24 14:36:38 2006 --- ds2.0r20b/lib/domains/town/room/furnace.c Wed Apr 12 23:47:50 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 60, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/hall.c ds2.0r20b/lib/domains/town/room/hall.c *** ds2.0r18/lib/domains/town/room/hall.c Wed Jan 4 20:42:53 2006 --- ds2.0r20b/lib/domains/town/room/hall.c Wed Dec 31 19:00:00 1969 *************** *** 1,25 **** - #include - inherit LIB_ROOM; - - static void create() { - room::create(); - SetClimate("outdoors"); - SetAmbientLight(30); - SetShort("copy of vill_road3.c"); - SetLong("A long road going through the village." + - "Town Hall is north. The main part of the town "+ - "is west of here. The post office is south."); - SetItems(([ - ({ "town hall", "hall" }) : "A place to conduct official business.", - ({ "post office", "office", "post" }) : "A place to send and receive mail.", - ])); - SetExits(([ - ])); - - SetEnters( ([ - "office" : "/domains/town/room/postoffice.c", - ]) ); - } - void init(){ - ::init(); - } --- 0 ---- diff -c -r --new-file ds2.0r18/lib/domains/town/room/school.c ds2.0r20b/lib/domains/town/room/school.c *** ds2.0r18/lib/domains/town/room/school.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/room/school.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,31 ---- + #include + inherit LIB_ROOM; + + static void create() { + room::create(); + SetTown("town"); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Village Schoolhouse"); + SetLong("This simple, one-room schoolhouse is not especially large but it is clean, well-maintained, and clearly an important part of village life. People come here to be taught, mostly languages, by traveling teachers and guest lecturers."); + SetProperties (([ + "no attack":1, + "no bump":1, + "no steal":0, + "no magic":0, + "no paralyze":0, + "no teleport":0])); + SetItems(([])); + SetInventory(([ + "/domains/town/npc/bugg" : 1, + ])); + SetExits(([ + "south" : "/domains/town/room/vill_road4", + ])); + + } + void init() { + ::init(); + SetSmell(([])); + SetListen(([])); + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/shore.c ds2.0r20b/lib/domains/town/room/shore.c *** ds2.0r18/lib/domains/town/room/shore.c Mon Nov 7 13:30:39 2005 --- ds2.0r20b/lib/domains/town/room/shore.c Wed Apr 5 19:33:17 2006 *************** *** 1,5 **** --- 1,6 ---- #include inherit LIB_ROOM; + static void create() { room::create(); SetClimate("outdoors"); *************** *** 8,14 **** SetLong("You are on the shore, at the far eastern end of town. " "A road travels west into the heart of town. "); SetExits( ([ ! "west" : "/domains/town/room/vill_road3", ]) ); ! SetObviousExits("w"); } --- 9,17 ---- SetLong("You are on the shore, at the far eastern end of town. " "A road travels west into the heart of town. "); SetExits( ([ ! "west" : "/domains/town/room/vill_road4.c", ]) ); ! } ! void init(){ ! ::init(); } diff -c -r --new-file ds2.0r18/lib/domains/town/room/vill_road3.c ds2.0r20b/lib/domains/town/room/vill_road3.c *** ds2.0r18/lib/domains/town/room/vill_road3.c Thu Jan 5 00:17:31 2006 --- ds2.0r20b/lib/domains/town/room/vill_road3.c Wed Apr 5 19:33:17 2006 *************** *** 12,26 **** ({ "building", "buildings" }) : "Structures designed for human occupancy.", ({ "hall", "town hall" }) : "This is the modest building where official town business takes place.", ])); - SetEnters( ([ - "town hall" : "/domains/town/room/thall", - "office" : "/domains/town/room/postoffice.c", - ]) ); SetExits( ([ ! "east" : "/domains/town/room/shore", "west" : "/domains/town/room/vill_road2", "north" : "/domains/town/room/thall", ! "south" : "/domains/town/room/postoffice", ]) ); } void init(){ --- 12,26 ---- ({ "building", "buildings" }) : "Structures designed for human occupancy.", ({ "hall", "town hall" }) : "This is the modest building where official town business takes place.", ])); SetExits( ([ ! "south" : "/domains/town/room/postoffice", "west" : "/domains/town/room/vill_road2", "north" : "/domains/town/room/thall", ! "east" : "/domains/town/room/vill_road4.c", ! ]) ); ! SetEnters( ([ ! "town hall" : "/domains/town/room/thall", ! "office" : "/domains/town/room/postoffice.c", ]) ); } void init(){ diff -c -r --new-file ds2.0r18/lib/domains/town/room/vill_road4.c ds2.0r20b/lib/domains/town/room/vill_road4.c *** ds2.0r18/lib/domains/town/room/vill_road4.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/room/vill_road4.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,26 ---- + #include + inherit LIB_ROOM; + + static void create() { + room::create(); + SetClimate("outdoors"); + SetAmbientLight(30); + SetShort("Village Path"); + SetLong("As it travels from west to east, Village Road becomes less of a road here and more of a dirt path. The shore of the eastern sea is almost visible from here. The village schoolhouse is north, and the shore is east."); + SetItems(([ + ({ "building", "schoolhouse", "school", "village school", "village schoolhouse" }) : "A small but well-kept wooden building where townsfolk and their children go to acquire knowledge.", + ({ "building", "buildings" }) : "Structures designed for human occupancy.", + ({ "shore", "village shore" }) : "The shore of the eastern sea is east of here.", + ])); + SetExits( ([ + "west" : "/domains/town/room/vill_road3", + "east" : "/domains/town/room/shore", + "north" : "/domains/town/room/school.c", + ]) ); + SetEnters( ([ + ]) ); + + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/voters.c ds2.0r20b/lib/domains/town/room/voters.c *** ds2.0r18/lib/domains/town/room/voters.c Mon Dec 12 19:51:56 2005 --- ds2.0r20b/lib/domains/town/room/voters.c Wed Apr 12 23:47:50 2006 *************** *** 28,35 **** SetInventory(([ ])); AddExit("west", "/domains/town/room/thall"); - //funs - //snuf } mixed ReadList() { --- 28,33 ---- *************** *** 47,58 **** if( VOTING_D->GetStatus() == VOTE_NOT_RUNNING ) { ! this_player()->eventPrint("\nSince the elections are not " ! "currently running, the list is blank."); return 1; } ! msg = "\n\tCandidates for Dead Souls Offices\n\n"; foreach( string sClass in CLASSES_D->GetClasses() ) { msg += capitalize( sClass ) + " : "; --- 45,56 ---- if( VOTING_D->GetStatus() == VOTE_NOT_RUNNING ) { ! this_player()->eventPrint(VOTING_D->GetCurrentCouncil()); return 1; } ! msg = VOTING_D->GetCurrentCouncil(); ! msg += "\n\tCandidates for Dead Souls Offices\n\n"; foreach( string sClass in CLASSES_D->GetClasses() ) { msg += capitalize( sClass ) + " : "; *************** *** 121,128 **** break; case VOTE_MODE_CANDIDATES : ! this_player()->eventPrint("Voting has not yet started, " ! "nominate a candidate instead."); break; case VOTE_NOT_PRIMARY : --- 119,127 ---- break; case VOTE_MODE_CANDIDATES : ! this_player()->eventPrint("Voting has not yet started. We are " ! "still nominating candidates. Please nominate a candidate " ! "instead."); break; case VOTE_NOT_PRIMARY : diff -c -r --new-file ds2.0r18/lib/domains/town/weap/gstaff.c ds2.0r20b/lib/domains/town/weap/gstaff.c *** ds2.0r18/lib/domains/town/weap/gstaff.c Mon Nov 7 13:30:39 2005 --- ds2.0r20b/lib/domains/town/weap/gstaff.c Wed Apr 12 23:47:50 2006 *************** *** 3,8 **** --- 3,9 ---- #include inherit LIB_ITEM; + inherit LIB_CLAN; static void create(){ item::create(); SetKeyName("golden staff"); diff -c -r --new-file ds2.0r18/lib/include/stargate.h ds2.0r20b/lib/include/stargate.h *** ds2.0r18/lib/include/stargate.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/include/stargate.h Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,20 ---- + /** + * + * $Id: stargate.h,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + */ + + #ifndef startgate_h + #define stargate_h + + #define GATE_TIMEOUT (10+random(5)) + + // address (i.e. "sgc") is a key in a mapping in the stargate daemon so it is not included here + class stargate + { + string status; + string destination; + string endpoint; + } + + #endif diff -c -r --new-file ds2.0r18/lib/lib/blank_pile.c ds2.0r20b/lib/lib/blank_pile.c *** ds2.0r18/lib/lib/blank_pile.c Mon Nov 7 13:28:59 2005 --- ds2.0r20b/lib/lib/blank_pile.c Fri Apr 14 18:27:24 2006 *************** *** 6,12 **** --- 6,16 ---- int PileAmount = 0; static void create() { + string *saveds; item::create(); + saveds = item::GetSave(); + saveds += ({ "PileType", "PileAmount" }); + AddSave( saveds ); SetKeyName("money"); } diff -c -r --new-file ds2.0r18/lib/lib/body.c ds2.0r20b/lib/lib/body.c *** ds2.0r18/lib/lib/body.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/lib/body.c Wed Apr 12 23:47:53 2006 *************** *** 8,13 **** --- 8,14 ---- */ #include + #include #include #include #include *************** *** 31,37 **** private float StaminaPoints; private string Torso, Biter; private mapping Fingers, Limbs, MissingLimbs; ! private static int Dying, LastHeal; private static function Protect; private static mapping WornItems; private static class MagicProtection *Protection; --- 32,38 ---- private float StaminaPoints; private string Torso, Biter; private mapping Fingers, Limbs, MissingLimbs; ! private static int Dying, LastHeal, Encumbrance; private static function Protect; private static mapping WornItems; private static class MagicProtection *Protection; *************** *** 66,71 **** --- 67,85 ---- ExtraChannels = ({}); } + int GetEncumbrance(){ + int encumbrance = 0; + object *stuff = filter(all_inventory(this_object()), (: !($1->GetWorn()) :) ); + + //tc("ENABLE_ENCUMBRANCE: "+ENABLE_ENCUMBRANCE,"cyan"); + if(!(ENABLE_ENCUMBRANCE) || inherits(LIB_NPC,this_object()) ) return encumbrance; + //tc("bad encumbrance","red"); + if(sizeof(stuff)) foreach(object item in stuff) + encumbrance += item->GetMass(); + if(sizeof(stuff)) encumbrance *= sizeof(stuff); + return encumbrance; + } + string SetBodyComposition(string str){ if(!str) return ""; else BodyComposition = str; *************** *** 693,698 **** --- 707,721 ---- return 1; } + string *GetEquippedLimbs(){ + string *equipped_limbs = ({}); + object *wornstuff = filter(all_inventory(this_object()), (: $1->GetWorn() :) ); + + foreach(object item in wornstuff){ + equipped_limbs += item->GetWorn(); + } + return equipped_limbs; + } /************ /lib/body.c Data manipulation functions *************/ void NewBody(string race) { if(!race) *************** *** 982,987 **** --- 1005,1015 ---- return 1; } + int HealLimb(string limb){ + Limbs[limb]["health"] = GetMaxHealthPoints(limb); + return Limbs[limb]["health"]; + } + int RestoreLimb(string limb) { if( !MissingLimbs[limb] ) return 0; Limbs[limb] = MissingLimbs[limb]; diff -c -r --new-file ds2.0r18/lib/lib/clan.c ds2.0r20b/lib/lib/clan.c *** ds2.0r18/lib/lib/clan.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/clan.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,162 ---- + #include + #include "include/clan.h" + + private class ClanClass Clan; + + private int isWelcomed; + + static void create() { + Clan = new(class ClanClass); + Clan->leader = 0; + Clan->name = 0; + Clan->objectName = 0; + Clan->skill = 0; + isWelcomed = 0; + } + + static void init() { + if(!present(this_object(), this_player())) return; + if((string)this_player()->GetClan() != (string)GetClanName()) return; + if((string)this_player()->GetKeyName() == (string)GetLeader()) { + add_action("eventBring", "bring"); + add_action("eventInitiate", "initiate"); + add_action("eventRetire", "retire"); + } + this_player()->eventPrint("\n"); + if(!isWelcomed) { + this_player()->AddChannel(GetClanName()); + eventWelcome(this_player()); + isWelcomed = 1; + } + } + + mixed CanJoin(object ob) { return 1; } + + string GetAffectLong(object ob) { + if(!ob || !living(ob)) return 0; + return ob->GetName() + " is a member of the " + + pluralize(GetClanName()) + "."; + } + + string SetLeader(string str) { + if(!user_exists(str)) error("No such user: " + str + + ". You must have a real leader."); + if(!stringp(Clan->leader)) + Clan->leader = str; + return Clan->leader; + } + + string GetLeader() { return Clan->leader; } + + string SetClanName(string str) { + if(!stringp(Clan->name)) Clan->name = str; + return Clan->name; + } + + string GetClanName() { return Clan->name; } + + string SetClanObject(string str) { + if(!stringp(Clan->objectName)) Clan->objectName = str; + return Clan->objectName; + } + + string GetClanObject() { return Clan->objectName; } + + string SetClanSkill(string str) { + if(!stringp(Clan->skill)) Clan->skill = str; + return Clan->skill; + } + + string GetClanSkill() { return Clan->skill; } + + int eventBring(string str) { + object who; + + if(!str) return notify_fail("Bring whom?\n"); + who = find_player(lower_case(str)); + if(!who) + return notify_fail(who->GetName() + " is nowhere to be found.\n"); + if((string)who->GetClan() != (string)GetClanName()) + return notify_fail(who->GetName() + " is not one of you!\n"); + if( environment(who)->GetProperty("no teleport") + || environment(this_player())->GetProperty("no teleport") + || environment(this_player())->GetProperty("no magic")) + return notify_fail("A magic force blocks your powers.\n"); + if(present(who, environment(this_player()))) + return notify_fail(capitalize(str) + " is here.\n"); + if((int)this_player()->GetMagicPoints() < 70) + return notify_fail("Too low on magic power.\n"); + this_player()->AddMagicPoints(-70); + who->eventPrint("%^CYAN%^Your clan leader summons you.%^RESET%^"); + who->eventMoveLiving(environment(this_player())); + if(!present(who, environment(this_player()))) + this_player()->eventPrint("%^CYAN%^" + capitalize(str) + + " is beyond your reach.%^RESET%^"); + return 1; + } + + int eventInitiate(string str) { + object initiate; + object clanObject; + mixed ret; + + if(!str) return notify_fail("Initiate whom?\n"); + initiate = present(lower_case(str), environment(this_player())); + if(!initiate || !living(initiate)) + return notify_fail("No one of that nature here.\n"); + if(stringp(ret = CanJoin(initiate))) return notify_fail(ret); + else if(!ret) return ret; + if((int)this_player()->GetMagicPoints() < 300) + return notify_fail("Too low on magic power.\n"); + if(initiate->GetClan()) + return notify_fail("You may only initiate people without clan " + + "affiliation.\n"); + initiate->SetClan((string)GetClanName()); + initiate->SetSkill(GetClanSkill(), 1, 1); + if(clanObject = new((string)GetClanObject())) + clanObject->eventMove(initiate); + this_player()->AddMagicPoints(-300); + eventJoin(initiate); + return 1; + } + + void eventJoin(object ob) { + ob->eventPrint("%^YELLOW%^You are now a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^"); + environment(ob)->eventPrint("%^YELLOW%^" +(string)ob->GetName() + + " is now a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^", ob); + } + + int eventRetire(string str) { + object retiree; + object clanObject; + + if(!str) return notify_fail("Retire whom?\n"); + retiree = present(lower_case(str), environment(this_player())); + if(!retiree || !living(retiree)) + return notify_fail("No one of that nature here.\n"); + if((string)retiree->GetClan() != (string)GetClanName()) + return notify_fail(retiree->GetName() + " is not one of us!\n"); + clanObject = present(GetClanName() + "_clan_object", retiree); + if(!clanObject) error("Problem with clan object."); + clanObject->eventDestruct(); + retiree->SetClan(0); + // retiree->SetSkill(GetClanSkill(), 1, 1); We need to remove skill here. + eventUnjoin(retiree); + return 1; + } + + void eventUnjoin(object ob) { + ob->eventPrint("%^RED%^You are no longer a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^"); + environment(ob)->eventPrint("%^RED%^" + (string)ob->GetName() + + " is no longer a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^", ob); + } + + void eventWelcome(object ob) { + ob->eventPrint("%^YELLOW%^Welcome, fellow " + (string)GetClanName() + + ".%^RESET%^"); + } + diff -c -r --new-file ds2.0r18/lib/lib/classes.c ds2.0r20b/lib/lib/classes.c *** ds2.0r18/lib/lib/classes.c Mon Jan 16 23:03:04 2006 --- ds2.0r20b/lib/lib/classes.c Wed Apr 12 23:48:35 2006 *************** *** 1,6 **** /* /lib/classes.c * from the Dead Souls LPC Library ! * classes and guild handling object * created by Descartes of Borg 950123 * Version: @(#) classes.c 1.4@(#) * Last modified: 96/12/13 --- 1,6 ---- /* /lib/classes.c * from the Dead Souls LPC Library ! * classes and clan handling object * created by Descartes of Borg 950123 * Version: @(#) classes.c 1.4@(#) * Last modified: 96/12/13 *************** *** 13,19 **** inherit LIB_ABILITIES; private int Morality; ! private string Class, Guild; private mapping SkillModifiers; private string *Religion; --- 13,19 ---- inherit LIB_ABILITIES; private int Morality; ! private string Class, Clan; private mapping SkillModifiers; private string *Religion; *************** *** 22,28 **** SkillModifiers = ([]); Religion = allocate(2); Class = 0; ! Guild = 0; Morality = 0; } --- 22,28 ---- SkillModifiers = ([]); Religion = allocate(2); Class = 0; ! Clan = 0; Morality = 0; } *************** *** 107,115 **** return (int)CLASSES_D->ClassMember(Class, class_name); } ! string SetGuild(string guild) { return (Guild = guild); } ! string GetGuild() { return Guild; } int GetBaseStatLevel(string stat) { return 0; } --- 107,115 ---- return (int)CLASSES_D->ClassMember(Class, class_name); } ! string SetClan(string clan) { return (Clan = clan); } ! string GetClan() { return Clan; } int GetBaseStatLevel(string stat) { return 0; } diff -c -r --new-file ds2.0r18/lib/lib/combat.c ds2.0r20b/lib/lib/combat.c *** ds2.0r18/lib/lib/combat.c Fri Mar 24 14:36:38 2006 --- ds2.0r20b/lib/lib/combat.c Wed Apr 12 23:48:35 2006 *************** *** 126,132 **** --- 126,137 ---- } mixed *RemoveNonTargets(mixed val){ + if(!val) val = ({}); if(!arrayp(val)) val = ({ val }); + if(!sizeof(val)){ + NonTargets = ({}); + return NonTargets; + } foreach(object member in val){ if(member_array(member,NonTargets) != -1){ NonTargets -= ({ member }); *************** *** 402,407 **** --- 407,413 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } *************** *** 428,433 **** --- 434,440 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } else { *************** *** 450,455 **** --- 457,463 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } } *************** *** 621,634 **** SendWeaponMessages(target, -1, weapon, TargetLimb); } else { // I hit, but how hard did I hit? ! int damage_type, damage, weapon_damage, actual_damage; eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); damage = (weapon->eventStrike(target) * pro)/(GetLevel()*2); damage = GetDamage(damage, weapon_type + " attack"); actual_damage = target->eventReceiveDamage(this_object(), damage_type, damage, 0, TargetLimb); ! if( actual_damage < 1 ) { actual_damage = 0; } weapon_damage = damage - actual_damage; --- 629,650 ---- SendWeaponMessages(target, -1, weapon, TargetLimb); } else { // I hit, but how hard did I hit? ! int damage_type, damage, weapon_damage, actual_damage, encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","yellow"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); ! } eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); damage = (weapon->eventStrike(target) * pro)/(GetLevel()*2); damage = GetDamage(damage, weapon_type + " attack"); + damage -= encumbrance; + if(damage < 0) damage = 0; actual_damage = target->eventReceiveDamage(this_object(), damage_type, damage, 0, TargetLimb); ! if( actual_damage < 0 ) { actual_damage = 0; } weapon_damage = damage - actual_damage; *************** *** 706,718 **** GetCombatBonus(target->GetLevel())); } else { ! int x; ! // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, GetCombatBonus(target->GetLevel())); if(this_object()->GetMelee()) x = GetDamage(3*chance/4, "melee attack"); else x = GetDamage(3*chance/20, "melee attack"); x = target->eventReceiveDamage(this_object(), BLUNT, x, 0, TargetLimb); if( !target->GetDying() ) { --- 722,741 ---- GetCombatBonus(target->GetLevel())); } else { ! int x, encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","blue"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); ! } // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, GetCombatBonus(target->GetLevel())); if(this_object()->GetMelee()) x = GetDamage(3*chance/4, "melee attack"); else x = GetDamage(3*chance/20, "melee attack"); + x -= encumbrance; + if(x < 0) x = 0; x = target->eventReceiveDamage(this_object(), BLUNT, x, 0, TargetLimb); if( !target->GetDying() ) { *************** *** 887,898 **** if( !ob ) return; Enemies -= ({ ob }); Hostiles -= ({ ob }); } varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs) { ! int hp; ! x = race::eventReceiveDamage(agent, type, x, internal, limbs); if( !Wimpy ) return x; if( (hp = GetHealthPoints()) < 1 ) return x; --- 910,928 ---- if( !ob ) return; Enemies -= ({ ob }); Hostiles -= ({ ob }); + if(!sizeof(SpecialTargets) || (!sizeof(Enemies) || !sizeof(Hostiles))) + NonTargets = ({}); } varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs) { ! int hp,encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","green"); ! tell_object(this_object(),"You try to dodge while weighed down."); ! } x = race::eventReceiveDamage(agent, type, x, internal, limbs); if( !Wimpy ) return x; if( (hp = GetHealthPoints()) < 1 ) return x; diff -c -r --new-file ds2.0r18/lib/lib/command.c ds2.0r20b/lib/lib/command.c *** ds2.0r18/lib/lib/command.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/lib/command.c Wed Apr 12 23:48:35 2006 *************** *** 26,32 **** apostrophe_exceptions += ({"say","speak","yell","whisper","shout"}); //Fix here courtesy of Jonez apostrophe_exceptions += ({"ping", "reply"}); ! SearchPath = ({ DIR_PLAYER_CMDS, DIR_SECURE_PLAYER_CMDS, DIR_GUILD_CMDS, DIR_COMMON_CMDS, DIR_SECURE_COMMON_CMDS }); } --- 26,32 ---- apostrophe_exceptions += ({"say","speak","yell","whisper","shout"}); //Fix here courtesy of Jonez apostrophe_exceptions += ({"ping", "reply"}); ! SearchPath = ({ DIR_PLAYER_CMDS, DIR_SECURE_PLAYER_CMDS, DIR_CLAN_CMDS, DIR_COMMON_CMDS, DIR_SECURE_COMMON_CMDS }); } diff -c -r --new-file ds2.0r18/lib/lib/comp/holder.c ds2.0r20b/lib/lib/comp/holder.c *** ds2.0r18/lib/lib/comp/holder.c Mon Nov 7 13:31:06 2005 --- ds2.0r20b/lib/lib/comp/holder.c Sun Apr 9 23:49:20 2006 *************** *** 82,87 **** --- 82,88 ---- return tmp; } AddCarriedMass(ob->GetMass()); + this_object()->SetMass(this_object()->GetMass() + ob->GetMass()); parse_refresh(); return 1; } *************** *** 90,96 **** int x; x = container::eventReleaseObject(ob); ! call_out((: parse_refresh :), 0); return x; } --- 91,100 ---- int x; x = container::eventReleaseObject(ob); ! //call_out((: parse_refresh :), 0); ! AddCarriedMass(-(ob->GetMass())); ! this_object()->SetMass(this_object()->GetMass() - ob->GetMass()); ! parse_refresh(); return x; } diff -c -r --new-file ds2.0r18/lib/lib/creator.c ds2.0r20b/lib/lib/creator.c *** ds2.0r18/lib/lib/creator.c Sat Mar 11 11:16:11 2006 --- ds2.0r20b/lib/lib/creator.c Wed Apr 12 23:48:35 2006 *************** *** 178,184 **** laston = GetLoginTime(); if( !player::Setup() ) return 0; ! AddChannel(({"cre", "newbie", "gossip", "ds", "death" })); AddChannel((string array)CLASSES_D->GetClasses()); if( archp() ) AddChannel( ({ "admin", "error" }) ); AddSearchPath( ({ DIR_CREATOR_CMDS, DIR_SECURE_CREATOR_CMDS }) ); --- 178,184 ---- laston = GetLoginTime(); if( !player::Setup() ) return 0; ! AddChannel(({"cre", "newbie", "gossip", "ds", "ds_test", "lpuni", "death","intergossip","intercre" })); AddChannel((string array)CLASSES_D->GetClasses()); if( archp() ) AddChannel( ({ "admin", "error" }) ); AddSearchPath( ({ DIR_CREATOR_CMDS, DIR_SECURE_CREATOR_CMDS }) ); diff -c -r --new-file ds2.0r18/lib/lib/donate.c ds2.0r20b/lib/lib/donate.c *** ds2.0r18/lib/lib/donate.c Thu Jan 5 00:17:58 2006 --- ds2.0r20b/lib/lib/donate.c Wed Apr 12 23:48:35 2006 *************** *** 16,22 **** static void init() { if( (string)this_player()->ClassMember((string)GetOwner()) || ! (string)this_player()->GetGuild() == (string)GetOwner() ) { add_action( (: eventDonate :) , "donate" ); } } --- 16,22 ---- static void init() { if( (string)this_player()->ClassMember((string)GetOwner()) || ! (string)this_player()->GetClan() == (string)GetOwner() ) { add_action( (: eventDonate :) , "donate" ); } } diff -c -r --new-file ds2.0r18/lib/lib/events/put.c ds2.0r20b/lib/lib/events/put.c *** ds2.0r18/lib/lib/events/put.c Wed Dec 7 14:03:05 2005 --- ds2.0r20b/lib/lib/events/put.c Thu Apr 13 21:03:52 2006 *************** *** 24,35 **** mixed tmp; if( (tmp = CanDrop(who)) != 1 ) return tmp; if( !environment() ) { destruct(this_object()); return 1; } ! if( environment() != this_player() ) return 0; if( !PreventPut ) return 1; if( stringp(PreventPut) && PreventPut == "PERMIT" ) return 1; if( intp(PreventPut) ) return 0; if( stringp(PreventPut) ) return PreventPut; if( objectp(PreventPut) ) { if( PreventPut == who ) return "You cannot put " + GetShort() + " anywhere."; --- 24,43 ---- mixed tmp; if( (tmp = CanDrop(who)) != 1 ) return tmp; + //debug("i dunno 1"); if( !environment() ) { destruct(this_object()); return 1; } ! //debug("i dunno 2"); ! if( environment() != this_player() && ! environment() != environment(this_player())) return 0; ! //debug("i dunno 3"); if( !PreventPut ) return 1; + //debug("i dunno 4"); if( stringp(PreventPut) && PreventPut == "PERMIT" ) return 1; + //debug("i dunno 5"); if( intp(PreventPut) ) return 0; + //debug("i dunno 6"); if( stringp(PreventPut) ) return PreventPut; + //debug("i dunno 7"); if( objectp(PreventPut) ) { if( PreventPut == who ) return "You cannot put " + GetShort() + " anywhere."; *************** *** 80,82 **** --- 88,94 ---- return CanPut(this_player()); } + mixed direct_put_wrd_wrd_word_obj(){ + return CanPut(this_player()); + } + diff -c -r --new-file ds2.0r18/lib/lib/genetics.c ds2.0r20b/lib/lib/genetics.c *** ds2.0r18/lib/lib/genetics.c Sat Mar 11 11:16:11 2006 --- ds2.0r20b/lib/lib/genetics.c Sun Apr 9 23:49:20 2006 *************** *** 99,111 **** varargs void AddStat(string stat, int base, int cls) { int level; ! if( userp(this_object()) ) level = 1; else level = GetLevel(); if( !stat || cls < 1 || cls > 5 ) return; base += ((5 - cls) * random(10)) + (3 * (level + 1))/(cls * 4); if( userp(this_object()) && base > 90 ) base = 90; else if( base > 100 ) base = 100; SetStat(stat, base, cls); } --- 99,112 ---- varargs void AddStat(string stat, int base, int cls) { int level; ! //tc("stat: "+stat+", base: "+base+", cls: "+cls,"red"); if( userp(this_object()) ) level = 1; else level = GetLevel(); if( !stat || cls < 1 || cls > 5 ) return; base += ((5 - cls) * random(10)) + (3 * (level + 1))/(cls * 4); if( userp(this_object()) && base > 90 ) base = 90; else if( base > 100 ) base = 100; + //tc("stat: "+stat+", base: "+base+", cls: "+cls,"green"); SetStat(stat, base, cls); } diff -c -r --new-file ds2.0r18/lib/lib/guild.c ds2.0r20b/lib/lib/guild.c *** ds2.0r18/lib/lib/guild.c Wed Dec 7 14:03:18 2005 --- ds2.0r20b/lib/lib/guild.c Wed Dec 31 19:00:00 1969 *************** *** 1,165 **** - - #include - #include "include/guild.h" - - class GuildClass Guild; - - //private static class GuildClass; - private int isWelcomed; - class Guild = new(class GuildClass); - - static void create() { - Guild = new(class GuildClass); - Guild->leader = 0; - Guild->name = 0; - Guild->objectName = 0; - Guild->skill = 0; - isWelcomed = 0; - } - - static void init() { - if(!present(this_object(), this_player())) return; - if((string)this_player()->GetGuild() != (string)GetGuildName()) return; - if((string)this_player()->GetKeyName() == (string)GetLeader()) { - add_action((:eventBring:), "bring"); - add_action((:eventInitiate:), "initiate"); - add_action((:eventRetire:), "retire"); - } - this_player()->eventPrint("\n"); - if(!isWelcomed) { - this_player()->AddChannel(GetGuildName()); - eventWelcome(this_player()); - isWelcomed = 1; - } - } - - mixed CanJoin(object ob) { return 1; } - - string GetAffectLong(object ob) { - if(!ob || !living(ob)) return 0; - return ob->GetName() + " is a member of the " - + pluralize(GetGuildName()) + "."; - } - - string SetLeader(string str) { - if(!user_exists(str)) error("No such user: " + str - + ". You must have a real leader."); - if(!stringp(Guild->leader)) - Guild->leader = str; - return Guild->leader; - } - - string GetLeader() { return Guild->leader; } - - string SetGuildName(string str) { - if(!stringp(Guild->name)) Guild->name = str; - return Guild->name; - } - - string GetGuildName() { return Guild->name; } - - string SetGuildObject(string str) { - if(!stringp(Guild->objectName)) Guild->objectName = str; - return Guild->objectName; - } - - string GetGuildObject() { return Guild->objectName; } - - string SetGuildSkill(string str) { - if(!stringp(Guild->skill)) Guild->skill = str; - return Guild->skill; - } - - string GetGuildSkill() { return Guild->skill; } - - int eventBring(string str) { - object who; - - if(!str) return notify_fail("Bring whom?\n"); - who = find_player(lower_case(str)); - if(!who) - return notify_fail(who->GetName() + " is nowhere to be found.\n"); - if((string)who->GetGuild() != (string)GetGuildName()) - return notify_fail(who->GetName() + " is not one of you!\n"); - if( environment(who)->GetProperty("no teleport") - || environment(this_player())->GetProperty("no teleport") - || environment(this_player())->GetProperty("no magic")) - return notify_fail("A magic force blocks your powers.\n"); - if(present(who, environment(this_player()))) - return notify_fail(capitalize(str) + " is here.\n"); - if((int)this_player()->GetMagicPoints() < 70) - return notify_fail("Too low on magic power.\n"); - this_player()->AddMagicPoints(-70); - who->eventPrint("%^CYAN%^Your guild leader summons you.%^RESET%^"); - who->eventMoveLiving(environment(this_player())); - if(!present(who, environment(this_player()))) - this_player()->eventPrint("%^CYAN%^" + capitalize(str) - + " is beyond your reach.%^RESET%^"); - return 1; - } - - int eventInitiate(string str) { - object initiate; - object guildObject; - mixed ret; - - if(!str) return notify_fail("Initiate whom?\n"); - initiate = present(lower_case(str), environment(this_player())); - if(!initiate || !living(initiate)) - return notify_fail("No one of that nature here.\n"); - if(stringp(ret = CanJoin(initiate))) return notify_fail(ret); - else if(!ret) return ret; - if((int)this_player()->GetMagicPoints() < 300) - return notify_fail("Too low on magic power.\n"); - if(initiate->GetGuild()) - return notify_fail("You may only initiate people without guild " - + "affiliation.\n"); - initiate->SetGuild((string)GetGuildName()); - initiate->SetSkill(GetGuildSkill(), 1, 1); - if(guildObject = new((string)GetGuildObject())) - guildObject->eventMove(initiate); - this_player()->AddMagicPoints(-300); - eventJoin(initiate); - return 1; - } - - void eventJoin(object ob) { - ob->eventPrint("%^YELLOW%^You are now a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^"); - environment(ob)->eventPrint("%^YELLOW%^" +(string)ob->GetName() - + " is now a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^", ob); - } - - int eventRetire(string str) { - object retiree; - object guildObject; - - if(!str) return notify_fail("Retire whom?\n"); - retiree = present(lower_case(str), environment(this_player())); - if(!retiree || !living(retiree)) - return notify_fail("No one of that nature here.\n"); - if((string)retiree->GetGuild() != (string)GetGuildName()) - return notify_fail(retiree->GetName() + " is not one of us!\n"); - guildObject = present(GetGuildName() + "_guild_object", retiree); - if(!guildObject) error("Problem with guild object."); - guildObject->eventDestruct(); - retiree->SetGuild(0); - // retiree->SetSkill(GetGuildSkill(), 1, 1); We need to remove skill here. - eventUnjoin(retiree); - return 1; - } - - void eventUnjoin(object ob) { - ob->eventPrint("%^RED%^You are no longer a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^"); - environment(ob)->eventPrint("%^RED%^" + (string)ob->GetName() - + " is no longer a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^", ob); - } - - void eventWelcome(object ob) { - ob->eventPrint("%^YELLOW%^Welcome, fellow " + (string)GetGuildName() - + ".%^RESET%^"); - } - --- 0 ---- diff -c -r --new-file ds2.0r18/lib/lib/include/bait.h ds2.0r20b/lib/lib/include/bait.h *** ds2.0r18/lib/lib/include/bait.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/bait.h Wed Apr 5 19:33:17 2006 *************** *** 1,19 **** #ifndef l_bait_h #define l_bait_h ! static void create(); ! mixed indirect_bait_obj_with_obj(); ! int SetBaitStrength(int x); int GetBaitStrength(); ! mixed eventBait(object who, object pole); ! /* virtual functions */ ! static mixed AddSave(mixed *vars); string GetShort(); int eventDestruct(); ! #endif --- 1,19 ---- #ifndef l_bait_h #define l_bait_h ! static void create(); ! mixed indirect_bait_obj_with_obj(); ! int SetBaitStrength(int x); int GetBaitStrength(); ! mixed eventBait(object who, object pole); ! /* virtual functions */ ! static mixed AddSave(mixed *vars); string GetShort(); int eventDestruct(); ! #endif diff -c -r --new-file ds2.0r18/lib/lib/include/bank.h ds2.0r20b/lib/lib/include/bank.h *** ds2.0r18/lib/lib/include/bank.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/bank.h Wed Apr 5 19:33:17 2006 *************** *** 1,10 **** #ifndef l_bank_h #define l_bank_h ! static void create(); ! mixed CanBank(object who, string currency); ! string SetBank(string str); string SetCurrency(string str); int SetSurcharge(int amount); --- 1,10 ---- #ifndef l_bank_h #define l_bank_h ! static void create(); ! mixed CanBank(object who, string currency); ! string SetBank(string str); string SetCurrency(string str); int SetSurcharge(int amount); *************** *** 19,31 **** int GetMinimumTransaction(); float GetExchangePercentage(); mixed GetCurrencies(); ! int AddSurcharge(object who, string currency, int amount); ! mixed eventDeposit(object who, string currency, int amount); mixed eventWithdraw(object who, string currency, int amount); mixed eventBalance(object who); mixed eventExchange(object who, int amount, string str1, string str2); mixed eventOpenAccount(object who); ! #endif /* l_bank_h */ --- 19,31 ---- int GetMinimumTransaction(); float GetExchangePercentage(); mixed GetCurrencies(); ! int AddSurcharge(object who, string currency, int amount); ! mixed eventDeposit(object who, string currency, int amount); mixed eventWithdraw(object who, string currency, int amount); mixed eventBalance(object who); mixed eventExchange(object who, int amount, string str1, string str2); mixed eventOpenAccount(object who); ! #endif /* l_bank_h */ diff -c -r --new-file ds2.0r18/lib/lib/include/body.h ds2.0r20b/lib/lib/include/body.h *** ds2.0r18/lib/lib/include/body.h Mon Jan 16 23:03:04 2006 --- ds2.0r20b/lib/lib/include/body.h Wed Apr 5 19:33:17 2006 *************** *** 1,6 **** #ifndef l_body_h #define l_body_h ! static void create(); static void heart_beat(); void restart_heart(); --- 1,6 ---- #ifndef l_body_h #define l_body_h ! static void create(); static void heart_beat(); void restart_heart(); *************** *** 13,24 **** varargs int eventHealDamage(int x, int internal, mixed limbs); varargs int