diff -c -r --new-file ds2.0r26/lib/cmds/admins/mfinger.c ds2.0r29/lib/cmds/admins/mfinger.c *** ds2.0r26/lib/cmds/admins/mfinger.c Mon Nov 7 13:28:38 2005 --- ds2.0r29/lib/cmds/admins/mfinger.c Sat Jul 8 23:30:54 2006 *************** *** 53,58 **** void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.", this_player()); } --- 53,63 ---- void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.\n\n" ! "Note: In 1995, you could reliably expect a UNIX machine to cheerfully " ! "respond to a finger request. Now, more than 10 years later, everything " ! "is blocked, firewalled, and hardened. This command is all but useless, " ! "and is kept as a historical curiosity. Any \"bugs\" it contains will " ! "not be fixed.", this_player()); } diff -c -r --new-file ds2.0r26/lib/cmds/common/help.c ds2.0r29/lib/cmds/common/help.c *** ds2.0r26/lib/cmds/common/help.c Sat Mar 11 11:13:28 2006 --- ds2.0r29/lib/cmds/common/help.c Wed Jul 5 00:01:03 2006 *************** *** 16,28 **** mixed cmd(string arg) { object who = previous_object(); int array screen = (who->GetScreen() || ({ 80, 24 })); ! string help; ! if( !arg || arg == "" || arg == "help") { help = HELP_D->GetHelp("help"); write(help); return 1; } if( arg == "index" || HELP_D->GetTopics(arg) ) { if( arg == "index" ) { HelpMenu(); --- 16,35 ---- mixed cmd(string arg) { object who = previous_object(); int array screen = (who->GetScreen() || ({ 80, 24 })); ! string help = ""; ! if( arg == "help") { help = HELP_D->GetHelp("help"); write(help); return 1; } + if( !arg || arg == "") { + if(creatorp(this_player())) help = read_file("/doc/help/creators/creator_general"); + else help = read_file("/doc/help/players/player_general"); + if(!sizeof(help)) help = HELP_D->GetHelp("help"); + write(help); + return 1; + } if( arg == "index" || HELP_D->GetTopics(arg) ) { if( arg == "index" ) { HelpMenu(); diff -c -r --new-file ds2.0r26/lib/cmds/creators/colors.c ds2.0r29/lib/cmds/creators/colors.c *** ds2.0r26/lib/cmds/creators/colors.c Thu Apr 13 21:03:19 2006 --- ds2.0r29/lib/cmds/creators/colors.c Sat Jul 8 23:30:54 2006 *************** *** 6,29 **** int cmd() { write( ! "%^RED%^RED\n" ! "%^GREEN%^GREEN\n" ! "%^ORANGE%^ORANGE\n" ! "%^YELLOW%^YELLOW\n" ! "%^BLUE%^BLUE\n" ! "%^CYAN%^CYAN\n" ! "%^MAGENTA%^MAGENTA\n" ! "%^BLACK%^BLACK\n" ! "%^WHITE%^WHITE\n" ! "%^B_RED%^B_RED\n" ! "%^B_GREEN%^B_GREEN\n" ! "%^B_ORANGE%^B_ORANGE\n" ! "%^B_YELLOW%^B_YELLOW\n" ! "%^B_BLUE%^B_BLUE\n" ! "%^B_CYAN%^B_CYAN\n" ! "%^B_BLACK%^B_BLACK\n" ! "%^B_WHITE%^B_WHITE%^RESET%^\n" ! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); return 1; } --- 6,33 ---- int cmd() { write( ! "%^RED%^RED\t%%^^RED%%^^\n" ! "%^GREEN%^GREEN\t%%^^GREEN%%^^\n" ! "%^ORANGE%^ORANGE\t%%^^ORANGE%%^^\n" ! "%^YELLOW%^YELLOW\t%%^^YELLOW%%^^\n" ! "%^BLUE%^BLUE\t%%^^BLUE%%^^\n" ! "%^CYAN%^CYAN\t%%^^CYAN%%^^\n" ! "%^MAGENTA%^MAGENTA\t%%^^MAGENTA%%^^\n" ! "%^BLACK%^BLACK\t%%^^BLACK%%^^\n" ! "%^WHITE%^WHITE\t%%^^WHITE%%^^\n" ! "%^B_RED%^B_RED\t%%^^B_RED%%^^\n" ! "%^B_GREEN%^B_GREEN\t%%^^B_GREEN%%^^\n" ! "%^B_ORANGE%^B_ORANGE\t%%^^B_ORANGE%%^^\n" ! "%^B_YELLOW%^B_YELLOW\t%%^^B_YELLOW%%^^\n" ! "%^B_BLUE%^B_BLUE\t%%^^B_BLUE%%^^\n" ! "%^B_CYAN%^B_CYAN\t%%^^B_CYAN%%^^\n" ! "%^B_BLACK%^B_BLACK\t%%^^B_BLACK%%^^\n" ! "%^B_WHITE%^B_WHITE\t%%^^B_WHITE%%^^\n" ! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n\n" ! "Special tags: %%^^BOLD%%^^ and %%^^FLASH%%^^ and %%^^RESET%%^^\n\n" ! "You can mix and match, for example: \n" ! "%%^^B_RED%%^^%%^^CYAN%%^^%%^^BOLD%%^^%%^^FLASH%%^^Foo!%%^^RESET%%^^:" ! "%^B_RED%^%^CYAN%^%^BOLD%^%^FLASH%^Foo!%^RESET%^" ); return 1; } diff -c -r --new-file ds2.0r26/lib/cmds/creators/margins.c ds2.0r29/lib/cmds/creators/margins.c *** ds2.0r26/lib/cmds/creators/margins.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/cmds/creators/margins.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,19 ---- + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + return @ENDTEXT + |---------------------------------------------------------------|-------------| + ENDTEXT; + } + + void help() { + write("Syntax: margins\n"); + write(@EndText + This simple command prints a line to help creators when writing + descriptions. It gives a visual indicator of when to stop on + one line and continue on the next. + EndText + ); + } diff -c -r --new-file ds2.0r26/lib/cmds/creators/move.c ds2.0r29/lib/cmds/creators/move.c *** ds2.0r26/lib/cmds/creators/move.c Wed Apr 5 19:33:16 2006 --- ds2.0r29/lib/cmds/creators/move.c Wed Dec 31 19:00:00 1969 *************** *** 1,55 **** - /* /cmds/creators/move.c - * From the Dead Souls V Object Library - * Moves object from one place to another - * created by Descartes of Borg 961008 - * Version: @(#) move.c 1.2@(#) - * Last modified: 96/10/08 - */ - - #include - #include - - inherit LIB_DAEMON; - - mixed cmd(string args) { - object what, destination; - string a, b; - mixed res; - - if( sscanf(args, "%s into %s", a, b) != 2 && - sscanf(args, "%s to %s", a, b) != 2 ) { - return "Syntax: \n\n"; - } - what = to_object(a); - destination = to_object(b); - if( !what ) { - return "Unable to find " + a + "."; - } - if( !destination ) { - return "Unable to find " + b + "."; - } - if( living(what) && living(destination) ) { - return "None of that nonsense."; - } - res = what->eventMove(destination); - if( !res ) { - return "Failed to move " + identify(what) + " into " + - identify(destination) + "."; - } - else if( res != 1 ) { - return res; - } - previous_object()->eventPrint("Moved " + identify(what) + " into " + - identify(destination) + ".", MSG_SYSTEM); - if( living(what) ) { - what->eventDescribeEnvironment(); - } - return 1; - } - - string GetHelp() { - 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"); - } --- 0 ---- diff -c -r --new-file ds2.0r26/lib/cmds/creators/polyglottize.c ds2.0r29/lib/cmds/creators/polyglottize.c *** ds2.0r26/lib/cmds/creators/polyglottize.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/cmds/creators/polyglottize.c Wed Jul 5 00:01:03 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 polyglottize you."); + return 1; + } + + target->SetPolyglot(1); + if(target == this_player()) str = "yourself"; + else str = capitalize(str); + write("You polyglottize "+str+"."); + if(target != this_player()) + tell_object(target, capitalize(this_player()->GetKeyName())+" polyglottizes you."); + return 1; + } + + void help() { + message("help", "Syntax: polyglottize \n\n" + "Make the target able to understand all languages.\n\n", + this_player()); + } diff -c -r --new-file ds2.0r26/lib/cmds/creators/transfer.c ds2.0r29/lib/cmds/creators/transfer.c *** ds2.0r26/lib/cmds/creators/transfer.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/cmds/creators/transfer.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,59 ---- + /* /cmds/creators/transfer.c + * From the Dead Souls V Object Library + * Moves object from one place to another + * created by Descartes of Borg 961008 + * Version: @(#) transfer.c 1.2@(#) + * Last modified: 96/10/08 + */ + + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + object what, destination; + string a, b; + mixed res; + + if(!args || args == ""){ + return "Syntax: \n\n"; + } + + if( sscanf(args, "%s into %s", a, b) != 2 && + sscanf(args, "%s to %s", a, b) != 2 ) { + return "Syntax: \n\n"; + } + what = to_object(a); + destination = to_object(b); + if( !what ) { + return "Unable to find " + a + "."; + } + if( !destination ) { + return "Unable to find " + b + "."; + } + if( living(what) && living(destination) ) { + return "None of that nonsense."; + } + res = what->eventMove(destination); + if( !res ) { + return "Failed to transfer " + identify(what) + " into " + + identify(destination) + "."; + } + else if( res != 1 ) { + return res; + } + previous_object()->eventPrint("Transferred " + identify(what) + " into " + + identify(destination) + ".", MSG_SYSTEM); + if( living(what) ) { + what->eventDescribeEnvironment(); + } + return 1; + } + + string GetHelp() { + return ("Syntax: \n\n" + "Allows you to transfer the object you name into the container " + "you name.\n\n" + "See also: trans, expel, goto, return"); + } diff -c -r --new-file ds2.0r26/lib/cmds/players/biography.c ds2.0r29/lib/cmds/players/biography.c *** ds2.0r26/lib/cmds/players/biography.c Mon Nov 7 13:28:39 2005 --- ds2.0r29/lib/cmds/players/biography.c Wed Jul 5 19:58:18 2006 *************** *** 93,99 **** d2 = ({}); } else { ! x = x/2; d1 = deaths[0..(x-1)]; d2 = deaths[x..]; } --- 93,99 ---- d2 = ({}); } else { ! //x = x/2; d1 = deaths[0..(x-1)]; d2 = deaths[x..]; } *************** *** 123,129 **** col3 = npcs[(2*x)..]; } for(i=0; i= sizeof(col1)) ? "" : col1[i] + " (" + kills[col1[i]] + ")", (i >= sizeof(col2)) ? "" : --- 123,129 ---- col3 = npcs[(2*x)..]; } for(i=0; i= sizeof(col1)) ? "" : col1[i] + " (" + kills[col1[i]] + ")", (i >= sizeof(col2)) ? "" : diff -c -r --new-file ds2.0r26/lib/cmds/players/env.c ds2.0r29/lib/cmds/players/env.c *** ds2.0r26/lib/cmds/players/env.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/cmds/players/env.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,19 ---- + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + write("Screen: \t\t"+identify(this_player()->GetScreen())); + write("Terminal: \t\t"+this_player()->GetTerminal()); + write("Brief mode: \t\t"+ ( (this_player()->GetBriefMode()) ? "on" : "off" )); + //write("PlayerKill mode: \t"+ ( (this_player()->GetPK()) ? "on" : "off" )); + if(creatorp(this_player())) + write("Debug mode: \t\t"+ ( (this_player()->GetProperty("debug")) ? "on" : "off" )); + return 1; + } + + void help() { + message("help", "Syntax: \n\n" + "Displays your basic interface and play settings. " + + "See also: brief, terminal, screen", this_player()); + } diff -c -r --new-file ds2.0r26/lib/cmds/players/language.c ds2.0r29/lib/cmds/players/language.c *** ds2.0r26/lib/cmds/players/language.c Wed Apr 5 19:33:16 2006 --- ds2.0r29/lib/cmds/players/language.c Wed Jul 5 00:01:03 2006 *************** *** 11,18 **** } write("You speak:"); ! foreach(string key, int val in FluencyMap){ ! write(capitalize(key)+" with "+val+"% proficiency."); } return 1; --- 11,25 ---- } write("You speak:"); ! ! if(this_player()->GetPolyglot()){ ! write("All languages with 100% proficiency."); ! } ! ! else { ! foreach(string key, int val in FluencyMap){ ! write(capitalize(key)+" with "+val+"% proficiency."); ! } } return 1; diff -c -r --new-file ds2.0r26/lib/cmds/players/mudlist.c ds2.0r29/lib/cmds/players/mudlist.c *** ds2.0r26/lib/cmds/players/mudlist.c Tue Mar 28 23:23:40 2006 --- ds2.0r29/lib/cmds/players/mudlist.c Wed Jul 5 19:58:18 2006 *************** *** 100,108 **** list = ({}); foreach(mud, info in borg) list += ({ sprintf("%:-15s %:-6s %:-15s %:-18s %s %d", ! mud, info[8], info[7], info[5], info[1], info[2]) }); list = sort_array(list, 1); ! list = ({ mud_name() + " recognizes " + consolidate(sizeof(borg), "a mud")+ " matching your query: ", "" }) + list; this_player()->eventPage(list); return 1; --- 100,108 ---- list = ({}); foreach(mud, info in borg) list += ({ sprintf("%:-15s %:-6s %:-15s %:-18s %s %d", ! replace_string(mud,"%^","%%^^"), info[8], info[7], info[5], info[1], info[2]) }); list = sort_array(list, 1); ! list = ({ replace_string(mud_name(),"%^","%%^^") + " recognizes " + consolidate(sizeof(borg), "a mud")+ " matching your query: ", "" }) + list; this_player()->eventPage(list); return 1; diff -c -r --new-file ds2.0r26/lib/cmds/players/screen.c ds2.0r29/lib/cmds/players/screen.c *** ds2.0r26/lib/cmds/players/screen.c Mon Nov 7 13:28:39 2005 --- ds2.0r29/lib/cmds/players/screen.c Wed Jul 5 00:01:03 2006 *************** *** 11,21 **** mixed cmd(string args) { int *screen; int h, w; if( args == "" || !args ) ! return "You need to specify both width and height."; if( sscanf(args, "%d %d", w, h) != 2 ) ! return "You need to specify both width and height."; this_player()->SetScreen(w, h); message("system", "Screen set to " + w + " by " + h + ".", this_player()); return 1; --- 11,24 ---- mixed cmd(string args) { int *screen; int h, w; + string chide = "You need to specify both width and height.\n"; + string ret = "Your current settings are: "+ this_player()->GetScreen()[0]; + ret += " "+ this_player()->GetScreen()[1]; if( args == "" || !args ) ! return chide + ret; if( sscanf(args, "%d %d", w, h) != 2 ) ! return chide + ret; this_player()->SetScreen(w, h); message("system", "Screen set to " + w + " by " + h + ".", this_player()); return 1; diff -c -r --new-file ds2.0r26/lib/cmds/players/who.c ds2.0r29/lib/cmds/players/who.c *** ds2.0r26/lib/cmds/players/who.c Wed Feb 22 15:29:49 2006 --- ds2.0r29/lib/cmds/players/who.c Wed Jul 5 00:01:03 2006 *************** *** 6,12 **** #include inherit LIB_DAEMON; - int elderp(object foo); #define SEP repeat_string("*=",39)+"*\n"; --- 6,11 ---- *************** *** 23,30 **** if(!obs[i]->GetInvis()) { if(archp(obs[i])) tmp+="[%^BLUE%^ARCH%^RESET%^]"; else if(creatorp(obs[i]) ) tmp+="[%^CYAN%^WIZ%^RESET%^]"; else tmp+=sprintf("[%d]", obs[i]->GetLevel() ); ! if(elderp(obs[i])) tmp+=" [%^GREEN%^ELDER%^RESET%^]"; if(sizeof(obs[i]->GetShort()) < 50) { tmp+=sprintf(" %s", obs[i]->GetShort()); } --- 22,32 ---- if(!obs[i]->GetInvis()) { if(archp(obs[i])) tmp+="[%^BLUE%^ARCH%^RESET%^]"; else if(creatorp(obs[i]) ) tmp+="[%^CYAN%^WIZ%^RESET%^]"; + else if(avatarp(obs[i]) ) tmp+="[%^GREEN%^AVATAR%^RESET%^]"; + else if(high_mortalp(obs[i]) ) tmp+="[%^GREEN%^HIGH MORTAL%^RESET%^]"; else tmp+=sprintf("[%d]", obs[i]->GetLevel() ); ! if(elderp(obs[i])) tmp+=" [%^YELLOW%^ELDER%^RESET%^]"; ! if(ambassadorp(obs[i])) tmp+=" [%^YELLOW%^AMBASSADOR%^RESET%^]"; if(sizeof(obs[i]->GetShort()) < 50) { tmp+=sprintf(" %s", obs[i]->GetShort()); } *************** *** 54,61 **** return 1; } - int elderp(object ob){ - string str; - str=ob->GetKeyName(); - return member_group(str, PRIV_ELDER); - } --- 56,58 ---- diff -c -r --new-file ds2.0r26/lib/daemon/help.c ds2.0r29/lib/daemon/help.c *** ds2.0r26/lib/daemon/help.c Mon Jan 23 09:03:35 2006 --- ds2.0r29/lib/daemon/help.c Wed Jul 5 00:00:58 2006 *************** *** 438,445 **** help = "Index: %^GREEN%^" + index + "%^RESET%^\n" + "Topic: %^GREEN%^" + topic + "%^RESET%^\n\n" + help; if( file_exists(DIR_RACE_HELP + "/" + topic) ) ! help += read_file(DIR_RACE_HELP + "/" + topic); ! return help; } Error = "No such race exists."; return 0; --- 438,445 ---- help = "Index: %^GREEN%^" + index + "%^RESET%^\n" + "Topic: %^GREEN%^" + topic + "%^RESET%^\n\n" + help; if( file_exists(DIR_RACE_HELP + "/" + topic) ) ! //help += read_file(DIR_RACE_HELP + "/" + topic); ! return help; } Error = "No such race exists."; return 0; diff -c -r --new-file ds2.0r26/lib/daemon/intermud.c ds2.0r29/lib/daemon/intermud.c *** ds2.0r26/lib/daemon/intermud.c Wed Apr 12 23:47:49 2006 --- ds2.0r29/lib/daemon/intermud.c Wed Jul 5 00:00:58 2006 *************** *** 11,16 **** --- 11,17 ---- #else #include + #include #include #include #include *************** *** 31,37 **** Password = 0; Tries = 0; Banned = ([]); - Nameservers = ({ ({ "*yatmim", "149.152.218.102 23" }) }); MudList = new(class list); ChannelList = new(class list); MudList->ID = -1; --- 32,37 ---- *************** *** 40,45 **** --- 40,46 ---- ChannelList->List = ([]); if( file_size( SAVE_INTERMUD __SAVE_EXTENSION__ ) > 0 ) unguarded( (: restore_object, SAVE_INTERMUD, 1 :) ); + Nameservers = ({ ({ "*yatmim", "149.152.218.102 23" }) }); SetNoClean(1); tn("INTERMUD_D reloaded."); SetDestructOnClose(1); *************** *** 73,78 **** --- 74,93 ---- (mapping)SERVICES_D->GetServices(), ([]) }) ), "red");; } + void eventClearVars(){ + if( !((int)master()->valid_apply(({ PRIV_ASSIST, INTERMUD_D }))) ) + error("Illegal attempt to reset intermud: "+get_stack()+" "+identify(previous_object(-1))); + Connected = 0; + Tries = 0; + MudList = new(class list); + ChannelList = new(class list); + MudList->ID = -1; + MudList->List = ([]); + ChannelList->ID = -1; + ChannelList->List = ([]); + save_object(SAVE_INTERMUD); + } + static void eventRead(mixed *packet) { mixed val; string cle; *************** *** 164,169 **** --- 179,185 ---- break; case "chanlist-reply": // if( packet[6] == ChannelList->ID ) return; + tn("chanlist reply: "+identify(packet), "blue"); if( packet[2] != Nameservers[0][0] ) return; ChannelList->ID = packet[6]; foreach(cle, val in packet[7]) { diff -c -r --new-file ds2.0r26/lib/daemon/verbs.c ds2.0r29/lib/daemon/verbs.c *** ds2.0r26/lib/daemon/verbs.c Wed Feb 22 15:29:50 2006 --- ds2.0r29/lib/daemon/verbs.c Sun Jul 9 19:04:26 2006 *************** *** 23,29 **** string verb; int i; - //tc("/daemon/verbs: eventReloadVerbs"); if( arrayp(val) ) verbs = filter(val, (: GetValidVerb($1) :)); else if( stringp(val) ) { if( strlen(val) > 2 && val[<2..] == ".c" ) val = val[0..<3]; --- 23,28 ---- *************** *** 51,56 **** --- 50,63 ---- break; } } + foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) { + dir = DIR_SECURE_VERBS + "/" + dir; + if( file_size(dir) != -2 ) continue; + if( file_exists( dir + "/" + val + ".c") ) { + verbs = ({ dir + "/" + val }); + break; + } + } if( !verbs ) return; } } *************** *** 64,69 **** --- 71,81 ---- if( file_size(dir) == -2 ) verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :)); } + foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) { + dir = DIR_SECURE_VERBS + "/" + dir; + if( file_size(dir) == -2 ) + verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :)); + } } i = 0; foreach(verb in verbs) { *************** *** 87,101 **** } string GetErrorMessage(string verb) { - //tc("/daemon/verbs: GetErrorMessage"); if( !Verbs[verb] ) return 0; else return (string)Verbs[verb]->GetErrorMessage(); } int GetValidVerb(string verb) { ! //tc("/daemon/verbs: GetValidVerb: verb: "+verb); ! return !strsrch(verb, DIR_VERBS); ! //key_arr = keys(GetVerbs()); } mapping GetVerbs() { return copy(Verbs); } --- 99,111 ---- } string GetErrorMessage(string verb) { if( !Verbs[verb] ) return 0; else return (string)Verbs[verb]->GetErrorMessage(); } int GetValidVerb(string verb) { ! if(!strsrch(verb, DIR_VERBS) || !strsrch(verb, DIR_VERBS)) return 1; ! else return 0; } mapping GetVerbs() { return copy(Verbs); } diff -c -r --new-file ds2.0r26/lib/doc/CREDITS ds2.0r29/lib/doc/CREDITS *** ds2.0r26/lib/doc/CREDITS Mon May 15 11:27:29 2006 --- ds2.0r29/lib/doc/CREDITS Sat Jul 8 23:30:54 2006 *************** *** 3,22 **** Sine qua non: Descartes, the legion of MudOS developers, and all those coders who toiled at Nightmare, and Lars Pensjö. Direct conributors: Haderach and his clever code and inspiration, Duuk and his willingness to let me poke through his lib and filch code. Great thanks to Marajin for his direct and substantial contribution to the Windows port. Thanks also to the following for code donation, support, and/or contribution: Tim@TimMUD, Manchi, ! Brodbane, Ashon, Shadyman, Jonez, Cecil. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, Aten, Metiscus, Garfield, Javelin, Alensin, Daelas, ! and Detah for their thoughtful comments and suggestions. Also: Xyzzy He Is Cool --- 3,27 ---- Sine qua non: Descartes, the legion of MudOS developers, and all those coders who toiled at Nightmare, and Lars Pensjö. + Marius for his kind permission to bundle MudOS. Direct conributors: Haderach and his clever code and inspiration, Duuk and his willingness to let me poke through his lib and filch code. Great thanks to Marajin for his direct and substantial contribution to the Windows port. + Much gratitude to Saquivor, for whom a town street is + now named, for getting the Windows socket code working. Thanks also to the following for code donation, support, and/or contribution: Tim@TimMUD, Manchi, ! Brodbane, Ashon, Shadyman, Jonez, Cecil, Daelas. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, Aten, Metiscus, Garfield, Javelin, Alensin, Daelas, ! Zeus, Dastuun, Detah, and Nulvect for their thoughtful comments and suggestions. + Much gratitude to playtesters: Karri, Aten, Tacitus. + Also: Xyzzy He Is Cool diff -c -r --new-file ds2.0r26/lib/doc/README ds2.0r29/lib/doc/README *** ds2.0r26/lib/doc/README Mon Jan 23 09:17:12 2006 --- ds2.0r29/lib/doc/README Wed Jul 5 00:00:58 2006 *************** *** 6,21 **** safe first, and then restore it after you upgrade. Alternately you may just edit the new mudos.cfg to say what the old one said. ! GENERAL FAQ: http://dead-souls.sourceforge.net/ds-faq.html ! ADMIN FAQ: http://dead-souls.sourceforge.net/ds-admin-faq.html ! ED TUTORIAL: http://dead-souls.sourceforge.net/editor.html ! NEW CREATION SYSTEM: http://dead-souls.sourceforge.net/example.html ! ! The Frontiers LPC Foundation is pleased to present the ! re-release of Dead Souls 2. Please read /doc/SUPPORT for details on the supportability of this software. Note that the Frontiers LPC Foundation does not take --- 6,18 ---- safe first, and then restore it after you upgrade. Alternately you may just edit the new mudos.cfg to say what the old one said. ! GENERAL FAQ: http://dead-souls.net/ds-faq.html ! ADMIN FAQ: http://dead-souls.net/ds-admin-faq.html ! ED TUTORIAL: http://dead-souls.net/editor.html ! NEW CREATION SYSTEM: http://dead-souls.net/example.html Please read /doc/SUPPORT for details on the supportability of this software. Note that the Frontiers LPC Foundation does not take *************** *** 30,49 **** This mudlib is based on that old warhorse. It is entirely free from those copyright problems, and can be shared. ! We felt that too many substandard libs were starting to ! pop up, and that there was a need to bring back some of the old ! LPC magic. In accordance with this wish to cater to the elite, we have ! disabled some intermud channels by default. To enable them, all you ! need to do is add them to yourself with these commands: ! call me->AddChannel("intergossip") ! call me->AddChannel("intercre") ! ! If you want to contribute to the Dead Souls Lib Resurrection ! project, please visit Frontiers MUD and leave some mudmail for ! Cratylus. You can also request to sign up as a lib developer at ! http://sourceforge.net/projects/dead-souls/ ! ! The latest available files will be at http://sourceforge.net/project/showfiles.php?group_id=148388 so check often. Please review /doc/old/README for more historical background. --- 27,34 ---- This mudlib is based on that old warhorse. It is entirely free from those copyright problems, and can be shared. ! The latest files will be at ! http://sourceforge.net/project/showfiles.php?group_id=148388 Please review /doc/old/README for more historical background. diff -c -r --new-file ds2.0r26/lib/doc/RELEASE_NOTES ds2.0r29/lib/doc/RELEASE_NOTES *** ds2.0r26/lib/doc/RELEASE_NOTES Sun Jun 18 16:28:32 2006 --- ds2.0r29/lib/doc/RELEASE_NOTES Sun Jul 9 19:04:27 2006 *************** *** 1,3 **** --- 1,91 ---- + ---- 2.0r29 --- + - Fixed finger daemon to not display ip addresses to players. + - The verb copy now handles relative paths more gracefully. + - LIB_TEACHER can now know all languages with SetAllLanguages(1) + - Standard chairs and beds can no longer be taken when someone is using them. + - Fixed church elevator buttons. + - Fixed problem with "look at pile". + - Fixed problem with examining objects on surfaces. + - It is now also possible to look at things carried by others, + e.g. "look at shirt on fighter". + - Remote finger no longer betrays invisible people. + - Added sefun: alpha_strip + - Room descriptions now indicate which piece of furniture a creature + is resting on, if applicable. + - Objects on surfaces than can be sat or lain in are not visible + or accessible if someone is lying or sitting on that surface. e.g., + you can't examine or get the glasses under your butt on the chair. + - SetMaxHealthPoints now works as one would expect. The kitchen rat + is invincible no more. + - Look at problem fixed. + - Bank tellers (Zoe) now do a better job of retaining the correct + surcharge on currency withdrawals. + - Added /secure/obj/glasses.c as a creation object. Since you wear them, + it's hard to lose them accidentally. Since few things are called "glasses", + they won't get in the way of creating objects. New creators will have them + automatically added to the table in their sample room. + - One may now have a smiley in front of a channel message without + it turning into an emote. + - Fixed a conflict in the parsing system. + - Verbified "force". + - Fixed vendor bugs: appraising at zero, confusion with similar items. + - Beefed up the answers_to sefun, to handle adjectives. + - Fixed a couple of bugs in the lead/follow system. + - Fixed null error when selling to non-vendors. + - Fixed a channel log bug that logged to one of two files for + some channels, depending on whether someone was logged on (!!). + - Fixed bug in meals that prevented empty bottles replacing + full ones. + - Fixed a bug in the MudOS parser that screwed up things with apostrophes. + + ---- 2.0r28 --- + - Fixed minor bug in body.c that interfered with collapsing. + - Fixed message boards. + - Added command: snoopreport + - Fixed bug that caused players to be essentially immortal. + - Player death history is now accurately recorded. + - The command mudlist now ignores colors. + + ---- 2.0r27 --- + - Fixed currency problem in dying NPC's. + - Added commands: env, polyglottize + - Fixed "about" verb. + - Tweaked snoop daemon and snoop objects. + - Added pay-for-lessons feature in language teachers. + - Fixed bug in LIB_EXITS that hosed various things, + including wandering NPC's. + - mv command no longer overwrites an existing destination file. + - Fixed campus rooms with hosed CanReceive()'s that horked logins. + - Turned "move" command into "transfer", to address a conflict with + the "move" verb. - Fixed bug in admintool that prevented assistant admins from + using it. + - Fixed bug in eval that prevented assistant admins from using it. + - i3router: dynamic channel data is now persistent (newly created + channels won't disappear when the router resets). + - i3router: fixed a bug in chanlist-reply that stopped the + channel list being sent to LPUni lib muds. + - Modified install process to handle compiling on Wolfpaw servers. + - Added code example domain that was donated by Daelas @ Moraelinost. + - Added new podium, conference room, and margins command that were + donated by Daelas @ Moraelinost. + - i3router: correct password is now honored. + - Fixed help daemon bug that displayed race help twice. + - QCS: creating an enter no longer wipes exits from an existing + target room. + - Fixed bug in rescue login (Thanks, Nulvect). + - Fixed bug in tell command that mishandled mud name ambiguity. + - Fixed bug in CHAT_D that failed to return remote channel listeners. + - i3router: fixed bug that incorrectly rejected targeted emotes. + - Killing a creature super-ultra-extremely fast no longer + generates multiple corpses. + - QCS: Fixed some money problems with both how much things cost and + how much money they have. + - Modified encumbrance to be rather less cumbersome. + - Mailer default behavior now is to notify you when you receive new + mail. Already created characters do not have this default. + - Fixed opacity problem in worn storage. + - Fixed message board in arch room. + ---- 2.0r26 --- - Plugged some serious security holes ( http://dead-souls.net/news.html#16jun06 ) - Cleaned up some unnecessary call_outs in lib objects. diff -c -r --new-file ds2.0r26/lib/doc/SUPPORT ds2.0r29/lib/doc/SUPPORT *** ds2.0r26/lib/doc/SUPPORT Mon Jan 23 09:17:12 2006 --- ds2.0r29/lib/doc/SUPPORT Wed Jul 5 00:00:58 2006 *************** *** 12,18 **** For your convenience, a telnet room has been added to your mud that can help you connect to Frontiers, so that you may ask for help if you run into trouble. Just enter the telnet room ! west of the wizard hall, and type: connect You may ask questions of creators there, but don't be offended if they are more interested in building --- 12,18 ---- For your convenience, a telnet room has been added to your mud that can help you connect to Frontiers, so that you may ask for help if you run into trouble. Just enter the telnet room ! west and north of the wizard hall, and type: connect You may ask questions of creators there, but don't be offended if they are more interested in building diff -c -r --new-file ds2.0r26/lib/doc/faq/admin ds2.0r29/lib/doc/faq/admin *** ds2.0r26/lib/doc/faq/admin Sat Mar 11 11:22:47 2006 --- ds2.0r29/lib/doc/faq/admin Wed Jul 5 00:01:03 2006 *************** *** 420,426 **** %^GREEN%^*** I found a bug. For real. Can you please fix it?***%^RESET%^ ! Email me: @users.sourceforge.net Please include a detailed description of the bug, and the exact error text and commands that produced it. A log file or --- 420,426 ---- %^GREEN%^*** I found a bug. For real. Can you please fix it?***%^RESET%^ ! Email me: @comcast.net Please include a detailed description of the bug, and the exact error text and commands that produced it. A log file or diff -c -r --new-file ds2.0r26/lib/doc/faq/general ds2.0r29/lib/doc/faq/general *** ds2.0r26/lib/doc/faq/general Sat Mar 11 11:22:47 2006 --- ds2.0r29/lib/doc/faq/general Wed Jul 5 00:01:03 2006 *************** *** 159,165 **** %^GREEN%^ How do I get started? %^RESET%^ ! Download the latest version from http://dead-souls.sourceforge.net/ or http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls and install it. There are versions available for Windows and for Unix. The main difference between the two is the driver. The Windows driver is a Windows --- 159,165 ---- %^GREEN%^ How do I get started? %^RESET%^ ! Download the latest version from http://dead-souls.net/ or http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls and install it. There are versions available for Windows and for Unix. The main difference between the two is the driver. The Windows driver is a Windows diff -c -r --new-file ds2.0r26/lib/doc/guide/chapter05 ds2.0r29/lib/doc/guide/chapter05 *** ds2.0r26/lib/doc/guide/chapter05 Sun Jun 18 16:20:51 2006 --- ds2.0r29/lib/doc/guide/chapter05 Wed Jul 5 00:01:03 2006 *************** *** 36,42 **** classes, Dead Souls provides you the ability to use the existing stock classes, and permits you to create your own. The files in /secure/cfg/classes describe them. ! See http://dead-souls.sourceforge.net/ds-creator-faq.html#2.46 for the exact syntax of these files. You'll notice that there is a field for "how important" --- 36,42 ---- classes, Dead Souls provides you the ability to use the existing stock classes, and permits you to create your own. The files in /secure/cfg/classes describe them. ! See http://dead-souls.net/ds-creator-faq.html#2.46 for the exact syntax of these files. You'll notice that there is a field for "how important" diff -c -r --new-file ds2.0r26/lib/doc/guide/chapter08 ds2.0r29/lib/doc/guide/chapter08 *** ds2.0r26/lib/doc/guide/chapter08 Sun Jun 18 16:20:52 2006 --- ds2.0r29/lib/doc/guide/chapter08 Wed Jul 5 00:01:03 2006 *************** *** 195,201 **** keep track of which fields have been plowed, how many times, and how long it'll take to get to harvest time. Dead Souls daemons typically use object ! persistence files ( http://dead-souls.sourceforge.net/ds-admin-faq.html#80 ) to avoid losing information during object reloads or mud reboots. A FARMING_D is exactly what you need to keep track of and manage this kind of data. --- 195,201 ---- keep track of which fields have been plowed, how many times, and how long it'll take to get to harvest time. Dead Souls daemons typically use object ! persistence files ( http://dead-souls.net/ds-admin-faq.html#80 ) to avoid losing information during object reloads or mud reboots. A FARMING_D is exactly what you need to keep track of and manage this kind of data. diff -c -r --new-file ds2.0r26/lib/doc/hbook/chapter04 ds2.0r29/lib/doc/hbook/chapter04 *** ds2.0r26/lib/doc/hbook/chapter04 Sat Mar 11 11:14:53 2006 --- ds2.0r29/lib/doc/hbook/chapter04 Wed Jul 5 00:01:03 2006 *************** *** 23,31 **** friends to tackle the orcs together, or raise your level to the point where you're tough enough to take them on. ! To raise your level, wander around in the newbie mansion. There's ! lots of loot there you can sell at Otik's shop, and with the cash you ! can then get some proper weaponry and armor. Silver is heavy, so don't try to carry all your money around all the time. Request an account from Zoe the banker and keep your money there until you really need it. --- 23,34 ---- friends to tackle the orcs together, or raise your level to the point where you're tough enough to take them on. ! To raise your level, wander around in the newbie mansion, which ! is south of the village church. ! ! There's lots of loot there you can sell at Otik's shop, and with the ! cash you can then get some proper weaponry and armor. ! Silver is heavy, so don't try to carry all your money around all the time. Request an account from Zoe the banker and keep your money there until you really need it. *************** *** 34,40 **** finding the secret room will give you experience and quest points too. (hint, there might be more than one secret room) ! Once you have enough experience and/and or points, go to Dirk in the adventurers hall and "%^GREEN%^ask dirk to advance%^RESET%^". Make sure you learn some spells from Herkimer, because if you --- 37,43 ---- finding the secret room will give you experience and quest points too. (hint, there might be more than one secret room) ! Once you have enough experience and/or points, go to Dirk in the adventurers hall and "%^GREEN%^ask dirk to advance%^RESET%^". Make sure you learn some spells from Herkimer, because if you diff -c -r --new-file ds2.0r26/lib/doc/help/creators/admin ds2.0r29/lib/doc/help/creators/admin *** ds2.0r26/lib/doc/help/creators/admin Fri May 12 21:13:22 2006 --- ds2.0r29/lib/doc/help/creators/admin Wed Jul 5 00:01:10 2006 *************** *** 10,18 **** Your most valuable tools will be the Dead Souls FAQs: ! http://dead-souls.sourceforge.net/ds-admin-faq.html ! http://dead-souls.sourceforge.net/ds-creator-faq.html Almost everything else will flow from your familiarity and understanding of the information there. --- 10,18 ---- Your most valuable tools will be the Dead Souls FAQs: ! http://dead-souls.net/ds-admin-faq.html ! http://dead-souls.net/ds-creator-faq.html Almost everything else will flow from your familiarity and understanding of the information there. diff -c -r --new-file ds2.0r26/lib/doc/help/creators/creation ds2.0r29/lib/doc/help/creators/creation *** ds2.0r26/lib/doc/help/creators/creation Mon Jan 23 09:17:12 2006 --- ds2.0r29/lib/doc/help/creators/creation Wed Jul 5 00:01:10 2006 *************** *** 16,21 **** In the meantime, take a look below at the commands in actual use, with a few added comments: ! http://dead-souls.sourceforge.net/example.html --- 16,21 ---- In the meantime, take a look below at the commands in actual use, with a few added comments: ! http://dead-souls.net/example.html diff -c -r --new-file ds2.0r26/lib/doc/help/creators/creator_general ds2.0r29/lib/doc/help/creators/creator_general *** ds2.0r26/lib/doc/help/creators/creator_general Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/creators/creator_general Wed Jul 5 00:01:10 2006 *************** *** 0 **** --- 1,21 ---- + Common Creator commands: + + File commands: + ------------- + cp - copy a file + mv - move or rename a file + cd - change your working directory + ls - list the contents of your directory + ed - edit a file (WARNING: if you get stuck, type a + single period on a blank line, then Q, then enter) + rm - delete a file + more - page through the contents of a file + cat - display the entire contents of a file + update - load a file into memory + + Creation commands (used on objects, not files): + ------------- + create, modify, reload, delete, add, copy + + For more information on a command, type: help + See also: help help diff -c -r --new-file ds2.0r26/lib/doc/help/creators/plan ds2.0r29/lib/doc/help/creators/plan *** ds2.0r26/lib/doc/help/creators/plan Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/creators/plan Fri Jul 7 19:41:41 2006 *************** *** 0 **** --- 1,7 ---- + Your plan file is the extra information others see when + they finger you, usually listing what your projects are + and what you've been up to. To modify your plan, + edit the .plan file in your home directory. For example, + + cd + ed .plan diff -c -r --new-file ds2.0r26/lib/doc/help/creators/profile ds2.0r29/lib/doc/help/creators/profile *** ds2.0r26/lib/doc/help/creators/profile Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/creators/profile Fri Jul 7 19:41:41 2006 *************** *** 0 **** --- 1,11 ---- + Your profile is a file that contains a list of + instructions. When you log in, the mud will force + you to execute those commands. To modify what those + "startup commands" are, edit the .profile file in + your home directory. For example: + + cd + ed .profile + + Note that the mud cannot force you to do + certain things as a security measure. diff -c -r --new-file ds2.0r26/lib/doc/help/players/alias ds2.0r29/lib/doc/help/players/alias *** ds2.0r26/lib/doc/help/players/alias Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/players/alias Wed Jul 5 00:01:10 2006 *************** *** 0 **** --- 1,28 ---- + Syntax: alias + alias $* + + This command lets you substitute a short command for a long one. + For example, rather than type out "get all from corpse" you + can create this alias: + + %^GREEN%^alias gc get all from corpse%^RESET%^ + + And all you need do is type "gc" to get the same effect. + You can also use a wildcard, like this: + + %^GREEN%^alias gc get all from $* corpse%^RESET%^ + + So that typing: %^GREEN%^gc first%^RESET%^ + Expands out to: %^GREEN%^get all from first corpse%^RESET%^ + + The wildcard is also helpful for channel aliases: + + %^GREEN%^alias ige intergossipemote $*%^RESET%^ + + To see your aliases, type: %^GREEN%^alias%^RESET%^ + + To remove an alias, type alias plus the alias, like so: + + %^GREEN%^alias gc%^RESET%^ + + diff -c -r --new-file ds2.0r26/lib/doc/help/players/channels ds2.0r29/lib/doc/help/players/channels *** ds2.0r26/lib/doc/help/players/channels Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/players/channels Wed Jul 5 00:01:10 2006 *************** *** 0 **** --- 1,55 ---- + Channels are an out-of-character (OOC) means for users + to communicate with each other. You may hear the terms + "channel" and "line" used interchangeably. + + There are two main types of channels: local and intermud. + The default Dead Souls distribution uses these channels as + local: + + cre - only creators hear this + gossip - general offtopic stuff + newbie - everyone can hear this unless they turn it off + thief - channel for the thief class + fighter - channel for the fighter class + error - system errors + death - death announcements + mage - channel for the thief class + priest - channel for the thief class + explorer - channel for the thief class + admin - only admins hear this + + The following are intermud channels: + + ds - Dead Souls mud code talk + ds_test - testing testing 1, 2, 3, etc + intergossip - general offtopic stuff + lpuni - LPUniversity discussion + intercre - general technical chatter + + + By default, players do not have access to intermud channels. + Mud admins are asked to maintain some level of adherence to + the channel topics from their users. Muds that violate the + router admin's interpretation of "on-topic" will be asked + politely, if possible, to conform to the channel standards. + + Continued violations subject the offending mud to potential + banning. + + Hate speech is not tolerated, and flaming is frowned + upon, though each mud is expected to police itself and + enforce these standards on their own. + + If you don't like these rules, use a router other than the default. + + For local channels of course, none of this applies. Whatever + local rules are in place, that's what must be obeyed. + + Some tips: + --------- + To turn on/off a channel, type its name by itself, like this: newbie + + To know who is listening to a channel: list newbie + + To see a brief history of channel messages: hist newbie + diff -c -r --new-file ds2.0r26/lib/doc/help/players/player_general ds2.0r29/lib/doc/help/players/player_general *** ds2.0r26/lib/doc/help/players/player_general Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/players/player_general Wed Jul 5 00:01:10 2006 *************** *** 0 **** --- 1,23 ---- + Basic player commands: + + look - get a view of your environment + inventory - take stock of your possessions + stat - your health and statistics + score - your overall ranking and information + + Dealing with objects: + -------------------- + look at, look in + get, drop, put, give + open, close + read + wield, unwield, wear, remove + + Moving around: + ------------- + n, s, e, w, ne, nw, se, sw, u, d + enter, go out, climb up, climb down, jump down + crawl, fly + + See also: help help + diff -c -r --new-file ds2.0r26/lib/domains/Ylsrim/room/bazaar.c ds2.0r29/lib/domains/Ylsrim/room/bazaar.c *** ds2.0r26/lib/domains/Ylsrim/room/bazaar.c Wed Dec 7 13:59:22 2005 --- ds2.0r29/lib/domains/Ylsrim/room/bazaar.c Wed Jul 5 00:01:11 2006 *************** *** 20,26 **** // the is the amount of light the street lamps make at night SetAmbientLight(30); // the obvious exits tell people how to leave the room - SetObviousExits("n, s, enter armory, enter weaponry"); // set the sounds people hear SetListen("Vendors are begging you to come look at their goods."); // set the short description... should not be capitalized --- 20,25 ---- diff -c -r --new-file ds2.0r26/lib/domains/Ylsrim/room/vote_hall.c ds2.0r29/lib/domains/Ylsrim/room/vote_hall.c *** ds2.0r26/lib/domains/Ylsrim/room/vote_hall.c Mon Nov 7 13:29:44 2005 --- ds2.0r29/lib/domains/Ylsrim/room/vote_hall.c Wed Jul 5 00:01:11 2006 *************** *** 20,28 **** SetProperties( ([ "no kill" : 1, "no attack" : 1, "no steal" : 1, "no magic" : 1, "light" : 3, "no bump" : 1, "no teleport" : 1 ]) ); SetShort("voting hall"); ! SetLong("You are in the voting hall of Dead Souls. This is where " ! "people come to nominate candidates for class leader and to " ! "cast their vote. There is a list posted on the wall here."); SetItems( ([ "list" : "This is the list of candidates." ]) ); SetRead( "list", (: ReadList :) ); SetObviousExits("d"); --- 20,26 ---- SetProperties( ([ "no kill" : 1, "no attack" : 1, "no steal" : 1, "no magic" : 1, "light" : 3, "no bump" : 1, "no teleport" : 1 ]) ); SetShort("voting hall"); ! SetLong("You are in the voting hall of Ylsrim. This is where people come to nominate candidates for class leader and to cast their vote. There is a list posted on the wall here."); SetItems( ([ "list" : "This is the list of candidates." ]) ); SetRead( "list", (: ReadList :) ); SetObviousExits("d"); diff -c -r --new-file ds2.0r26/lib/domains/campus/armor/foodsmock.c ds2.0r29/lib/domains/campus/armor/foodsmock.c *** ds2.0r26/lib/domains/campus/armor/foodsmock.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/armor/foodsmock.c Sun Jul 9 22:06:36 2006 *************** *** 6,12 **** static void create(){ armor::create(); SetKeyName("uniform"); ! SetAdjectives( ({"food workers"}) ); SetId( ({"overalls", "smock"}) ); SetShort("a food worker's uniform"); SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance."); --- 6,12 ---- static void create(){ armor::create(); SetKeyName("uniform"); ! SetAdjectives( ({"food workers","food worker's"}) ); SetId( ({"overalls", "smock"}) ); SetShort("a food worker's uniform"); SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance."); diff -c -r --new-file ds2.0r26/lib/domains/campus/armor/wizard_hat.c ds2.0r29/lib/domains/campus/armor/wizard_hat.c *** ds2.0r26/lib/domains/campus/armor/wizard_hat.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/armor/wizard_hat.c Sun Jul 9 22:06:36 2006 *************** *** 2,21 **** #include #include inherit LIB_ARMOR; static void create(){ armor::create(); ! SetKeyName("wizard hat"); ! SetId(({"hat","headgear"})); ! SetAdjectives(({"wizard","wizard's"})); SetShort("a wizard's hat"); 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."); SetMass(50); ! SetDollarCost(500); SetDamagePoints(100); SetArmorType(A_HELMET); SetProtection(BLUNT, 20); SetProtection(BLADE, 20); SetProtection(KNIFE, 20); } --- 2,28 ---- #include #include inherit LIB_ARMOR; + static void create(){ armor::create(); ! SetKeyName("wizard's hat"); ! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) ); ! SetId( ({"hat"}) ); SetShort("a wizard's hat"); 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); SetArmorType(A_HELMET); SetProtection(BLUNT, 20); SetProtection(BLADE, 20); SetProtection(KNIFE, 20); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r26/lib/domains/campus/meals/red_wine.c ds2.0r29/lib/domains/campus/meals/red_wine.c *** ds2.0r26/lib/domains/campus/meals/red_wine.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/meals/red_wine.c Wed Dec 31 19:00:00 1969 *************** *** 1,22 **** - #include - #include - - inherit LIB_MEAL; - - static void create() { - meal::create(); - SetKeyName("red wine"); - SetId( ({"wine"}) ); - SetShort("a bottle of milk"); - SetLong("A fairly small bottle of milk from some unknown creature. It has " - "a greyish tint to it. It would take several of these bottles to quench " - "that deep down bodily thirst."); - SetMass(3); - SetMealType(MEAL_DRINK); - SetStrength(10); - SetMealMessages("You gulp down the bottle of milk.", "$N gulps down a small " - "bottle of milk."); - SetEmptyName("bottle"); - SetEmptyShort("an empty bottle"); - SetEmptyLong("A small bottle which used to contain a portion of milk."); - } --- 0 ---- diff -c -r --new-file ds2.0r26/lib/domains/campus/meals/wing.c ds2.0r29/lib/domains/campus/meals/wing.c *** ds2.0r26/lib/domains/campus/meals/wing.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/meals/wing.c Wed Dec 31 19:00:00 1969 *************** *** 1,29 **** - /* /domains/Praxis/etc/ale.c - * from Nightmare LPMud - * created by Descartes of Borg 950603 - */ - - #include - #include - - inherit LIB_MEAL; - - static void create() { - meal::create(); - SetKeyName("ale"); - SetId( ({ "bottle", "ale", "praxis ale" }) ); - SetShort("a bottle of ale"); - SetLong("A nice bottle of Lars' famous Praxis Ale."); - SetMass(60); - SetMealType(MEAL_FOOD); - SetMealMessages("You eat a chicken wing. Mmm!", - "$N enjoys a chicken wing. It looks delicious."); - } - void eventEat(){ - this_object()->goopy(); - return; - } - int goopy(){ - tell_room(environment(this_player()),"Gppy!\n"); - return 1; - } --- 0 ---- diff -c -r --new-file ds2.0r26/lib/domains/campus/npc/hans.c ds2.0r29/lib/domains/campus/npc/hans.c *** ds2.0r26/lib/domains/campus/npc/hans.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/npc/hans.c Wed Jul 5 19:58:19 2006 *************** *** 51,57 **** SetShort("Hans"); SetLong("Hans is a foreign exchange student from Germany."); SetLevel(5); - SetUnique(1); SetRace("human"); SetGender("male"); SetNoClean(1); --- 51,56 ---- diff -c -r --new-file ds2.0r26/lib/domains/campus/npc/rat.c ds2.0r29/lib/domains/campus/npc/rat.c *** ds2.0r26/lib/domains/campus/npc/rat.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/npc/rat.c Wed Jul 5 19:58:19 2006 *************** *** 1,9 **** - #include inherit LIB_SENTIENT; - static void create() { sentient::create(); SetKeyName("a mangy little rat"); --- 1,7 ---- *************** *** 12,18 **** SetLong("A scruffy little dirty rat."); SetLevel(1); SetMaxHealthPoints(5); - SetUnique(1); SetRace("rodent"); SetGender("male"); SetWanderSpeed(1); --- 10,15 ---- diff -c -r --new-file ds2.0r26/lib/domains/campus/obj/podium.c ds2.0r29/lib/domains/campus/obj/podium.c *** ds2.0r26/lib/domains/campus/obj/podium.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/obj/podium.c Wed Jul 5 00:01:11 2006 *************** *** 1,225 **** ! /* It works now, no define needed. ! * make sure someone does "setmc" or it won't do much. ! * setmc can only be done once, first come, first get i guess ;) ! * by Boy@frontiers. ! * Major corrections and modifications by Crat 25jul05 ! */ ! #include ! #include ! inherit LIB_STORAGE; ! string speaker; ! string mc; ! int x; ! object ob; ! static void create() { ! storage::create(); ! SetShort("a podium"); ! SetLong("This is the speaker's podium. It is about four feet tall "+ ! "and made of some expensive-looking, deep grain wood. This podium "+ ! "facilitates the running of meetings by giving the speaker the power "+ ! "to recognize individual people to speak at a time. There is "+ ! "some space in the podium to store things in, perhaps there is something "+ ! "in there now. For more "+ ! "details on running a meeting with the podium, type: help podium."); ! SetMass(10); ! SetId( ({"podium", "speaker's podium", "podium.c"}) ); ! SetDollarCost(-110); ! SetKeyName("podium"); ! SetId(({"podium","handler"})); ! SetAdjectives(({"wood","wooden","meeting","speaker's","Speaker's"})); ! SetDamagePoints(1000); ! SetPreventGet("You can't get that."); ! SetMaxCarry(20); ! SetInventory(([ ! "/domains/campus/obj/key1" : 1 ! ])); ! mc = ""; ! x = 0; ! speaker = ""; ! } ! void init() { ! ::init(); ! add_action("CatchInput", "",1); ! //add_action("eventSay", "say",1); ! //add_action("eventRaise", "raise"); ! //add_action("eventCallOn", "recognize"); ! //add_action("shaddap", "yell"); ! //add_action("shaddap", "shout"); ! //add_action("shaddap", "emote"); ! //add_action("help", "help"); ! //add_action("quiet", "quiet"); ! //add_action("changemc", "changemc"); ! //add_action("SetMc", "setmc"); ! ! } ! mixed CanGet(object ob) { return "The podium does not budge.";} ! ! ! ! int eventSay(string args) { ! if (mc == this_player()->GetKeyName()) { ! this_player()->eventPrint("You say \"%^CYAN%^" + args + "\""); ! say(this_player()->GetName() + " says \"%^CYAN%^" + args + "\""); ! return 1; ! } ! ! if ( mc != "" && this_player()-> GetKeyName() != speaker) { ! this_player()->eventPrint("%^RED%^It is not polite to talk out of order."); ! this_player()->eventPrint("Raise your hand if you'd like to speak."); ! return 1; ! } ! ! } ! ! int eventCallOn(string args) { ! if (present((object)args)) { ! if (mc == this_player()->GetKeyName()) { ! speaker = args; ! write("You have called on " + speaker+".\n"); ! find_living(args)->eventPrint("%^CYAN%^" + capitalize(mc) + " has called on you, you may speak."); ! return 1; ! } ! else { ! this_player()->eventPrint("Only the speaker can do that."); ! return 1; ! } ! } ! else { ! write("%^CYAN%^This person is not here to be called on."); ! return 1; ! } ! } ! int eventRaise() { ! string dude; ! dude=this_player()->GetKeyName(); ! if(dude != mc && dude != speaker) { ! tell_room(environment(this_player()), ! this_player()->GetName()+" raises "+ ! possessive(this_player())+ ! " hand.", ({this_player()}) ); ! this_player()->eventPrint("%^CYAN%^You raise your hand."); ! return 1; ! } ! else { ! write("You can speak already. Say what's on your mind."); ! return 1; ! } ! } ! int shaddap() { ! if(mc != "" && this_player()->GetKeyName() != speaker){ ! write("%^RED%^It would be impolite to do that at this time."); ! return 1; ! } ! } ! int help(string args) { ! if (args != "podium") { ! return 0; ! } ! else { ! write("%^GREEN%^This is the speakers podium, it is where the " ! "speaker stands during a speech. This podium " ! "has special properties, it can prevent others " ! "from speaking out of turn, if you are the "+ ! "speaker.%^RESET%^"); ! if (this_player()->GetKeyName() == mc) { ! write("%^RED%^Available commands:"); ! write("%^YELLOW%^recognize %^RESET%^: Calls on another to speak."); ! write("%^YELLOW%^say %^RESET%^: As the speaker, you can say things whenever you like."); ! write("%^YELLOW%^quiet %^RESET%^: Revokes the speaking privilege to the person you last called on."); ! write("%^YELLOW%^changemc %^RESET%^: Removes yourself as mc, and let someone else take over."); ! return 1; ! } ! else { ! write("%^RED%^Available commands:"); ! write("%^YELLOW%^raise %^RESET%^: Raise your hand, to motion to the speaker that you would like to speak."); ! write("%^YELLOW%^say %^RESET%^ : Say something, you only may do this if the speaker has called on you."); ! if (x == 0) { ! write("%^YELLOW%^setmc%^RESET%^ : There is no mc currently, use this command to set one."); ! } ! return 1; ! } ! } ! } ! int quiet() { ! write("%^CYAN%^You thank " + capitalize(speaker) + " for speaking."); ! find_living(speaker)->eventPrint("%^CYAN%^" + capitalize(mc) + " thanks you for you speaking."); ! speaker = mc; ! return 1; ! } ! int changemc(string args) { ! if (args != 0) { ! if (this_player()->GetKeyName() != mc) { ! write("%^RED%^You are not the mc to begin with, you cannot give that position away."); ! return 1; ! } ! else { ! if (!present(args)) { ! write("%^CYAN%^" + args + " is not present, and therefore cannot be mc."); ! return 1; ! } ! else { ! write("%^CYAN%^You hand the podium over to " + args); ! mc = args; ! say("%^CYAN%^" + capitalize(args) + " is the new head speaker."); ! find_living(mc)->eventPrint("%^BLUE%^You are the new head speaker!"); ! find_living(mc)->eventPrint("The command \"help podium\" can help you, if you don't know what to do."); ! return 1; ! } ! } ! } ! else { ! write("%^CYAN%^Syntax:"); ! write("changemc "); ! return 1; ! } ! } ! int SetMc(string args) { ! if (x==0) { ! if (args != 0) { ! if (present(args)) { ! mc = args; ! say("%^CYAN%^" + capitalize(mc) + " is the speaker."); ! write("You set " + capitalize(args) + " as the speaker."); ! x++; ! return 1; ! } ! else { ! write("You cannot set him/her as the speaker, he/she is not here!"); ! return 1; ! } ! } ! else { ! write("%^CYAN%^Syntax:"); ! write("setmc "); ! return 1; ! } ! } ! else { ! write("There is already a speaker, you cannot set another one."); ! return 1; ! } ! } ! ! void CatchInput(string str){ ! string cmd,args; ! string *cmds; ! cmds = ({ "setmc","say","help","quiet","changemc","recognize" }); ! cmd=query_verb(); ! write("cmd: "+cmd); ! if(str && str!= "") args = str; ! write("args: "+args); ! if(cmd == "emote" || member_array(cmd, "/daemon/soul"->GetEmotes()) != -1){ ! shaddap(); ! return; ! } ! //if(cmd == "setmc") SetMc(args); ! //if(cmd == "say") eventSay(args); ! //if(cmd == "help") help(args); ! //if(cmd == "quiet") quiet(); ! //if(cmd == "changemc") changemc(args); ! //if(cmd == "recognize") eventCallOn(args); ! //if(cmd == "raise") eventRaise(); ! //if(member_array(cmd,cmds) != -1) return; ! //if(cmd == "say") return; ! } ! --- 1,713 ---- ! /* It works now, no define needed. ! * make sure someone does "setmc" or it won't do much. ! * setmc can only be done once, first come, first get i guess ;) ! * by Boy@frontiers. ! * Major corrections and modifications by Crat 25jul05 ! */ ! #include ! #include ! inherit LIB_STORAGE; ! ! #define DEFAULT_BOUNCE_ROOM "/domains/town/room/adv_guild" ! string bounce_room ; /* File name of the bounce room */ ! string *voters ; /* Array of names of users who have voted */ ! string *agenda ; /* Array of agenda item strings. */ ! mapping votes ; /* Keys are names, data are votes cast */ ! string vote_str ; /* The proposition being voted on */ ! int endtime ; /* Time at which the speaker/vote ends */ ! int votelog ; /* 1 if votes are being announced, else 0 */ ! ! string speaker; ! string mc; ! int x; ! object ob; ! static void create() { ! storage::create(); ! SetShort("a podium"); ! SetLong("This is the speaker's podium. It is about four feet tall "+ ! "and made of some expensive-looking, deep grain wood. This podium "+ ! "facilitates the running of meetings by giving the speaker the power "+ ! "to recognize individual people to speak at a time. There is "+ ! "some space in the podium to store things in, perhaps there is something "+ ! "in there now. For more "+ ! "details on running a meeting with the podium, type: help podium."); ! SetMass(10); ! SetId( ({"podium", "speaker's podium", "podium.c"}) ); ! SetDollarCost(-110); ! SetKeyName("podium"); ! SetId(({"podium","handler"})); ! SetAdjectives(({"wood","wooden","meeting","speaker's","Speaker's"})); ! SetDamagePoints(1000); ! SetPreventGet("You can't get that."); ! SetMaxCarry(20); ! ! SetInventory(([ ! ])); ! ! mc = ""; ! x = 0; ! speaker = ""; ! ! vote_str = "none" ; ! voters = ({ }) ; ! votes = ([ ]) ; ! agenda = ({ }) ; ! bounce_room = DEFAULT_BOUNCE_ROOM ; ! ! } ! void init() { ! ::init(); ! add_action("eventSay", "say",1); ! add_action("eventRaise", "raise"); ! add_action("eventCallOn", "recognize"); ! add_action("shaddap", "yell"); ! add_action("shaddap", "shout"); ! add_action("shaddap", "emote"); ! add_action("help", "help"); ! add_action("quiet", "quiet"); ! add_action("changemc", "changemc"); ! add_action("SetMc", "setmc"); ! add_action ("echo", "echo") ; ! add_action ("vote", "vote") ; ! add_action ("call_for_vote", "call") ; ! add_action ("call_for_roll", "rollcall") ; ! add_action ("permit_entry", "permit") ; ! add_action ("localtime", "time") ; ! add_action ("reset_clock", "reset") ; ! add_action ("show_agenda", "agenda") ; ! add_action ("add_items", "add") ; ! add_action ("remove_item", "remove") ; ! add_action ("clear_items", "clear") ; ! add_action ("eject_player", "eject") ; ! add_action ("privacy", "privacy"); ! add_action ("privacy", "priv"); ! add_action ("localupdate", "update") ; ! add_action ("step_down", "step" ); ! } ! mixed CanGet(object ob) { return "The podium does not budge.";} ! ! ! ! int eventSay(string args) { ! string foo; ! ! if (mc == this_player()->GetKeyName()) { ! this_player()->eventPrint("You say %^CYAN%^\"" + capitalize(args) + "\""); ! say(this_player()->GetName() + " says %^CYAN%^\"" + capitalize(args) + "\""); ! return 1; ! } ! if ( mc != "" && this_player()-> GetKeyName() != speaker ) { ! this_player()->eventPrint("%^RED%^It is not polite to talk out of order."); ! this_player()->eventPrint("Raise your hand if you'd like to speak."); ! return 1; ! } ! if ((!args) || (args == " ")) { ! write ("You mutter to yourself.\n") ; ! return 1 ; ! } ! foo = wrap((string)this_player()->GetCapName() + ! " says: %^CYAN%^\"" + capitalize(args)) ; ! say (foo) ; ! write(wrap("You say: %^CYAN%^\"" + capitalize(args))); ! return 1; ! ! } ! ! ! int eventCallOn(string args) { ! if (present((object)args)) { ! if (mc == this_player()->GetKeyName()) { ! speaker = args; ! write("You have called on " + speaker+".\n"); ! find_living(args)->eventPrint("%^CYAN%^" + capitalize(mc) + " has called on you, you may speak."); ! return 1; ! } ! else { ! this_player()->eventPrint("Only the speaker can do that."); ! return 1; ! } ! } ! else { ! write("%^CYAN%^This person is not here to be called on."); ! return 1; ! } ! } ! ! ! int eventRaise() { ! string dude; ! dude=this_player()->GetKeyName(); ! if(dude != mc && dude != speaker) { ! tell_room(environment(this_player()), ! this_player()->GetName()+" raises "+ ! possessive(this_player())+ ! " hand.", ({this_player()}) ); ! this_player()->eventPrint("%^CYAN%^You raise your hand."); ! return 1; ! } ! else { ! write("You can speak already. Say what's on your mind."); ! return 1; ! } ! } ! ! ! int shaddap() { ! if(mc != "" && this_player()->GetKeyName() != speaker){ ! write("%^RED%^It would be impolite to do that at this time."); ! return 1; ! } ! } ! ! ! int help(string args) { ! if (args != "podium") { ! return 0; ! } ! else { ! write("%^GREEN%^This is the speakers podium, it is where the " ! "speaker stands during a speech. This podium " ! "has special properties, it can prevent others " ! "from speaking out of turn, if you are the "+ ! "speaker.%^RESET%^"); ! if (this_player()->GetKeyName() == mc) { ! write("%^RED%^Available commands:"); ! write("%^YELLOW%^recognize %^RESET%^: Calls on another to speak."); ! write("%^YELLOW%^say %^RESET%^: As the speaker, you can say things whenever you like."); ! write("%^YELLOW%^quiet %^RESET%^: Revokes the speaking privilege to the person you last called on."); ! write("%^YELLOW%^changemc %^RESET%^: Removes yourself as mc, and let someone else take over."); ! write("%^YELLOW%^add %^RESET%^: Add agenda item to the bottom of the agenda."); ! write("%^YELLOW%^remove %^RESET%^: Remove agenda item from the agenda."); ! write("%^YELLOW%^clear agenda%^RESET%^: Clear the agenda."); ! write("%^YELLOW%^permit %^RESET%^: Permit player to enter the meeting room when locked."); ! write("%^YELLOW%^eject %^RESET%^: Eject player from the meeting room."); ! write("%^YELLOW%^time [minutes/seconds]%^RESET%^: Set the clock to minutes or seconds."); ! write("%^YELLOW%^reset clock%^RESET%^: Clear the clock."); ! write("%^YELLOW%^step down%^RESET%^: Step down as head speaker."); ! write("%^YELLOW%^rollcall [minutes/seconds] %^RESET%^: Call for a roll call vote,\n" ! "\tlasting num minutes or seconds, on ."); ! write("%^YELLOW%^add after %^RESET%^: Add agenda item after agenda item #.\n" ! "\tadd after 0 adds to the top of the list."); ! write("%^YELLOW%^call [minutes/seconds] %^RESET%^: Call for a vote, lasting num minutes\n" ! "\tor seconds, on ."); ! return 1; ! } ! else { ! write("%^RED%^Available commands:"); ! write("%^YELLOW%^raise %^RESET%^: Raise your hand, to motion to the speaker that you would like to speak."); ! write("%^YELLOW%^say %^RESET%^ : Say something, you only may do this if the speaker has called on you."); ! if (x == 0) { ! write("%^YELLOW%^setmc%^RESET%^ : There is no mc currently, use this command to set one."); ! } ! return 1; ! } ! } ! } ! ! ! int quiet() { ! if (mc == this_player()->GetKeyName()) { ! write("%^CYAN%^You thank " + capitalize(speaker) + " for speaking."); ! find_living(speaker)->eventPrint("%^CYAN%^" + capitalize(mc) + " thanks you for you speaking."); ! speaker = mc; ! return 1; ! } ! write ("Only the mc may use this command.\n") ; ! return 1; ! } ! ! ! int changemc(string args) { ! if (args != 0) { ! if ( this_player()->GetKeyName() != mc ) { ! write("%^RED%^You are not the mc to begin with, you cannot give that position away."); ! return 1; ! } ! else { ! if (!present(args)) { ! write("%^CYAN%^" + args + " is not present, and therefore cannot be mc."); ! return 1; ! } ! else { ! write("%^CYAN%^You hand the podium over to " + args); ! mc = args; ! say("%^CYAN%^" + capitalize(args) + " is the new head speaker."); ! find_living(mc)->eventPrint("%^BLUE%^You are the new head speaker!"); ! find_living(mc)->eventPrint("The command \"help podium\" can help you, if you don't know what to do."); ! return 1; ! } ! } ! } ! else { ! write("%^CYAN%^Syntax:"); ! write("changemc "); ! return 1; ! } ! } ! ! int step_down(string args){ ! if (args == "down") { ! if ( this_player()->GetKeyName() != mc ) { ! write("%^RED%^You are not the mc to begin with, you cannot give that position away."); ! return 1; ! } ! say("%^CYAN%^" + capitalize(mc) + " has stepped down as the head speaker."); ! write ( "You step down as the head speaker" ); ! mc = ""; ! x--; ! load_object(base_name(environment(this_object())))->AutoDeactivate(); ! return 1; ! } ! else { ! write("%^CYAN%^Syntax:"); ! write(""); ! return 1; ! } ! ! } ! ! int SetMc(string args) { ! if (x==0) { ! if (args != 0) { ! if (present(args) ) { ! mc = args; ! say("%^CYAN%^" + capitalize(mc) + " is the speaker."); ! write("You set " + capitalize(args) + " as the speaker."); ! find_living(mc)->eventPrint("The command \"help podium\" can help you, if you don't know what to do."); ! x++; ! return 1; ! } ! else { ! write("You cannot set him/her as the speaker, he/she is not here!"); ! return 1; ! } ! } ! else { ! write("%^CYAN%^Syntax:"); ! write("setmc "); ! return 1; ! } ! } ! else { ! write("There is already a speaker, you cannot set another one."); ! return 1; ! } ! } ! ! int privacy(string str){ ! ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may use the shield.\n") ; ! return 1 ; ! } ! if(str=="on" || str == "1"){ ! load_object(base_name(environment(this_object())))->set_privacy( 1 ); ! write("You enable the privacy shield.\n"); ! say(this_player()->GetName()+" enables a privacy force field around the room."); ! return 1; ! } ! if(str=="off" || str == "0"){ ! load_object(base_name(environment(this_object())))->AutoDeactivate(); ! write("You disable the privacy shield.\n"); ! say(this_player()->GetName()+" disables a privacy force field around the room."); ! return 1; ! } ! } ! ! // Echoing is always forbidden. It's just too much of a hassle. ! int echo (string str) { ! write ("Echoing is forbidden in the conference room at all times.\n") ; ! return 1 ; ! } ! ! // Permit_entry lets the mc bring someone into the conference room ! // when it is locked. ! int permit_entry (string name) { ! ! object user ; ! int oldlock ; ! ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may permit entry into a locked conference.\n") ; ! return 1 ; ! } ! user = find_player(name) ; ! if (!user) { ! write ("There is no user by that name.\n") ; ! return 1 ; ! } ! if (present(user,environment(this_object()))) { ! write (capitalize(name)+" is already here!\n") ; ! return 1 ; ! } ! // We save the old locked status of the room, and restore it when we're ! // done. You can "permit" entry into an unlocked conference if you want ! // to: it saves the person the trouble of walking. ! oldlock = load_object(base_name(environment(this_object())))->get_privacy() ; ! load_object(base_name(environment(this_object())))->set_privacy( 0 ); ! user -> eventMove(environment(this_object())) ; ! load_object(base_name(environment(this_object())))->set_privacy( oldlock ); ! write ("You bring "+capitalize(name)+" into the conference.\n") ; ! tell_object (user, capitalize(mc)+" permits you to enter.\n") ; ! say (capitalize(name)+" has been permitted to enter the conference.\n", user) ; ! return 1 ; ! } ! ! ! ! // Eject_player lets the mc banish a player from the room and dump ! // him in the bounce room. Not very effective if the room is unlocked, ! // except perhaps as a warning. ! int eject_player (string str) { ! ! object ob ; ! ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may eject players.\n") ; ! return 1 ; ! } ! ob = find_player(str) ; ! if (!ob || !present (ob, environment(this_object()))) { ! write ("There is no player named "+capitalize(str)+" here.\n") ; ! return 1 ; ! } ! write ("You eject "+capitalize(str)+" from the room!\n") ; ! tell_object (ob, "You have been ejected from the room.\n") ; ! say (capitalize(str)+" has been ejected from the room.\n") ; ! ob->eventMove(bounce_room) ; ! return 1 ; ! } ! ! // Localtime shows the user the amount of time left on the room clock. ! // The name is chosen to avoid colliding with the time() efun. ! // The mc may also use this function to set the time on the clock ! // and start it running. See the help documents for more information on ! // how the clock works. ! varargs int localtime (string str) { ! ! int i, min, sec ; ! string foo ; ! ! // If no string, then we just indicate how much time is left on the clock. ! if (!str) { ! if (!endtime || endtime == 0) { ! write ("Time is not running at the moment.\n") ; ! return 1 ; ! } ! i = time() ; ! i = endtime - i ; ! min = (i/60) ; ! sec = i - (min*60) ; ! if (min==1) { ! write ("The clock shows 1 minute and "+sec+" seconds remaining.\n") ; ! } else { ! write ("The clock shows "+min+" minutes and "+sec+" seconds remaining.\n") ; ! } ! return 1 ; ! } ! // If there is a string, then the user is trying to set the clock to some ! // number of minutes or seconds. ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may set the clock.\n") ; ! return 1 ; ! } ! // You cannot set a new time if the clock is running. This is for safety. ! // You must reset the clock first. See below. ! if (endtime!=0) { ! write ("The clock is running. You must reset the clock first.\n" ! ) ; ! return 1 ; ! } ! if (sscanf(str, "%d min%s", i, foo) == 2) { ! i=i*60 ; ! } else { ! if (sscanf(str, "%d seconds", i) != 1) { ! write ("You must set a number of minutes or seconds: ie, 3 minutes or 90 seconds.\n") ; ! return 1 ; ! } ! } ! write ("You set the clock to "+str+".\n") ; ! say (capitalize(mc)+" sets the clock to "+str+".\n") ; ! endtime = time()+i ; ! // We call_out to a function that prints a message when time runs out. ! call_out ("expire_time", i) ; ! return 1 ; ! } ! ! // Reset_clock lets the mc clear the clock before setting a new time ! // on it. ! int reset_clock (string str) { ! if (!str || str!="clock") { ! notify_fail ("Reset what?\n") ; ! return 0 ; ! } ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may reset the clock.\n") ; ! return 1 ; ! } ! if (endtime==0) { ! write ("The clock isn't running.\n") ; ! return 1 ; ! } ! endtime = 0 ; ! write ("You clear the clock.\n") ; ! say (capitalize(mc)+" clears the clock.\n") ; ! // Clear any pending call_outs that may be left behind. ! remove_call_out("expire_time") ; ! remove_call_out("expire_vote") ; ! return 1 ; ! } ! ! // Expire_time lets the conference room know that time has expired. It ! // doesn't force the speaker to shut up or anything like that: that's left ! // to the mcs discretion. ! int expire_time() { ! tell_room (environment(this_object()),"The clock runs out.\n") ; ! endtime = 0 ; ! } ! ! ! // Show_agenda lets users see the current agenda. ! int show_agenda() { ! ! int i ; ! ! if (!agenda || sizeof(agenda)==0) { ! write ("The agenda has not been set.\n") ; ! return 1 ; ! } ! write ("The current agenda is:\n") ; ! for (i=0;iGetKeyName() ) { ! write ("Only the mc may clear the agenda.\n") ; ! return 1 ; ! } ! if (!str || str!="agenda") { ! write ("Usage: clear [agenda]\n") ; ! return 1 ; ! } ! agenda = ({ }) ; ! write ("The agenda has been cleared.\n") ; ! say ("The agenda has been cleared.\n") ; ! return 1 ; ! } ! ! // Add_agenda_item lets the mc add an agenda item. If the argument ! // is of the form "after ", then string is added to the ! // agenda AFTER item int. Agenda items are numbered 1-N rather than 0-(N-1). ! int add_items (string str) { ! ! int post ; ! string prop ; ! ! if ( mc != this_player()->GetKeyName() ) { ! notify_fail ("Only the mc may add agenda items.\n") ; ! return 0 ; ! } ! if (!str) { ! write ("Usage: add item or add after N item\n") ; ! return 1 ; ! } ! if (sscanf(str,"after %d %s", post, prop)!=2) { ! agenda += ({ str }) ; ! write ("Added the following item to the agenda\n"+str+"\n") ; ! return 1 ; ! } ! if (post<0 || post>=sizeof(agenda)) { ! notify_fail ("Item number out of range.\n") ; ! return 0 ; ! } ! if (post==0) agenda = ({ prop }) + agenda ; else ! agenda = agenda[0..post-1] + ({ prop }) + agenda[post..sizeof(agenda)] ; ! write ("Added the following agenda item after item "+post+":\n"+ ! prop+"\n") ; ! return 1 ; ! } ! ! // Remove_item lets the mc take an item off the agenda. ! int remove_item (string str) { ! ! int agitem ; ! ! if (!str) { ! notify_fail ("Usage: remove \n") ; ! return 0 ; ! } ! if (sscanf(str,"%d",agitem)!=1) { ! notify_fail ("Usage: remove \n") ; ! return 0 ; ! } ! if (agitem<0 || agitem>sizeof(agenda)) { ! write ("Item number out of range.\n") ; ! return 0 ; ! } ! // Convert to 0-(N-1) numbering. ! agitem = agitem-1 ; ! write (agitem+"\n") ; ! write ("Removing the following agenda item:\n"+agenda[agitem]+"\n") ; ! if (agitem==0) { ! agenda = agenda[1..sizeof(agenda)-1] ; ! } else { ! if (agitem == sizeof(agenda)-1) { ! agenda = agenda[0..sizeof(agenda)-2] ; ! } else { ! agenda = agenda[0..agitem-1] + agenda[agitem+1..sizeof(agenda)-1] ; ! } ! } ! return 1 ; ! } ! ! // Vote lets a player cast a vote on the proposed issue. See the help ! // document for details on how voting works. ! int vote (string str) { ! // With no argument, we print the proposal, if there is one. ! if (!str) { ! if (!vote_str || vote_str=="none") { ! write ("No vote is in progress.\n") ; ! return 1 ; ! } ! write ("Voting on: "+vote_str+"\n") ; ! return 1 ; ! } ! // If there is a argument, we interpret that string as a vote cast. ! if (!vote_str || vote_str=="none") { ! write ("No vote is in progress at this time.\n") ; ! return 1 ; ! } ! if (str!="yes" && str!="no" && str!="abstain") { ! write ("Please vote yes, no, or abstain..\n") ; ! return 1 ; ! } ! if (member_array( this_player()->GetName(),voters)!=-1) { ! write ("You have already voted!\n") ; ! return 1 ; ! } ! voters += ({ this_player()->GetName() }) ; ! votes[str] = votes[str]+1 ; ! write ("You vote "+str+" on "+vote_str+".\n") ; ! // If this is a roll call vote - ie, the votes are being logged - we announce ! // the vote to the log file and to the room. ! if (votelog) { ! say (capitalize(this_player()->GetName())+" votes "+capitalize(str)+".\n") ; ! } ! return 1 ; ! } ! ! // Call_for_vote allows the mc to call for a secret-ballot vote on ! // a proposal. ! int call_for_vote (string str) { ! ! string timestr, subjstr ; ! int i ; ! ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may call for votes.\n") ; ! return 1 ; ! } ! // Must specify an amount of time for which votes may be cast, and a subject ! // which people are voting on. ! if (!str) { ! write ("Usage: call \n") ; ! return 1 ; ! } ! if (sscanf(str,"%d %s %s",i,timestr,subjstr)!=3) { ! write ("Usage: call \n") ; ! return 1 ; ! } ! // This is going to reset the clock: so we want to force the mc to ! // clear the clock first. ! if (endtime!=0) { ! write ("The clock is running. You must reset the clock first.\n") ; ! return 1 ; ! } ! if (timestr=="minutes") { ! i = i * 60 ; ! } else { ! if (timestr!="seconds") { ! write ("Enter the time in minutes or seconds.\n") ; ! return 1 ; ! } ! } ! vote_str = subjstr ; ! // This is a secret ballot so we don't want to log the votes. ! votelog = 0 ; ! write ("You call for a vote on "+vote_str+".\n") ; ! say (capitalize(mc)+" calls for a vote on "+vote_str+".\n") ; ! say (capitalize(mc)+" sets the clock to "+str+".\n") ; ! endtime = time()+i ; ! // Call out to a function which totals the votes at the end of the vote time. ! call_out ("expire_vote",i) ; ! return 1 ; ! } ! ! // Call_for_roll is exactly like call_for_vote EXCEPT that it calls for ! // a roll-call vote: that is, all votes are announced and logged. ! int call_for_roll (string str) { ! ! string timestr, subjstr ; ! int i ; ! ! if ( mc != this_player()->GetKeyName() ) { ! write ("Only the mc may call for votes.\n") ; ! return 1 ; ! } ! if (!str) { ! write ("Usage: rollcall \n") ; ! return 1 ; ! } ! if (sscanf(str,"%d %s %s",i,timestr,subjstr)!=3) { ! write ("Usage: rollcall \n") ; ! return 1 ; ! } ! if (endtime!=0) { ! write ("The clock is running. You must reset the clock first.\n") ; ! return 1 ; ! } ! if (timestr=="minutes") { ! i = i * 60 ; ! } else { ! if (timestr!="seconds") { ! write ("Enter the time in minutes or seconds.\n") ; ! return 1 ; ! } ! } ! vote_str = subjstr ; ! // This is a roll call vote so we log the votes and announce them. ! votelog = 1 ; ! write ("You call for a roll call vote on "+vote_str+".\n") ; ! say (capitalize(mc)+" calls for a roll call vote on "+vote_str+".\n") ; ! say (capitalize(mc)+" sets the clock to "+str+".\n") ; ! endtime = time()+i ; ! call_out ("expire_vote",i) ; ! return 1 ; ! } ! ! // Expire_vote finishes the vote and tabulates the results. It does not ! // announce the outcome because some votes required 2/3 or 3/4 to pass ! // rather than a simple majority. ! int expire_vote() { ! tell_room (environment(this_object()), "The clock runs out. Voting is over.\n") ; ! endtime = 0 ; ! tell_room (environment(this_object()), "The results of the vote were:\n"+ ! "Yes: "+votes["yes"]+" No: "+votes["no"]+" Abstain: "+ ! votes["abstain"]+"\n") ; ! voters = ({ }) ; ! votes["yes"] = 0 ; ! votes["no"] = 0 ; ! votes["abstain"] = 0 ; ! vote_str="none" ; ! } ! ! int localupdate() { ! write ("You may not update objects while in the conference room.\n") ; ! return 1 ; ! } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/access0.c ds2.0r29/lib/domains/campus/room/access0.c *** ds2.0r26/lib/domains/campus/room/access0.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/access0.c Wed Jul 5 00:01:11 2006 *************** *** 36,44 **** AddExit("south","/domains/campus/room/access4"); } int CanReceive(object ob){ ! string str; ! str=file_name(environment(ob)); ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } --- 36,42 ---- AddExit("south","/domains/campus/room/access4"); } int CanReceive(object ob){ ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/conf.c ds2.0r29/lib/domains/campus/room/conf.c *** ds2.0r26/lib/domains/campus/room/conf.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/conf.c Wed Jul 5 00:01:11 2006 *************** *** 31,42 **** SetExits( (["north" : "/domains/campus/room/corridor4", ])); SetObviousExits("n"); ! // SetInventory((["/domains/campus/obj/podium" : 1, ! // ])); SetProperty("no attack", 1); } int CanReceive(object ob) { ! if(living(ob)){ if(file_name(environment(ob)) != "/domains/campus/room/corridor4" && !archp(ob)){ message("info","You must enter the conference room through the normal "+ --- 31,42 ---- SetExits( (["north" : "/domains/campus/room/corridor4", ])); SetObviousExits("n"); ! SetInventory((["/domains/campus/obj/podium" : 1, ! ])); SetProperty("no attack", 1); } int CanReceive(object ob) { ! if(ob && living(ob)){ if(file_name(environment(ob)) != "/domains/campus/room/corridor4" && !archp(ob)){ message("info","You must enter the conference room through the normal "+ diff -c -r --new-file ds2.0r26/lib/domains/campus/room/conf2.c ds2.0r29/lib/domains/campus/room/conf2.c *** ds2.0r26/lib/domains/campus/room/conf2.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/campus/room/conf2.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,128 ---- + #include + #include + + inherit LIB_ROOM; + + int privacy, timer; + string ExtraDesc(); + static void create() { + string privs; + privs = query_privs(); + if( privs ) privs = capitalize(privs); + else privs = "a creator"; + room::create(); + SetClimate("indoors"); + SetAmbientLight(40); + SetShort("Conference Room"); + SetLong((: ExtraDesc :)); + SetExits( ([ + ]) ); + SetInventory(([ + "/domains/town/obj/bbucket" : 1, + "/domains/town/obj/chair" : 4, + "/domains/campus/obj/podium" : 1, + ])); + + SetProperties(([ + "no attack" : 1, + "nopeer" : 1, + ])); + privacy=0; + set_heart_beat(20); + timer = 0; + + } + + int AutoDeactivate(){ + message("info","%^RED%^The privacy field shuts off.%^RESET%^", this_object()); + timer = 0; + privacy = 0; + return 1; + } + + void init(){ + ::init(); + // add_action("privacy","privacy"); + // add_action("privacy","priv"); + add_action("report_time","timer"); + } + + void heart_beat(){ + if(timer && (time() - timer ) > 1200) AutoDeactivate(); + } + + int report_time(){ + int secs = time() - timer; + //tc("time: "+time()); + //tc("timer: "+timer); + + if(!timer){ + write("Privacy field is not active."); + return 1; + } + + write("Elapsed seconds: "+secs); + write("Elapsed minutes: "+(secs/60)); + return secs; + } + + int CanReceive(object ob) { + if(privacy){ + if(!interactive(ob)) { + message("info","\n\nPRIVACY WARNING: "+ob->GetName()+" has entered the room.\n\n",this_object() ); + } + else if(!archp(ob)){ + message("info","You bounce off the conference room privacy shield.", ob); + message("info",ob->GetName()+" bounced off the privacy shield.",this_object()); + if(!environment(ob)) ob->eventMoveLiving(ROOM_START); + return 0; + } + + } + return 1; + } + + int set_privacy(int i){ + if(environment(this_player()) != this_object() && !archp(this_player())) { + write("You lack the adequate privileges to do that."); + say(this_player()->GetName()+" is trying to mess around with the privacy shield system."); + return 1; + } + privacy=i; + timer = time(); + return 1; + } + /* + int privacy(string str){ + if(environment(this_player()) != this_object() && !archp(this_player())) { + write("You lack the adequate privileges to do that."); + say(this_player()->GetName()+" is trying to muck around with the privacy shield system."); + return 1; + } + + if(str=="on" || str == "1"){ + this_object()->set_privacy(1); + write("You enable the privacy shield.\n"); + say(this_player()->GetName()+" enables a privacy force field around the room."); + timer = time(); + return 1; + } + if(str=="off" || str == "0"){ + this_object()->set_privacy(0); + write("You disable the privacy shield.\n"); + say(this_player()->GetName()+" disables a privacy force field around the room."); + timer = 0; + return 1; + } + } + */ + int get_privacy(){ + return privacy; + } + + string ExtraDesc(){ + string extra = "%^YELLOW%^A privacy force field is active around this room.%^RESET%^"; + string desc = "This is an enchanted room, with the magical power to prevent uninvited people from entering. It is used for meetings where three or more people need to share information without interruption or privately. To enable privacy, 'privacy on'. To disable it, 'privacy off'. The privacy field automatically deactivates after approximately 20 minutes.\n"; + if(privacy) return desc+extra; + else return desc+"%^RED%^The privacy field is DISABLED."; + } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/corridor.c ds2.0r29/lib/domains/campus/room/corridor.c *** ds2.0r26/lib/domains/campus/room/corridor.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/corridor.c Wed Jul 5 00:01:11 2006 *************** *** 23,29 **** SetDoor("south", "/domains/campus/doors/plain_door"); } int CanReceive(object ob) { ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } --- 23,29 ---- SetDoor("south", "/domains/campus/doors/plain_door"); } int CanReceive(object ob) { ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/corridor3.c ds2.0r29/lib/domains/campus/room/corridor3.c *** ds2.0r26/lib/domains/campus/room/corridor3.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/corridor3.c Wed Jul 5 00:01:11 2006 *************** *** 23,31 **** SetProperty("no attack", 1); } int CanReceive(object ob){ ! string str; ! str=file_name(environment(ob)); ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } --- 23,29 ---- SetProperty("no attack", 1); } int CanReceive(object ob){ ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/corridor4.c ds2.0r29/lib/domains/campus/room/corridor4.c *** ds2.0r26/lib/domains/campus/room/corridor4.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/corridor4.c Wed Jul 5 00:01:11 2006 *************** *** 1,4 **** --- 1,5 ---- #include + #include inherit LIB_ROOM; static void create() { *************** *** 22,31 **** SetProperty("no attack", 1); } int CanReceive(object ob){ ! string str; ! str=file_name(environment(ob)); ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } return 1; --- 23,31 ---- SetProperty("no attack", 1); } int CanReceive(object ob){ ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); + if(!environment(ob) && interactive(ob)) ob->eventMove(ROOM_START); return 0; } return 1; diff -c -r --new-file ds2.0r26/lib/domains/campus/room/foyer.c ds2.0r29/lib/domains/campus/room/foyer.c *** ds2.0r26/lib/domains/campus/room/foyer.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/foyer.c Wed Jul 5 00:01:11 2006 *************** *** 28,34 **** SetProperty("no attack", 1); } int CanReceive(object ob) { ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } --- 28,34 ---- SetProperty("no attack", 1); } int CanReceive(object ob) { ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/furnace.c ds2.0r29/lib/domains/campus/room/furnace.c *** ds2.0r26/lib/domains/campus/room/furnace.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/furnace.c Wed Jul 5 00:01:11 2006 *************** *** 18,24 **** SetNoModify(1); } int CanReceive(object ob){ ! if(interactive(ob)){ tell_object(ob, "You fail to enter the furnace."); return 0; } --- 18,24 ---- SetNoModify(1); } int CanReceive(object ob){ ! if(ob && interactive(ob)){ tell_object(ob, "You fail to enter the furnace."); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/room/mailroom.c ds2.0r29/lib/domains/campus/room/mailroom.c *** ds2.0r26/lib/domains/campus/room/mailroom.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/mailroom.c Wed Jul 5 00:01:11 2006 *************** *** 43,49 **** } } mixed CanMail(object who, string args) { ! if( !interactive(who) ) return 0; if( GetTown() != (string)who->GetTown() ) return "Any mail you might have will be at your home post office."; return 1; --- 43,49 ---- } } mixed CanMail(object who, string args) { ! if( who && !interactive(who) ) return 0; if( GetTown() != (string)who->GetTown() ) return "Any mail you might have will be at your home post office."; return 1; *************** *** 63,75 **** return 1; } int CanReceive(object ob) { ! if( !ob && !(ob = previous_object()) ) return 0; ! if( living(ob) && !interactive(ob) ) return 0; else return room::CanReceive(ob); } int eventReleaseObject() { object ob; if( !(ob = previous_object()) ) return room::eventReleaseObject(); if( !room::eventReleaseObject() ) return 0; if( (ob = present(POSTAL_ID, ob)) ) ob->eventDestruct(); --- 63,75 ---- return 1; } int CanReceive(object ob) { ! if( !ob || (living(ob) && !interactive(ob)) ) return 0; else return room::CanReceive(ob); } int eventReleaseObject() { object ob; + if(!ob) return 0; if( !(ob = previous_object()) ) return room::eventReleaseObject(); if( !room::eventReleaseObject() ) return 0; if( (ob = present(POSTAL_ID, ob)) ) ob->eventDestruct(); diff -c -r --new-file ds2.0r26/lib/domains/campus/room/slab.c ds2.0r29/lib/domains/campus/room/slab.c *** ds2.0r26/lib/domains/campus/room/slab.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/slab.c Wed Jul 5 00:01:11 2006 *************** *** 42,48 **** } int CanReceive(object ob) { ! return room::CanReceive(); } void init(){ --- 42,49 ---- } int CanReceive(object ob) { ! if(!ob) return 0; ! return room::CanReceive(ob); } void init(){ diff -c -r --new-file ds2.0r26/lib/domains/campus/room/start.c ds2.0r29/lib/domains/campus/room/start.c *** ds2.0r26/lib/domains/campus/room/start.c Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/room/start.c Wed Jul 5 00:01:11 2006 *************** *** 8,17 **** SetAmbientLight(30); SetShort("LPC University Reception"); SetLong("You are in the small, spare reception area of the Virtual Campus admissions office. A door leads north to the main administration building corridor."); ! SetNoModify(0); ! SetExits( ([ "north" : "/domains/campus/room/corridor", ]) ); SetDoor("north","/domains/campus/doors/plain_door"); SetInventory(([ "/domains/campus/obj/bbucket" :1, --- 8,17 ---- SetAmbientLight(30); SetShort("LPC University Reception"); SetLong("You are in the small, spare reception area of the Virtual Campus admissions office. A door leads north to the main administration building corridor."); ! SetExits( ([ "north" : "/domains/campus/room/corridor", ]) ); + SetNoModify(1); SetDoor("north","/domains/campus/doors/plain_door"); SetInventory(([ "/domains/campus/obj/bbucket" :1, *************** *** 25,35 **** } mixed CanReceive(object ob){ ! if(ob->GetRace() == "verb"){ ! return 0; ! } ! ! if(ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } --- 25,31 ---- } mixed CanReceive(object ob){ ! if(ob && ob->GetRace() == "rodent"){ message("info","You are repelled by rodenticide.",ob); return 0; } diff -c -r --new-file ds2.0r26/lib/domains/campus/txt/moochers.txt ds2.0r29/lib/domains/campus/txt/moochers.txt *** ds2.0r26/lib/domains/campus/txt/moochers.txt Sun Jun 18 15:50:03 2006 --- ds2.0r29/lib/domains/campus/txt/moochers.txt Wed Jul 5 00:01:11 2006 *************** *** 1 **** ! Four:One:Jayren:Seven:Solitaire:Selene:Testymage:Bastion:Testylus:testiers:EOF --- 1 ---- ! Testylus:EOF diff -c -r --new-file ds2.0r26/lib/domains/default/armor/badge.c ds2.0r29/lib/domains/default/armor/badge.c *** ds2.0r26/lib/domains/default/armor/badge.c Mon Jan 23 08:51:04 2006 --- ds2.0r29/lib/domains/default/armor/badge.c Sun Jul 9 22:06:36 2006 *************** *** 7,13 **** static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ --- 7,13 ---- static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor's pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ diff -c -r --new-file ds2.0r26/lib/domains/default/armor/wizard_hat.c ds2.0r29/lib/domains/default/armor/wizard_hat.c *** ds2.0r26/lib/domains/default/armor/wizard_hat.c Wed Apr 5 19:33:16 2006 --- ds2.0r29/lib/domains/default/armor/wizard_hat.c Sun Jul 9 22:06:36 2006 *************** *** 5,12 **** static void create(){ armor::create(); ! SetKeyName("wizards hat"); ! SetAdjectives( ({"wizards", "floppy", "large", "conical", "blue"}) ); SetId( ({"hat"}) ); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ --- 5,12 ---- static void create(){ armor::create(); ! SetKeyName("wizard's hat"); ! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) ); SetId( ({"hat"}) ); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ diff -c -r --new-file ds2.0r26/lib/domains/default/npc/dummy.c ds2.0r29/lib/domains/default/npc/dummy.c *** ds2.0r26/lib/domains/default/npc/dummy.c Sun Jun 18 16:20:52 2006 --- ds2.0r29/lib/domains/default/npc/dummy.c Sun Jul 9 19:04:27 2006 *************** *** 29,48 **** evidence = ""; if(agent) evidence += "I receive damage from "+agent->GetKeyName(); if(type) { ! if(type == BLUNT ) evidence += ", damage type is BLUNT"; ! if(type == BLADE ) evidence += ", damage type is BLADE"; ! if(type == KNIFE ) evidence += ", damage type is KNIFE"; ! if(type == WATER ) evidence += ", damage type is WATER"; ! if(type == SHOCK ) evidence += ", damage type is SHOCK"; ! if(type == COLD ) evidence += ", damage type is COLD"; ! if(type == HEAT ) evidence += ", damage type is HEAT"; ! if(type == GAS ) evidence += ", damage type is GAS"; ! if(type == ACID ) evidence += ", damage type is ACID"; ! if(type == MAGIC ) evidence += ", damage type is MAGIC"; ! if(type == POISON ) evidence += ", damage type is POISON"; ! if(type == DISEASE ) evidence += ", damage type is DISEASE"; ! if(type == TRAUMA ) evidence += ", damage type is TRAUMA"; ! //else evidence += ", damage type is indeterminate"; } if(x) evidence += ", raw damage is "+x; if(internal) evidence += ", internal variable is "+internal; --- 29,58 ---- evidence = ""; if(agent) evidence += "I receive damage from "+agent->GetKeyName(); if(type) { ! switch(type){ ! case BLUNT : evidence += ", damage type is BLUNT";break; ! case BLADE : evidence += ", damage type is BLADE";break; ! case KNIFE : evidence += ", damage type is KNIFE";break; ! case WATER : evidence += ", damage type is WATER";break; ! case SHOCK : evidence += ", damage type is SHOCK";break; ! case COLD : evidence += ", damage type is COLD";break; ! case HEAT : evidence += ", damage type is HEAT";break; ! case GAS : evidence += ", damage type is GAS";break; ! case ACID : evidence += ", damage type is ACID";break; ! case MAGIC : evidence += ", damage type is MAGIC";break; ! case POISON : evidence += ", damage type is POISON";break; ! case DISEASE : evidence += ", damage type is DISEASE";break; ! case TRAUMA : evidence += ", damage type is TRAUMA";break; ! case PIERCE : evidence += ", damage type is PIERCE";break; ! case PSIONIC : evidence += ", damage type is PSIONIC";break; ! case ANOXIA : evidence += ", damage type is ANOXIA";break; ! case DEATHRAY : evidence += ", damage type is DEATHRAY";break; ! case EMOTIONAL : evidence += ", damage type is EMOTIONAL";break; ! case SONIC : evidence += ", damage type is SONIC";break; ! case BITE : evidence += ", damage type is BITE";break; ! case OTHER : evidence += ", damage type is OTHER";break; ! default : evidence += ", damage type is UNKNOWN";break; ! } } if(x) evidence += ", raw damage is "+x; if(internal) evidence += ", internal variable is "+internal; diff -c -r --new-file ds2.0r26/lib/domains/default/npc/fighter.c ds2.0r29/lib/domains/default/npc/fighter.c *** ds2.0r26/lib/domains/default/npc/fighter.c Fri Mar 24 14:36:36 2006 --- ds2.0r29/lib/domains/default/npc/fighter.c Sat Jul 8 23:30:54 2006 *************** *** 9,23 **** SetLong("This is a large human warrior. His pectoral muscles "+ "are clearly visible even through his armor. His face is covered in "+ "bold blue tattoos."); ! SetCustomXP(350); SetLevel(10); SetRace("human"); - SetClass("fighter"); SetGender("male"); SetInventory(([ "/domains/default/armor/chainmail.c" : "wear chainmail", "/domains/default/weap/sharpsword.c" : "wield sword" ])); SetMaxHealthPoints(550); } void init(){ --- 9,27 ---- SetLong("This is a large human warrior. His pectoral muscles "+ "are clearly visible even through his armor. His face is covered in "+ "bold blue tattoos."); ! SetClass("fighter"); SetLevel(10); + SetCustomXP(350); SetRace("human"); SetGender("male"); SetInventory(([ "/domains/default/armor/chainmail.c" : "wear chainmail", "/domains/default/weap/sharpsword.c" : "wield sword" ])); + SetCurrency( ([ + "silver" : 100, + ]) ); + SetHealthPoints(549); SetMaxHealthPoints(550); } void init(){ diff -c -r --new-file ds2.0r26/lib/domains/default/npc/tree.c ds2.0r29/lib/domains/default/npc/tree.c *** ds2.0r26/lib/domains/default/npc/tree.c Thu Feb 23 15:40:40 2006 --- ds2.0r29/lib/domains/default/npc/tree.c Sat Jul 8 23:30:54 2006 *************** *** 11,19 **** --- 11,21 ---- "pods are full to bursting with coins of all kinds. It would be no "+ "trouble at all to get from tree...looks like "+ "you've hit the jackpot!"); + SetPacifist(1); SetCanBite(0); SetLevel(99); SetRace("tree"); + SetHealthPoints(99999); SetMaxHealthPoints(99999); } void init(){ diff -c -r --new-file ds2.0r26/lib/domains/default/obj/guide.c ds2.0r29/lib/domains/default/obj/guide.c *** ds2.0r26/lib/domains/default/obj/guide.c Sun Jun 18 16:20:53 2006 --- ds2.0r29/lib/domains/default/obj/guide.c Sun Jul 9 22:06:36 2006 *************** *** 4,12 **** void create(){ ::create(); ! SetKeyName("guidebook"); SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) ); ! SetAdjectives( ({"admin", "admins", "administrator", "administrators", "reference"}) ); SetShort("an Administrator's Guidebook"); SetLong("This is a reference text for Dead Souls administrators."); SetNoCondition(1); --- 4,12 ---- void create(){ ::create(); ! SetKeyName("administrator's guidebook"); SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) ); ! SetAdjectives( ({"admin's", "admin", "admins", "administrator", "administrators", "reference"}) ); SetShort("an Administrator's Guidebook"); SetLong("This is a reference text for Dead Souls administrators."); SetNoCondition(1); diff -c -r --new-file ds2.0r26/lib/domains/default/room/arena.c ds2.0r29/lib/domains/default/room/arena.c *** ds2.0r26/lib/domains/default/room/arena.c Mon Jan 23 08:51:42 2006 --- ds2.0r29/lib/domains/default/room/arena.c Wed Jul 5 00:01:11 2006 *************** *** 6,12 **** SetClimate("indoors"); SetAmbientLight(30); SetShort("the Arena"); ! SetLong("You are in a large room with blank cement walls. This room was built so Creators may test their armor, weapons and NPC's in combat."); SetItems( ([ ({"wall","walls"}) : "The walls are smooth and cement.", ({"floor","ceiling"}) : "The floor and ceiling are, like the walls, made "+ --- 6,12 ---- SetClimate("indoors"); SetAmbientLight(30); SetShort("the Arena"); ! SetLong("You are in a large room with blank cement walls. This room was built so Creators may test their armor, weapons and NPC's in combat. A large steel door is here, which can be used to prevent wimpy creatures from escaping."); SetItems( ([ ({"wall","walls"}) : "The walls are smooth and cement.", ({"floor","ceiling"}) : "The floor and ceiling are, like the walls, made "+ diff -c -r --new-file ds2.0r26/lib/domains/default/room/domains_room.c ds2.0r29/lib/domains/default/room/domains_room.c *** ds2.0r26/lib/domains/default/room/domains_room.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/default/room/domains_room.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,66 ---- + #include + #include + + inherit LIB_ROOM; + + string LongDesc(){ + string desc = "Immortals come here to communicate with each other about "+ + "the world they are building. The Adventurer's Guild "+ + "is north. The Arch Room is south. To visit the Dead Souls "+ + "test and development mud, go west. The test lab facilities are east."; + desc += "\nA sign reads: "+load_object(ROOM_ARCH)->SignRead(); + return desc; + } + + static void create() { + object ob; + room::create(); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Domains Room"); + SetLong("This room provides a convenient access point to various domain start rooms and featured realms."); + SetItems(([ + "Ylsrim" : "This is the entry point for the Ylsrim domain.", + "campus" : "This is the entry point for the campus domain.", + "examples" : "This is the entry point for the examples domain.", + ({ "sign" }) : "A sign you can read.", + ])); + SetEnters( ([ + "campus" : "/domains/campus/room/start", + "ylsrim" : "/domains/Ylsrim/room/bazaar", + "examples" : "/domains/examples/room/start.c", + ]) ); + SetProperty("no attack", 1); + SetProperty("nopeer",1); + ob = new("/lib/bboard"); + ob->SetKeyName("chalkboard"); + ob->SetId( ({ "board", "chalkboard", "dusty board", "dusty chalkboard" }) ); + ob->set_board_id("immortal_board"); + ob->set_max_posts(30); + SetShort("Domains Room"); + ob->eventMove(this_object()); + SetExits(([ + "north" : "/domains/default/room/wiz_hall2", + ])); + + SetInventory(([ + ])); + + SetRead("sign", (: load_object(ROOM_ARCH)->SignRead() :) ); + } + + int CanReceive(object ob) { + if(playerp(ob) && !creatorp(ob) && !present("testchar badge",ob)) { + message("info","Creator staff only, sorry.", ob); + return 0; + } + + if(ob->GetRace() == "rodent"){ + message("info","You are repelled by rodenticide.",ob); + return 0; + } + return 1; + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r26/lib/domains/default/room/telnet_room.c ds2.0r29/lib/domains/default/room/telnet_room.c *** ds2.0r26/lib/domains/default/room/telnet_room.c Tue Mar 28 23:23:40 2006 --- ds2.0r29/lib/domains/default/room/telnet_room.c Wed Jul 5 00:01:11 2006 *************** *** 41,51 **** "Once you connect to Dead Souls, type \"dcon\" to "+ "return to your own mud. \n\n"+ "To connect type \"connect\" \n"+ ! "The Creators' Hall is east of here."); ! SetExits( ([ ! "east" : "/domains/default/room/wiz_hall" ]) ); - SetObviousExits("e"); SetNoModify(1); } --- 41,50 ---- "Once you connect to Dead Souls, type \"dcon\" to "+ "return to your own mud. \n\n"+ "To connect type \"connect\" \n"+ ! "The Creators' Hall west wing is south of here."); ! SetExits( ([ ! "south" : "/domains/default/room/wiz_hall2", ]) ); SetNoModify(1); } diff -c -r --new-file ds2.0r26/lib/domains/default/room/wiz_hall.c ds2.0r29/lib/domains/default/room/wiz_hall.c *** ds2.0r26/lib/domains/default/room/wiz_hall.c Fri Mar 24 14:36:36 2006 --- ds2.0r29/lib/domains/default/room/wiz_hall.c Wed Jul 5 00:01:11 2006 *************** *** 34,44 **** SetItems( ([ ({"sign"}) : "A sign you can read.", ]) ); ! SetExits( ([ ! "north" : "/domains/town/room/adv_guild", "east" : "/domains/default/room/wiz_corr1", "south" : "/secure/room/arch", ! "west" : "/domains/default/room/telnet_room", ]) ); SetRead("sign", (: load_object(ROOM_ARCH)->SignRead() :) ); } --- 34,44 ---- SetItems( ([ ({"sign"}) : "A sign you can read.", ]) ); ! SetExits( ([ "east" : "/domains/default/room/wiz_corr1", "south" : "/secure/room/arch", ! "north" : "/domains/town/room/adv_guild", ! "west" : "/domains/default/room/wiz_hall2.c", ]) ); SetRead("sign", (: load_object(ROOM_ARCH)->SignRead() :) ); } diff -c -r --new-file ds2.0r26/lib/domains/default/room/wiz_hall2.c ds2.0r29/lib/domains/default/room/wiz_hall2.c *** ds2.0r26/lib/domains/default/room/wiz_hall2.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/default/room/wiz_hall2.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,59 ---- + #include + #include + + inherit LIB_ROOM; + + string LongDesc(){ + string desc = "Immortals come here to communicate with each other about "+ + "the world they are building. The Adventurer's Guild "+ + "is north. The Arch Room is south. To visit the Dead Souls "+ + "test and development mud, go west. The test lab facilities are east."; + desc += "\nA sign reads: "+load_object(ROOM_ARCH)->SignRead(); + return desc; + } + + static void create() { + object ob; + room::create(); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Creators' Hall West Wing"); + SetLong("This is the west wing of the Creators' Hall. North is the telnet room where you can connect to the Dead Souls test and development mud. South is the domains room, where you can conveniently visit featured domains or realms."); + SetProperty("no attack", 1); + SetProperty("nopeer",1); + ob = new("/lib/bboard"); + ob->SetKeyName("chalkboard"); + ob->SetId( ({ "board", "chalkboard", "dusty board", "dusty chalkboard" }) ); + ob->set_board_id("immortal_board"); + ob->set_max_posts(30); + SetShort("Creators' Hall West Wing"); + ob->eventMove(this_object()); + SetItems( ([ + ({"sign"}) : "A sign you can read.", + ]) ); + SetExits( ([ + "east" : "/domains/default/room/wiz_hall", + "north" : "/domains/default/room/telnet_room", + "south" : "/domains/default/room/domains_room.c", + ]) ); + SetInventory(([ + ])); + + SetRead("sign", (: load_object(ROOM_ARCH)->SignRead() :) ); + } + + int CanReceive(object ob) { + if(playerp(ob) && !creatorp(ob) && !present("testchar badge",ob)) { + message("info","Creator staff only, sorry.", ob); + return 0; + } + + if(ob->GetRace() == "rodent"){ + message("info","You are repelled by rodenticide.",ob); + return 0; + } + return 1; + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r26/lib/domains/examples/room/README ds2.0r29/lib/domains/examples/room/README *** ds2.0r26/lib/domains/examples/room/README Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/README Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,16 ---- + Example Rooms Index + =========================================================================== + exroom1: Changing Chats when a quest has been done. + exroom2: example of a room you can inherit. All its functions + go to the rooms which inherit it. They can over-write those functions. + All three rooms which inherit it manipulate 'pull' in their own + rooms. They don't affect 'pull' or "myvar" in this room. + exroom2a: inherits exroom2 and ADDS to the object_entered function + exroom2b: inherits exroom2 and adds nothing to object_entered (but you'll + see that it uses the object_entered from exroom2). + exroom2c: inherits exroom2 and removes the object_entered from exroom2. + exroom3: move_player + exroom4: pre/post exits add/remove exits set/query/remove tempvars + exroom5: look_fail & tempvars pt 2. + exroom6: pre-exit (sneak) + exroom7: two verbs for one add_action diff -c -r --new-file ds2.0r26/lib/domains/examples/room/entrance.c ds2.0r29/lib/domains/examples/room/entrance.c *** ds2.0r26/lib/domains/examples/room/entrance.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/entrance.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,106 ---- + #include + #include + #include "ex.h" + + inherit LIB_ROOM; + + + void create() { + room::create(); + SetAmbientLight(30); + SetShort( "Entrance to Hall Of Rooms" ); + SetLong( + "|-----------------------------------------------------------------------------|\n\n"+ + " You are in a large, empty room. There are few things to examine -- only the\n" + "floor, ceiling and wall at this time. An opening to your north leads to the \n" + "incredible Hall of Examples. The line at the top of this description was put\n" + "in as a VERY useful tool for keeping a standard width to all descriptions\n" + " and messages.\n\n" + " The Hall of Examples has many rooms to look through. Each room is limited\n" + "to one or two different types of things. For example, showing how to do a\n" + "pre-exit function. Naturally, you will probably combine many of these\n" + "functions into one single room. Room files can get long and involved, but\n" + "when you understand the individual parts, you have no trouble understanding\n" + "the whole. Don't forget to %^BOLD%^GREEN%^'more here'%^RESET%^ in each room." + " Most of the rooms have explanations written out in comments.\n\n" + " As a final aside, most of the functions are simplistic. These are \n" + "very basic examples." + ); + + SetExits( ([ + "north" : EXPATH + "exroom1", + "south" : START + ])); + + // What follows is a short tutorial on item descriptions. + + // A mapping is a special type of variable -- a list. + // It has a 'key' and a 'value' which are tied together. + // When you query a key it returns the value. + // Each key must be unique. + + // The SetItems in rooms is a mapping where the key & value are + // both strings. + + // This: ([ ]) means what is inside is a mapping. + + // SetItems( ([ ]) ); means you're putting an entire + // mapping into the SetItems. This is how we put items into + // various rooms. We're manipulating the entire mapping + // as a whole. You'll notice for the walls, there is an + // array to allow a player to do 'look wall' and 'look walls' + // and get the same description. This is a very useful method. + + SetItems( ([ + "floor" : "The floor is dirty.", + "ceiling" : "The ceiling is high", + ({ "wall", "walls" }) : "The walls are currtly not very exciting.", + ]) ); + + // The room code also allows us to manipulate individual 'keys' of the + // SetItems mapping: + // AddItem( "bird" , "A small robin sits passageway you can enter."); + // would be a way to put the description for bird into the SetItems mapping. + + // With any mapping, when you set a value for a key that already exists + // the mapping replaces the old one with the new; if that key does + // not yet exist it will add it in. + + // So, when you see the ([ ]) it means you are plunking in a group of + // key/value pairs into the mapping. + + // Finally, if you do SetItems( ([ ]) ); it is going to replace + // the entire SetItems mapping with what is in the ([ ]). + // If you do AddItem(); it will ADD the new mapping to + // the existing SetItems mapping. + + // To illustrate you need to call the test1() function in this room. + // To do that, do the following: + // > call here->test1() + + } + + void test1() + { + write("Now take a look at the room"); + SetItems( ([ + "north wall" : "The north wall has an exit.", + "east wall" : "The east wall is painted blue.", + "south wall" : "The south wall is painted yellow.", + "west wall" : "The west wall is painted green.", + "wall" : "Which wall? North, South, East or West?", + "walls" : "Which wall? North, South, East or West?" + ]) ); + + // In this example, when overwriting the SetItems mapping, you are + // not able to use arrays at this time. That is the reason that + // 'wall' and 'walls' is not listed as you first saw. Keep this + // in mind when overwriting existing mappings. As you'll also + // notice, as mentioned above, you can no longer look at the floor + // or the ceiling since the whole SetItems mapping has been replaced. + + // Now let's add one description to the list. + AddItem( "statue", "There is a statue of a wizard here." ); + + return; + } diff -c -r --new-file ds2.0r26/lib/domains/examples/room/ex.h ds2.0r29/lib/domains/examples/room/ex.h *** ds2.0r26/lib/domains/examples/room/ex.h Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/ex.h Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,7 ---- + //here's some paths + #define EXAMPLES "/domains/examples/" + #define EXPATH EXAMPLES + "room/" + + //here's some files + #define PAPAROOM EXPATH +"exroom2" + #define START EXPATH + "start" diff -c -r --new-file ds2.0r26/lib/domains/examples/room/exroom1.c ds2.0r29/lib/domains/examples/room/exroom1.c *** ds2.0r26/lib/domains/examples/room/exroom1.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/exroom1.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,110 ---- + #include + #include + #include "ex.h" + + // The #include "ex.h" is used in each of these files to remember + // the defines for EXPATH and other variables we have defined + // that all of these files use. It would be tedious to have to + // put the #define EXPATH in every file, so we put it into one + // and include it as a reference for each file that needs it. + // Consider it a library card. The books that are in the library + // (the #define's) are referenced every time you see EXPATH. + + inherit LIB_ROOM; + + // I'm defining a global variable here called once to be used later + // in the file. A global variable is something that can be used + // by any function in this room. There are also local variables + // that can be defined only in the variable using it. + + int once; + + // I'm also defing a function lever_pulled() that will be called later. + mixed lever_pulled(); + + void create() + { + ::create(); + SetAmbientLight(30); + SetShort( "Lever Pull" ); + SetLong("This is an example room for a simple add_action which changes "+ + "a description. There's a lever to pull." + ); + + SetExits( ([ + "north" : EXPATH + "exroom2", + "south" : EXPATH + "entrance", + ])); + + // Here, take a look at how I set the lever item. It is different + // that you saw in the entrance room. What I am doing here is + // calling a functional. When the player types 'look lever', it + // will call the functional (: lever_pulled :) that we defined above. + // I'll explain later in this file. + + SetItems( ([ + "lever" : ((: lever_pulled :)) + ]) ); + + } + + // In the init() function, I am setting our global variable 'once' to 0. This + // is used to reset the lever back when the room resets or the mud reboots. + // so the next player who comes in to pull the lever, they can. + // In the init() function, we also define the actions that can be done in the + // room. In this case, we need a pull action to 'pull lever'. Whenever a player + // types pull, it will call the function aa_pull(). + + void init() + { + ::init(); + add_action("aa_pull","pull"); + once = 0; + } + + // This is the function that is called when a player types pull as mentioned above. + // First, we need to check and see if they are pulling the correct thing. the + // string str is defining a local variable that will be used in this function. + // Next, we have if( str != "lever"). That is saying if I type 'pull finger', + // it will write 'Pull what?'. The \n symbol means a carriage return or 'enter' + // to go to the next line. + + mixed aa_pull(string str) + { + if ( str != "lever") + { + write( "Pull what?\n" ); + return 1; + } + + // Here we are going to check if the lever has been pulled. If it has, + // it's going to tell the player that and exit the aa_pull() function. + // this is done by the return 1; that you see here. + + if( once ==1 ) + { + write( "The lever's already pulled." ); + return 1; + } + + // If the lever has not been pulled, this part starts. As you'll notice, we + // set once = 1 to indicate that the lever has been pulled. + + write("You pull the lever!\n"); + say(this_player()->GetName() + " pulls the lever!\n"); + once=1; + return 1; + } + + // I told you I'd explain what the functional (: lever_pulled :) was for. + // Below, it checks to see if the lever has been pulled. if( !once ) + // says, if once is equal to 0 (not pulled) it returns and says the lever + // has not been pulled. If once is not equal to 0, then it means that it + // has been pulled and returns a different message. + + mixed lever_pulled() + { + if( !once ) + return "The lever is pushed into the wall. Perhaps you could pull it."; + return "The lever has already been pulled. You're too late!"; + } diff -c -r --new-file ds2.0r26/lib/domains/examples/room/exroom2.c ds2.0r29/lib/domains/examples/room/exroom2.c *** ds2.0r26/lib/domains/examples/room/exroom2.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/exroom2.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,77 ---- + #include + #include "ex.h" + + inherit LIB_ROOM; + + int myvar; + + void create() + { + ::create(); + SetAmbientLight(30); + SetShort( "a master file" ); + SetLong(@EndText + |---------------------------------------------------------------|-------------| + This is an example room for inheriting files. This + file is inherited by two others. It's also a fully + functional room. There's a lever to pull. + The rooms which inherit me are to the east. + EndText + ); + + // You'll notice that for SetLong(), I've put @EndText at the top and EndText at the bottom + // and have not put in quotes. When using this style of code, it is important to make sure + // you manually enter to the next line to wrap the lines on the player's screen. + // This can be a tedious if you do not know how many lines to enter before you need to + // continue on the next line. If you look back to the Entrance to the Hall of Examples, + // You will see a handy line I've used to know when to stop a line and continue on + // the next. I've included it in the room description for your convenience. the + // normal screen default is 79 characters. Whenever you would like to recreate the line + // at the top, type 'margins' + + SetExits( ([ + "south" : EXPATH + "exroom1", + "north" : EXPATH + "exroom3", + "east" : EXPATH + "exroom2a" + ]) ); + SetItems( ([ + "lever" : "A lever for pulling.", + ]) ); + + myvar = 0; + } + + // The CanReceive() function is very helpful to do checks on an interactive object + // that enters the room. In this case, we are checking to see if the object that + // enters is a creator player object. If it is, then we will give a message to + // that object with the write() funciton. I've put some color tags to set the color + // off from the rest of the text. For colors available, type 'colors'. + + int CanReceive(object ob) + { + if ( creatorp(ob) ) + write( "%^BOLD%^BLUE%^Room tells you: %^BOLD%^GREEN%^You're a creator! %^BOLD%^BLUE%^(This is from the master file.)%^RESET%^\n"); + return 1; + } + + void init() + { + ::init(); + add_action("aa_pull","pull"); + } + + // We're going to use the variable 'myvar' in the middle of a write() funciton. As + // you'll notice below, the text you are writing has to be in the " ". Then we + // separate the text by putting in: " + myvar + ". This adds the myvar variable + // to the text output whenever a player pulls the lever. Try it and see. + + + mixed aa_pull(string str) + { + if (str!="lever") + return notify_fail("Pull what?\n"); + myvar ++; + write("You pull the lever and the value of 'myvar' is now " + myvar + "\n"); + say(this_player()->GetName() + " pulls the lever!\n"); + return 1; + } diff -c -r --new-file ds2.0r26/lib/domains/examples/room/exroom2a.c ds2.0r29/lib/domains/examples/room/exroom2a.c *** ds2.0r26/lib/domains/examples/room/exroom2a.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/examples/room/exroom2a.c Wed Jul 5 00:01:11 2006 *************** *** 0 **** --- 1,72 ---- + #include + #include "ex.h" + + inherit PAPAROOM; + + void create() + { + ::create(); + SetAmbientLight(30); + SetShort( "a 'child' file" ); + SetLong("This is an example room whose properties are inherited " + "from another room.\n for more information." + ); + + //Note: When we set the "exits" in this room we + // over-write the "exits" we inherited from PAPAROOM + // There's a way to just add an exit to the list, but exits + // are primarily unique to each room, so this method is fine. + SetExits( ([ + "west" : EXPATH + "exroom2", + "east" : EXPATH + "exroom2b" + ])); + + SetItems( ([ + "more" : @EndBlah + ------------------------------------------------------------------- + Take a look at the CanReceive function. + Do you see the line ::CanReceive(ob)? + The :: refers to 'the file I've inherited from'. + So, we are calling (using) the function CanReceive() as it is + written in exroom2.c + THEN we are doing our own thing. + + When an object enters this room (player or bowl or sword etc) + it becomes the variable 'ob'. + + We pass that v