diff -c -r --new-file ds1.1/lib/cfg/months.cfg ds2.0r27/lib/cfg/months.cfg *** ds1.1/lib/cfg/months.cfg Fri Jan 3 22:13:10 1997 --- ds2.0r27/lib/cfg/months.cfg Wed Jul 5 00:00:58 2006 *************** *** 5,17 **** # format: # month:season:days:day_length ! Roki:winter:20:9 ! Praxi:winter:20:10 ! Altki:spring:20:10 ! Ketralki:spring:20:10 ! Aenterki:summer:20:11 ! Kepki:summer:20:12 ! Kortki:summer:20:11 ! Kantki:autumn:20:10 ! Sartki:autumn:20:10 ! Denki:winter:20:10 --- 5,17 ---- # format: # month:season:days:day_length ! Roki:winter:20:11 ! Praxi:winter:20:12 ! Altki:spring:20:12 ! Ketralki:spring:20:12 ! Aenterki:summer:20:13 ! Kepki:summer:20:14 ! Kortki:summer:20:13 ! Kantki:autumn:20:12 ! Sartki:autumn:20:12 ! Denki:winter:20:12 diff -c -r --new-file ds1.1/lib/cfg/timezone.cfg ds2.0r27/lib/cfg/timezone.cfg *** ds1.1/lib/cfg/timezone.cfg Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cfg/timezone.cfg Wed Jul 5 00:00:58 2006 *************** *** 0 **** --- 1 ---- + EDT diff -c -r --new-file ds1.1/lib/cfg/timezones.cfg ds2.0r27/lib/cfg/timezones.cfg *** ds1.1/lib/cfg/timezones.cfg Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cfg/timezones.cfg Wed Jul 5 00:00:58 2006 *************** *** 0 **** --- 1,17 ---- + NZT + AET + AWT + MOT + CET + BST + GMT + ADT + AST + EDT + EST + CDT + CST + MDT + MST + PDT + PST diff -c -r --new-file ds1.1/lib/cmds/admins/arch.c ds2.0r27/lib/cmds/admins/arch.c *** ds1.1/lib/cmds/admins/arch.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/admins/arch.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,21 ---- + /* /cmds/creators/wiz.c + * Created by Zin@Frontiers + * Sun Sep 21 21:00:16 1997 EDT + */ + + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + write("You speed to the Arch room.\n"); + this_player()->eventMoveLiving("/secure/room/arch"); + return 1; + } + + void help() { + message("help", "Syntax: \n\n" + "This command will move you to the Arch room.\n\n", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/admins/broadcast.c ds2.0r27/lib/cmds/admins/broadcast.c *** ds1.1/lib/cmds/admins/broadcast.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/broadcast.c Wed Jul 5 00:01:03 2006 *************** *** 12,18 **** if(!archp(previous_object())) return 0; message("broadcast", sprintf("%%^RED%%^Broadcast message from %s: %%^YELLOW%%^%s%%^RESET%%^", ! (string)this_player()->GetName(), str), users()); return 1; } --- 12,18 ---- if(!archp(previous_object())) return 0; message("broadcast", sprintf("%%^RED%%^Broadcast message from %s: %%^YELLOW%%^%s%%^RESET%%^", ! (string)this_player()->GetName(), str), users()); return 1; } diff -c -r --new-file ds1.1/lib/cmds/admins/cache.c ds2.0r27/lib/cmds/admins/cache.c *** ds1.1/lib/cmds/admins/cache.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/cache.c Wed Jul 5 00:01:03 2006 *************** *** 5,23 **** int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! cache_stats(); ! return 1; } int help() { ! write( @EndText Syntax: cache Effect: Gets the cache stats from the driver, including the hit rate See man: cache_stats See also: callouts, mstatus, netstat, opcprof, fdinfo, dumpallobj EndText ! ); ! return 1; } --- 5,23 ---- int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! cache_stats(); ! return 1; } int help() { ! write( @EndText Syntax: cache Effect: Gets the cache stats from the driver, including the hit rate See man: cache_stats See also: callouts, mstatus, netstat, opcprof, fdinfo, dumpallobj EndText ! ); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/admins/channel.c ds2.0r27/lib/cmds/admins/channel.c *** ds1.1/lib/cmds/admins/channel.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/channel.c Wed Jul 5 00:01:03 2006 *************** *** 13,67 **** if(!str) return 0; if(!archp(previous_object())) return 0; ! // Attempt to remove or add a players line rights. if(sscanf(str, "%s %s %s", opt, who, channel) == 3) { ! if(!(ob = find_player(lower_case(who)))) ! return notify_fail("No such player online.\n"); ! if(opt == "remove") { ! if(member_array(channel, ob->GetChannels()) == -1) { ! this_player()->eventPrint(ob->GetName() ! + " is not currently subscribed to the " + channel + " line."); ! return 1; ! } ! ob->RestrictChannel(channel); ! this_player()->eventPrint("%^RED%^You restrict " + ob->GetName() ! + " from the " + channel + " line.%^RESET%^"); ! ob->eventPrint("%^RED%^You have lost your " + channel ! + " line rights.%^RESET%^"); ! return 1; ! } ! else if(opt == "add") { ! if(member_array(channel, ob->GetRestrictedChannels()) == -1) { ! message("system", ob->GetName() + " is not currently restricted from the " ! + channel + " line.", this_player()); ! return 1; ! } ! ob->UnrestrictChannel(channel); ! this_player()->eventPrint("%^RED%^You unrestrict " + ob->GetName() ! + " from the " + channel + " line.%^RESET%^"); ! ob->eventPrint("%^RED%^You have regained your " + channel ! + " line rights.%^RESET%^"); ! return 1; ! } } // Otherwise, return restriction information, if it is requested. else if(str) { ! string *channels; ! string tmp; ! int size; ! if(!(ob = find_player(lower_case(str)))) ! return notify_fail("No such player online.\n"); ! channels = ob->GetRestrictedChannels(); ! size = sizeof(channels); ! tmp = ob->GetName() + " is currently restricted from "; ! if(size) tmp += "the " + conjunction(channels); ! else tmp += "no"; ! if(size == 1) tmp += " line."; ! else tmp += " lines."; ! this_player()->eventPrint(tmp); ! return 1; } else return 0; } --- 13,67 ---- if(!str) return 0; if(!archp(previous_object())) return 0; ! // Attempt to remove or add a players line rights. if(sscanf(str, "%s %s %s", opt, who, channel) == 3) { ! if(!(ob = find_player(lower_case(who)))) ! return notify_fail("No such player online.\n"); ! if(opt == "remove") { ! if(member_array(channel, ob->GetChannels()) == -1) { ! this_player()->eventPrint(ob->GetName() ! + " is not currently subscribed to the " + channel + " line."); ! return 1; ! } ! ob->RestrictChannel(channel); ! this_player()->eventPrint("%^RED%^You restrict " + ob->GetName() ! + " from the " + channel + " line.%^RESET%^"); ! ob->eventPrint("%^RED%^You have lost your " + channel ! + " line rights.%^RESET%^"); ! return 1; ! } ! else if(opt == "add") { ! if(member_array(channel, ob->GetRestrictedChannels()) == -1) { ! message("system", ob->GetName() + " is not currently restricted from the " ! + channel + " line.", this_player()); ! return 1; ! } ! ob->UnrestrictChannel(channel); ! this_player()->eventPrint("%^RED%^You unrestrict " + ob->GetName() ! + " from the " + channel + " line.%^RESET%^"); ! ob->eventPrint("%^RED%^You have regained your " + channel ! + " line rights.%^RESET%^"); ! return 1; ! } } // Otherwise, return restriction information, if it is requested. else if(str) { ! string *channels; ! string tmp; ! int size; ! if(!(ob = find_player(lower_case(str)))) ! return notify_fail("No such player online.\n"); ! channels = ob->GetRestrictedChannels(); ! size = sizeof(channels); ! tmp = ob->GetName() + " is currently restricted from "; ! if(size) tmp += "the " + conjunction(channels); ! else tmp += "no"; ! if(size == 1) tmp += " line."; ! else tmp += " lines."; ! this_player()->eventPrint(tmp); ! return 1; } else return 0; } diff -c -r --new-file ds1.1/lib/cmds/admins/dumpallobj.c ds2.0r27/lib/cmds/admins/dumpallobj.c *** ds1.1/lib/cmds/admins/dumpallobj.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/dumpallobj.c Wed Jul 5 00:01:03 2006 *************** *** 5,23 **** int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! dumpallobj("/tmp/objects"); ! return 1; } int help() { ! write( @EndText Syntax: dumpallobj Effect: Puts a list of all currently loaded objects in /log/dumps/obj_dump See man: dumpallobj See also: callouts, cache, mstatus, netstat, fdinfo, opcprof EndText ! ); ! return 1; } --- 5,23 ---- int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! dumpallobj("/tmp/objects"); ! return 1; } int help() { ! write( @EndText Syntax: dumpallobj Effect: Puts a list of all currently loaded objects in /log/dumps/obj_dump See man: dumpallobj See also: callouts, cache, mstatus, netstat, fdinfo, opcprof EndText ! ); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/admins/fdinfo.c ds2.0r27/lib/cmds/admins/fdinfo.c *** ds1.1/lib/cmds/admins/fdinfo.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/fdinfo.c Wed Jul 5 00:01:03 2006 *************** *** 5,23 **** int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! dump_file_descriptors(); ! return 1; } int help() { ! write( @EndText Syntax: fdinfo Effect: Lists the status of the machines's file descriptors See man: dump_file_descriptors See also: netstat, mstatus, cache, callouts, dumpallobj, opcprof EndText ! ); ! return 1; } --- 5,23 ---- int cmd(string arg) { ! if(!archp(previous_object())) return 0; ! dump_file_descriptors(); ! return 1; } int help() { ! write( @EndText Syntax: fdinfo Effect: Lists the status of the machines's file descriptors See man: dump_file_descriptors See also: netstat, mstatus, cache, callouts, dumpallobj, opcprof EndText ! ); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/admins/mfinger.c ds2.0r27/lib/cmds/admins/mfinger.c *** ds1.1/lib/cmds/admins/mfinger.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/mfinger.c Wed Jul 5 00:01:03 2006 *************** *** 23,29 **** if( !args || args == "" ) return "Mfinger whom?"; if( !(ob = find_player(args)) ) ! return "No one around " + mud_name() + " by that name."; ip = query_ip_number(ob); args = (string)ob->GetCapName(); ob = new(LIB_CLIENT); --- 23,29 ---- if( !args || args == "" ) return "Mfinger whom?"; if( !(ob = find_player(args)) ) ! return "No one around " + mud_name() + " by that name."; ip = query_ip_number(ob); args = (string)ob->GetCapName(); ob = new(LIB_CLIENT); *************** *** 37,43 **** ob->SetRead( (: ReadSocket :) ); ob->eventWrite("\n"); message("system", "Finger sent to " + possessive_noun(args) + " site " + ! ip + ".", this_player()); return 1; } --- 37,43 ---- ob->SetRead( (: ReadSocket :) ); ob->eventWrite("\n"); message("system", "Finger sent to " + possessive_noun(args) + " site " + ! ip + ".", this_player()); return 1; } *************** *** 47,58 **** if( !Waiting[ob = previous_object()] ) return; if( !Waiting[ob]["who"] ) return; message("system", "Information from " + Waiting[ob]["ip"] + " for " + ! Waiting[ob]["player"] + ":", Waiting[ob]["who"]); message("system", str, Waiting[ob]["who"]); } void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.", ! this_player()); } --- 47,58 ---- if( !Waiting[ob = previous_object()] ) return; if( !Waiting[ob]["who"] ) return; message("system", "Information from " + Waiting[ob]["ip"] + " for " + ! Waiting[ob]["player"] + ":", Waiting[ob]["who"]); message("system", str, Waiting[ob]["who"]); } void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.", ! this_player()); } diff -c -r --new-file ds1.1/lib/cmds/admins/objload.c ds2.0r27/lib/cmds/admins/objload.c *** ds1.1/lib/cmds/admins/objload.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/objload.c Wed Jul 5 00:01:03 2006 *************** *** 30,36 **** } foreach(string who, mixed array data in vals) { mapping mp = ([]); ! output += ({ who + ": " + data[0] }); foreach(object ob in data[1]) { mp[base_name(ob)]++; --- 30,36 ---- } foreach(string who, mixed array data in vals) { mapping mp = ([]); ! output += ({ who + ": " + data[0] }); foreach(object ob in data[1]) { mp[base_name(ob)]++; *************** *** 45,52 **** string GetHelp(string unused) { return ("Syntax: \n\n" ! "Provides you with information about how many objects " ! "each creator has in the game."); } ! ! --- 45,52 ---- string GetHelp(string unused) { return ("Syntax: \n\n" ! "Provides you with information about how many objects " ! "each creator has in the game."); } ! ! diff -c -r --new-file ds1.1/lib/cmds/admins/opcprof.c ds2.0r27/lib/cmds/admins/opcprof.c *** ds1.1/lib/cmds/admins/opcprof.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/admins/opcprof.c Wed Dec 31 19:00:00 1969 *************** *** 1,28 **** - #include - - - inherit LIB_DAEMON; - - int - cmd(string arg) - { - if(!archp(previous_object())) return 0; - #ifdef HAS_OPCPROF - opcprof(LOG_DIR + "/dumps/opcprof"); - #else - message("my_action","Sorry, driver has been compiled with OPC_PROF disabled",this_player()); - #endif - return 1; - } - - int help() - { - write( @EndText - Syntax: opcprof - Effect: Puts a list of efuns and eoperators in /log/dumps/opcprof - See man: opcprof - See also: fdinfo, netstat, mstatus, cache, callouts, dumpallobj, - EndText - ); - return 1; - } --- 0 ---- diff -c -r --new-file ds1.1/lib/cmds/common/help.c ds2.0r27/lib/cmds/common/help.c *** ds1.1/lib/cmds/common/help.c Sun Feb 1 21:29:49 1998 --- ds2.0r27/lib/cmds/common/help.c Wed Jul 5 00:01:03 2006 *************** *** 16,33 **** mixed cmd(string arg) { object who = previous_object(); int array screen = (who->GetScreen() || ({ 80, 24 })); ! string help; ! ! if( !arg ) { ! help = center("Dead Souls System Help", screen[0]); ! help += wrap(HELP_D->GetHelp(0), screen[0]); ! who->eventPage(explode(help, "\n"), MSG_HELP, function() { ! this_player()->eventPrint("Hit the key to get a list of indices," ! "'q' to quit help: ", MSG_PROMPT); ! input_to(function(string str) { ! if( str == "q" ) return; ! HelpMenu(); }); ! }); return 1; } if( arg == "index" || HELP_D->GetTopics(arg) ) { --- 16,33 ---- 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) ) { *************** *** 41,48 **** if( !(help = HELP_D->GetHelp(arg)) ) { return HELP_D->GetLastError(); } ! help = center("Dead Souls System Help", screen[0]) + help; ! help = wrap(help, screen[0]); who->eventPage(explode(help, "\n"), MSG_HELP); return 1; } --- 41,48 ---- if( !(help = HELP_D->GetHelp(arg)) ) { return HELP_D->GetLastError(); } ! help = center(mud_name()+" System Help", screen[0]) + help; ! if(sizeof(help) < 2000) help = wrap(help, screen[0]); who->eventPage(explode(help, "\n"), MSG_HELP); return 1; } *************** *** 57,161 **** string array indices; int array scr; int y = 0; ! scr = this_player()->GetScreen() || ({ 80, 25 }); ! tmp = center("Dead Souls System Help", scr[0]); if( !index ) { tmp += "Index: %^GREEN%^main index%^RESET%^\n\n"; indices = filter(HELP_D->GetIndices(), ! (: CanAccess(this_player(), $1) :)); foreach(string yuck in indices) { int z = strlen(yuck) + 6; ! if( z > y ) { y = z; } } tmp += format_page(map(indices, function(string str, string array ind) { ! int num = member_array(str, ind) + 1; ! return ("[%^CYAN%^"+(num)+"%^RESET%^] " + str); ! }, indices), scr[0]/(y+2)); } else if( !HELP_D->CanAccess(this_player(), index) ) { message("help", "Invalid index choice.", this_player()); message("prompt", "Hit : ", this_player()); input_to(function(string str) { HelpMenu(0); }); ! return; ! } ! else { ! string array topics = HELP_D->GetTopics(index); ! string array bing = allocate(sizeof(topics)); ! int i = 0; ! ! tmp += "Index: %^GREEN%^" + index + "%^RESET%^\n\n"; ! foreach(string topic in topics) { ! int z = strlen(topic) + 6; ! ! if( z > y ) { ! y = z; ! } ! bing[i++] = "[%^CYAN%^" + (i+1) + "%^RESET%^] " + topic; ! } ! tmp += format_page(bing, scr[0]/(y+2)); ! } ! f = function(string ind) { ! if( !ind ) ! message("prompt", "\n\nEnter a index or 'q' to quit help: ", ! this_player()); ! else ! message("prompt", "\n\nEnter a topic, 'q' to quit help, or " ! " for main menu: ", this_player()); ! input_to(function(string str, string ind) { ! string ret; ! int ind_num; ! int *scr; ! ! if( str == "q" ) { ! message("system", "Exiting help.", this_player()); ! return; ! } ! if( !str || str == "" ) { ! HelpMenu(0); ! return; ! } ! scr = (int *)this_player()->GetScreen() || ({ 80 }); ! if( ind_num = to_int(str) ) { ! string array tmp2; ! if( !ind ) tmp2 = filter(HELP_D->GetIndices(), ! (: CanAccess(this_player(), $1) :)); ! else tmp2 = HELP_D->GetTopics(ind); ! if( ind_num < 1 || ind_num > sizeof(tmp2) ) { ! str = 0; ! HELP_D->SetError("Index number out of range."); } ! else str = tmp2[ind_num - 1]; ! } ! if( !ind && !HELP_D->GetTopics(str) ) { ! message("help", "Invalid index choice.", this_player()); ! message("prompt", "Hit : ", this_player()); ! input_to(function(string str) { HelpMenu(); }); ! return; } ! else if( !ind ) { ! HelpMenu(str); ! return; ! } ! if( !(ret = HELP_D->GetHelpByIndex(ind, str)) ) { ! message("help", HELP_D->GetLastError(), this_player()); ! message("prompt", "\nHit : ", this_player()); ! input_to(function(string str) { HelpMenu(); }); ! return; ! } ! ret = center("Dead Souls System Help", scr[0])+wrap(ret, scr[0]); ! this_player()->eventPage(explode(ret, "\n"), "help", ! function(string ind) { ! message("prompt", "\n\nHit : ", ! this_player()); ! input_to(function(string str, string ind) { ! HelpMenu(ind); }, ind); ! return; ! }, ind); ! }, ind); ! }; ! this_player()->eventPage(explode(tmp, "\n"), "help", f, index); ! } --- 57,161 ---- string array indices; int array scr; int y = 0; ! scr = this_player()->GetScreen() || ({ 80, 25 }); ! tmp = center(mud_name()+" System Help", scr[0]); if( !index ) { tmp += "Index: %^GREEN%^main index%^RESET%^\n\n"; indices = filter(HELP_D->GetIndices(), ! (: CanAccess(this_player(), $1) :)); foreach(string yuck in indices) { int z = strlen(yuck) + 6; ! if( z > y ) { y = z; } } tmp += format_page(map(indices, function(string str, string array ind) { ! int num = member_array(str, ind) + 1; ! return ("[%^CYAN%^"+(num)+"%^RESET%^] " + str); ! }, indices), scr[0]/(y+2)); } else if( !HELP_D->CanAccess(this_player(), index) ) { message("help", "Invalid index choice.", this_player()); message("prompt", "Hit : ", this_player()); input_to(function(string str) { HelpMenu(0); }); ! return; ! } ! else { ! string array topics = HELP_D->GetTopics(index); ! string array bing = allocate(sizeof(topics)); ! int i = 0; ! ! tmp += "Index: %^GREEN%^" + index + "%^RESET%^\n\n"; ! foreach(string topic in topics) { ! int z = strlen(topic) + 6; ! ! if( z > y ) { ! y = z; } ! bing[i++] = "[%^CYAN%^" + (i+1) + "%^RESET%^] " + topic; } ! tmp += format_page(bing, scr[0]/(y+2)); ! } ! f = function(string ind) { ! if( !ind ) ! message("prompt", "\n\nEnter a index or 'q' to quit help: ", ! this_player()); ! else ! message("prompt", "\n\nEnter a topic, 'q' to quit help, or " ! " for main menu: ", this_player()); ! input_to(function(string str, string ind) { ! string ret; ! int ind_num; ! int *scr; ! ! if( str == "q" ) { ! message("system", "Exiting help.", this_player()); ! return; ! } ! if( !str || str == "" ) { ! HelpMenu(0); ! return; ! } ! scr = (int *)this_player()->GetScreen() || ({ 80 }); ! if( ind_num = to_int(str) ) { ! string array tmp2; ! if( !ind ) tmp2 = filter(HELP_D->GetIndices(), ! (: CanAccess(this_player(), $1) :)); ! else tmp2 = HELP_D->GetTopics(ind); ! if( ind_num < 1 || ind_num > sizeof(tmp2) ) { ! str = 0; ! HELP_D->SetError("Index number out of range."); ! } ! else str = tmp2[ind_num - 1]; ! } ! if( !ind && !HELP_D->GetTopics(str) ) { ! message("help", "Invalid index choice.", this_player()); ! message("prompt", "Hit : ", this_player()); ! input_to(function(string str) { HelpMenu(); }); ! return; ! } ! else if( !ind ) { ! HelpMenu(str); ! return; ! } ! if( !(ret = HELP_D->GetHelpByIndex(ind, str)) ) { ! message("help", HELP_D->GetLastError(), this_player()); ! message("prompt", "\nHit : ", this_player()); ! input_to(function(string str) { HelpMenu(); }); ! return; ! } ! ret = center(mud_name()+" System Help", scr[0])+wrap(ret, scr[0]); ! this_player()->eventPage(explode(ret, "\n"), "help", ! function(string ind) { ! message("prompt", "\n\nHit : ", ! this_player()); ! input_to(function(string str, string ind) { ! HelpMenu(ind); }, ind); ! return; ! }, ind); ! }, ind); ! }; ! this_player()->eventPage(explode(tmp, "\n"), "help", f, index); ! } diff -c -r --new-file ds1.1/lib/cmds/creators/anglicize.c ds2.0r27/lib/cmds/creators/anglicize.c *** ds1.1/lib/cmds/creators/anglicize.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/anglicize.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 anglicize you."); + return 1; + } + + target->SetNativeLanguage("English"); + if(target == this_player()) str = "yourself"; + else str = capitalize(str); + write("You anglicize "+str+"."); + if(target != this_player()) + tell_object(target, capitalize(this_player()->GetKeyName())+" anglicizes you."); + return 1; + } + + void help() { + message("help", "Syntax: anglicize \n\n" + "Make the target's native language English.\n\n", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/ascii.c ds2.0r27/lib/cmds/creators/ascii.c *** ds1.1/lib/cmds/creators/ascii.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/ascii.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,41 ---- + #include + #include + + inherit LIB_COMMAND; + + int cmd(string str){ + int code; + string tmp; + string ret = ""; + + if(str && !code = atoi(str)){ + write("That doesn't appear to be an integer."); + return 1; + } + + if(code) { + ret = convert_ascii(code); + write("The ASCII code "+code+" is: "+ret); + return 1; + } + + for(code = 33; code < 256; code++){ + tmp = convert_ascii(code); + if(sizeof(tmp)) ret += "The ASCII code "+code+" is: "+tmp+"\n"; + } + + write(ret); + return 1; + } + + + + string GetHelp(string str) { + return "Syntax: ascii [CODE]\n" + "Provided an integer that corresponds to an ASCII code known to " + "the mud, that character will be displayed. Note that the mud's " + "understanding of these characters is imperfect, and your client's " + "rendition may be unsatisfactory.\nWithout an argument, the command " + "displays all ASCII codes known to the mud and their characters.\n " + ""; + } diff -c -r --new-file ds1.1/lib/cmds/creators/boards.c ds2.0r27/lib/cmds/creators/boards.c *** ds1.1/lib/cmds/creators/boards.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/boards.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,28 ---- + // By Magnafix 10-14-96 + // required addition of list_new_posts() in bboard daemon + #include + #include + + inherit LIB_COMMAND; + + + int cmd(string str){ + string *boards; + int x; + + boards = ({ "immortal_board" }); + if(archp(this_player())) boards += ({ "admin_board" }); + + for(x = 0; x < sizeof(boards); x++) + write("/secure/daemon/bboard.c"->list_new_posts(boards[x])); + + return 1; + } + + + + string GetHelp(string str) { + return "Syntax: \n" + "This command tells you which boards have unread messages " + "on them."; + } diff -c -r --new-file ds1.1/lib/cmds/creators/callouts.c ds2.0r27/lib/cmds/creators/callouts.c *** ds1.1/lib/cmds/creators/callouts.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/callouts.c Wed Jul 5 00:01:03 2006 *************** *** 14,20 **** mixed cmd(string args) { mixed array callouts; string tmp; ! callouts = call_out_info(); if( !sizeof(callouts) ) { previous_object()->eventPrint("No pending callouts.", MSG_SYSTEM); --- 14,20 ---- mixed cmd(string args) { mixed array callouts; string tmp; ! callouts = call_out_info(); if( !sizeof(callouts) ) { previous_object()->eventPrint("No pending callouts.", MSG_SYSTEM); *************** *** 22,28 **** } tmp = sprintf("%:-40s %:-25s Delay\n", "Object", "Function"); tmp += "--------------------------------------------------" ! "-------------------------\n"; foreach(mixed array callout in callouts) { tmp += sprintf("%:-40O %:-25s %d\n", callout...); } --- 22,28 ---- } tmp = sprintf("%:-40s %:-25s Delay\n", "Object", "Function"); tmp += "--------------------------------------------------" ! "-------------------------\n"; foreach(mixed array callout in callouts) { tmp += sprintf("%:-40O %:-25s %d\n", callout...); } *************** *** 32,37 **** string GetHelp() { return ("Syntax: \n\n" ! "Lists all pending callouts.\n\n" ! "See also: events, mstatus, netstat"); } --- 32,37 ---- string GetHelp() { return ("Syntax: \n\n" ! "Lists all pending callouts.\n\n" ! "See also: events, mstatus, netstat"); } diff -c -r --new-file ds1.1/lib/cmds/creators/classblock.c ds2.0r27/lib/cmds/creators/classblock.c *** ds1.1/lib/cmds/creators/classblock.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/classblock.c Wed Jul 5 00:01:03 2006 *************** *** 12,18 **** #include inherit LIB_DAEMON; ! mixed cmd(string args) { if( !args || (args != "on" && args != "off") ) { return "Syntax: "; --- 12,18 ---- #include inherit LIB_DAEMON; ! mixed cmd(string args) { if( !args || (args != "on" && args != "off") ) { return "Syntax: "; *************** *** 24,30 **** } } previous_object()->eventPrint("You are now blocking all class lines.", ! MSG_SYSTEM); } else { foreach(string class_name in CLASSES_D->GetClasses()) { --- 24,30 ---- } } previous_object()->eventPrint("You are now blocking all class lines.", ! MSG_SYSTEM); } else { foreach(string class_name in CLASSES_D->GetClasses()) { *************** *** 33,46 **** } } previous_object()->eventPrint("You are no longer blocking any class " ! "lines.", MSG_SYSTEM); } return 1; } ! string GetHelp() { return ("Syntax: \n\n" ! "Allows you to make sure that you are blocking all or no " ! "class chat lines.\n\n" ! "See also: codeblock"); } --- 33,46 ---- } } previous_object()->eventPrint("You are no longer blocking any class " ! "lines.", MSG_SYSTEM); } return 1; } ! string GetHelp() { return ("Syntax: \n\n" ! "Allows you to make sure that you are blocking all or no " ! "class chat lines.\n\n" ! "See also: codeblock"); } diff -c -r --new-file ds1.1/lib/cmds/creators/clean.c ds2.0r27/lib/cmds/creators/clean.c *** ds1.1/lib/cmds/creators/clean.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/clean.c Wed Jul 5 00:01:03 2006 *************** *** 14,20 **** mixed cmd(string args) { object array obs, items, users; object ob; ! if( !args || args == "" ) { ob = environment(previous_object()); } --- 14,20 ---- mixed cmd(string args) { object array obs, items, users; object ob; ! if( !args || args == "" ) { ob = environment(previous_object()); } *************** *** 45,53 **** string GetHelp() { return ("Syntax: \n" ! " \n\n" ! "This command destroys all objects in the inventory of a " ! "specified object. It skips any item that has a user somewhere " ! "in its deep inventory."); } --- 45,53 ---- string GetHelp() { return ("Syntax: \n" ! " \n\n" ! "This command destroys all objects in the inventory of a " ! "specified object. It skips any item that has a user somewhere " ! "in its deep inventory."); } diff -c -r --new-file ds1.1/lib/cmds/creators/clone.c ds2.0r27/lib/cmds/creators/clone.c *** ds1.1/lib/cmds/creators/clone.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/clone.c Wed Jul 5 00:01:03 2006 *************** *** 17,47 **** if( args == "" || !args ) return "Clone what?"; file = absolute_path((string)this_player()->query_cwd(), args); if( file[<2..] != ".c" ) file = file + ".c"; ! if( file_size(file) < 0 ) return "No such file " + file; if( res = catch(ob = new(file)) ) ! return "Error in cloning object: " + res; if( !ob ) return "Failed to clone file: " + file; if( !((int)ob->eventMove(this_player())) && ! !((int)ob->eventMove(environment(this_player()))) ) { message("system", "Failed to properly move the object.", ! this_player()); return 1; } if( !(nom = (string)ob->GetShort()) ) nom = "something peculiar"; if( !(res = (string)this_player()->GetMessage("clone", ob)) ) ! res = (string)this_player()->GetName() + " clones " + nom + "."; message("info", "You clone " + nom + " (" + file + ").", ! this_player()); message("other_action", res, environment(this_player()), ! ({ this_player() })); return 1; } string GetHelp() { return ("Syntax: \n\n" ! "Clones the object from the code stored in the file named. " ! "If for some reason the object cannot be moved to your " ! "inventory (it is alive, you cannot carry it, etc.), then " ! "it will be moved into your environment.\n\n" ! "See also: dest, message"); } --- 17,47 ---- if( args == "" || !args ) return "Clone what?"; file = absolute_path((string)this_player()->query_cwd(), args); if( file[<2..] != ".c" ) file = file + ".c"; ! if( file_size(file) < 0 && !archp(this_player())) return "No such file " + file; if( res = catch(ob = new(file)) ) ! return "Error in cloning object: " + res; if( !ob ) return "Failed to clone file: " + file; if( !((int)ob->eventMove(this_player())) && ! !((int)ob->eventMove(environment(this_player()))) ) { message("system", "Failed to properly move the object.", ! this_player()); return 1; } if( !(nom = (string)ob->GetShort()) ) nom = "something peculiar"; if( !(res = (string)this_player()->GetMessage("clone", ob)) ) ! res = (string)this_player()->GetName() + " clones " + nom + "."; message("info", "You clone " + nom + " (" + file + ").", ! this_player()); message("other_action", res, environment(this_player()), ! ({ this_player() })); return 1; } string GetHelp() { return ("Syntax: \n\n" ! "Clones the object from the code stored in the file named. " ! "If for some reason the object cannot be moved to your " ! "inventory (it is alive, you cannot carry it, etc.), then " ! "it will be moved into your environment.\n\n" ! "See also: dest, message"); } diff -c -r --new-file ds1.1/lib/cmds/creators/codeblock.c ds2.0r27/lib/cmds/creators/codeblock.c *** ds1.1/lib/cmds/creators/codeblock.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/codeblock.c Wed Jul 5 00:01:03 2006 *************** *** 15,21 **** previous_object()->SetBlocked("all"); if( previous_object()->GetBlocked("all") ) { previous_object()->eventPrint("All channels are being blocked.", ! MSG_SYSTEM); } else { previous_object()->eventPrint("Codeblock is now off.", MSG_SYSTEM); --- 15,21 ---- previous_object()->SetBlocked("all"); if( previous_object()->GetBlocked("all") ) { previous_object()->eventPrint("All channels are being blocked.", ! MSG_SYSTEM); } else { previous_object()->eventPrint("Codeblock is now off.", MSG_SYSTEM); *************** *** 25,31 **** string GetHelp() { return ("Syntax: \n\n" ! "Allows you to toggle on and off the blocking of all mud " ! "channels.\n\n" ! "See also: classblock"); } --- 25,31 ---- string GetHelp() { return ("Syntax: \n\n" ! "Allows you to toggle on and off the blocking of all mud " ! "channels.\n\n" ! "See also: classblock"); } diff -c -r --new-file ds1.1/lib/cmds/creators/colors.c ds2.0r27/lib/cmds/creators/colors.c *** ds1.1/lib/cmds/creators/colors.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/colors.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,36 ---- + #include + #include + + inherit LIB_DAEMON; + + 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; + } + + string GetHelp() { + return("Syntax: colors\n\n" + "Lists all available colors in the corresponding color." + "\n\n"); + } + diff -c -r --new-file ds1.1/lib/cmds/creators/debug.c ds2.0r27/lib/cmds/creators/debug.c *** ds1.1/lib/cmds/creators/debug.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/debug.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,25 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + int status = this_player()->GetProperty("debug"); + if(!str && !status) str = "on"; + else if(!str && status) str = "off"; + if(str != "on" && str != "off") return 0; + if(str == "on"){ + write("You enable debugging."); + this_player()->SetProperty("debug", 1); + return 1; + } + write("You disable debugging."); + this_player()->SetProperty("debug", 0); + return 1; + } + + void help() { + message("help", "Syntax: debug [on | off]\n\n" + "Allows you to receive debugging information\n\n", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/dest.c ds2.0r27/lib/cmds/creators/dest.c *** ds1.1/lib/cmds/creators/dest.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/dest.c Wed Dec 31 19:00:00 1969 *************** *** 1,67 **** - /* /cmds/creator/dest.c - * From the Dead Souls V Object Library - * Destructs the object named - * Created by Descartes of Borg 950425 - * Version: @(#) dest.c 1.2@(#) - * Last modified: 96/10/08 - */ - - #include - #include - - inherit LIB_DAEMON; - - mixed cmd(string args) { - object who = previous_object(); - object target; - string msg; - - if( !args || args == "" ) { - return "Dest what?"; - } - if( args == "all" ) { - foreach(target in all_inventory(environment(who))) { - if( interactive(target) ) { - continue; - } - msg = who->GetMessage("dest", target); - who->eventPrint("You dest " + target->GetShort() + ".", - MSG_SYSTEM); - environment(who)->eventPrint(msg, MSG_SYSTEM, previous_object()); - target->eventDestruct(); - if( target ) { - destruct(target); - } - } - return 1; - } - if( archp(who) ) { - target = to_object(args); - } - if( !target && !(target = present(lower_case(args), who)) && - !(target = present(lower_case(args), environment(who))) ) { - return "No such thing."; - } - if( interactive(target) && !archp(who) ) { - return "You are not permitted to do that."; - } - msg = who->GetMessage("dest", target); - who->eventPrint("You dest " + target->GetShort() + ".", MSG_SYSTEM); - if( interactive(target) ) { - target->eventPrint(who->GetName() + " dests you.", MSG_SYSTEM); - } - environment(who)->eventPrint(msg, MSG_SYSTEM, ({ who, target })); - target->eventDestruct(); - if( target ) { - destruct(target); - } - return 1; - } - - string GetHelp() { - return ("Syntax: \n\n" - "This command destroys the object named. \"dest all\" " - "destroys all the items in your inventory. See \"help format\" " - "for how to denote objects.\n\n" - "See also: clean, scan"); - } --- 0 ---- diff -c -r --new-file ds1.1/lib/cmds/creators/domains.c ds2.0r27/lib/cmds/creators/domains.c *** ds1.1/lib/cmds/creators/domains.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/domains.c Wed Jul 5 00:01:03 2006 *************** *** 17,23 **** mapping stats = ([]); string array domains; mixed array tmp; ! foreach(string domain, mixed data in domain_stats()) { if( !data ) { continue; --- 17,23 ---- mapping stats = ([]); string array domains; mixed array tmp; ! foreach(string domain, mixed data in domain_stats()) { if( !data ) { continue; *************** *** 31,59 **** stats[domain] = data; } domains = sort_array(keys(stats), function(string a, string b, mapping mp) { ! if( mp[a]["moves"] > mp[b]["moves"] ) { ! return -1; ! } ! else { ! return 1; ! } ! }, stats); tmp = ({ sprintf("%:-15s %:-11s %:-11s %:-11s %:-11s %s", "Domain", ! "Moves", "Objects", "Errors", "Heart Beats", ! "Array Size"), sprintf("%'-'" + (width-1) + "s", "") }); foreach(string domain in domains) { tmp += ({ sprintf("%:-15s %:-11d %:-11d %:-11d %:-11d %d", ! capitalize(domain), stats[domain]["moves"], ! stats[domain]["objects"], stats[domain]["errors"], ! stats[domain]["heart_beats"], ! stats[domain]["array_size"]) }); } who->eventPage(tmp, MSG_SYSTEM); return 1; } ! string GetHelp() { return ("Syntax: \n\n" ! "Prints out domain statistics for the mud's domains.\n\n" ! "See also: realms"); } --- 31,59 ---- stats[domain] = data; } domains = sort_array(keys(stats), function(string a, string b, mapping mp) { ! if( mp[a]["moves"] > mp[b]["moves"] ) { ! return -1; ! } ! else { ! return 1; ! } ! }, stats); tmp = ({ sprintf("%:-15s %:-11s %:-11s %:-11s %:-11s %s", "Domain", ! "Moves", "Objects", "Errors", "Heart Beats", ! "Array Size"), sprintf("%'-'" + (width-1) + "s", "") }); foreach(string domain in domains) { tmp += ({ sprintf("%:-15s %:-11d %:-11d %:-11d %:-11d %d", ! capitalize(domain), stats[domain]["moves"], ! stats[domain]["objects"], stats[domain]["errors"], ! stats[domain]["heart_beats"], ! stats[domain]["array_size"]) }); } who->eventPage(tmp, MSG_SYSTEM); return 1; } ! string GetHelp() { return ("Syntax: \n\n" ! "Prints out domain statistics for the mud's domains.\n\n" ! "See also: realms"); } diff -c -r --new-file ds1.1/lib/cmds/creators/elog.c ds2.0r27/lib/cmds/creators/elog.c *** ds1.1/lib/cmds/creators/elog.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/elog.c Wed Jul 5 00:01:03 2006 *************** *** 9,15 **** inherit LIB_DAEMON; int cmd(string str) { ! if(!str) str = DIR_ERROR_LOGS+"/"+(string)previous_object()->GetKeyName(); else str = DIR_ERROR_LOGS+"/"+str; write(str+":\n"); if(!tail(str)) write("No errors in "+str+".\nTry /log/debug.log.\n"); --- 9,15 ---- inherit LIB_DAEMON; int cmd(string str) { ! if(!str) str = DIR_ERROR_LOGS+"/"+(string)previous_object()->GetKeyName(); else str = DIR_ERROR_LOGS+"/"+str; write(str+":\n"); if(!tail(str)) write("No errors in "+str+".\nTry /log/debug.log.\n"); diff -c -r --new-file ds1.1/lib/cmds/creators/events.c ds2.0r27/lib/cmds/creators/events.c *** ds1.1/lib/cmds/creators/events.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/events.c Wed Jul 5 00:01:03 2006 *************** *** 15,21 **** string *obs; string *st2; string st3; ! int i,j,k; string name; if(!str && archp(previous_object())) { --- 15,21 ---- string *obs; string *st2; string st3; ! int i,j,k,l; string name; if(!str && archp(previous_object())) { *************** *** 23,31 **** i = sizeof(obs = keys(mp)); message("info", "The following events are pending:", this_player()); while(i--) { ! message("info", arrange_string(obs[i], 30) + ! arrange_string(mp[obs[i]]["function"], 15) + ! ctime(mp[obs[i]]["time"])+" Mud Time", this_player()); } return 1; } else if((archp(previous_object()) && str) || creatorp(previous_object())) { --- 23,32 ---- i = sizeof(obs = keys(mp)); message("info", "The following events are pending:", this_player()); while(i--) { ! l=atoi(""+obs[i]); ! message("info", arrange_string(""+l, 30) + ! arrange_string(mp[obs[i]]["function"], 15) + ! local_ctime(l)+" "+query_tz(), this_player()); } return 1; } else if((archp(previous_object()) && str) || creatorp(previous_object())) { *************** *** 38,44 **** i = sizeof(obs = keys(mp)); if (i) { while(i--) ! if((st2 = explode(obs[i], "/"))) if (st2[0] == "realms" && st2[1] == name) { if (j == 0) { if (archp(previous_object())) --- 39,45 ---- i = sizeof(obs = keys(mp)); if (i) { while(i--) ! if((st2 = explode(""+obs[i], "/"))) if (st2[0] == "realms" && st2[1] == name) { if (j == 0) { if (archp(previous_object())) *************** *** 51,57 **** for (k = 2; k < sizeof(st2); k++) st3 += "/" + st2[k]; message("info", arrange_string(st3, 30) + ! arrange_string(mp[obs[i]]["function"], 15) + ctime(mp[obs[i]]["time"])+" Mud Time", this_player()); } } --- 52,58 ---- for (k = 2; k < sizeof(st2); k++) st3 += "/" + st2[k]; message("info", arrange_string(st3, 30) + ! arrange_string(mp[obs[i]]["function"], 15) + ctime(mp[obs[i]]["time"])+" Mud Time", this_player()); } } diff -c -r --new-file ds1.1/lib/cmds/creators/exits.c ds2.0r27/lib/cmds/creators/exits.c *** ds1.1/lib/cmds/creators/exits.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/exits.c Wed Jul 5 00:01:03 2006 *************** *** 15,21 **** object oEnv; if ( !( oEnv = environment( this_player() ) ) ) ! return "You do not have a valid environment."; asExits = oEnv->GetExits(); asEnters = oEnv->GetEnters(); --- 15,21 ---- object oEnv; if ( !( oEnv = environment( this_player() ) ) ) ! return "You do not have a valid environment."; asExits = oEnv->GetExits(); asEnters = oEnv->GetEnters(); *************** *** 24,48 **** this_player() ); if ( !( sizeof( asExits ) ) ) ! message( "my_action", "This room has no exits.", this_player() ); else { ! message( "Nmy_action", "This room has the following exits :\n\n", ! this_player() ); ! foreach( sExit in asExits ) { ! message( "my_action", sprintf( "\t%10s -> %s", sExit, ! oEnv->GetExit( sExit ) ), this_player() ); ! } } if ( !( sizeof( asEnters ) ) ) ! message( "my_action", "\nThis room has no enters.", this_player() ); else { ! message( "Nmy_action", "\nThis room has the following enters :\n\n", ! this_player() ); ! foreach( sExit in asEnters ) { ! message( "my_action", sprintf( "\t%10s -> %s", sExit, ! oEnv->GetEnter( sExit ) ), this_player() ); ! } } return 1; --- 24,48 ---- this_player() ); if ( !( sizeof( asExits ) ) ) ! message( "my_action", "This room has no exits.", this_player() ); else { ! message( "Nmy_action", "This room has the following exits :\n\n", ! this_player() ); ! foreach( sExit in asExits ) { ! message( "my_action", sprintf( "\t%10s -> %s", sExit, ! oEnv->GetExit( sExit ) ), this_player() ); ! } } if ( !( sizeof( asEnters ) ) ) ! message( "my_action", "\nThis room has no enters.", this_player() ); else { ! message( "Nmy_action", "\nThis room has the following enters :\n\n", ! this_player() ); ! foreach( sExit in asEnters ) { ! message( "my_action", sprintf( "\t%10s -> %s", sExit, ! oEnv->GetEnter( sExit ) ), this_player() ); ! } } return 1; diff -c -r --new-file ds1.1/lib/cmds/creators/expel.c ds2.0r27/lib/cmds/creators/expel.c *** ds1.1/lib/cmds/creators/expel.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/expel.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,53 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + object ob, *obs; + + if( !args || args == "" ) return "Expel whom?"; + ob = present(args,environment(this_player())); + if(args != "all" && (!ob || !living(ob))){ + + return "Expel only works for living things in your environment."; + } + if(archp(ob) && !archp(this_player())){ + write("You can't expel an admin."); + tell_player(ob, this_player()->GetName()+" just tried to expel you."); + return 1; + } + + if(args == "all"){ + if(archp(this_player())) { + obs = filter(get_livings(environment(this_player())), (: $1 != this_player() :) ); + } + else { + obs = filter(get_livings(environment(this_player())), + (: $1 != this_player() && !archp($1) :) ); + } + } + + else obs = ({ ob }); + + foreach(object nuisance in obs){ + nuisance->eventWimpy(1); + } + + foreach(object nuisance in obs){ + if(environment(nuisance) == environment(this_player())){ + if(creatorp(nuisance)) { + nuisance->eventMoveLiving(homedir(nuisance)+"/workroom"); + } + else nuisance->eventMoveLiving(ROOM_START); + } + } + + return 1; + } + + void help() { + message("help", "Syntax: expel \n\n" + "Forces the specified living thing to leave your environment.\n\n" + "See also: return, goto, move, trans", this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/findobj.c ds2.0r27/lib/cmds/creators/findobj.c *** ds1.1/lib/cmds/creators/findobj.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/findobj.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,46 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + string tmpfile; + string ret = ""; + object *obs; + + if(args) args = replace_string(args,"\"",""); + + if(!args) obs = ({ this_player() }); + + else obs = findobs(args); + + if(!sizeof(obs)) { + write("No such objects found."); + return 1; + } + + write(sizeof(obs)+" matches found. They are:\n\n"); + + foreach(object ob in obs){ + string name; + string str = "%^BOLD%^BLUE%^Object: "+identify(ob)+", "; + if(args != "door" && name = ob->GetName()) str += "%^BOLD%^GREEN%^name: "+name+", "; + str += "%^BOLD%^WHITE%^"; + if(environment(ob)) str += "environment: "+identify(environment(ob))+".\n"; + else str += "environment: None.\n"; + str += "%^RESET%^\n"; + ret += str; + } + + tmpfile = generate_tmp(); + write_file(tmpfile,ret); + this_player()->eventPage(tmpfile); + rm(tmpfile); + return 1; + } + + string GetHelp() { + return ("Syntax: findobj STRING\n\n" + "Displays matching objects that are loaded into memory.\n\n" + "examples: \n\nfindobj staff\nfindobj /lib/dummy"); + } diff -c -r --new-file ds1.1/lib/cmds/creators/force.c ds2.0r27/lib/cmds/creators/force.c *** ds1.1/lib/cmds/creators/force.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/force.c Wed Dec 31 19:00:00 1969 *************** *** 1,65 **** - /* /cmds/creators/force.c - * From the Dead Souls V Object Library - * Created by Descartes of Borg 961018 - * Version: %A% - * Last modified: %D% - */ - - #include - - inherit LIB_DAEMON; - - mixed cmd(string args) { - object who = previous_object(); - object target; - string name, cmd; - - if( sscanf(args, "%s to %s", name, cmd) != 1 ) { - int i = strsrch(args, " "); - - name = ""; - while( i != -1 ) { - name += args[0..(i-1)]; - if( strlen(args) < i-1 ) { - args = args[(i+1)..]; - } - else { - args = ""; - } - if( target = find_living(lower_case(name)) ) { - break; - } - if( target = find_living(convert_string(name)) ) { - break; - } - } - if( !target ) { - who->eventPrint("Cannot find any living thing called: " + name); - return 1; - } - cmd = args; - } - else { - target = find_living(lower_case(name)); - if( !target ) { - target = find_living(convert_string(name)); - } - if( !target ) { - who->eventPrint("Cannot find any living thing called: " + name); - return 1; - } - } - target->eventPrint(who->GetName() + " forces you to: " + cmd); - who->eventPrint("You force " + target->GetShort() + " to: " + cmd); - target->eventForce(cmd); - return 1; - } - - string GetErorMessage() { - "Force whom to do what?"; - } - - string GetHelp() { - return ("Syntax: \n\n" - "Allows you to force a living object to take a certain action."); - } --- 0 ---- diff -c -r --new-file ds1.1/lib/cmds/creators/format.c ds2.0r27/lib/cmds/creators/format.c *** ds1.1/lib/cmds/creators/format.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/format.c Wed Jul 5 00:01:03 2006 *************** *** 9,49 **** int cmd(string str) { ! write("This is a fake wiz command. Try \"help format\" to get" + ! " information on\nspecifying objects for certain wiz commands.\n"); ! return 1; } int help() { ! write("NOTE: This is not a command in itself.\n" + ! "Certain wizard commands require that you specify\n" + ! "objects in a certain format.\n" + ! "The format uses prefixes to specify types of\n" + ! "objects as follows:\n" + ! " !ob ob is NOT an NPC or player\n" + ! " %ob ob is a player\n" + ! " $ob ob is an NPC\n" + ! " #int int is an ordinal value, e.g. 0, 1 , 2...\n" + ! " /str str is a filename of an object\n" + ! "Objects can also be \"me\", which is your player\n" + ! " object, or \"here\", which is you environment.\n"); ! write("Objects denoted by prefixes are joined by a few\n" + ! "functional symbols:\n" + ! " object@environment denotes the object at an\n" + ! " environment. Environment can be either an\n" + ! " object or an object@environment.\n" + ! " e(object) denotes the environment of object.\n\n"); ! write("For example:\n" + ! " !sword@%descartes is the sword in Descartes'\n" + ! " inventory.\n" + ! " #2@!bag@$orc@here is the 3rd item in the bag\n" + ! " that the orc in front of you is holding.\n" + ! " NOTE: #0 is the first object.\n" + ! " $orc@/d/standard/square is the orc that\n" + ! " shouldn't be in the square.\n" + ! "See also: patch\n"+ ! "See man: to_object, get_object, get_objects\n"+ ! ""); ! return 1; } --- 9,49 ---- int cmd(string str) { ! write("This is a fake wiz command. Try \"help format\" to get" + ! " information on\nspecifying objects for certain wiz commands.\n"); ! return 1; } int help() { ! write("NOTE: This is not a command in itself.\n" + ! "Certain wizard commands require that you specify\n" + ! "objects in a certain format.\n" + ! "The format uses prefixes to specify types of\n" + ! "objects as follows:\n" + ! " !ob ob is NOT an NPC or player\n" + ! " %ob ob is a player\n" + ! " $ob ob is an NPC\n" + ! " #int int is an ordinal value, e.g. 0, 1 , 2...\n" + ! " /str str is a filename of an object\n" + ! "Objects can also be \"me\", which is your player\n" + ! " object, or \"here\", which is you environment.\n"); ! write("Objects denoted by prefixes are joined by a few\n" + ! "functional symbols:\n" + ! " object@environment denotes the object at an\n" + ! " environment. Environment can be either an\n" + ! " object or an object@environment.\n" + ! " e(object) denotes the environment of object.\n\n"); ! write("For example:\n" + ! " !sword@%descartes is the sword in Descartes'\n" + ! " inventory.\n" + ! " #2@!bag@$orc@here is the 3rd item in the bag\n" + ! " that the orc in front of you is holding.\n" + ! " NOTE: #0 is the first object.\n" + ! " $orc@/d/standard/square is the orc that\n" + ! " shouldn't be in the square.\n" + ! "See also: patch\n"+ ! "See man: to_object, get_object, get_objects\n"+ ! ""); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/creators/goto.c ds2.0r27/lib/cmds/creators/goto.c *** ds1.1/lib/cmds/creators/goto.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/goto.c Wed Jul 5 00:01:03 2006 *************** *** 8,32 **** #include inherit LIB_DAEMON; ! mixed cmd(string str) { object ob; if(!str) return "Goto where?"; if((ob = find_living(lower_case(str))) && (!ob->GetInvis() || !archp(ob)) && ob=environment(ob)) { ! if(ob == environment(this_player())) { ! message("my_action", "You twitch.", this_player()); ! if(hiddenp(this_player())) return 1; ! message("other_action", (string)this_player()->GetName()+ ! " twitches.", ob, ({ this_player() })); ! return 1; ! } } if(ob && ob->GetInvis() && creatorp(ob) && !archp(this_player())) ob = 0; if(!ob) str = absolute_path((string)this_player()->query_cwd(), str); ! if(ob) this_player()->eventMoveLiving(ob, ""); ! else this_player()->eventMoveLiving(str, ""); return 1; } --- 8,40 ---- #include inherit LIB_DAEMON; ! mixed cmd(string str) { object ob; if(!str) return "Goto where?"; if((ob = find_living(lower_case(str))) && (!ob->GetInvis() || !archp(ob)) && ob=environment(ob)) { ! if(ob == environment(this_player())) { ! message("my_action", "You twitch.", this_player()); ! if(hiddenp(this_player())) return 1; ! message("other_action", (string)this_player()->GetName()+ ! " twitches.", ob, ({ this_player() })); ! return 1; ! } } if(ob && ob->GetInvis() && creatorp(ob) && !archp(this_player())) ob = 0; if(!ob) str = absolute_path((string)this_player()->query_cwd(), str); ! if(ob) { ! this_player()->eventMoveLiving(ob, ""); ! return 1; ! } ! if(!file_exists(str)) str += ".c"; ! if(!file_exists(str)) { ! write("Location not found."); ! return 1; ! } ! else this_player()->eventMoveLiving(str, ""); return 1; } *************** *** 35,41 **** "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans.", this_player() ); } --- 43,49 ---- "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans, expel.", this_player() ); } diff -c -r --new-file ds1.1/lib/cmds/creators/home.c ds2.0r27/lib/cmds/creators/home.c *** ds1.1/lib/cmds/creators/home.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/home.c Wed Jul 5 00:01:03 2006 *************** *** 19,76 **** else who = lower_case(str); str = user_path(who); if( ob = (object)this_player()->query_property("workroom") ) { ! if(ob == prev) return "You twitch."; ! if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) ! return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin", (string)this_player()->GetMessage("telin"), ob, ! ({ this_player() })); ! return 1; ! } } if( !ob ) { ! if( !(ob = load_object(str+"workroom")) && ! str == user_path((string)this_player()->GetKeyName())) { ! ob = new(DIR_OBJ + "workroom"); ! this_player()->set_property("workroom", ob); ! } ! else if( !(ob = load_object(str+"workroom")) ) { ! if(!(ob = find_player(who)) || !(ob=(object)ob->query_property("workroom"))) ! return capitalize(who)+" has no active workroom."; ! } ! else { ! if( file_name(prev) == str+"workroom" ) ! return "You twitch."; ! if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) ! return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin", (string)this_player()->GetMessage("telin"), ! environment(this_player()), ({ this_player() })); ! return 1; ! } ! return "You stay where you are."; ! } } if(ob == prev) return "You twitch."; if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin",(string)this_player()->GetMessage("telin"),ob,({this_player()})); ! return 1; } return "You stay where you are."; } void help() { message("help", "Syntax: \n \n\n" ! "Without arguments, this command will take you to your workroom. " ! "With arguments, it takes you to the workroom of the person " ! "you specify.\n\n" ! "See also: goto, trans", this_player()); } --- 19,76 ---- else who = lower_case(str); str = user_path(who); if( ob = (object)this_player()->query_property("workroom") ) { ! if(ob == prev) return "You twitch."; ! if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) ! return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin", (string)this_player()->GetMessage("telin"), ob, ! ({ this_player() })); ! return 1; ! } } if( !ob ) { ! if( !(ob = load_object(str+"workroom")) && ! str == user_path((string)this_player()->GetKeyName())) { ! ob = new(DIR_OBJ + "workroom"); ! this_player()->set_property("workroom", ob); ! } ! else if( !(ob = load_object(str+"workroom")) ) { ! if(!(ob = find_player(who)) || !(ob=(object)ob->query_property("workroom"))) ! return capitalize(who)+" has no active workroom."; ! } ! else { ! if( file_name(prev) == str+"workroom" ) ! return "You twitch."; ! if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) ! return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin", (string)this_player()->GetMessage("telin"), ! environment(this_player()), ({ this_player() })); ! return 1; ! } ! return "You stay where you are."; ! } } if(ob == prev) return "You twitch."; if( (int)this_player()->eventMove(ob) ) { ! this_player()->eventDescribeEnvironment(0); ! if(hiddenp(this_player()) || this_player()->GetInvis()) return 1; ! message("mmout", (string)this_player()->GetMessage("home"), prev); ! message("mmin",(string)this_player()->GetMessage("telin"),ob,({this_player()})); ! return 1; } return "You stay where you are."; } void help() { message("help", "Syntax: \n \n\n" ! "Without arguments, this command will take you to your workroom. " ! "With arguments, it takes you to the workroom of the person " ! "you specify.\n\n" ! "See also: goto, trans", this_player()); } diff -c -r --new-file ds1.1/lib/cmds/creators/i3who.c ds2.0r27/lib/cmds/creators/i3who.c *** ds1.1/lib/cmds/creators/i3who.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/i3who.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,18 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + foreach(string mud in INTERMUD_D->GetMuds()){ + SERVICES_D->eventSendWhoRequest(mud); + } + return 1; + } + + + void help() { + message("help", "Syntax: i3who\n\n" + "Queries each active mud for rwho information.\n\n", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/invis.c ds2.0r27/lib/cmds/creators/invis.c *** ds1.1/lib/cmds/creators/invis.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/invis.c Wed Jul 5 00:01:03 2006 *************** *** 8,20 **** varargs int cmd(string str) { ! if((int)this_player()->GetInvis()) { notify_fail("You are already invisible.\n"); return 0; } this_player()->SetInvis(1); message("my_action", "You fade into the shadows.", this_player()); ! return 1; } void help() --- 8,20 ---- varargs int cmd(string str) { ! if((int)this_player()->GetInvis()) { notify_fail("You are already invisible.\n"); return 0; } this_player()->SetInvis(1); message("my_action", "You fade into the shadows.", this_player()); ! return 1; } void help() diff -c -r --new-file ds1.1/lib/cmds/creators/last.c ds2.0r27/lib/cmds/creators/last.c *** ds1.1/lib/cmds/creators/last.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/last.c Wed Jul 5 00:01:03 2006 *************** *** 43,49 **** string GetHelp(string topic) { return ("Syntax: \n" ! " \n\n" ! "Gives you a list of the last bunch of people to login or logout " ! "from the enter log."); } --- 43,49 ---- string GetHelp(string topic) { return ("Syntax: \n" ! " \n\n" ! "Gives you a list of the last bunch of people to login or logout " ! "from the enter log."); } diff -c -r --new-file ds1.1/lib/cmds/creators/lightme.c ds2.0r27/lib/cmds/creators/lightme.c *** ds1.1/lib/cmds/creators/lightme.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/lightme.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,26 ---- + #include + + inherit LIB_COMMAND; + + int cmd(string str){ + int level; + if(!str){ + write("Your current radiant light is: "+this_player()->GetRadiantLight()+"."); + return 1; + } + if(sscanf(str,"%d",level) != 1){ + write("Please specify a numerical light level."); + return 1; + } + if(level < 0 || level > 100){ + write("Please enter a light level between 0 and 100"); + return 1; + } + this_player()->SetRadiantLight(level); + write("Your current radiant light is: "+this_player()->GetRadiantLight()+"."); + return 1; + } + + string GetHelp(string str){ + return "Reports or changes the amount of light your body radiates."; + } diff -c -r --new-file ds1.1/lib/cmds/creators/malloc.c ds2.0r27/lib/cmds/creators/malloc.c *** ds1.1/lib/cmds/creators/malloc.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/malloc.c Wed Jul 5 00:01:03 2006 *************** *** 5,23 **** int cmd(string arg) { ! malloc_status(); ! return 1; } int help() { ! write( @EndText Syntax: malloc Effect: Lists memory usage statistics Output will depend on memory management package specified in options.h when the driver is compiled. See man: malloc_status EndText ! ); ! return 1; } --- 5,23 ---- int cmd(string arg) { ! malloc_status(); ! return 1; } int help() { ! write( @EndText Syntax: malloc Effect: Lists memory usage statistics Output will depend on memory management package specified in options.h when the driver is compiled. See man: malloc_status EndText ! ); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/creators/man.c ds2.0r27/lib/cmds/creators/man.c *** ds1.1/lib/cmds/creators/man.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/man.c Wed Jul 5 00:01:03 2006 *************** *** 8,14 **** inherit LIB_DAEMON; ! #define MAN_PAGES ({ "sefun", "efun", "applies", "lfun" }) int cmd(string str) { string d, tmp; --- 8,14 ---- inherit LIB_DAEMON; ! #define MAN_PAGES ({ "sefun", "efun/all", "applies", "lfun" }) int cmd(string str) { string d, tmp; *************** *** 19,30 **** i = sizeof(MAN_PAGES); pages = ({}); while(i--) ! if(file_exists(tmp = sprintf("%s/%s/%s", DIR_DOCS, MAN_PAGES[i], ! str))) pages += ({ tmp }); if(!(i = sizeof(pages))) return notify_fail("No such man page.\n"); else if(i > 1) ! message("system", "Showing only the first of "+i+" man pages.", ! this_player()); this_player()->eventPage(pages[0]); return 1; ! } --- 19,30 ---- i = sizeof(MAN_PAGES); pages = ({}); while(i--) ! if(file_exists(tmp = sprintf("%s/%s/%s", DIR_DOCS, MAN_PAGES[i], ! str))) pages += ({ tmp }); if(!(i = sizeof(pages))) return notify_fail("No such man page.\n"); else if(i > 1) ! message("system", "Showing only the first of "+i+" man pages.", ! this_player()); this_player()->eventPage(pages[0]); return 1; ! } diff -c -r --new-file ds1.1/lib/cmds/creators/margins.c ds2.0r27/lib/cmds/creators/margins.c *** ds1.1/lib/cmds/creators/margins.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/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 ds1.1/lib/cmds/creators/message.c ds2.0r27/lib/cmds/creators/message.c *** ds1.1/lib/cmds/creators/message.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/message.c Wed Jul 5 00:01:03 2006 *************** *** 12,43 **** string type, msg; if( !args || args == "" ) { ! mapping msgs; ! string *cles; ! int i; ! string tmp = ""; ! ! i = sizeof(cles = keys(msgs = (mapping)this_player()->GetMessages())); ! while(i--) tmp += sprintf("%:-10s %s\n", cles[i], msgs[cles[i]]); ! message("system", tmp, this_player()); ! return 1; } if( sscanf(args, "%s %s", type, msg) != 2) return "Set it to what?"; if( !((int)this_player()->SetMessage(type, msg)) ) ! return "Invalid message type."; message("system", "Message " + type + " changed to:\n" + msg, ! this_player()); return 1; } void help() { message("help", "Syntax: \n\n" ! "Allows you to modify standard " + mud_name() + " messages. " ! "The message types are come, leave, telin, telout, home, " ! "clone, dest, login, logout, say, ask, exclaim. Not that " ! "with say, ask, and exclaim you only may enter in the verbs. " ! "Depending on the message class, you may place such placeholders " ! "as:\n$M\t" + mud_name() + "\n$N\tYour name\n$D\tdirection\n" ! "$O\tobject", ! this_player()); } --- 12,43 ---- string type, msg; if( !args || args == "" ) { ! mapping msgs; ! string *cles; ! int i; ! string tmp = ""; ! ! i = sizeof(cles = keys(msgs = (mapping)this_player()->GetMessages())); ! while(i--) tmp += sprintf("%:-10s %s\n", cles[i], msgs[cles[i]]); ! message("system", tmp, this_player()); ! return 1; } if( sscanf(args, "%s %s", type, msg) != 2) return "Set it to what?"; if( !((int)this_player()->SetMessage(type, msg)) ) ! return "Invalid message type."; message("system", "Message " + type + " changed to:\n" + msg, ! this_player()); return 1; } void help() { message("help", "Syntax: \n\n" ! "Allows you to modify standard " + mud_name() + " messages. " ! "The message types are come, leave, telin, telout, home, " ! "clone, dest, login, logout, say, ask, exclaim. Not that " ! "with say, ask, and exclaim you only may enter in the verbs. " ! "Depending on the message class, you may place such placeholders " ! "as:\n$M\t" + mud_name() + "\n$N\tYour name\n$D\tdirection\n" ! "$O\tobject", ! this_player()); } diff -c -r --new-file ds1.1/lib/cmds/creators/move.c ds2.0r27/lib/cmds/creators/move.c *** ds1.1/lib/cmds/creators/move.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/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"); - } --- 0 ---- diff -c -r --new-file ds1.1/lib/cmds/creators/mraces.c ds2.0r27/lib/cmds/creators/mraces.c *** ds1.1/lib/cmds/creators/mraces.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/mraces.c Wed Jul 5 00:01:03 2006 *************** *** 2,31 **** * A tool for cres which displays a listing of all preset npc races * Blitz@NM-IVD */ ! #include ! #include ! mixed cmd(string str) { ! string *types; ! if( str ) types = regexp(PresetNpcTypes, "^"+str); ! else types = PresetNpcTypes; ! if( !sizeof(types) ) { ! if( !str ) return "No list at this time."; ! return "No match was found for \""+str+"\"."; ! } ! types = sort_array(types, 1); ! message("help", format_page(types, 5), this_player() ); ! return 1; } ! void help() { ! message("info", ! "Syntax: mraces\n" ! " mraces \n\n" ! "A simple tool for creators which will list available 'preset' npc " ! "races. Entering \"mraces\" along will list all races. Entering " ! "\"mraces a\" will list all races that begin with 'a', etc.", ! this_player() ); } ! --- 2,28 ---- * A tool for cres which displays a listing of all preset npc races * Blitz@NM-IVD */ ! #include ! #include ! mixed cmd(string str) { ! string *types; ! ! types = load_object(RACES_D)->GetRaces(); ! if( !sizeof(types) ) { ! return "No list at this time."; ! } ! types = sort_array(types, 1); ! message("help", format_page(types, 5), this_player() ); ! return 1; } ! void help() { ! message("info", ! "Syntax: mraces\n" ! " mraces \n\n" ! "A simple tool for creators which will list available npc races.", ! this_player() ); } ! diff -c -r --new-file ds1.1/lib/cmds/creators/mstatus.c ds2.0r27/lib/cmds/creators/mstatus.c *** ds1.1/lib/cmds/creators/mstatus.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/mstatus.c Wed Jul 5 00:01:03 2006 *************** *** 9,15 **** } string GetHelp(string str) { ! return (@EndText Syntax: mstatus [] Effect: Give you statistics on the driver and mudlib If the optional argument is given, you also get: --- 9,15 ---- } string GetHelp(string str) { ! return (@EndText Syntax: mstatus [] Effect: Give you statistics on the driver and mudlib If the optional argument is given, you also get: diff -c -r --new-file ds1.1/lib/cmds/creators/netstat.c ds2.0r27/lib/cmds/creators/netstat.c *** ds1.1/lib/cmds/creators/netstat.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/netstat.c Wed Jul 5 00:01:03 2006 *************** *** 18,24 **** void help() { message("help", "Syntax: \n\n" ! "Gives you information about sockets being used by the LPC " ! "server through the MudOS socket efuns.\n\n" ! "See also: callouts, dumpallobj, mstatus", this_player()); } --- 18,24 ---- void help() { message("help", "Syntax: \n\n" ! "Gives you information about sockets being used by the LPC " ! "server through the MudOS socket efuns.\n\n" ! "See also: callouts, dumpallobj, mstatus", this_player()); } diff -c -r --new-file ds1.1/lib/cmds/creators/notices.c ds2.0r27/lib/cmds/creators/notices.c *** ds1.1/lib/cmds/creators/notices.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/notices.c Wed Jul 5 00:01:03 2006 *************** *** 2,15 **** * from the Dead Souls V Mud Library * created by Blitz@Dead Souls 950115 */ ! #include #include ! #define OneDay (3600 * 24) ! string GetHelp(string foo); ! mixed cmd(string str) { string * words; object ob = this_player(); --- 2,15 ---- * from the Dead Souls V Mud Library * created by Blitz@Dead Souls 950115 */ ! #include #include ! #define OneDay (3600 * 24) ! string GetHelp(string foo); ! mixed cmd(string str) { string * words; object ob = this_player(); *************** *** 17,65 **** if( !sizeof(str) ) x = 1; else x = to_int(str); if( x < 1 ) { ! if( !archp(this_player()) ) return GetHelp(0); ! words = explode(str, " "); ! if( words[0] == "-d" ) { ! if( sizeof(words) < 2 ) return GetHelp(0); ! x = to_int(words[1]); ! if( x < 1 && words[1] != "0" ) ! return "Bad value ("+words[1]+")."; ! if( NOTIFY_D->eventRemoveNotice(x) ) ! ob->eventPrint("Notice number " + x + " has been erased."); ! else ob->eventPrint("Could not remove number " + x + "."); ! return 1; ! } ! else if( words[0] == "-p" && sizeof(words) > 1 ) { ! string file = words[1]; ! if( sizeof(words) > 2 ) x = to_int(words[2]); ! else x = 1; ! if( x < 1 ) return GetHelp(0); ! if( NOTIFY_D->eventWriteNotices(file, time() - (OneDay*x)) ) ! ob->eventPrint("Notices dumped to " + file + "."); ! else ob->eventPrint("No notices found, nothing done."); ! return 1; ! } ! else return GetHelp(0); } x = time() - (OneDay * x); if( !(int)NOTIFY_D->eventPrintNotices(this_player(), x) ) ! return "No recent notices found."; ! else return 1; } ! string GetHelp(string foo) { string str; str = "Syntax: notices\n" ! " notices \n\n" ! "Without arguments, this command displays all notices " ! "posted within the last 24 hours. You may also " ! "specify how many days back to search. For example, " ! "\"notices 7\" will display all notices posted within " ! "the last week.\n\n"; if( archp(this_player()) ) ! str += "Arch Commands: notices -d \n" ! " notices -p \n\n" ! "The d option deletes the specified notice id number.\n" ! "the p option will dump the output into \n"; return str; } --- 17,65 ---- if( !sizeof(str) ) x = 1; else x = to_int(str); if( x < 1 ) { ! if( !archp(this_player()) ) return GetHelp(0); ! words = explode(str, " "); ! if( words[0] == "-d" ) { ! if( sizeof(words) < 2 ) return GetHelp(0); ! x = to_int(words[1]); ! if( x < 1 && words[1] != "0" ) ! return "Bad value ("+words[1]+")."; ! if( NOTIFY_D->eventRemoveNotice(x) ) ! ob->eventPrint("Notice number " + x + " has been erased."); ! else ob->eventPrint("Could not remove number " + x + "."); ! return 1; ! } ! else if( words[0] == "-p" && sizeof(words) > 1 ) { ! string file = words[1]; ! if( sizeof(words) > 2 ) x = to_int(words[2]); ! else x = 1; ! if( x < 1 ) return GetHelp(0); ! if( NOTIFY_D->eventWriteNotices(file, time() - (OneDay*x)) ) ! ob->eventPrint("Notices dumped to " + file + "."); ! else ob->eventPrint("No notices found, nothing done."); ! return 1; ! } ! else return GetHelp(0); } x = time() - (OneDay * x); if( !(int)NOTIFY_D->eventPrintNotices(this_player(), x) ) ! return "No recent notices found."; ! else return 1; } ! string GetHelp(string foo) { string str; str = "Syntax: notices\n" ! " notices \n\n" ! "Without arguments, this command displays all notices " ! "posted within the last 24 hours. You may also " ! "specify how many days back to search. For example, " ! "\"notices 7\" will display all notices posted within " ! "the last week.\n\n"; if( archp(this_player()) ) ! str += "Arch Commands: notices -d \n" ! " notices -p \n\n" ! "The d option deletes the specified notice id number.\n" ! "the p option will dump the output into \n"; return str; } diff -c -r --new-file ds1.1/lib/cmds/creators/people.c ds2.0r27/lib/cmds/creators/people.c *** ds1.1/lib/cmds/creators/people.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/people.c Wed Jul 5 00:01:03 2006 *************** *** 15,24 **** static private string query_time(); private string calculateFormatString(int screenSize); int cmd(string str) { - object *who, *display; - string *args; string msg, tmp1, tmp2; int i, maxi, aflag, bflag, cflag, eflag, gflag, hflag, lflag, mflag; int nflag, pflag, rflag, sflag, uflag; --- 15,24 ---- static private string query_time(); private string calculateFormatString(int screenSize); + object *whom, *who, *display; + string *args; int cmd(string str) { string msg, tmp1, tmp2; int i, maxi, aflag, bflag, cflag, eflag, gflag, hflag, lflag, mflag; int nflag, pflag, rflag, sflag, uflag; *************** *** 26,70 **** string formatString; string bar; if(!str || str == "" || strlen(str) == 1 || str[0] != '-') args = ({}); else args = explode(str[1..strlen(str)-1], ""); i = sizeof(args); while(i--) { ! switch(args[i]) { ! case "a": aflag = 1; break; /* list arches */ ! case "b": bflag = 1; break; /* list ambassadors */ ! case "c": cflag = 1; break; /* list creators */ ! case "e": eflag = 1; break; /* sort by race */ ! case "g": gflag = 1; break; /* sort by age */ ! case "h": hflag = 1; break; /* list high mortals */ ! case "l": lflag = 1; break; /* sort by level */ ! case "m": mflag = 1; break; /* page through eventPage */ ! case "n": nflag = 1; break; /* list newbies */ ! case "p": pflag = 1; break; /* list regular mortals */ ! case "r": rflag = 1; break; /* sort by realm location */ ! case "s": sflag = 1; break; /* sort by class */ ! case "u": uflag = 1; break; /* list undead */ ! } } who = filter(users(), "filter_invis", this_object()); if(!aflag && !bflag && !cflag && !hflag && !nflag && !pflag && !uflag) ! display = who; else { ! display = ({}); ! if(aflag) display += filter(who, "filter_arches", this_object()); ! if(bflag) display += filter(who, "filter_ambass", this_object()); ! if(cflag) display += filter(who, "filter_cres", this_object()); ! if(hflag) display += filter(who, "filter_hms", this_object()); ! if(nflag) display += filter(who, "filter_newbie", this_object()); ! if(pflag) display += filter(who, "filter_mortal", this_object()); ! if(uflag) display += filter(who, "filter_undead", this_object()); ! display = distinct_array(display); } if(!eflag && !gflag && !lflag && !rflag && !sflag) ! maxi = sizeof(display=sort_array(display,"general_sort",this_object())); else { ! __SortFlags = ({ eflag, gflag, lflag, rflag, sflag }); ! maxi = sizeof(display = sort_array(display,"special_sort",this_object())); } screenSize = ((int*)this_player()->GetScreen())[0]; formatString = calculateFormatString(screenSize); --- 26,78 ---- string formatString; string bar; + whom = ({}); + if(!str || str == "" || strlen(str) == 1 || str[0] != '-') args = ({}); else args = explode(str[1..strlen(str)-1], ""); i = sizeof(args); while(i--) { ! switch(args[i]) { ! case "a": aflag = 1; break; /* list arches */ ! case "b": bflag = 1; break; /* list ambassadors */ ! case "c": cflag = 1; break; /* list creators */ ! case "e": eflag = 1; break; /* sort by race */ ! case "g": gflag = 1; break; /* sort by age */ ! case "h": hflag = 1; break; /* list high mortals */ ! case "l": lflag = 1; break; /* sort by level */ ! case "m": mflag = 1; break; /* page through eventPage */ ! case "n": nflag = 1; break; /* list newbies */ ! case "p": pflag = 1; break; /* list regular mortals */ ! case "r": rflag = 1; break; /* sort by realm location */ ! case "s": sflag = 1; break; /* sort by class */ ! case "u": uflag = 1; break; /* list undead */ ! } } who = filter(users(), "filter_invis", this_object()); + foreach(object real_person in who){ + if(sizeof(base_name(real_person))) whom += ({ real_person }); + } + + who = whom; + if(!aflag && !bflag && !cflag && !hflag && !nflag && !pflag && !uflag) ! display = who; else { ! display = ({}); ! if(aflag) display += filter(who, "filter_arches", this_object()); ! if(bflag) display += filter(who, "filter_ambass", this_object()); ! if(cflag) display += filter(who, "filter_cres", this_object()); ! if(hflag) display += filter(who, "filter_hms", this_object()); ! if(nflag) display += filter(who, "filter_newbie", this_object()); ! if(pflag) display += filter(who, "filter_mortal", this_object()); ! if(uflag) display += filter(who, "filter_undead", this_object()); ! display = distinct_array(display); } if(!eflag && !gflag && !lflag && !rflag && !sflag) ! maxi = sizeof(display=sort_array(display,"general_sort",this_object())); else { ! __SortFlags = ({ eflag, gflag, lflag, rflag, sflag }); ! maxi = sizeof(display = sort_array(display,"special_sort",this_object())); } screenSize = ((int*)this_player()->GetScreen())[0]; formatString = calculateFormatString(screenSize); *************** *** 89,94 **** --- 97,103 ---- } static int filter_invis(object ob) { + if(!ob || !sizeof(base_name(ob))) return 0; if(!((int)ob->GetKeyName())) return 0; if(!((int)ob->GetInvis(this_player()))) return 1; if(archp(this_player())) return 1; *************** *** 106,112 **** static int filter_newbie(object ob) { return (!creatorp(ob) && !ambassadorp(ob) && (MAX_NEWBIE_LEVEL >= ! (int)ob->GetLevel())); } static int filter_mortal(object ob) { --- 115,121 ---- static int filter_newbie(object ob) { return (!creatorp(ob) && !ambassadorp(ob) && (MAX_NEWBIE_LEVEL >= ! (int)ob->GetLevel())); } static int filter_mortal(object ob) { *************** *** 121,148 **** int x, y; if(archp(alpha)) { ! if(!archp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(archp(beta)) return 1; if(creatorp(alpha)) { ! if(!creatorp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(creatorp(beta)) return 1; if(ambassadorp(alpha)) { ! if(!ambassadorp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(ambassadorp(beta)) return 1; if((x = (int)alpha->GetLevel()) > (y = (int)beta->GetLevel())) ! return -1; else if(x < y) return 1; else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } static int special_sort(object alpha, object beta) { --- 130,157 ---- int x, y; if(archp(alpha)) { ! if(!archp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(archp(beta)) return 1; if(creatorp(alpha)) { ! if(!creatorp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(creatorp(beta)) return 1; if(ambassadorp(alpha)) { ! if(!ambassadorp(beta)) return -1; ! else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } else if(ambassadorp(beta)) return 1; if((x = (int)alpha->GetLevel()) > (y = (int)beta->GetLevel())) ! return -1; else if(x < y) return 1; else return strcmp((string)alpha->GetCapName(), ! (string)beta->GetCapName()); } static int special_sort(object alpha, object beta) { *************** *** 150,197 **** int x, y; if(__SortFlags[4]) { ! if((a=(string)alpha->query_class())!=(b=(string)beta->query_class())) { ! if(!a) a = "zzzz"; ! if(!b) b= "zzzz"; ! return strcmp(a, b); ! } } if(__SortFlags[0]) { ! if((a=(string)alpha->query_race()) != (b=(string)beta->query_race())) { ! if(!a) a = "zzzz"; ! if(!b) b = "zzzz"; ! return strcmp(a, b); ! } } if(__SortFlags[3]) { ! if((a = file_name(environment(alpha))) != ! (b = file_name(environment(beta)))) return strcmp(a, b); } if(__SortFlags[2]) { ! if((x = (int)alpha->GetLevel()) != (y=(int)beta->GetLevel())) { ! if(x > y) return -1; ! else return 1; ! } } if(__SortFlags[1]) { ! if((x = (int)alpha->GetAge()) != (y = (int)beta->GetAge())) { ! if(x > y) return -1; ! else return 1; ! } } return 0; } private string calculateFormatString(int screenSize) { ! int nomSize = (((screenSize - 21) * 12) / 54); ! int ipSize = (((screenSize - 21) * 18) / 54); ! int envSize = (((screenSize - 21) * 24) / 54); ! ! if(nomSize < 12) nomSize = 12; ! if(ipSize < 18) ipSize = 18; ! if(envSize < 24) envSize = 24; ! ! return "%:-5s %:-2s %:-" + nomSize + "s %:-" + ipSize + "s %:-5s %:-3s %:-" + envSize + "s"; } --- 159,206 ---- int x, y; if(__SortFlags[4]) { ! if((a=(string)alpha->query_class())!=(b=(string)beta->query_class())) { ! if(!a) a = "zzzz"; ! if(!b) b= "zzzz"; ! return strcmp(a, b); ! } } if(__SortFlags[0]) { ! if((a=(string)alpha->query_race()) != (b=(string)beta->query_race())) { ! if(!a) a = "zzzz"; ! if(!b) b = "zzzz"; ! return strcmp(a, b); ! } } if(__SortFlags[3]) { ! if((a = file_name(environment(alpha))) != ! (b = file_name(environment(beta)))) return strcmp(a, b); } if(__SortFlags[2]) { ! if((x = (int)alpha->GetLevel()) != (y=(int)beta->GetLevel())) { ! if(x > y) return -1; ! else return 1; ! } } if(__SortFlags[1]) { ! if((x = (int)alpha->GetAge()) != (y = (int)beta->GetAge())) { ! if(x > y) return -1; ! else return 1; ! } } return 0; } private string calculateFormatString(int screenSize) { ! int nomSize = (((screenSize - 21) * 12) / 54); ! int ipSize = (((screenSize - 21) * 18) / 54); ! int envSize = (((screenSize - 21) * 24) / 54); ! ! if(nomSize < 12) nomSize = 12; ! if(ipSize < 18) ipSize = 18; ! if(envSize < 24) envSize = 24; ! ! return "%:-5s %:-2s %:-" + nomSize + "s %:-" + ipSize + "s %:-5s %:-3s %:-" + envSize + "s"; } *************** *** 207,219 **** if((int)ob->GetInvis()) nom = "("+nom+")"; if(in_edit(ob) || in_input(ob)) nom = "["+nom+"]"; if(creatorp(ob)) { ! if((int)ob->GetBlocked("all")) blk = "ACG"; ! else { ! if((int)ob->GetBlocked("cre")) blk = " C"; ! else blk = " "; ! if((int)ob->GetBlocked("gossip")) blk += "G"; ! else blk += " "; ! } } else blk = " "; if(!(x = (int)ob->GetLevel())) lev = "-"; --- 216,228 ---- if((int)ob->GetInvis()) nom = "("+nom+")"; if(in_edit(ob) || in_input(ob)) nom = "["+nom+"]"; if(creatorp(ob)) { ! if((int)ob->GetBlocked("all")) blk = "ACG"; ! else { ! if((int)ob->GetBlocked("cre")) blk = " C"; ! else blk = " "; ! if((int)ob->GetBlocked("gossip")) blk += "G"; ! else blk += " "; ! } } else blk = " "; if(!(x = (int)ob->GetLevel())) lev = "-"; *************** *** 225,245 **** if(!environment(ob)) env = "no environment"; else env = file_name(environment(ob)); if(!strsrch(env, REALMS_DIRS)) ! env = "~" + env[strlen(REALMS_DIRS)+1..]; else if(!strsrch(env, DOMAINS_DIRS)) ! env = "^"+env[strlen(DOMAINS_DIRS)+1..strlen(env)-1]; return sprintf(formatString, age, lev, nom, ip, idle, blk, env); } static private string query_time() { string tzone; ! int x; ! tzone = (string)this_player()->GetTimeZone() || localtime(time())[LT_ZONE]; ! x = (int)TIME_D->GetOffset(tzone) * 3600; return tzone + " time is: " + ctime(time() + x); } ! void help() { message("help", "Syntax: people [-abceghlmnprsu]\n\n" "Gives you a listing of people on "+mud_name()+". Output is " --- 234,258 ---- if(!environment(ob)) env = "no environment"; else env = file_name(environment(ob)); if(!strsrch(env, REALMS_DIRS)) ! env = "~" + env[strlen(REALMS_DIRS)+1..]; else if(!strsrch(env, DOMAINS_DIRS)) ! env = "^"+env[strlen(DOMAINS_DIRS)+1..strlen(env)-1]; return sprintf(formatString, age, lev, nom, ip, idle, blk, env); } static private string query_time() { string tzone; ! int x, offset; ! //tzone = (string)this_player()->GetTimeZone() || local_time(time())[LT_ZONE]; ! tzone = query_tz(); ! offset = (int)TIME_D->GetOffset(tzone); ! offset += EXTRA_TIME_OFFSET; ! if(query_os_type() != "windows" ) x = offset * 3600; ! else x = 0; return tzone + " time is: " + ctime(time() + x); } ! void help() { message("help", "Syntax: people [-abceghlmnprsu]\n\n" "Gives you a listing of people on "+mud_name()+". Output is " diff -c -r --new-file ds1.1/lib/cmds/creators/ping.c ds2.0r27/lib/cmds/creators/ping.c *** ds1.1/lib/cmds/creators/ping.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/ping.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,25 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + string target; + if(!str || str == "") str = "Dead Souls"; + target = INTERMUD_D->GetMudName(str); + this_player()->SetProperty("pinging",1); + INTERMUD_D->eventWrite(({ "auth-mud-req", 5, mud_name(), 0,target, 0 })); + + return 1; + } + + void help() { + message("help", "Syntax: ping \n\n" + "Pings a mud to test connectivity. Only pings to " + "Dead Souls muds are supported and recommended.\n" + "Note that you may receive a reply from a different " + "mud than the one specified if someone else already " + "initiated a ping, or if your mud's keepalive happens " + "to be running at the moment of your command.\n\n", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/polyglottize.c ds2.0r27/lib/cmds/creators/polyglottize.c *** ds1.1/lib/cmds/creators/polyglottize.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/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 ds1.1/lib/cmds/creators/quell.c ds2.0r27/lib/cmds/creators/quell.c *** ds1.1/lib/cmds/creators/quell.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/quell.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,27 ---- + // By Magnafix 10-14-96 + // required addition of list_new_posts() in bboard daemon + #include + #include + + inherit LIB_COMMAND; + + + int cmd(string str){ + write("You casually wave your hand, and bring about peace."); + say(this_player()->GetCapName()+" waves "+possessive()+" hand "+ + "and brings peace to the area."); + foreach(object combatant in get_livings(environment(this_player()))){ + if(combatant->GetInCombat()) tell_object(combatant,"You stop fighting."); + combatant->eventQuell(); + } + + return 1; + } + + + + string GetHelp(string str) { + return "Syntax: \n" + "This command brings peace between combatants in your environment.\n" + "See also: unquell\n"; + } diff -c -r --new-file ds1.1/lib/cmds/creators/realms.c ds2.0r27/lib/cmds/creators/realms.c *** ds1.1/lib/cmds/creators/realms.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/realms.c Wed Jul 5 00:01:03 2006 *************** *** 20,29 **** text += ({ "Creator Moves Size Errors Objs HBs" }); text += ({ "-----------------------------------------------------" }); foreach(string name in names) { ! mapping foo = Stats[name]; ! text += ({ sprintf("%-14s %-8d %-8d %-8d %-6d %d", name, ! foo["moves"], foo["array_size"], foo["errors"], ! foo["objects"], foo["heart_beats"]) }); } this_player()->eventPage(text); return 1; --- 20,29 ---- text += ({ "Creator Moves Size Errors Objs HBs" }); text += ({ "-----------------------------------------------------" }); foreach(string name in names) { ! mapping foo = Stats[name]; ! text += ({ sprintf("%-14s %-8d %-8d %-8d %-6d %d", name, ! foo["moves"], foo["array_size"], foo["errors"], ! foo["objects"], foo["heart_beats"]) }); } this_player()->eventPage(text); return 1; *************** *** 31,38 **** string GetHelp(string str) { return ("Syntax: \n\n" ! "A creator command that displays individual author " ! "statistics relative to the \"areas\" found within " ! "their directories.\n\n" ! "See also: man author_stats"); } --- 31,38 ---- string GetHelp(string str) { return ("Syntax: \n\n" ! "A creator command that displays individual author " ! "statistics relative to the \"areas\" found within " ! "their directories.\n\n" ! "See also: man author_stats"); } diff -c -r --new-file ds1.1/lib/cmds/creators/rehash.c ds2.0r27/lib/cmds/creators/rehash.c *** ds1.1/lib/cmds/creators/rehash.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/rehash.c Wed Jul 5 00:01:03 2006 *************** *** 2,27 **** * This allows creators to refresh command lookup tables * Blitz@NM-IVD */ ! #include #include ! inherit LIB_DAEMON; ! mixed cmd(string str) { ! if( !sizeof(str) ) return "Syntax: rehash \n"; ! if( file_size(str) != -2 ) ! return str+": Path not found."; ! CMD_D->eventRehash(str); ! message("system", str+": Rehashed.", this_player() ); ! return 1; } ! void help() { ! message("help", ! "Syntax: rehash \n\n" ! "This command allows creators to refresh the specified path's " ! "command parsing lookup tables.", ! this_player() ); } ! --- 2,27 ---- * This allows creators to refresh command lookup tables * Blitz@NM-IVD */ ! #include #include ! inherit LIB_DAEMON; ! mixed cmd(string str) { ! if( !sizeof(str) ) return "Syntax: rehash \n"; ! if( file_size(str) != -2 ) ! return str+": Path not found."; ! CMD_D->eventRehash(str); ! message("system", str+": Rehashed.", this_player() ); ! return 1; } ! void help() { ! message("help", ! "Syntax: rehash \n\n" ! "This command allows creators to refresh the specified path's " ! "command parsing lookup tables.", ! this_player() ); } ! diff -c -r --new-file ds1.1/lib/cmds/creators/replog.c ds2.0r27/lib/cmds/creators/replog.c *** ds1.1/lib/cmds/creators/replog.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/replog.c Wed Jul 5 00:01:03 2006 *************** *** 11,22 **** if(!str) str = (string)this_player()->GetKeyName(); str = "/log/reports/"+str; if(!file_exists(str)) { ! notify_fail("No such file: "+str+".\n"); ! return 0; } if(!tail(str)) { ! notify_fail("Failed to read file: "+str+".\n"); ! return 0; } return 1; } --- 11,22 ---- if(!str) str = (string)this_player()->GetKeyName(); str = "/log/reports/"+str; if(!file_exists(str)) { ! notify_fail("No such file: "+str+".\n"); ! return 0; } if(!tail(str)) { ! notify_fail("Failed to read file: "+str+".\n"); ! return 0; } return 1; } diff -c -r --new-file ds1.1/lib/cmds/creators/reset.c ds2.0r27/lib/cmds/creators/reset.c *** ds1.1/lib/cmds/creators/reset.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/reset.c Wed Jul 5 00:01:03 2006 *************** *** 26,31 **** void help() { write("Syntax: or or \n\n"+ ! "Resets the object named or the environment you are in if no object\n"+ ! "is named.\n"); } --- 26,31 ---- void help() { write("Syntax: or or \n\n"+ ! "Resets the object named or the environment you are in if no object\n"+ ! "is named.\n"); } diff -c -r --new-file ds1.1/lib/cmds/creators/return.c ds2.0r27/lib/cmds/creators/return.c *** ds1.1/lib/cmds/creators/return.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/return.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,50 ---- + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + object ob, room; + string last_loc; + + if( !args || args == "" ) { + if(!last_loc = this_player()->GetProperty("LastLocation")){ + write("You have nowhere to return to."); + return 1; + } + else if(!load_object(last_loc)){ + write("There is a problem with that location."); + write("You remain where you are."); + return 1; + } + else this_player()->eventMoveLiving(load_object(last_loc)); + return 1; + } + + if( !(ob = find_player(convert_name(args))) && !(ob = find_living(args)) ) + return "No such being exists anywhere presently."; + if( !room = load_object(ob->GetProperty("ReturnSite"))){ + write("That person has nowhere to return."); + return 1; + } + + if(room == environment(ob)){ + write("That person is already there."); + return 1; + } + + ob->SetProperty("ReturnSite",""); + if( !((int)ob->eventMoveLiving(room) )) + return "Failed to move " + (string)ob->GetCapName() + "."; + message("system", "You have been returned to your previous location by " + + (string)this_player()->GetName() + ".", ob); + message("system", "You return " + (string)ob->GetCapName() + + " to their previous location.", this_player()); + return 1; + } + + void help() { + message("help", "Syntax: \n\n" + "Sends someone back, after a trans.\n" + "With no arguments, sends you to your last location.\n\n" + "See also: goto", this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/scan.c ds2.0r27/lib/cmds/creators/scan.c *** ds1.1/lib/cmds/creators/scan.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/scan.c Wed Jul 5 00:01:03 2006 *************** *** 4,91 **** * created by Descartes of Borg 950516 * -fi flags added for Dead Souls by Blitz 951208 */ ! #include ! #define OPT_E (1 << 1) #define OPT_D (1 << 2) #define OPT_I (1 << 3) #define OPT_F (1 << 4) ! inherit LIB_DAEMON; ! string inventory(object ob, int level, int scan); ! mixed cmd(string args) { object *inv; object ob; string tmp; int scan, i, maxi; ! if( args == "" || !args ) { ! ob = this_player(); ! scan = 0; } else { ! while(args[0] == '-') { ! switch(args[1]) { ! case 'd': scan |= OPT_D; break; ! case 'e': scan |= OPT_E; break; ! case 'i': scan |= OPT_I; break; ! case 'f': scan |= OPT_F; break; ! } ! if( strlen(args) > 3 ) args = trim(args[2..]); ! else args = ""; ! } ! if( args != "" ) ob = to_object(args); ! if( !ob ) ob = this_player(); } if( scan & OPT_E ) ob = environment(ob); if( !ob ) return "No environment for requested object."; if( scan & OPT_D ) tmp = "Deep scanning " + identify(ob) + ":\n"; else tmp = "Scanning " + identify(ob) + ":\n"; for(i=0, maxi = sizeof(inv = all_inventory(ob)); ieventPage(explode(tmp, "\n"), "system"); return 1; } ! string inventory(object ob, int level, int scan) { object *inv; string ret; int i, maxi; ! for(i = 1, ret = ""; i <= level; i++) ret += "\t"; if( scan & OPT_I ) { ! string tmp; ! if( scan & OPT_F ) tmp = identify(ob) + "\n" + ret + " "; ! else tmp = ""; ! tmp += sprintf("(%s) - Mass: %d Value: %d Class: %d", ! capitalize((string)ob->GetKeyName()), ! (int)ob->GetMass(), (int)ob->GetValue(), ! (int)ob->GetClass() ); ! if( ob->GetWorn() ) tmp += " (worn)"; ! ret += tmp; } else ret += identify(ob); if( ( scan & OPT_D ) && ! ( maxi = sizeof(inv = all_inventory(ob))) ) ret += ":\n"; else ret += "\n"; if( !( scan & OPT_D ) ) return ret; for(i=0; i\n\n" ! "Scans the inventory of the object you name. If you do " ! "not specify an object, then it gives you your inventory. " ! "If you specify the -e option, the command does the " ! "environment of the object which is targeted. If the -d " ! "option is specified, then a deep scan is done. The -i " ! "option displays information about each object. The -f " ! "option forces filenames to be displayed (default).\n\n" ! "See also: inventory, stat"; } ! --- 4,91 ---- * created by Descartes of Borg 950516 * -fi flags added for Dead Souls by Blitz 951208 */ ! #include ! #define OPT_E (1 << 1) #define OPT_D (1 << 2) #define OPT_I (1 << 3) #define OPT_F (1 << 4) ! inherit LIB_DAEMON; ! string inventory(object ob, int level, int scan); ! mixed cmd(string args) { object *inv; object ob; string tmp; int scan, i, maxi; ! if( args == "" || !args ) { ! ob = this_player(); ! scan = 0; } else { ! while(args[0] == '-') { ! switch(args[1]) { ! case 'd': scan |= OPT_D; break; ! case 'e': scan |= OPT_E; break; ! case 'i': scan |= OPT_I; break; ! case 'f': scan |= OPT_F; break; ! } ! if( strlen(args) > 3 ) args = trim(args[2..]); ! else args = ""; ! } ! if( args != "" ) ob = to_object(args); ! if( !ob ) ob = this_player(); } if( scan & OPT_E ) ob = environment(ob); if( !ob ) return "No environment for requested object."; if( scan & OPT_D ) tmp = "Deep scanning " + identify(ob) + ":\n"; else tmp = "Scanning " + identify(ob) + ":\n"; for(i=0, maxi = sizeof(inv = all_inventory(ob)); ieventPage(explode(tmp, "\n"), "system"); return 1; } ! string inventory(object ob, int level, int scan) { object *inv; string ret; int i, maxi; ! for(i = 1, ret = ""; i <= level; i++) ret += "\t"; if( scan & OPT_I ) { ! string tmp; ! if( scan & OPT_F ) tmp = identify(ob) + "\n" + ret + " "; ! else tmp = ""; ! tmp += sprintf("(%s) - Mass: %d Value: %d Class: %d", ! capitalize((string)ob->GetKeyName()), ! (int)ob->GetMass(), (int)ob->GetValue(), ! intp((int)ob->GetClass()) ? (int)ob->GetClass() : 0 ); ! if( ob->GetWorn() ) tmp += " (worn)"; ! ret += tmp; } else ret += identify(ob); if( ( scan & OPT_D ) && ! ( maxi = sizeof(inv = all_inventory(ob))) ) ret += ":\n"; else ret += "\n"; if( !( scan & OPT_D ) ) return ret; for(i=0; i\n\n" ! "Scans the inventory of the object you name. If you do " ! "not specify an object, then it gives you your inventory. " ! "If you specify the -e option, the command does the " ! "environment of the object which is targeted. If the -d " ! "option is specified, then a deep scan is done. The -i " ! "option displays information about each object. The -f " ! "option forces filenames to be displayed (default).\n\n" ! "See also: inventory, stat"; } ! diff -c -r --new-file ds1.1/lib/cmds/creators/showtree.c ds2.0r27/lib/cmds/creators/showtree.c *** ds1.1/lib/cmds/creators/showtree.c Sun Feb 1 21:29:51 1998 --- ds2.0r27/lib/cmds/creators/showtree.c Wed Jul 5 00:01:03 2006 *************** *** 15,21 **** string func, file; if( !str || str == "" ) ! return "Syntax: or "; if( sscanf(str, "%s in %s", func, file) != 2 ) { if( sscanf(str, "%s %s", func, file) != 2 ) { func = 0; --- 15,21 ---- string func, file; if( !str || str == "" ) ! return "Syntax: or "; if( sscanf(str, "%s in %s", func, file) != 2 ) { if( sscanf(str, "%s %s", func, file) != 2 ) { func = 0; *************** *** 33,39 **** object ob; string str; int found; ! if( strlen(file) > 2 && file[<2..] == ".c" ) file = file[0..<3]; if( file[0] != '/' ) file = "/" + file; if( !(ob = load_object(file)) ) { --- 33,39 ---- object ob; string str; int found; ! if( strlen(file) > 2 && file[<2..] == ".c" ) file = file[0..<3]; if( file[0] != '/' ) file = "/" + file; if( !(ob = load_object(file)) ) { *************** *** 61,71 **** string GetHelp(string str) { return ("Syntax: \n" ! " \n\n" ! "In its first version, shows you the full inheritance " ! "tree for the named object. In its second form, it shows " ! "you all files in the inheritance tree which contain the " ! "function you name, specifically noting those objects which " ! "have definitions for the function.\n\n" ! "See also: help"); } --- 61,71 ---- string GetHelp(string str) { return ("Syntax: \n" ! " \n\n" ! "In its first version, shows you the full inheritance " ! "tree for the named object. In its second form, it shows " ! "you all files in the inheritance tree which contain the " ! "function you name, specifically noting those objects which " ! "have definitions for the function.\n\n" ! "See also: help"); } diff -c -r --new-file ds1.1/lib/cmds/creators/stargate.c ds2.0r27/lib/cmds/creators/stargate.c *** ds1.1/lib/cmds/creators/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/stargate.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,46 ---- + /** + * modification of code contributed by daelas + * started 2006-04-04 + */ + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str){ + mapping network; + + network = STARGATE_D->GetStargates(); + if (str){ + if (network[lower_case(str)]){ + write(str+" is part of the Stargate Network.\n"); + write(str+" data: "+identify(network[lower_case(str)])); + } + else { + write(str+" is not currently part of the Stargate Network.\n"); + } + return 1; + } + else { + write("These are the current Stargate locations in the Network:\n"); + if (!sizeof(network)){ + write("No locations found."); + return 1; + } + else { + string buf = ""; + string name; + write(implode(keys(network), ", ")); + } + } + return 1; + } + + void help() { + message("help", "Syntax: stargate \n\n" + "With an argument, this command will determine whether the argument " + "supplied is a valid stargate. If so, stargate data on that gate " + "is displayed. Without an argument, this command lists known valid " + "stargates.", + this_player()); + } diff -c -r --new-file ds1.1/lib/cmds/creators/stat.c ds2.0r27/lib/cmds/creators/stat.c *** ds1.1/lib/cmds/creators/stat.c Sun Feb 1 21:29:50 1998 --- ds2.0r27/lib/cmds/creators/stat.c Wed Dec 31 19:00:00 1969 *************** *** 1,105 **** - /* /cmds/creator/stat.c - * from the Dead Souls LPC Library - * a command to view something's stats - * created by Descartes of Borg 950409 - */ - - #include - - inherit LIB_DAEMON; - - mixed cmd(string args) { - string *lines, *arr, *limbs; - object ob; - string tmp1, tmp2; - int i, x, y, cols; - - if( args == "" || !args ) return 0; - if( !(ob = present(args, environment(this_player()))) ) - if( !(ob = find_player(convert_name(args))) && - !(ob = find_living(lower_case(args))) ) - return capitalize(args) + " is nowhere to be found."; - if( creatorp(ob) ) return "You cannot get stat information on a creator."; - cols = ((int *)this_player()->GetScreen())[0]; - tmp1 = (string)ob->GetCapName() + " aka " + (string)ob->GetShort() + - ", level " + (int)ob->GetLevel() + " " + (string)ob->GetGender(); - if( !(tmp2 = (string)ob->GetRace()) ) tmp2 = "blob"; - tmp1 += " " + tmp2; - if( !(tmp2 = (string)ob->GetClass()) ) tmp2 = "drifter"; - tmp1 += " " + capitalize(tmp2); - if( tmp2 = (string)ob->GetSpouse() ) - tmp1 += " (spouse: " + tmp2 + ")"; - lines = ({ center(tmp1, cols) }); - if( (int)ob->GetUndead() ) tmp1 = "Undead"; - else tmp1 = "Alive"; - if( (int)ob->GetSleeping() ) tmp1 += " / Sleeping"; - else tmp1 += " / Awake"; - if( (int)ob->GetParalyzed() ) tmp1 += " / Paralyzed"; - lines += ({ center(tmp1, cols), "" }); - lines += ({ center("Health: " +(int)ob->GetHealthPoints() + "/"+ - (int)ob->GetMaxHealthPoints() + " Magic: " + - (int)ob->GetMagicPoints() + "/" + - (int)ob->GetMaxMagicPoints() + " Stamina: " + - (int)ob->GetStaminaPoints() + "/" + - to_int((float)ob->GetMaxStaminaPoints()) + " Carry: " + - (int)ob->GetCarriedMass() + "/" + - (int)ob->GetMaxCarry(), cols) }); - lines += ({ center("Food: " + (int)ob->GetFood() + " " + - "Drink: " + (int)ob->GetDrink() + " " + - "Alcohol: " + (int)ob->GetAlcohol() + " " + - "Caffeine: " + (int)ob->GetCaffeine() + " " + - "Poison: " + (int)ob->GetPoison() + " ", cols) }); - lines += ({ center("Training Points: " + (int)ob->GetTrainingPoints()) }); - lines += ({ "", "Limbs:" }); - limbs = (string *)ob->GetWieldingLimbs(); - arr = map((string *)ob->GetLimbs(), - (: sprintf("%:-14s%s (%d) %d/%d", $1, - ((member_array($1, $(limbs)) == -1) ? " " : "*"), - (int)($(ob))->GetLimbClass($1), - (int)($(ob))->GetHealthPoints($1), - (int)($(ob))->GetMaxHealthPoints($1)) :)); - i = sizeof(arr); - while(i--) if( (y = strlen(arr[i])) > x ) x = y; - x = cols/(x+2); - lines += explode(format_page(arr, x), "\n") + ({ "", "Skills:" }); - arr = map((string *)ob->GetSkills(), - function(string skill, object who) { - mapping mp = (mapping)who->GetSkill(skill); - int x, max; - x = to_int(percent(mp["points"], - (int)who->GetMaxSkillPoints(skill, mp["level"]))); - max = ( mp["class"] == 1 ? 2 : 1 ) + who->GetLevel(); - max *= 2; - if( max < mp["level"] ) max = mp["level"]; - return sprintf("%:-18s (%d) %:2d%% - %d/%d", - skill, mp["class"], x, mp["level"], max); - }, ob); - i = sizeof(arr); - while(i--) if( (y = strlen(arr[i])) > x ) x = y; - x = cols/(x+2); - lines += explode(format_page(arr, x), "\n") + ({ "", "Stats:" }); - arr = map((string *)ob->GetStats(), - (: sprintf("%:-12s (%d) %d/%d", $1, - (int)($(ob))->GetStatClass($1), - (int)($(ob))->GetStatLevel($1), - (int)($(ob))->GetBaseStatLevel($1)) :)); - i = sizeof(arr); - x = 0; - while(i--) if( (y = strlen(arr[i])) > x ) x = y; - x =cols/(x+2); - lines += explode(format_page(arr, x), "\n"); - lines += ({ "", (string)ob->GetName()+" has amassed a net worth of " + - ( (int)ob->GetNetWorth() * currency_rate("gold") ) + " gold."}); - arr = filter( map((string *)ob->GetCurrencies(), - (: ($(ob))->GetCurrency($1) && - sprintf("%d %s", ($(ob))->GetCurrency($1), $1) :)), - (: $1 :)); - lines += ({ "Money on hand: "+implode(arr, ", ") }); - this_player()->eventPage(lines, "system"); - return 1; - } - - string GetHelp(string blah) { - return ("Syntax: stat \n\n" - "Displays statistical information on the living object named."); - } --- 0 ---- diff -c -r --new-file ds1.1/lib/cmds/creators/tellblock.c ds2.0r27/lib/cmds/creators/tellblock.c *** ds1.1/lib/cmds/creators/tellblock.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/tellblock.c Wed Jul 5 00:01:03 2006 *************** *** 19,23 **** void help() { write("Syntax: \n\n"+ ! "Toggles the blocking of tells on and off."); } --- 19,23 ---- void help() { write("Syntax: \n\n"+ ! "Toggles the blocking of tells on and off."); } diff -c -r --new-file ds1.1/lib/cmds/creators/trans.c ds2.0r27/lib/cmds/creators/trans.c *** ds1.1/lib/cmds/creators/trans.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/trans.c Wed Jul 5 00:01:03 2006 *************** *** 13,32 **** if( !args || args == "" ) return "Trans whom?"; if( !(ob = find_player(convert_name(args))) && !(ob = find_living(args)) ) ! return "No such being exists anywhere presently."; if( environment(ob) == environment(this_player()) ) ! return (string)ob->GetCapName() + " is right here."; message("system", "You have been summoned by " + ! (string)this_player()->GetName() + ".", ob); if( !((int)ob->eventMoveLiving(environment(this_player()))) ) ! return "Failed to move " + (string)ob->GetCapName() + "."; else message("system", "You trans " + (string)ob->GetCapName() + ! " to you.", this_player()); return 1; } void help() { message("help", "Syntax: \n\n" ! "Brings a living thing to your location.\n\n" ! "See also: goto", this_player()); } --- 13,38 ---- if( !args || args == "" ) return "Trans whom?"; if( !(ob = find_player(convert_name(args))) && !(ob = find_living(args)) ) ! return "No such being exists anywhere presently."; if( environment(ob) == environment(this_player()) ) ! return (string)ob->GetCapName() + " is right here."; ! if(archp(ob) && !archp(this_player())){ ! write("You can't trans an admin."); ! tell_player(ob, this_player()->GetName()+" just tried to trans you."); ! return 1; ! } ! ob->SetProperty("ReturnSite",base_name(environment(ob))); message("system", "You have been summoned by " + ! (string)this_player()->GetName() + ".", ob); if( !((int)ob->eventMoveLiving(environment(this_player()))) ) ! return "Failed to move " + (string)ob->GetCapName() + "."; else message("system", "You trans " + (string)ob->GetCapName() + ! " to you.", this_player()); return 1; } void help() { message("help", "Syntax: \n\n" ! "Brings a living thing to your location.\n\n" ! "See also: return, goto, move, expel", this_player()); } diff -c -r --new-file ds1.1/lib/cmds/creators/transfer.c ds2.0r27/lib/cmds/creators/transfer.c *** ds1.1/lib/cmds/creators/transfer.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/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 ds1.1/lib/cmds/creators/unquell.c ds2.0r27/lib/cmds/creators/unquell.c *** ds1.1/lib/cmds/creators/unquell.c Wed Dec 31 19:00:00 1969 --- ds2.0r27/lib/cmds/creators/unquell.c Wed Jul 5 00:01:03 2006 *************** *** 0 **** --- 1,27 ---- + // By Magnafix 10-14-96 + // required addition of list_new_posts() in bboard daemon + #include + #include + + inherit LIB_COMMAND; + + + int cmd(string str){ + write("You snap your fingers, and permit hostilities to resume."); + say(this_player()->GetCapName()+" snaps "+possessive()+" fingers "+ + "and permits hostilities to resume."); + foreach(object combatant in get_livings(environment(this_player()))){ + combatant->eventUnQuell(); + if(combatant->GetInCombat()) tell_object(combatant,"You resume fighting."); + } + + return 1; + } + + + + string GetHelp(string str) { + return "Syntax: \n" + "Allows quelled combat to resume.\n" + "See also: quell\n"; + } diff -c -r --new-file ds1.1/lib/cmds/creators/vis.c ds2.0r27/lib/cmds/creators/vis.c *** ds1.1/lib/cmds/creators/vis.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/vis.c Wed Jul 5 00:01:03 2006 *************** *** 8,29 **** varargs int cmd(string str) { ! if(!this_player()->GetInvis()) { notify_fail("You are already visible.\n"); return 0; } this_player()->SetInvis(0); message("my_action", "You step out of the shadows.", this_player()); ! return 1; } int help() { ! write( @EndText Syntax: vis Effect: Makes you visible if you wern't already. EndText ! ); ! return 1; } --- 8,29 ---- varargs int cmd(string str) { ! if(!this_player()->GetInvis()) { notify_fail("You are already visible.\n"); return 0; } this_player()->SetInvis(0); message("my_action", "You step out of the shadows.", this_player()); ! return 1; } int help() { ! write( @EndText Syntax: vis Effect: Makes you visible if you wern't already. EndText ! ); ! return 1; } diff -c -r --new-file ds1.1/lib/cmds/creators/which.c ds2.0r27/lib/cmds/creators/which.c *** ds1.1/lib/cmds/creators/which.c Sun Feb 1 21:29:52 1998 --- ds2.0r27/lib/cmds/creators/which.c Wed Jul 5 00:01:03 2006 *************** *** 15,30 **** mixed cmd(string args) { string array dirs; string dir, msg; if( !args ) { return "You want to know information on which command?"; } ! if( !(dirs = CMD_D->GetPaths(args)) ) { return args + ": not found."; } msg = args + ":"; foreach(dir in dirs) { ! msg += "\n\t" + dir; } previous_object()->eventPrint(msg, MSG_SYSTEM); return 1; --- 15,39 ---- mixed cmd(string args) { string array dirs; string dir, msg; + int isverb; + dirs = ({}); + + isverb = 0; if( !args ) { return "You want to know information on which command?"; } ! if(member_array(args,keys(VERBS_D->GetVerbs())) != -1){ ! dirs += ({ (VERBS_D->GetVerbs())[args] }); ! isverb = 1; ! } ! else if( !(dirs = CMD_D->GetPaths(args)) ) { return args + ": not found."; } msg = args + ":"; foreach(dir in dirs) { ! if(isverb) msg += "\n\t" + dir; ! else msg += "\n\t" + dir + "/" + args + ".c"; } previous_object()->eventPrint(msg, MSG_SYSTEM); return 1; *************** *** 32,38 **** string GetHelp() { return ("Syntax: \n\n" ! "Gives you a listing of all directories in which a command " ! "object may be found.\n\n" ! "See also: help, man"); } --- 41,47 ---- string GetHelp() {