diff -c -r --new-file ds2.0r28/lib/cmds/admins/mfinger.c ds2.0r29/lib/cmds/admins/mfinger.c *** ds2.0r28/lib/cmds/admins/mfinger.c Wed Jul 5 00:01:03 2006 --- ds2.0r29/lib/cmds/admins/mfinger.c Sat Jul 8 23:30:54 2006 *************** *** 53,58 **** void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.", this_player()); } --- 53,63 ---- void help() { message("help", "Syntax: \n\n" ! "Allows you to get finger information from a player's site.\n\n" ! "Note: In 1995, you could reliably expect a UNIX machine to cheerfully " ! "respond to a finger request. Now, more than 10 years later, everything " ! "is blocked, firewalled, and hardened. This command is all but useless, " ! "and is kept as a historical curiosity. Any \"bugs\" it contains will " ! "not be fixed.", this_player()); } diff -c -r --new-file ds2.0r28/lib/cmds/creators/colors.c ds2.0r29/lib/cmds/creators/colors.c *** ds2.0r28/lib/cmds/creators/colors.c Wed Jul 5 00:01:03 2006 --- ds2.0r29/lib/cmds/creators/colors.c Sat Jul 8 23:30:54 2006 *************** *** 6,29 **** int cmd() { write( ! "%^RED%^RED\n" ! "%^GREEN%^GREEN\n" ! "%^ORANGE%^ORANGE\n" ! "%^YELLOW%^YELLOW\n" ! "%^BLUE%^BLUE\n" ! "%^CYAN%^CYAN\n" ! "%^MAGENTA%^MAGENTA\n" ! "%^BLACK%^BLACK\n" ! "%^WHITE%^WHITE\n" ! "%^B_RED%^B_RED\n" ! "%^B_GREEN%^B_GREEN\n" ! "%^B_ORANGE%^B_ORANGE\n" ! "%^B_YELLOW%^B_YELLOW\n" ! "%^B_BLUE%^B_BLUE\n" ! "%^B_CYAN%^B_CYAN\n" ! "%^B_BLACK%^B_BLACK\n" ! "%^B_WHITE%^B_WHITE%^RESET%^\n" ! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); return 1; } --- 6,33 ---- int cmd() { write( ! "%^RED%^RED\t%%^^RED%%^^\n" ! "%^GREEN%^GREEN\t%%^^GREEN%%^^\n" ! "%^ORANGE%^ORANGE\t%%^^ORANGE%%^^\n" ! "%^YELLOW%^YELLOW\t%%^^YELLOW%%^^\n" ! "%^BLUE%^BLUE\t%%^^BLUE%%^^\n" ! "%^CYAN%^CYAN\t%%^^CYAN%%^^\n" ! "%^MAGENTA%^MAGENTA\t%%^^MAGENTA%%^^\n" ! "%^BLACK%^BLACK\t%%^^BLACK%%^^\n" ! "%^WHITE%^WHITE\t%%^^WHITE%%^^\n" ! "%^B_RED%^B_RED\t%%^^B_RED%%^^\n" ! "%^B_GREEN%^B_GREEN\t%%^^B_GREEN%%^^\n" ! "%^B_ORANGE%^B_ORANGE\t%%^^B_ORANGE%%^^\n" ! "%^B_YELLOW%^B_YELLOW\t%%^^B_YELLOW%%^^\n" ! "%^B_BLUE%^B_BLUE\t%%^^B_BLUE%%^^\n" ! "%^B_CYAN%^B_CYAN\t%%^^B_CYAN%%^^\n" ! "%^B_BLACK%^B_BLACK\t%%^^B_BLACK%%^^\n" ! "%^B_WHITE%^B_WHITE\t%%^^B_WHITE%%^^\n" ! "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n\n" ! "Special tags: %%^^BOLD%%^^ and %%^^FLASH%%^^ and %%^^RESET%%^^\n\n" ! "You can mix and match, for example: \n" ! "%%^^B_RED%%^^%%^^CYAN%%^^%%^^BOLD%%^^%%^^FLASH%%^^Foo!%%^^RESET%%^^:" ! "%^B_RED%^%^CYAN%^%^BOLD%^%^FLASH%^Foo!%^RESET%^" ); return 1; } diff -c -r --new-file ds2.0r28/lib/daemon/verbs.c ds2.0r29/lib/daemon/verbs.c *** ds2.0r28/lib/daemon/verbs.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/daemon/verbs.c Sun Jul 9 19:04:26 2006 *************** *** 23,29 **** string verb; int i; - //tc("/daemon/verbs: eventReloadVerbs"); if( arrayp(val) ) verbs = filter(val, (: GetValidVerb($1) :)); else if( stringp(val) ) { if( strlen(val) > 2 && val[<2..] == ".c" ) val = val[0..<3]; --- 23,28 ---- *************** *** 51,56 **** --- 50,63 ---- break; } } + foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) { + dir = DIR_SECURE_VERBS + "/" + dir; + if( file_size(dir) != -2 ) continue; + if( file_exists( dir + "/" + val + ".c") ) { + verbs = ({ dir + "/" + val }); + break; + } + } if( !verbs ) return; } } *************** *** 64,69 **** --- 71,81 ---- if( file_size(dir) == -2 ) verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :)); } + foreach(dir in get_dir(DIR_SECURE_VERBS + "/")) { + dir = DIR_SECURE_VERBS + "/" + dir; + if( file_size(dir) == -2 ) + verbs += map(get_dir(dir + "/*.c"), (: $(dir) + "/" + $1 :)); + } } i = 0; foreach(verb in verbs) { *************** *** 87,101 **** } string GetErrorMessage(string verb) { - //tc("/daemon/verbs: GetErrorMessage"); if( !Verbs[verb] ) return 0; else return (string)Verbs[verb]->GetErrorMessage(); } int GetValidVerb(string verb) { ! //tc("/daemon/verbs: GetValidVerb: verb: "+verb); ! return !strsrch(verb, DIR_VERBS); ! //key_arr = keys(GetVerbs()); } mapping GetVerbs() { return copy(Verbs); } --- 99,111 ---- } string GetErrorMessage(string verb) { if( !Verbs[verb] ) return 0; else return (string)Verbs[verb]->GetErrorMessage(); } int GetValidVerb(string verb) { ! if(!strsrch(verb, DIR_VERBS) || !strsrch(verb, DIR_VERBS)) return 1; ! else return 0; } mapping GetVerbs() { return copy(Verbs); } diff -c -r --new-file ds2.0r28/lib/doc/CREDITS ds2.0r29/lib/doc/CREDITS *** ds2.0r28/lib/doc/CREDITS Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/doc/CREDITS Sat Jul 8 23:30:54 2006 *************** *** 20,25 **** --- 20,27 ---- Zeus, Dastuun, Detah, and Nulvect for their thoughtful comments and suggestions. + Much gratitude to playtesters: Karri, Aten, Tacitus. + Also: Xyzzy He Is Cool diff -c -r --new-file ds2.0r28/lib/doc/RELEASE_NOTES ds2.0r29/lib/doc/RELEASE_NOTES *** ds2.0r28/lib/doc/RELEASE_NOTES Wed Jul 5 20:52:28 2006 --- ds2.0r29/lib/doc/RELEASE_NOTES Sun Jul 9 19:04:27 2006 *************** *** 1,3 **** --- 1,43 ---- + ---- 2.0r29 --- + - Fixed finger daemon to not display ip addresses to players. + - The verb copy now handles relative paths more gracefully. + - LIB_TEACHER can now know all languages with SetAllLanguages(1) + - Standard chairs and beds can no longer be taken when someone is using them. + - Fixed church elevator buttons. + - Fixed problem with "look at pile". + - Fixed problem with examining objects on surfaces. + - It is now also possible to look at things carried by others, + e.g. "look at shirt on fighter". + - Remote finger no longer betrays invisible people. + - Added sefun: alpha_strip + - Room descriptions now indicate which piece of furniture a creature + is resting on, if applicable. + - Objects on surfaces than can be sat or lain in are not visible + or accessible if someone is lying or sitting on that surface. e.g., + you can't examine or get the glasses under your butt on the chair. + - SetMaxHealthPoints now works as one would expect. The kitchen rat + is invincible no more. + - Look at problem fixed. + - Bank tellers (Zoe) now do a better job of retaining the correct + surcharge on currency withdrawals. + - Added /secure/obj/glasses.c as a creation object. Since you wear them, + it's hard to lose them accidentally. Since few things are called "glasses", + they won't get in the way of creating objects. New creators will have them + automatically added to the table in their sample room. + - One may now have a smiley in front of a channel message without + it turning into an emote. + - Fixed a conflict in the parsing system. + - Verbified "force". + - Fixed vendor bugs: appraising at zero, confusion with similar items. + - Beefed up the answers_to sefun, to handle adjectives. + - Fixed a couple of bugs in the lead/follow system. + - Fixed null error when selling to non-vendors. + - Fixed a channel log bug that logged to one of two files for + some channels, depending on whether someone was logged on (!!). + - Fixed bug in meals that prevented empty bottles replacing + full ones. + - Fixed a bug in the MudOS parser that screwed up things with apostrophes. + ---- 2.0r28 --- - Fixed minor bug in body.c that interfered with collapsing. - Fixed message boards. diff -c -r --new-file ds2.0r28/lib/doc/help/creators/plan ds2.0r29/lib/doc/help/creators/plan *** ds2.0r28/lib/doc/help/creators/plan Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/creators/plan Fri Jul 7 19:41:41 2006 *************** *** 0 **** --- 1,7 ---- + Your plan file is the extra information others see when + they finger you, usually listing what your projects are + and what you've been up to. To modify your plan, + edit the .plan file in your home directory. For example, + + cd + ed .plan diff -c -r --new-file ds2.0r28/lib/doc/help/creators/profile ds2.0r29/lib/doc/help/creators/profile *** ds2.0r28/lib/doc/help/creators/profile Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/doc/help/creators/profile Fri Jul 7 19:41:41 2006 *************** *** 0 **** --- 1,11 ---- + Your profile is a file that contains a list of + instructions. When you log in, the mud will force + you to execute those commands. To modify what those + "startup commands" are, edit the .profile file in + your home directory. For example: + + cd + ed .profile + + Note that the mud cannot force you to do + certain things as a security measure. diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/foodsmock.c ds2.0r29/lib/domains/campus/armor/foodsmock.c *** ds2.0r28/lib/domains/campus/armor/foodsmock.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/campus/armor/foodsmock.c Sun Jul 9 22:06:36 2006 *************** *** 6,12 **** static void create(){ armor::create(); SetKeyName("uniform"); ! SetAdjectives( ({"food workers"}) ); SetId( ({"overalls", "smock"}) ); SetShort("a food worker's uniform"); SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance."); --- 6,12 ---- static void create(){ armor::create(); SetKeyName("uniform"); ! SetAdjectives( ({"food workers","food worker's"}) ); SetId( ({"overalls", "smock"}) ); SetShort("a food worker's uniform"); SetLong("This is a set of overalls used by food workers to keep their bodies and the food at a healthy distance."); diff -c -r --new-file ds2.0r28/lib/domains/campus/armor/wizard_hat.c ds2.0r29/lib/domains/campus/armor/wizard_hat.c *** ds2.0r28/lib/domains/campus/armor/wizard_hat.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/campus/armor/wizard_hat.c Sun Jul 9 22:06:36 2006 *************** *** 2,21 **** #include #include inherit LIB_ARMOR; static void create(){ armor::create(); ! SetKeyName("wizard hat"); ! SetId(({"hat","headgear"})); ! SetAdjectives(({"wizard","wizard's"})); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ "around it, and a conical center. It is dark blue in color, "+ "and is decorated with pictures of yellow moons and stars."); SetMass(50); ! SetDollarCost(500); SetDamagePoints(100); SetArmorType(A_HELMET); SetProtection(BLUNT, 20); SetProtection(BLADE, 20); SetProtection(KNIFE, 20); } --- 2,28 ---- #include #include inherit LIB_ARMOR; + static void create(){ armor::create(); ! SetKeyName("wizard's hat"); ! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) ); ! SetId( ({"hat"}) ); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ "around it, and a conical center. It is dark blue in color, "+ "and is decorated with pictures of yellow moons and stars."); + SetProperties(([ + "beta" : 2, + ])); SetMass(50); ! SetBaseCost("silver",500); SetDamagePoints(100); SetArmorType(A_HELMET); SetProtection(BLUNT, 20); SetProtection(BLADE, 20); SetProtection(KNIFE, 20); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/red_wine.c ds2.0r29/lib/domains/campus/meals/red_wine.c *** ds2.0r28/lib/domains/campus/meals/red_wine.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/campus/meals/red_wine.c Wed Dec 31 19:00:00 1969 *************** *** 1,22 **** - #include - #include - - inherit LIB_MEAL; - - static void create() { - meal::create(); - SetKeyName("red wine"); - SetId( ({"wine"}) ); - SetShort("a bottle of milk"); - SetLong("A fairly small bottle of milk from some unknown creature. It has " - "a greyish tint to it. It would take several of these bottles to quench " - "that deep down bodily thirst."); - SetMass(3); - SetMealType(MEAL_DRINK); - SetStrength(10); - SetMealMessages("You gulp down the bottle of milk.", "$N gulps down a small " - "bottle of milk."); - SetEmptyName("bottle"); - SetEmptyShort("an empty bottle"); - SetEmptyLong("A small bottle which used to contain a portion of milk."); - } --- 0 ---- diff -c -r --new-file ds2.0r28/lib/domains/campus/meals/wing.c ds2.0r29/lib/domains/campus/meals/wing.c *** ds2.0r28/lib/domains/campus/meals/wing.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/campus/meals/wing.c Wed Dec 31 19:00:00 1969 *************** *** 1,29 **** - /* /domains/Praxis/etc/ale.c - * from Nightmare LPMud - * created by Descartes of Borg 950603 - */ - - #include - #include - - inherit LIB_MEAL; - - static void create() { - meal::create(); - SetKeyName("ale"); - SetId( ({ "bottle", "ale", "praxis ale" }) ); - SetShort("a bottle of ale"); - SetLong("A nice bottle of Lars' famous Praxis Ale."); - SetMass(60); - SetMealType(MEAL_FOOD); - SetMealMessages("You eat a chicken wing. Mmm!", - "$N enjoys a chicken wing. It looks delicious."); - } - void eventEat(){ - this_object()->goopy(); - return; - } - int goopy(){ - tell_room(environment(this_player()),"Gppy!\n"); - return 1; - } --- 0 ---- diff -c -r --new-file ds2.0r28/lib/domains/default/armor/badge.c ds2.0r29/lib/domains/default/armor/badge.c *** ds2.0r28/lib/domains/default/armor/badge.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/armor/badge.c Sun Jul 9 22:06:36 2006 *************** *** 7,13 **** static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ --- 7,13 ---- static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor's pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ diff -c -r --new-file ds2.0r28/lib/domains/default/armor/wizard_hat.c ds2.0r29/lib/domains/default/armor/wizard_hat.c *** ds2.0r28/lib/domains/default/armor/wizard_hat.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/armor/wizard_hat.c Sun Jul 9 22:06:36 2006 *************** *** 5,12 **** static void create(){ armor::create(); ! SetKeyName("wizards hat"); ! SetAdjectives( ({"wizards", "floppy", "large", "conical", "blue"}) ); SetId( ({"hat"}) ); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ --- 5,12 ---- static void create(){ armor::create(); ! SetKeyName("wizard's hat"); ! SetAdjectives( ({"wizard","wizards", "floppy", "large", "conical", "blue"}) ); SetId( ({"hat"}) ); SetShort("a wizard's hat"); SetLong("This is a large, floppy hat with a wide brim all "+ diff -c -r --new-file ds2.0r28/lib/domains/default/npc/dummy.c ds2.0r29/lib/domains/default/npc/dummy.c *** ds2.0r28/lib/domains/default/npc/dummy.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/npc/dummy.c Sun Jul 9 19:04:27 2006 *************** *** 29,48 **** evidence = ""; if(agent) evidence += "I receive damage from "+agent->GetKeyName(); if(type) { ! if(type == BLUNT ) evidence += ", damage type is BLUNT"; ! if(type == BLADE ) evidence += ", damage type is BLADE"; ! if(type == KNIFE ) evidence += ", damage type is KNIFE"; ! if(type == WATER ) evidence += ", damage type is WATER"; ! if(type == SHOCK ) evidence += ", damage type is SHOCK"; ! if(type == COLD ) evidence += ", damage type is COLD"; ! if(type == HEAT ) evidence += ", damage type is HEAT"; ! if(type == GAS ) evidence += ", damage type is GAS"; ! if(type == ACID ) evidence += ", damage type is ACID"; ! if(type == MAGIC ) evidence += ", damage type is MAGIC"; ! if(type == POISON ) evidence += ", damage type is POISON"; ! if(type == DISEASE ) evidence += ", damage type is DISEASE"; ! if(type == TRAUMA ) evidence += ", damage type is TRAUMA"; ! //else evidence += ", damage type is indeterminate"; } if(x) evidence += ", raw damage is "+x; if(internal) evidence += ", internal variable is "+internal; --- 29,58 ---- evidence = ""; if(agent) evidence += "I receive damage from "+agent->GetKeyName(); if(type) { ! switch(type){ ! case BLUNT : evidence += ", damage type is BLUNT";break; ! case BLADE : evidence += ", damage type is BLADE";break; ! case KNIFE : evidence += ", damage type is KNIFE";break; ! case WATER : evidence += ", damage type is WATER";break; ! case SHOCK : evidence += ", damage type is SHOCK";break; ! case COLD : evidence += ", damage type is COLD";break; ! case HEAT : evidence += ", damage type is HEAT";break; ! case GAS : evidence += ", damage type is GAS";break; ! case ACID : evidence += ", damage type is ACID";break; ! case MAGIC : evidence += ", damage type is MAGIC";break; ! case POISON : evidence += ", damage type is POISON";break; ! case DISEASE : evidence += ", damage type is DISEASE";break; ! case TRAUMA : evidence += ", damage type is TRAUMA";break; ! case PIERCE : evidence += ", damage type is PIERCE";break; ! case PSIONIC : evidence += ", damage type is PSIONIC";break; ! case ANOXIA : evidence += ", damage type is ANOXIA";break; ! case DEATHRAY : evidence += ", damage type is DEATHRAY";break; ! case EMOTIONAL : evidence += ", damage type is EMOTIONAL";break; ! case SONIC : evidence += ", damage type is SONIC";break; ! case BITE : evidence += ", damage type is BITE";break; ! case OTHER : evidence += ", damage type is OTHER";break; ! default : evidence += ", damage type is UNKNOWN";break; ! } } if(x) evidence += ", raw damage is "+x; if(internal) evidence += ", internal variable is "+internal; diff -c -r --new-file ds2.0r28/lib/domains/default/npc/fighter.c ds2.0r29/lib/domains/default/npc/fighter.c *** ds2.0r28/lib/domains/default/npc/fighter.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/npc/fighter.c Sat Jul 8 23:30:54 2006 *************** *** 9,23 **** SetLong("This is a large human warrior. His pectoral muscles "+ "are clearly visible even through his armor. His face is covered in "+ "bold blue tattoos."); ! SetCustomXP(350); SetLevel(10); SetRace("human"); - SetClass("fighter"); SetGender("male"); SetInventory(([ "/domains/default/armor/chainmail.c" : "wear chainmail", "/domains/default/weap/sharpsword.c" : "wield sword" ])); SetMaxHealthPoints(550); } void init(){ --- 9,27 ---- SetLong("This is a large human warrior. His pectoral muscles "+ "are clearly visible even through his armor. His face is covered in "+ "bold blue tattoos."); ! SetClass("fighter"); SetLevel(10); + SetCustomXP(350); SetRace("human"); SetGender("male"); SetInventory(([ "/domains/default/armor/chainmail.c" : "wear chainmail", "/domains/default/weap/sharpsword.c" : "wield sword" ])); + SetCurrency( ([ + "silver" : 100, + ]) ); + SetHealthPoints(549); SetMaxHealthPoints(550); } void init(){ diff -c -r --new-file ds2.0r28/lib/domains/default/npc/tree.c ds2.0r29/lib/domains/default/npc/tree.c *** ds2.0r28/lib/domains/default/npc/tree.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/npc/tree.c Sat Jul 8 23:30:54 2006 *************** *** 11,19 **** --- 11,21 ---- "pods are full to bursting with coins of all kinds. It would be no "+ "trouble at all to get from tree...looks like "+ "you've hit the jackpot!"); + SetPacifist(1); SetCanBite(0); SetLevel(99); SetRace("tree"); + SetHealthPoints(99999); SetMaxHealthPoints(99999); } void init(){ diff -c -r --new-file ds2.0r28/lib/domains/default/obj/guide.c ds2.0r29/lib/domains/default/obj/guide.c *** ds2.0r28/lib/domains/default/obj/guide.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/default/obj/guide.c Sun Jul 9 22:06:36 2006 *************** *** 4,12 **** void create(){ ::create(); ! SetKeyName("guidebook"); SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) ); ! SetAdjectives( ({"admin", "admins", "administrator", "administrators", "reference"}) ); SetShort("an Administrator's Guidebook"); SetLong("This is a reference text for Dead Souls administrators."); SetNoCondition(1); --- 4,12 ---- void create(){ ::create(); ! SetKeyName("administrator's guidebook"); SetId( ({"book", "guide", "administrators guide", "administrators guidebook"}) ); ! SetAdjectives( ({"admin's", "admin", "admins", "administrator", "administrators", "reference"}) ); SetShort("an Administrator's Guidebook"); SetLong("This is a reference text for Dead Souls administrators."); SetNoCondition(1); diff -c -r --new-file ds2.0r28/lib/domains/town/armor/badge.c ds2.0r29/lib/domains/town/armor/badge.c *** ds2.0r28/lib/domains/town/armor/badge.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/armor/badge.c Sun Jul 9 22:06:36 2006 *************** *** 1,4 **** --- 1,5 ---- #include + #include #include #include inherit LIB_ARMOR; *************** *** 6,23 **** static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ "pass is grounds for disciplinary action. A small scribble "+ "at the bottom of the pass reads: click heels"); SetMass(10); ! SetBaseCost("silver",5000); SetDamagePoints(100); SetArmorType(A_AMULET); - SetRestrictLimbs( ({"torso"}) ); SetRetainOnDeath(1); } void init(){ ::init(); --- 7,27 ---- static void create(){ armor::create(); SetKeyName("visitor pass"); ! SetId(({"testchar badge","badge","pass","visitor's pass"})); SetShort("a test character Visitor's Pass"); SetLong("This clip-on plastic badge grants the wearer access to "+ "some areas typically restricted to creator staff only. Abuse of this "+ "pass is grounds for disciplinary action. A small scribble "+ "at the bottom of the pass reads: click heels"); + SetProperties(([ + "no steal" : 1, + ])); SetMass(10); ! SetBaseCost(5000); SetDamagePoints(100); SetArmorType(A_AMULET); SetRetainOnDeath(1); + SetRestrictLimbs( ({ "torso" }) ); } void init(){ ::init(); *************** *** 29,35 **** write("There's no place like home!\n"+ "You are transported by an awesome whirlwind somewhere "+ "else...\n"); ! this_player()->eventMoveLiving("/domains/town/room/road"); return 1; } write("You click your heels together...but feel "+ --- 33,39 ---- write("There's no place like home!\n"+ "You are transported by an awesome whirlwind somewhere "+ "else...\n"); ! this_player()->eventMoveLiving(ROOM_START); return 1; } write("You click your heels together...but feel "+ diff -c -r --new-file ds2.0r28/lib/domains/town/npc/beggar.c ds2.0r29/lib/domains/town/npc/beggar.c *** ds2.0r28/lib/domains/town/npc/beggar.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/npc/beggar.c Sun Jul 9 19:04:27 2006 *************** *** 1,4 **** --- 1,5 ---- #include + #include #include inherit LIB_SENTIENT; *************** *** 36,41 **** --- 37,44 ---- object map; if(present(ob->GetKeyName(),environment(this_object())) && !this_object()->GetInCombat() && + member_array(ob->GetRace(),RACES_D->GetRaces(1)) != -1 && + !creatorp(ob) && !stringp(ob->CanManipulate()) ){ eventForce("say here, you might need this"); eventForce("give my first map to "+ob->GetKeyName()); *************** *** 49,55 **** int SayHi(object ob){ if(present(ob->GetKeyName(),environment(this_object())) ! && !this_object()->GetInCombat()) eventForce("say Hi, "+this_player()->GetName()); return 1; } --- 52,59 ---- int SayHi(object ob){ if(present(ob->GetKeyName(),environment(this_object())) ! && !this_object()->GetInCombat() && ! member_array(ob->GetRace(),RACES_D->GetRaces(1)) != -1) eventForce("say Hi, "+this_player()->GetName()); return 1; } diff -c -r --new-file ds2.0r28/lib/domains/town/npc/herkimer.c ds2.0r29/lib/domains/town/npc/herkimer.c *** ds2.0r28/lib/domains/town/npc/herkimer.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/npc/herkimer.c Sat Jul 8 23:30:54 2006 *************** *** 34,40 **** "see right through you, but the smile from beneath "+ "his white beard is reassuring."); SetLevel(300); ! SetUnique(1); SetRace("human"); SetGender("male"); SetClass("mage"); --- 34,40 ---- "see right through you, but the smile from beneath "+ "his white beard is reassuring."); SetLevel(300); ! SetUnique(0); SetRace("human"); SetGender("male"); SetClass("mage"); diff -c -r --new-file ds2.0r28/lib/domains/town/npc/orc2.c ds2.0r29/lib/domains/town/npc/orc2.c *** ds2.0r28/lib/domains/town/npc/orc2.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/npc/orc2.c Sun Jul 9 19:04:27 2006 *************** *** 2,7 **** --- 2,8 ---- inherit LIB_NPC; + int CheckOrc(mixed val){ if(!val) return 0; if(!objectp(val)) return 0; *************** *** 9,15 **** else eventForce("growl at "+val->GetKeyName()); return 1; } - static void create() { npc::create(); SetKeyName("orc"); --- 10,15 ---- *************** *** 30,32 **** --- 30,35 ---- ]) ); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r28/lib/domains/town/npc/rat.c ds2.0r29/lib/domains/town/npc/rat.c *** ds2.0r28/lib/domains/town/npc/rat.c Wed Jul 5 20:52:28 2006 --- ds2.0r29/lib/domains/town/npc/rat.c Sat Jul 8 23:30:55 2006 *************** *** 9,16 **** SetId( ({"rat"}) ); SetShort("a rat"); SetLong("A scruffy little dirty rat."); - SetLevel(1); SetRace("rodent"); SetGender("male"); SetEncounter(100); SetMessage("come","$N scurries in."); --- 9,17 ---- SetId( ({"rat"}) ); SetShort("a rat"); SetLong("A scruffy little dirty rat."); SetRace("rodent"); + SetHealthPoints(3); + SetMaxHealthPoints(3); SetGender("male"); SetEncounter(100); SetMessage("come","$N scurries in."); *************** *** 21,26 **** "You hear tiny munching sounds."})); } void init(){ - SetMaxHealthPoints(3); ::init(); } --- 22,26 ---- diff -c -r --new-file ds2.0r28/lib/domains/town/npc/thief.c ds2.0r29/lib/domains/town/npc/thief.c *** ds2.0r28/lib/domains/town/npc/thief.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/npc/thief.c Sat Jul 8 23:30:55 2006 *************** *** 2,8 **** inherit LIB_NPC; - static void create() { npc::create(); SetKeyName("thief"); --- 2,7 ---- *************** *** 13,29 **** "is obviously a thief who has snuck into the "+ "mansion and taken up residence. You seem "+ "to have caught him just after his shower."); ! SetLevel(3); SetRace("human"); ! SetClass("fighter"); SetGender("male"); SetEncounter(100); ! SetMaxHealthPoints(100); SetInventory(([ "/domains/town/armor/towel":"wear towel", "/domains/town/weap/brush":"wield brush", "/domains/town/obj/safe_key":1, ]) ); } void init(){ ::init(); --- 12,29 ---- "is obviously a thief who has snuck into the "+ "mansion and taken up residence. You seem "+ "to have caught him just after his shower."); ! SetLevel(1); SetRace("human"); ! SetClass("thief"); SetGender("male"); SetEncounter(100); ! SetMaxHealthPoints(50); SetInventory(([ "/domains/town/armor/towel":"wear towel", "/domains/town/weap/brush":"wield brush", "/domains/town/obj/safe_key":1, ]) ); + SetHealthPoints(50); } void init(){ ::init(); diff -c -r --new-file ds2.0r28/lib/domains/town/npc/zoe.c ds2.0r29/lib/domains/town/npc/zoe.c *** ds2.0r28/lib/domains/town/npc/zoe.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/npc/zoe.c Sat Jul 8 23:30:55 2006 *************** *** 3,8 **** --- 3,9 ---- inherit LIB_TELLER; + static void create() { ::create(); SetKeyName("zoe"); *************** *** 28,30 **** --- 29,34 ---- SetCurrencies( ({ "dollars", "copper", "silver", "electrum", "gold", "platinum" }) ); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r28/lib/domains/town/obj/ebutton1.c ds2.0r29/lib/domains/town/obj/ebutton1.c *** ds2.0r28/lib/domains/town/obj/ebutton1.c Wed Jul 5 20:52:28 2006 --- ds2.0r29/lib/domains/town/obj/ebutton1.c Fri Jul 7 19:41:41 2006 *************** *** 15,25 **** static void create() { dummy::create(); ! SetKeyName("button"); ! SetId(({"button","one","1" })); SetAdjectives("elevator","button","one","1"); SetShort("a button"); SetLong("It is a button that you could probably press. The numeral \"1\" " ! "is printed on it. Try: press 1 button"); SetPress((: openDoor :)); } --- 15,25 ---- static void create() { dummy::create(); ! SetKeyName("button 1"); ! SetId("button","one","1"); SetAdjectives("elevator","button","one","1"); SetShort("a button"); SetLong("It is a button that you could probably press. The numeral \"1\" " ! "is printed on it."); SetPress((: openDoor :)); } diff -c -r --new-file ds2.0r28/lib/domains/town/obj/ebutton2.c ds2.0r29/lib/domains/town/obj/ebutton2.c *** ds2.0r28/lib/domains/town/obj/ebutton2.c Wed Jul 5 20:52:28 2006 --- ds2.0r29/lib/domains/town/obj/ebutton2.c Sat Jul 8 23:30:55 2006 *************** *** 15,25 **** static void create() { dummy::create(); ! SetKeyName("button"); ! SetId(({"B"})); SetAdjectives("b", "elevator","button","basement","B"); SetShort("a button"); SetLong("It is a button that you could probably press. The letter \"B\" " ! "is printed on it. Try: press b button"); SetPress((: openDoor :)); } --- 15,25 ---- static void create() { dummy::create(); ! SetKeyName("button b"); ! SetId("b","button","two","B", "button B"); SetAdjectives("b", "elevator","button","basement","B"); SetShort("a button"); SetLong("It is a button that you could probably press. The letter \"B\" " ! "is printed on it."); SetPress((: openDoor :)); } diff -c -r --new-file ds2.0r28/lib/domains/town/obj/pack.c ds2.0r29/lib/domains/town/obj/pack.c *** ds2.0r28/lib/domains/town/obj/pack.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/obj/pack.c Sun Jul 9 19:04:27 2006 *************** *** 10,16 **** SetKeyName("backpack"); SetId(({"pack"})); SetAdjectives(({"leather","soft","brown"})); ! SetShort("a soft, brown leather backpack"); SetLong("This is a medium-sized backpack made of soft brown leather. "+ "It seems suitable for carrying books around, for the busy college student. "+ "It features wide, comfortable straps for convenient wear."); --- 10,16 ---- SetKeyName("backpack"); SetId(({"pack"})); SetAdjectives(({"leather","soft","brown"})); ! SetShort("a soft brown leather backpack"); SetLong("This is a medium-sized backpack made of soft brown leather. "+ "It seems suitable for carrying books around, for the busy college student. "+ "It features wide, comfortable straps for convenient wear."); diff -c -r --new-file ds2.0r28/lib/domains/town/obj/rayovac.c ds2.0r29/lib/domains/town/obj/rayovac.c *** ds2.0r28/lib/domains/town/obj/rayovac.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/obj/rayovac.c Sun Jul 9 19:04:28 2006 *************** *** 2,14 **** #include inherit "/lib/flashlight"; - void create(){ ::create(); SetKeyName("flashlight"); ! SetId( ({"fl","flashlight","light","torch","flashlite"}) ); SetAdjectives( ({"plastic","small","cheap","rayovac","Rayovac"}) ); ! SetShort( "a small, plastic flashlight" ); SetLong("This is a cheap Rayovac brand flashlight."); SetMass(20); SetBaseCost("silver",10); --- 2,13 ---- #include inherit "/lib/flashlight"; void create(){ ::create(); SetKeyName("flashlight"); ! SetId( ({"fl","flashlight","light","torch","flashlite", "rayovac"}) ); SetAdjectives( ({"plastic","small","cheap","rayovac","Rayovac"}) ); ! SetShort("a small plastic flashlight"); SetLong("This is a cheap Rayovac brand flashlight."); SetMass(20); SetBaseCost("silver",10); diff -c -r --new-file ds2.0r28/lib/domains/town/obj/simple_chair.c ds2.0r29/lib/domains/town/obj/simple_chair.c *** ds2.0r28/lib/domains/town/obj/simple_chair.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/domains/town/obj/simple_chair.c Sun Jul 9 22:06:36 2006 *************** *** 0 **** --- 1,18 ---- + #include + + inherit LIB_CHAIR; + + static void create() { + chair::create(); + SetKeyName("chair"); + SetAdjectives( ({"simple", "wooden"}) ); + SetId("chair"); + SetShort("a wooden chair"); + SetLong("A simple chair, made of wood, for sitting on."); + SetMass(150); + SetDollarCost(15); + SetMaxSitters(1); + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r28/lib/domains/town/obj/table.c ds2.0r29/lib/domains/town/obj/table.c *** ds2.0r28/lib/domains/town/obj/table.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/obj/table.c Sun Jul 9 22:06:36 2006 *************** *** 1,11 **** #include - inherit LIB_STORAGE; inherit LIB_CHAIR; ! inherit "/lib/comp/surface"; void create() { ! ::create(); SetKeyName("wooden table"); SetId( ({ "table" }) ); SetAdjectives( ({ "wood","wooden", "simple", "medium-sized" "medium sized" }) ); --- 1,11 ---- #include inherit LIB_CHAIR; ! inherit LIB_SURFACE; void create() { ! surface::create(); ! chair::create(); SetKeyName("wooden table"); SetId( ({ "table" }) ); SetAdjectives( ({ "wood","wooden", "simple", "medium-sized" "medium sized" }) ); diff -c -r --new-file ds2.0r28/lib/domains/town/obj/torch.c ds2.0r29/lib/domains/town/obj/torch.c *** ds2.0r28/lib/domains/town/obj/torch.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/obj/torch.c Sun Jul 9 19:04:28 2006 *************** *** 7,13 **** SetKeyName("torch"); SetId( ({ "torch", "old torch", "wooden torch" }) ); SetAdjectives( ({ "old", "wooden" }) ); ! SetShort("an old, wooden torch"); SetLong("An old, wooden torch with a bit of cloth wrapped around " "one end and dipped into a flamable substance."); SetRadiantLight(7); --- 7,13 ---- SetKeyName("torch"); SetId( ({ "torch", "old torch", "wooden torch" }) ); SetAdjectives( ({ "old", "wooden" }) ); ! SetShort("an old wooden torch"); SetLong("An old, wooden torch with a bit of cloth wrapped around " "one end and dipped into a flamable substance."); SetRadiantLight(7); *************** *** 20,22 **** --- 20,25 ---- SetBurntValue(10); SetClass(10); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r28/lib/domains/town/room/adv_guild.c ds2.0r29/lib/domains/town/room/adv_guild.c *** ds2.0r28/lib/domains/town/room/adv_guild.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/room/adv_guild.c Sat Jul 8 23:30:55 2006 *************** *** 30,43 **** SetInventory(([ "/domains/town/obj/bin" : 1, "/domains/town/obj/table" : 1, ])); SetRead( ([ ({"list","scroll"}) : (: ReadScroll :), ({"instructions","sign"}) : (: ReadSign :) ]) ); - AddStuff( ({ "/domains/town/npc/dirk" - }) ); SetProperty("no attack", 1); ob = new("/lib/bboard"); ob->SetKeyName("chalkboard"); --- 30,42 ---- SetInventory(([ "/domains/town/obj/bin" : 1, "/domains/town/obj/table" : 1, + "/domains/town/npc/dirk" : 1 ])); SetRead( ([ ({"list","scroll"}) : (: ReadScroll :), ({"instructions","sign"}) : (: ReadSign :) ]) ); SetProperty("no attack", 1); ob = new("/lib/bboard"); ob->SetKeyName("chalkboard"); diff -c -r --new-file ds2.0r28/lib/domains/town/room/elevator.c ds2.0r29/lib/domains/town/room/elevator.c *** ds2.0r28/lib/domains/town/room/elevator.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/room/elevator.c Sun Jul 9 22:06:36 2006 *************** *** 8,16 **** SetClimate("indoors"); SetAmbientLight(30); SetShort("Church Elevator"); ! SetLong("This is the elevator in the village church. The " ! "elevator door is on the east wall. Two buttons are " ! "set into the wall next to the door."); floor=1; moving = 0; closed=1; --- 8,14 ---- SetClimate("indoors"); SetAmbientLight(30); SetShort("Church Elevator"); ! SetLong("This is the elevator in the village church. The elevator door is on the east wall. Two buttons are set into the wall next to the door, labeled '1' and 'b'."); floor=1; moving = 0; closed=1; *************** *** 79,85 **** return 1; } int CanRelease(object ob){ ! if(closed > 0 && !creatorp(ob) && query_verb() == "go" ){ message("info","The elevator door is closed.", ob); return 0; } --- 77,88 ---- return 1; } int CanRelease(object ob){ ! if(archp(ob)) { ! tell_object(ob,"%^RED%^As archwizard, you are permitted to " ! "exit the elevator at any time. Normal creators and " ! "players cannot do this.%^RESET%^\n"); ! } ! if(closed > 0 && query_verb() == "go" ){ message("info","The elevator door is closed.", ob); return 0; } diff -c -r --new-file ds2.0r28/lib/domains/town/room/gate.c ds2.0r29/lib/domains/town/room/gate.c *** ds2.0r28/lib/domains/town/room/gate.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/room/gate.c Sat Jul 8 23:30:56 2006 *************** *** 1,7 **** #include inherit LIB_ROOM; - int PreExit(){ if(this_player()->GetLevel() > 3 && !creatorp(this_player())){ if(present("gate guard",this_object())){ --- 1,6 ---- *************** *** 49,61 **** "casual entry. They are made of brick and appear old " "and strong.", ]) ); SetExits( ([ "north" : "/domains/town/room/road1", ]) ); AddExit("south", "/domains/town/room/mansion_ext", (: PreExit :)); - AddStuff( ({ - "/domains/town/npc/mp" - }) ); SetProperty("no attack", 1); } --- 48,60 ---- "casual entry. They are made of brick and appear old " "and strong.", ]) ); + SetInventory(([ + "/domains/town/npc/mp" : 1, + ])); SetExits( ([ "north" : "/domains/town/room/road1", ]) ); AddExit("south", "/domains/town/room/mansion_ext", (: PreExit :)); SetProperty("no attack", 1); } diff -c -r --new-file ds2.0r28/lib/domains/town/room/magic_guild.c ds2.0r29/lib/domains/town/room/magic_guild.c *** ds2.0r28/lib/domains/town/room/magic_guild.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/room/magic_guild.c Sat Jul 8 23:30:56 2006 *************** *** 32,43 **** SetItems( ([ ({"list","list on the wall"}) : "A list of available spells", ]) ); SetRead(({"list","list on wall"}) , (: ReadList :) ); SetExits( ([ "north" : "/domains/town/room/magic_shop" ]) ); SetObviousExits("n"); - AddStuff( ({ "/domains/town/npc/herkimer" }) ); } void init(){ --- 32,45 ---- SetItems( ([ ({"list","list on the wall"}) : "A list of available spells", ]) ); + SetInventory(([ + "/domains/town/npc/herkimer" : 1, + ])); SetRead(({"list","list on wall"}) , (: ReadList :) ); SetExits( ([ "north" : "/domains/town/room/magic_shop" ]) ); SetObviousExits("n"); } void init(){ diff -c -r --new-file ds2.0r28/lib/domains/town/room/road2.c ds2.0r29/lib/domains/town/room/road2.c *** ds2.0r28/lib/domains/town/room/road2.c Wed Jul 5 00:01:11 2006 --- ds2.0r29/lib/domains/town/room/road2.c Sat Jul 8 23:30:56 2006 *************** *** 1,21 **** #include inherit LIB_ROOM; static void create() { room::create(); SetClimate("outdoors"); SetAmbientLight(30); SetShort("West Village road"); ! SetLong("This is a well-traveled road, leading east into town and west away from it. An old, humpbacked bridge is west of here."); SetItems(([ ({ "fort", "fortress", "fortress in the distance" }) : "It can't be seen well from here, but far north is what appears to be a large fortress built on a high plateau.", ({ "road", "roads" }) : "This is a simple east-west road that goes east into town and west away from it. Another road, paved with cobblestones, intersects here to the north and leads high toward a fortress in the distance.", "cobblestone road" : "This is where a cobblestone road begins that is built on an steep incline and rises up as it leads north to a high plateau.", ])); ! SetExits( ([ "west" : "/domains/town/room/bridge", "east" : "/domains/town/room/road1", ]) ); } void init(){ --- 1,29 ---- #include inherit LIB_ROOM; + string LongDesc(){ + string desc = "This is a well-traveled road, leading east into town and west away from it. An old, humpbacked bridge is west of here."; + if(this_object()->GetExit("north")) + desc += " A road north leads up to a plateau where a fortress stands in the distance."; + return desc; + } + static void create() { room::create(); SetClimate("outdoors"); SetAmbientLight(30); SetShort("West Village road"); ! SetLong((: LongDesc :)); SetItems(([ ({ "fort", "fortress", "fortress in the distance" }) : "It can't be seen well from here, but far north is what appears to be a large fortress built on a high plateau.", ({ "road", "roads" }) : "This is a simple east-west road that goes east into town and west away from it. Another road, paved with cobblestones, intersects here to the north and leads high toward a fortress in the distance.", "cobblestone road" : "This is where a cobblestone road begins that is built on an steep incline and rises up as it leads north to a high plateau.", ])); ! SetExits( ([ "west" : "/domains/town/room/bridge", "east" : "/domains/town/room/road1", ]) ); + if(mud_name() == "Dead Souls") AddExit("north","/domains/fort/room/f_road4.c"); } void init(){ diff -c -r --new-file ds2.0r28/lib/lib/blank_pile.c ds2.0r29/lib/lib/blank_pile.c *** ds2.0r28/lib/lib/blank_pile.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/blank_pile.c Fri Jul 7 19:41:41 2006 *************** *** 1,23 **** #include ! inherit LIB_ITEM; ! ! private string PileType = 0; ! int PileAmount = 0; static void create() { ! string *saveds; ! item::create(); ! saveds = item::GetSave(); ! saveds += ({ "PileType", "PileAmount" }); ! AddSave( saveds ); SetKeyName("money"); } string array GetId() { string array id; ! id = item::GetId(); if( PileType ) { if(PileType != "dollars") { id += ({ PileType, PileAmount + " " + PileType +" coins"}); --- 1,16 ---- #include ! inherit LIB_PILE; static void create() { ! pile::create(); SetKeyName("money"); } string array GetId() { string array id; ! id = pile::GetId(); if( PileType ) { if(PileType != "dollars") { id += ({ PileType, PileAmount + " " + PileType +" coins"}); *************** *** 30,59 **** } } - varargs string GetLong(string str) { - if( !PileAmount ) { - return 0; - } - if(PileType != "dollars") { - return PileAmount + " " + PileType + " coins."; - } - else return PileAmount + " " + PileType + "."; - } - - int GetMass() { - return currency_mass(PileAmount, PileType); - } - - void SetPile(string str, int amt) { - PileType = str; - PileAmount = amt; - parse_refresh(); - } - - string GetPileType() { return PileType; } - - int GetPileAmount() { return PileAmount; } - string GetShort() { string sum; if(!PileAmount) sum = "some"; --- 23,28 ---- *************** *** 64,130 **** else return sum + " " + PileType ; } - mixed eventGetCurrency(object who, int amount, string curr) { - string sum; - if(!amount) amount = PileAmount; - if( who->AddCurrency(curr, amount) == -1 ) { - who->eventPrint("You had a problem getting the money."); - return 1; - } - if(!amount) sum = "some"; - else sum = cardinal(amount); - send_messages("get", "$agent_name $agent_verb " + sum + " " + - curr + " " + GetShort() + ".", who, 0, environment(who)); - PileAmount -= amount; - if( PileAmount < 1 ) { - call_out((: Destruct :), 0); - return 1; - } - SetPile(PileType, PileAmount); /* This refreshes the parser */ - return 1; - } - - int eventMove(mixed dest) { - int x; - - x = item::eventMove(dest); - if( !environment() || !living(environment()) ) { - return x; - } - if(environment() && living(environment()) ) { - environment()->AddCurrency(PileType, PileAmount); - environment()->AddCarriedMass(-this_object()->GetMass()); - SetShort(PileAmount + " " + PileType); - //PileAmount = 0; - call_out((: Destruct :), 0); - return x; - } - } - - mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) { - int amt; - - if( environment() != environment(this_player()) ) { - return "#You cannot reach the money!"; - } - if( num[0] < '0' || num[0] > '9' ) { - return 0; - } - if( (amt = to_int(num)) < 1 ) { - return "That's a totally bogus amount."; - } - if( curr != PileType ) { - return "#There are no " + curr + " there, only " + PileType + "."; - } - if( amt > PileAmount ) { - return "#There is not that much there."; - } - if( !this_player()->CanCarry(currency_mass(amt, curr)) ) { - return "It is too heavy for you!"; - } - return 1; - } - - mixed direct_get_wrd_wrd_from_obj(string amt, string curr) { - return direct_get_wrd_wrd_out_of_obj(amt, curr); - } --- 33,35 ---- diff -c -r --new-file ds2.0r28/lib/lib/body.c ds2.0r29/lib/lib/body.c *** ds2.0r28/lib/lib/body.c Wed Jul 5 19:58:19 2006 --- ds2.0r29/lib/lib/body.c Sun Jul 9 19:04:28 2006 *************** *** 9,14 **** --- 9,15 ---- #include #include + #include #include #include #include *************** *** 68,73 **** --- 69,80 ---- ExtraChannels = ({}); } + varargs mixed eventBuy(mixed arg1, mixed arg2, mixed arg3){ + //This function will hopefully get overridden where appropriate. + write(capitalize(this_object()->GetShort())+" isn't buying anything from you."); + return 1; + } + int GetEncumbrance(){ int encumbrance = 0; object *stuff = filter(all_inventory(this_object()), (: !($1->GetWorn()) :) ); *************** *** 198,204 **** int eventCollapse() { int position = GetPosition(); ! foreach(object ob in all_inventory(environment(this_object()))){ if(inherits(LIB_CHAIR,ob) || inherits(LIB_BED,ob) ){ ob->eventReleaseStand(this_object()); } --- 205,213 ---- int eventCollapse() { int position = GetPosition(); ! if(!this_object() || !environment()) return 0; ! ! foreach(object ob in all_inventory(environment())){ if(inherits(LIB_CHAIR,ob) || inherits(LIB_BED,ob) ){ ob->eventReleaseStand(this_object()); } *************** *** 604,609 **** --- 613,619 ---- varargs int eventDie(mixed agent) { int x; string killer, death_annc; + object crime_scene; //debug(identify(agent)); //tc("stack: "+identify(get_stack())); *************** *** 629,641 **** if( x ) agent->eventDestroyEnemy(this_object()); else agent->eventKillEnemy(this_object()); } ! if( environment() ) { object *obs; string *currs; object ob; string curr; int i; if(GetRace() == "golem") { ob = new(LIB_CLAY); if(GetBodyComposition()) ob->SetComposition(GetBodyComposition()); --- 639,655 ---- if( x ) agent->eventDestroyEnemy(this_object()); else agent->eventKillEnemy(this_object()); } ! crime_scene = environment(); ! if( crime_scene ) { object *obs; string *currs; object ob; string curr; int i; + //I'd like to move the living body out first, but for now this + //misfeature stays. + //this_object()->eventMove(ROOM_VOID); if(GetRace() == "golem") { ob = new(LIB_CLAY); if(GetBodyComposition()) ob->SetComposition(GetBodyComposition()); *************** *** 645,651 **** else ob = new(LIB_CORPSE); ob->SetCorpse(this_object()); } ! ob->eventMove(environment()); obs = filter(all_inventory(), (: !((int)$1->GetRetainOnDeath()) :)); i = sizeof(obs); obs->eventMove(ob); --- 659,665 ---- else ob = new(LIB_CORPSE); ob->SetCorpse(this_object()); } ! ob->eventMove(crime_scene); obs = filter(all_inventory(), (: !((int)$1->GetRetainOnDeath()) :)); i = sizeof(obs); obs->eventMove(ob); diff -c -r --new-file ds2.0r28/lib/lib/combat.c ds2.0r29/lib/lib/combat.c *** ds2.0r28/lib/lib/combat.c Wed Jul 5 19:58:19 2006 --- ds2.0r29/lib/lib/combat.c Sat Jul 8 23:30:57 2006 *************** *** 57,62 **** --- 57,66 ---- } /* ***************** /lib/combat.c data functions ***************** */ + varargs int GetMaxHealthPoints(string limb){ + return race::GetMaxHealthPoints(limb); + } + int GetDead(){ return Dead; } *************** *** 656,664 **** int damage_type, damage, weapon_damage, actual_damage, encumbrance; encumbrance = this_object()->GetEncumbrance(); //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 200){ //tc("feep","yellow"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); } eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); --- 660,668 ---- int damage_type, damage, weapon_damage, actual_damage, encumbrance; encumbrance = this_object()->GetEncumbrance(); //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 20){ //tc("feep","yellow"); ! tell_object(this_object(),"You struggle to fight while carrying stuff."); } eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); *************** *** 752,760 **** int x, encumbrance; encumbrance = this_object()->GetEncumbrance(); //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 200){ //tc("feep","blue"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); } // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, --- 756,764 ---- int x, encumbrance; encumbrance = this_object()->GetEncumbrance(); //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 20){ //tc("feep","blue"); ! tell_object(this_object(),"You struggle to fight while carrying stuff."); } // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, diff -c -r --new-file ds2.0r28/lib/lib/command.c ds2.0r29/lib/lib/command.c *** ds2.0r28/lib/lib/command.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/command.c Sun Jul 9 19:04:28 2006 *************** *** 18,23 **** --- 18,27 ---- private static string *SearchPath; private static string *apostrophe_exceptions; + int direct_force_liv_str() { return 1; } + int direct_force_liv_to_str() { return 1; } + + /* *************** /lib/command.c driver applies *************** */ static void create() { *************** *** 31,37 **** } static string process_input(string cmd) { - //tc(this_object()->GetName()+": "+identify(parse_command(cmd))); return cmd; } --- 35,40 ---- *************** *** 42,59 **** mixed err; string verb, file; - //if(ParseMe(args) == 1) return 1; - //tc(this_object()->GetName()+" parse_command_id_list(): "+identify(parse_command_id_list())); - //tc(this_object()->GetName()+" parse_command_plural_id_list(): "+identify(parse_command_plural_id_list())); - //tc(this_object()->GetName()+" parse_command_adjectiv_id_list(): "+identify(parse_command_adjectiv_id_list())); - //tc(this_object()->GetName()+" parse_command_prepos_list(): "+identify(parse_command_prepos_list())); - - if(sizeof(args) && member_array(query_verb(), apostrophe_exceptions) == -1) - args = replace_string(args,"'",""); - old_agent = this_agent(this_object()); verb = query_verb(); - //write("verb: "+verb); if(this_player()->GetSleeping() > 0) { if(verb != "wake") { --- 45,52 ---- *************** *** 76,129 **** if( (int)this_object()->GetProperty("parse debug") ) dbg = 1; if( (int)this_object()->GetProperty("debug") ) dbg = 1; else dbg = 0; - //tc("command: checkpoint 1","green"); if( (err = parse_sentence(cmd, dbg)) == 1 ) { this_agent(old_agent || 1); return 1; } - //tc("command: checkpoint 2","green"); if( err ) { - //tc("command: checkpoint 3. err: "+err,"green"); if( err == -1 ) { - //tc("command: checkpoint 4","green"); if( !(err = (string)VERBS_D->GetErrorMessage(verb)) && !(err = (string)SOUL_D->GetErrorMessage(verb)) ) { err = "Such a command exists, but no default " "syntax is known."; } } - //tc("command: checkpoint 5","green"); if( intp(err) ) /* MudOS bug */ err = "What?"; SetCommandFail(err); } - //tc("command: checkpoint 6","green"); message("error", GetCommandFail(), this_object()); this_agent(old_agent || 1); return 1; } - //tc("command: checkpoint 7","green"); } - //tc("command: checkpoint 8","green"); if( (err = (mixed)call_other(file, "cmd", args)) != 1 ) { string cmd; - //tc("command: checkpoint 9","green"); if( err ) SetCommandFail(err); if( !args || args == "" ) cmd = verb; else cmd = verb + " " + args; if( (err = parse_sentence(cmd)) == 1 ) { - //tc("command: checkpoint 10","green"); this_agent(old_agent || 1); return 1; } - //tc("command: checkpoint 11","green"); if( !err ) err = GetCommandFail(); message("error", err, this_object()); this_agent(old_agent || 1); return 1; } - //tc("command: checkpoint 12","green"); this_agent(old_agent || 1); return 1; } --- 69,110 ---- diff -c -r --new-file ds2.0r28/lib/lib/events/get_from.c ds2.0r29/lib/lib/events/get_from.c *** ds2.0r28/lib/lib/events/get_from.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/events/get_from.c Sun Jul 9 19:04:28 2006 *************** *** 6,39 **** * Last modified: 96/12/22 */ // abstract methods int AddCarriedMass(int amount); string GetShort(); // end abstract methods mixed CanGetFrom(object who, object item) { - //tc("hit CanGetFrom"); - //tc("who: "+identify(who)); - //tc("item: "+identify(item)); - //tc("this_object: "+this_object()->GetName()); if( !item ) { - //tc("no item. about to return 0"); return 0; } if( environment(item) != this_object() ) { - //tc("this item isnt in my inventory. returning 0"); return 0; } - // if( environment(item) != this_object() ) { - ////tc("stack: "+get_stack()); - //tc("previous: "+identify(previous_object(-1))); - // - // return "#You can't do that."; - // } - //tc("survicved test"); if( environment(item) != this_object() ) { - //tc("oddness"); item = present(item->GetKeyName(),this_object()); if(!item) return 0; } --- 6,27 ---- * Last modified: 96/12/22 */ + #include + // abstract methods int AddCarriedMass(int amount); string GetShort(); // end abstract methods mixed CanGetFrom(object who, object item) { if( !item ) { return 0; } if( environment(item) != this_object() ) { return 0; } if( environment(item) != this_object() ) { item = present(item->GetKeyName(),this_object()); if(!item) return 0; } *************** *** 48,53 **** --- 36,47 ---- mixed CanPutInto(object who, object item) { object env; + if((inherits(LIB_SIT,item) && sizeof(item->GetSitters())) || + (inherits(LIB_LIE,item) && sizeof(item->GetLiers()))){ + write("There appears to be someone in your way."); + return 0; + } + if( item == this_object() ) { return "#You cannot change the laws of physics."; } *************** *** 65,71 **** mixed CanPutOnto(object who, object item) { object env; ! if(!inherits( "/lib/comp/surface", item ) ){ return "#That isn't a load-bearing surface."; } if( item == this_object() ) { --- 59,71 ---- mixed CanPutOnto(object who, object item) { object env; ! if((inherits(LIB_SIT,item) && sizeof(item->GetSitters())) || ! (inherits(LIB_LIE,item) && sizeof(item->GetLiers()))){ ! write("There appears to be someone preventing your access."); ! return 0; ! } ! ! if(!inherits( LIB_SURFACE, item ) ){ return "#That isn't a load-bearing surface."; } if( item == this_object() ) { *************** *** 86,92 **** string msg; int i, maxi; ! //tc("hit eventGetFrom. item is: " +identify(what),"red"); foreach(object ob in what ) { if( environment(ob) != this_object() ) { continue; --- 86,97 ---- string msg; int i, maxi; ! if((inherits(LIB_SIT,this_object()) && sizeof(this_object()->GetSitters())) || ! (inherits(LIB_LIE,this_object()) && sizeof(this_object()->GetLiers()))){ ! write("There appears to be someone on there."); ! return 0; ! } ! foreach(object ob in what ) { if( environment(ob) != this_object() ) { continue; *************** *** 138,143 **** --- 143,153 ---- } mixed eventPutOnto(object who, object what) { + if((inherits(LIB_SIT,this_object()) && sizeof(this_object()->GetSitters())) || + (inherits(LIB_LIE,this_object()) && sizeof(this_object()->GetLiers()))){ + write("There appears to be someone in the way of that."); + return 0; + } return what->eventPut(who, this_object()," onto "); } *************** *** 151,174 **** } mixed indirect_get_obj_from_obj(object item, object container) { - //tc("stack: "+get_stack()); - //tc("item is: " +identify(item)); - //tc("container is: " +identify(container)); - //tc("this object is: "+identify(this_object())); - //if(item) tc("item's environment is: "+identify(environment(item))); if(!item){ - //write("That's not there."); return 0; } if(environment(item) != this_object()) return 0; - // if(!(environment(item) == this_object())){ - // item = present(item->GetKeyName(),this_object()); - //tc("item is now: " +identify(item)); - //return 0; - // } - //tc("about to return CanGetFrom"); return CanGetFrom(this_player(), item); } --- 161,172 ---- diff -c -r --new-file ds2.0r28/lib/lib/events/lie.c ds2.0r29/lib/lib/events/lie.c *** ds2.0r28/lib/lib/events/lie.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/events/lie.c Sun Jul 9 22:06:37 2006 *************** *** 1,4 **** --- 1,6 ---- #include + #include + inherit LIB_SIT; private int MaxLiers = 1; private object array Liers = ({}); *************** *** 12,27 **** } object array GetLiers() { ! return Liers; } mixed eventReceiveLay(object who) { Liers = ({ Liers..., who }); return 1; } mixed eventReleaseStand(object who) { Liers -= ({ who }); return 1; } --- 14,37 ---- } object array GetLiers() { ! return copy(Liers); } mixed eventReceiveLay(object who) { + if(who->GetProperty("furniture")){ + write("You are already using a piece of furniture."); + return 1; + } Liers = ({ Liers..., who }); + who->SetProperty("furniture", " on "+this_object()->GetShort()); + who->SetProperty("furniture_object", this_object()); return 1; } mixed eventReleaseStand(object who) { Liers -= ({ who }); + Liers = filter(Liers, (: objectp($1) :) ); + sit::eventReleaseStand(who); return 1; } *************** *** 39,41 **** --- 49,65 ---- mixed direct_lie_down_word_obj() { return direct_lie_word_obj(); } + + int CanGet(object who){ + object *liers = this_object()->GetLiers(); if(sizeof(liers)){ + foreach(object wer in liers){ if(!wer || environment(wer) != environment()) this_object()->eventReleaseStand(wer); + } + if(sizeof(this_object()->GetLiers())){ + write(this_object()->GetLiers()[0]->GetName()+" is using it right now."); + return 0; + } + else return sit::CanGet(who); + } + else return sit::CanGet(who); + } + diff -c -r --new-file ds2.0r28/lib/lib/events/look.c ds2.0r29/lib/lib/events/look.c *** ds2.0r28/lib/lib/events/look.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/events/look.c Sun Jul 9 20:32:28 2006 *************** *** 8,13 **** --- 8,14 ---- #include #include + #include private mixed ExternalDesc = 0; private int Invisible = 0; *************** *** 173,188 **** GetShort() + ".", ({ who, this_object() })); } - if(inherits(LIB_SURFACE,this_object()) || - this_object()->GetOpacity() < 33){ - //tempdesc = this_object()->eventShowInterior(who); - who->eventPrint(desc); - this_object()->eventShowInterior(who); - } ! else { ! who->eventPrint(desc); } return 1; } --- 174,190 ---- GetShort() + ".", ({ who, this_object() })); } ! if((!inherits(LIB_SIT,this_object()) && !inherits(LIB_LIE,this_object())) || ! (!sizeof(this_object()->GetLiers()) && !sizeof(this_object()->GetSitters()))){ ! if(inherits(LIB_SURFACE,this_object()) || ! this_object()->GetOpacity() < 33){ ! who->eventPrint(desc); ! this_object()->eventShowInterior(who); ! } ! else who->eventPrint(desc); } + else who->eventPrint(desc); return 1; } *************** *** 204,210 **** --- 206,226 ---- } mixed direct_look_at_str_on_obj(string str, object target) { + object dingus; str = remove_article(lower_case(str)); + + if((inherits(LIB_SIT,target) && sizeof(target->GetSitters())) || + (inherits(LIB_LIE,target) && sizeof(target->GetLiers()))){ + write("There appears to be someone blocking your view."); + return 0; + } + + if((inherits(LIB_SURFACE,target) || living(target)) && dingus = present(str, target)){ + if(this_player()->GetEffectiveVision() == VISION_CLEAR){ + return dingus->GetExternalDesc(); + } + else return "#You can't quite make out its details."; + } if( !Items[str] ) { return "#There is no " + str + " on " + GetShort() + "."; } diff -c -r --new-file ds2.0r28/lib/lib/events/put.c ds2.0r29/lib/lib/events/put.c *** ds2.0r28/lib/lib/events/put.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/events/put.c Sun Jul 9 19:04:28 2006 *************** *** 4,9 **** --- 4,11 ---- * created by Descartes of Borg 960114 */ + #include + private mixed PreventPut; // abstract methods *************** *** 51,68 **** varargs mixed eventPut(object who, object storage, string prep) { int depth; - if(!prep || prep == "") prep = " into "; ! if(prep == " onto " && !inherits( "/lib/comp/surface", previous_object() ) ) { who->eventPrint("That isn't a load-bearing surface."); return 0; } ! if(prep == " into " && inherits( "/lib/comp/surface", previous_object() ) ) { who->eventPrint("That's a surface. Try \"put on\""); return 0; } if( !eventMove(storage) ) { who->eventPrint("There is not enough room in there!"); return 0; --- 53,76 ---- varargs mixed eventPut(object who, object storage, string prep) { int depth; if(!prep || prep == "") prep = " into "; ! if(prep == " onto " && !inherits( LIB_SURFACE, previous_object() ) ) { who->eventPrint("That isn't a load-bearing surface."); return 0; } ! if(prep == " into " && inherits( LIB_SURFACE, previous_object() ) ) { who->eventPrint("That's a surface. Try \"put on\""); return 0; } + if((inherits(LIB_SIT,storage) && sizeof(storage->GetSitters())) || + (inherits(LIB_LIE,storage) && sizeof(storage->GetLiers()))){ + write("There appears to be someone blocking your access."); + return 0; + } + + if( !eventMove(storage) ) { who->eventPrint("There is not enough room in there!"); return 0; diff -c -r --new-file ds2.0r28/lib/lib/events/sit.c ds2.0r29/lib/lib/events/sit.c *** ds2.0r28/lib/lib/events/sit.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/events/sit.c Sun Jul 9 22:06:37 2006 *************** *** 20,35 **** } object array GetSitters() { ! return Sitters; } mixed eventReceiveSit(object who) { Sitters = ({ Sitters..., who }); return 1; } mixed eventReleaseStand(object who) { Sitters -= ({ who }); return 1; } --- 20,44 ---- } object array GetSitters() { ! return copy(Sitters); } mixed eventReceiveSit(object who) { + if(who->GetProperty("furniture")){ + write("You are already using a piece of furniture."); + return 1; + } Sitters = ({ Sitters..., who }); + who->SetProperty("furniture", " on "+this_object()->GetShort()); + who->SetProperty("furniture_object", this_object()); return 1; } mixed eventReleaseStand(object who) { Sitters -= ({ who }); + Sitters = filter(Sitters, (: objectp($1) :) ); + if(who) who->RemoveProperty("furniture"); + if(who) who->RemoveProperty("furniture_object"); return 1; } *************** *** 47,49 **** --- 56,73 ---- mixed direct_sit_down_word_obj() { return direct_sit_word_obj(); } + + int CanGet(object who){ + object *sitters = this_object()->GetSitters(); + if(sizeof(sitters)){ + foreach(object wer in sitters){ + if(!wer || environment(wer) != environment()) this_object()->eventReleaseStand(wer); + } if(sizeof(this_object()->GetSitters())){ + write(this_object()->GetSitters()[0]->GetName()+" is using it right now."); + return 0; + } + else return 1; + } + else return 1; + } + diff -c -r --new-file ds2.0r28/lib/lib/exits.c ds2.0r29/lib/lib/exits.c *** ds2.0r28/lib/lib/exits.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/exits.c Fri Jul 7 19:41:42 2006 *************** *** 82,87 **** --- 82,91 ---- if( ob ) { ob->SetDoor(file); } + + if(!file_exists(file) && !file_exists(file+".c")){ + return "Door not found."; + } file->eventRegisterSide(dir); return (Doors[dir] = file); } diff -c -r --new-file ds2.0r28/lib/lib/interactive.c ds2.0r29/lib/lib/interactive.c *** ds2.0r28/lib/lib/interactive.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/interactive.c Sat Jul 8 23:30:58 2006 *************** *** 31,36 **** --- 31,37 ---- private int Age, WhereBlock, Brief, LoginTime, BirthTime, RescueBit; private string Password, Email, RealName, Rank, LoginSite, HostSite, WebPage; + private string globaltmp; private mapping News; private class marriage *Marriages; private static int LastAge, Setup; *************** *** 263,269 **** lying[s]++; } } - //tc(identify(shorts)); for(i=0, desc = 0, maxi = sizeof(shorts = keys(lying)); i 1 || val >1 ) desc += " are here.%^RESET%^\n"; *************** *** 299,304 **** --- 301,307 ---- i = GetEffectiveVision(); if( i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM ) { mapping lying = ([]), sitting = ([]), standing = ([]), flying = ([]); + mapping furniture = ([]); object *obs; string key; int val; *************** *** 313,320 **** foreach(object liv in obs) { string s = (string)liv->GetHealthShort(); int pos = (int)liv->GetPosition(); - if( !s ) continue; if( pos == POSITION_STANDING) standing[s]++; else if( pos == POSITION_LYING || (int)liv->isFreshCorpse() ) lying[s]++; --- 316,330 ---- foreach(object liv in obs) { string s = (string)liv->GetHealthShort(); int pos = (int)liv->GetPosition(); if( !s ) continue; + if(liv->GetProperty("furniture")) { + s += "BEGIN"+random(999999)+"END"; + } + if(liv->GetProperty("furniture")){ + furniture[s] = liv->GetProperty("furniture"); + } + else if(!furniture[s]) furniture[s] = 0; + if( pos == POSITION_STANDING) standing[s]++; else if( pos == POSITION_LYING || (int)liv->isFreshCorpse() ) lying[s]++; *************** *** 330,348 **** } desc = ""; foreach(key, val in lying) { ! if( val<2 ) desc += capitalize(key) + "%^RESET%^ is lying down."; ! else desc += capitalize(consolidate(val, key)) + "%^RESET%^ are lying down."; desc += "\n"; } foreach(key, val in sitting) { ! if( val<2 ) ! desc += capitalize(key) + "%^RESET%^ is sitting down."; ! else desc += capitalize(consolidate(val, key)) + "%^RESET%^ are sitting down."; desc += "\n"; } foreach(key, val in standing) { if( val<2 ) desc += capitalize(key) + "%^RESET%^ is standing here."; else desc += capitalize(consolidate(val, key)) + --- 340,407 ---- } desc = ""; foreach(key, val in lying) { ! globaltmp = key; ! if(grepp(key,"BEGIN")) { ! sscanf(key,"%sBEGIN%*s",key); ! } ! ! if(lying[globaltmp]>1 && !furniture[globaltmp]){ ! desc += capitalize(consolidate(val, globaltmp)) + "%^RESET%^ are lying down."; + } + else if(lying[globaltmp]<2 && !furniture[globaltmp]){ + desc += capitalize(key) + "%^RESET%^ is lying down."; + } + else if(furniture[globaltmp]) { + desc += capitalize(key) + "%^RESET%^ is lying down"+ + ((furniture[globaltmp]) ? furniture[globaltmp] : "") +"."; + } + else if(furniture[key]) { + desc += capitalize(key) + "%^RESET%^ is lying down"+ + ((furniture[key]) ? furniture[key] : "") +"."; + } + + + else { + desc += "wtf. i am "+key+", furniture["+globaltmp+"] is: "+furniture[globaltmp]+"\n"+ + " furniture["+key+"] is: "+furniture[key]+", and val is: "+val; + } + desc += "\n"; } foreach(key, val in sitting) { ! globaltmp = key; ! if(grepp(key,"BEGIN")) { ! sscanf(key,"%sBEGIN%*s",key); ! } ! ! if(sitting[globaltmp]>1 && !furniture[globaltmp]){ ! desc += capitalize(consolidate(val, globaltmp)) + "%^RESET%^ are sitting down."; + } + else if(sitting[globaltmp]<2 && !furniture[globaltmp]){ + desc += capitalize(key) + "%^RESET%^ is sitting down."; + } + else if(furniture[globaltmp]) { + desc += capitalize(key) + "%^RESET%^ is sitting down"+ + ((furniture[globaltmp]) ? furniture[globaltmp] : "") +"."; + } + else if(furniture[key]) { + desc += capitalize(key) + "%^RESET%^ is sitting down"+ + ((furniture[key]) ? furniture[key] : "") +"."; + } + + + else { + desc += "wtf. i am "+key+", furniture["+globaltmp+"] is: "+furniture[globaltmp]+"\n"+ + " furniture["+key+"] is: "+furniture[key]+", and val is: "+val; + } desc += "\n"; } foreach(key, val in standing) { + if(grepp(key,"BEGIN")) { + sscanf(key,"%sBEGIN%*s",key); + } if( val<2 ) desc += capitalize(key) + "%^RESET%^ is standing here."; else desc += capitalize(consolidate(val, key)) + diff -c -r --new-file ds2.0r28/lib/lib/living.c ds2.0r29/lib/lib/living.c *** ds2.0r28/lib/lib/living.c Wed Jul 5 19:58:19 2006 --- ds2.0r29/lib/lib/living.c Sat Jul 8 23:30:58 2006 *************** *** 613,618 **** --- 613,622 ---- return (carry::GetCarriedMass()); } + varargs int GetMaxHealthPoints(string limb){ + return combat::GetMaxHealthPoints(limb); + } + int GetMaxCarry() { return combat::GetMaxCarry(); } int SetPK(int x) { return (isPK = x); } diff -c -r --new-file ds2.0r28/lib/lib/meal.c ds2.0r29/lib/lib/meal.c *** ds2.0r28/lib/lib/meal.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/meal.c Sun Jul 9 19:04:29 2006 *************** *** 60,65 **** --- 60,66 ---- mixed eventDrink(object who) { mixed tmp; int x; + object ob; if( (tmp = (mixed)who->eventDrink(this_object())) != 1 ) return tmp; if( (x = functionp(MyMessage)) && !(x & FP_OWNER_DESTED) ) { *************** *** 75,100 **** who->eventPrint( capitalize(mymsg) ); environment(who)->eventPrint( capitalize(othermsg), who ); } - if( GetEmptyItem() ) { - object ob; ! ob = new(GetEmptyItem() || LIB_ITEM); ! if( base_name(ob) == LIB_ITEM ) { ! ob->SetKeyName(GetEmptyName()); ! ob->SetId( ({ GetEmptyName(), "container", "empty container" }) ); ! ob->SetShort(GetEmptyShort()); ! ob->SetLong(GetEmptyLong()); ! ob->SetValue(10); ! ob->SetMass(100); ! ob->SetDestroyOnSell(); ! } ! if( !((int)ob->eventMove(who)) ) { ! who->eventPrint("You drop " + (string)ob->GetShort() + "."); ! environment(who)->eventPrint((string)who->GetName() + ! " drops " + (string)ob->GetShort() + ".", who); ! ob->eventMove(environment(who)); ! } } if( x = GetPoison() ) { if( random((int)who->GetStatLevel("luck")) > 35 ) who->eventPrint("That didn't seem to taste quite right."); --- 76,99 ---- who->eventPrint( capitalize(mymsg) ); environment(who)->eventPrint( capitalize(othermsg), who ); } ! ob = new(GetEmptyItem() || LIB_ITEM); ! if( base_name(ob) == LIB_ITEM ) { ! ob->SetKeyName(GetEmptyName()); ! ob->SetId( ({ GetEmptyName(), "container", "empty container" }) ); ! ob->SetShort(GetEmptyShort()); ! ob->SetLong(GetEmptyLong()); ! ob->SetBaseCost(1); ! ob->SetMass(10); ! ob->SetDestroyOnSell(); ! } ! if( !((int)ob->eventMove(who)) ) { ! who->eventPrint("You drop " + (string)ob->GetShort() + "."); ! environment(who)->eventPrint((string)who->GetName() + ! " drops " + (string)ob->GetShort() + ".", who); ! ob->eventMove(environment(who)); } + if( x = GetPoison() ) { if( random((int)who->GetStatLevel("luck")) > 35 ) who->eventPrint("That didn't seem to taste quite right."); diff -c -r --new-file ds2.0r28/lib/lib/npc.c ds2.0r29/lib/lib/npc.c *** ds2.0r28/lib/lib/npc.c Wed Jul 5 19:58:20 2006 --- ds2.0r29/lib/lib/npc.c Sat Jul 8 23:30:58 2006 *************** *** 25,30 **** --- 25,31 ---- inherit LIB_SAVE; private int CustomXP, ActionChance, CombatActionChance, AutoStand, Mount; + private int MaximumHealth = 0; private mixed Encounter; private string *EnemyNames; private static int Level, Unique; *************** *** 606,613 **** return GetHealthPoints(); } int SetMaxHealthPoints(int x) { ! SetStat("durability", to_int((x-50)/10), GetStatClass("durability")); return GetMaxHealthPoints(); } --- 607,620 ---- return GetHealthPoints(); } + varargs int GetMaxHealthPoints(string limb){ + if(MaximumHealth) return MaximumHealth; + else return living::GetMaxHealthPoints(limb); + } + int SetMaxHealthPoints(int x) { ! if(x) MaximumHealth = x; ! else SetStat("durability", to_int((x-50)/10), GetStatClass("durability")); return GetMaxHealthPoints(); } diff -c -r --new-file ds2.0r28/lib/lib/pile.c ds2.0r29/lib/lib/pile.c *** ds2.0r28/lib/lib/pile.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/pile.c Sat Jul 8 23:30:58 2006 *************** *** 10,21 **** inherit LIB_ITEM; ! private string PileType = 0; ! private int PileAmount = 0; static void create() { string *saveds; item::create(); saveds = item::GetSave(); saveds += ({ "PileType", "PileAmount" }); AddSave( saveds ); --- 10,22 ---- inherit LIB_ITEM; ! string PileType = 0; ! int PileAmount = 0; static void create() { string *saveds; item::create(); + SetNoCondition(1); saveds = item::GetSave(); saveds += ({ "PileType", "PileAmount" }); AddSave( saveds ); *************** *** 27,42 **** id = item::GetId(); if( PileType ) { ! id += ({ PileType, PileAmount + " " + PileType }); } ! return ({ id..., "money", "pile" }); ! } ! ! varargs string GetLong(string str) { ! if( !PileAmount ) { ! return 0; ! } ! return "It is a pile of " + PileAmount + " " + PileType + "."; } int GetMass() { --- 28,36 ---- id = item::GetId(); if( PileType ) { ! id += ({ PileType, PileAmount + " " + PileType, "pile of "+PileType }); } ! return ({ id..., "money", "pile", "pile of "+ PileAmount + " " + PileType }); } int GetMass() { *************** *** 46,51 **** --- 40,50 ---- void SetPile(string str, int amt) { PileType = str; PileAmount = amt; + if(!PileAmount || PileAmount < 1 ){ + SetLong("a pile of money"); + call_out( (: eventDestruct :), 1); + } + else SetLong("It is a pile of " + PileAmount + " " + PileType + "."); parse_refresh(); } *************** *** 56,61 **** --- 55,64 ---- string GetShort() { string str = item::GetShort(); + if(!PileAmount || PileAmount < 1 ){ + call_out( (: eventDestruct :), 1); + return "a pile of money"; + } if( str ) { return str; } *************** *** 84,98 **** int x; x = item::eventMove(dest); ! if( !living(environment()) ) { return x; } - environment()->AddCurrency(PileType, PileAmount); - environment()->AddCarriedMass(-this_object()->GetMass()); - SetShort("a pile of " + PileAmount + " " + PileType); - PileAmount = 0; - call_out((: Destruct :), 0); - return x; } mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) { --- 87,104 ---- int x; x = item::eventMove(dest); ! if( environment() && !living(environment()) ) { ! return x; ! } ! ! if(environment() && living(environment())){ ! environment()->AddCurrency(PileType, PileAmount); ! environment()->AddCarriedMass(-this_object()->GetMass()); ! SetShort("a pile of " + PileAmount + " " + PileType); ! PileAmount = 0; ! call_out((: Destruct :), 0); return x; } } mixed direct_get_wrd_wrd_out_of_obj(string num, string curr) { *************** *** 122,124 **** --- 128,138 ---- mixed direct_get_wrd_wrd_from_obj(string amt, string curr) { return direct_get_wrd_wrd_out_of_obj(amt, curr); } + + void init(){ + ::init(); + if(!PileAmount || PileAmount < 1 ){ + SetLong("some money"); + call_out( (: eventDestruct :), 1); + } + } diff -c -r --new-file ds2.0r28/lib/lib/props/clean.c ds2.0r29/lib/lib/props/clean.c *** ds2.0r28/lib/lib/props/clean.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/props/clean.c Sat Jul 8 23:30:59 2006 *************** *** 29,35 **** * another object, call ob->eventDestruct(). */ static int Destruct() { ! object env; if( !this_object() ) { return 1; --- 29,35 ---- * another object, call ob->eventDestruct(). */ static int Destruct() { ! object env, furn; if( !this_object() ) { return 1; *************** *** 42,47 **** --- 42,51 ---- } } } + + if(living(this_object()) && furn = this_object()->GetProperty("furniture_object")) + if(objectp(furn)) furn->eventReleaseStand(this_object()); + remove_call_out(); destruct(this_object()); return !(this_object()); diff -c -r --new-file ds2.0r28/lib/lib/props/move.c ds2.0r29/lib/lib/props/move.c *** ds2.0r28/lib/lib/props/move.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/props/move.c Sat Jul 8 23:30:59 2006 *************** *** 9,15 **** } int eventMove(mixed dest) { ! object ob,to; int depth; to=this_object(); --- 9,15 ---- } int eventMove(mixed dest) { ! object ob,to,furn; int depth; to=this_object(); *************** *** 77,81 **** --- 77,85 ---- } } } + + if(living(this_object()) && furn = this_object()->GetProperty("furniture_object")) + if(objectp(furn)) furn->eventReleaseStand(this_object()); + return (LastEnvironment != environment()); } diff -c -r --new-file ds2.0r28/lib/lib/std/bed.c ds2.0r29/lib/lib/std/bed.c *** ds2.0r28/lib/lib/std/bed.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/std/bed.c Sun Jul 9 22:06:37 2006 *************** *** 1,17 **** #include inherit LIB_ITEM; - inherit LIB_SIT; inherit LIB_LIE; inherit LIB_SURFACE; void create(){ ! ::create(); ! SetMaxSitters(4); SetMaxLiers(2); SetMaxCarry(300); SetMass(1700); } --- 1,23 ---- #include inherit LIB_ITEM; inherit LIB_LIE; inherit LIB_SURFACE; void create(){ ! item::create(); ! surface::create(); ! ! SetMaxLiers(4); SetMaxLiers(2); SetMaxCarry(300); SetMass(1700); } + int CanGet(object who){ + if(lie::CanGet(who)) + return item::CanGet(who); + else return 0; + } diff -c -r --new-file ds2.0r28/lib/lib/std/chair.c ds2.0r29/lib/lib/std/chair.c *** ds2.0r28/lib/lib/std/chair.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/std/chair.c Sun Jul 9 22:06:37 2006 *************** *** 19,22 **** --- 19,28 ---- SetMass(500); } + int CanGet(object who){ + if(sit::CanGet(who)) + return item::CanGet(who); + else return 0; + } + /* Nothing else needs to happen here */ diff -c -r --new-file ds2.0r28/lib/lib/std/corpse.c ds2.0r29/lib/lib/std/corpse.c *** ds2.0r28/lib/lib/std/corpse.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/std/corpse.c Fri Jul 7 19:41:43 2006 *************** *** 74,80 **** Race = who->GetRace(); Count = 1; Fresh = 1; ! SetShort((string)who->GetShort()); SetLong("As you look closely at " + who->GetCapName() + ", you notice that " + nominative(who) + " does not appear to be moving."); --- 74,80 ---- Race = who->GetRace(); Count = 1; Fresh = 1; ! SetShort("the corpse of "+(string)who->GetShort()); SetLong("As you look closely at " + who->GetCapName() + ", you notice that " + nominative(who) + " does not appear to be moving."); diff -c -r --new-file ds2.0r28/lib/lib/std/table.c ds2.0r29/lib/lib/std/table.c *** ds2.0r28/lib/lib/std/table.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/std/table.c Sun Jul 9 22:06:38 2006 *************** *** 1,14 **** #include ! inherit LIB_ITEM; ! inherit LIB_SIT; ! inherit LIB_LIE; ! ! inherit LIB_STORAGE; ! inherit LIB_SURFACE; void create(){ ! storage::create(); SetMaxSitters(2); SetMaxLiers(1); SetMaxCarry(500); --- 1,11 ---- #include ! inherit LIB_BED; void create(){ ! bed::create(); ! SetShort("A table"); ! SetLong("A table"); SetMaxSitters(2); SetMaxLiers(1); SetMaxCarry(500); *************** *** 17,20 **** --- 14,24 ---- inventory_accessible(); } + void init(){ + ::init(); + } + + int CanGet(object who){ + return bed::CanGet(who); + } diff -c -r --new-file ds2.0r28/lib/lib/std/vendor.c ds2.0r29/lib/lib/std/vendor.c *** ds2.0r28/lib/lib/std/vendor.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/lib/std/vendor.c Sun Jul 9 19:04:29 2006 *************** *** 200,209 **** list2 += ({ ( obs[counter]->GetKeyName()) }); } } ! obs2 = ({ present(list2[0],sroom) }); ! maxi = sizeof(list2); ! for(int counter = 1;counter < maxi;++counter) { ! obs2 += ({ present(list2[counter],sroom) }); } maxi = sizeof(obs2); i = (int)this_player()->GetScreen()[0]; --- 200,218 ---- list2 += ({ ( obs[counter]->GetKeyName()) }); } } ! //obs2 = ({ present(list2[0],sroom) }); ! //maxi = sizeof(list2); ! //for(int counter = 1;counter < maxi;++counter) { ! // obs2 += ({ present(list2[counter],sroom) }); ! // } ! obs2 = ({}); ! foreach(object tempob in obs){ ! string *base_names = ({}); ! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) }); ! if(!sizeof(obs2)) { ! obs2 = ({tempob}); ! } ! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob }); } maxi = sizeof(obs2); i = (int)this_player()->GetScreen()[0]; *************** *** 318,325 **** cost=to_int(ob->GetBaseCost() / ECONOMY_D->__Query(LocalCurrency,"rate")); } else cost=to_int(floor(ob->GetBaseCost())); ! if(cost && cost > 0) x=cost; ! if(!cost || cost < 0) x = to_int(floor(GetValue(ob, this_player()))); eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will offer " "you " + x + " " + GetLocalCurrency() + " for " + (string)ob->GetShort()); --- 327,338 ---- cost=to_int(ob->GetBaseCost() / ECONOMY_D->__Query(LocalCurrency,"rate")); } else cost=to_int(floor(ob->GetBaseCost())); ! if(!cost || cost < 1){ ! eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will not buy " ! "that worthless thing from you."); ! return 1; ! } ! else x=cost; eventForce("say " + capitalize((string)who->GetKeyName()) + ", I will offer " "you " + x + " " + GetLocalCurrency() + " for " + (string)ob->GetShort()); *************** *** 343,367 **** return 0; } obs = all_inventory(sroom); ! maxi = sizeof(obs); if( x = to_int(args) ) { ! list2 = ({(obs[0]->GetKeyName())}); for(int counter = 1;counter < maxi;++counter) { ! if(member_array((obs[counter]->GetKeyName()),list2) < 0) { ! list2 += ({ ( obs[counter]->GetKeyName()) }); } } - obs2 = ({ present(list2[0],sroom) }); maxi = sizeof(list2); ! for(int counter = 1;counter < maxi;++counter) { ! obs2 += ({ present(list2[counter],sroom) }); ! } ! if((x <= 0) || (x > sizeof(obs2))) ob = 0; ! else ! ob = obs2[x-1]; ! } else ob = present(args = lower_case(args), sroom); if( !ob ) { eventForce("say I have no such thing!"); return 1; --- 356,384 ---- return 0; } obs = all_inventory(sroom); ! obs2 = ({}); ! foreach(object tempob in obs){ ! string *base_names = ({}); ! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) }); ! if(!sizeof(obs2)) { ! obs2 = ({tempob}); ! } ! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob }); ! } ! maxi = sizeof(obs2); if( x = to_int(args) ) { ! list2 = ({(obs2[0]->GetKeyName())}); for(int counter = 1;counter < maxi;++counter) { ! if(member_array((obs2[counter]->GetKeyName()),list2) < 0) { ! list2 += ({ ( obs2[counter]->GetKeyName()) }); } } maxi = sizeof(list2); ! ob = obs2[x-1]; } else ob = present(args = lower_case(args), sroom); + if(!ob) foreach(object tempob in obs2) + if(answers_to(args,tempob)) ob = tempob; if( !ob ) { eventForce("say I have no such thing!"); return 1; *************** *** 436,455 **** sroom = load_object(StorageRoom); obs = all_inventory(sroom); ! maxi = sizeof(obs); if(number = to_int(what)) { number = number - 1; ! list2 = ({(obs[0]->GetKeyName())}); for(int counter = 1;counter < maxi;++counter) { ! if(member_array((obs[counter]->GetKeyName()),list2) < 0) { ! list2 += ({ ( obs[counter]->GetKeyName()) }); } } - obs2 = ({ present(list2[0],sroom) }); maxi = sizeof(list2); - for(int counter = 1;counter < maxi;++counter) { - obs2 += ({ present(list2[counter],sroom) }); - } if((number >= 0) && (number < sizeof(obs2))) { ob = obs2[number]; } else { --- 453,477 ---- sroom = load_object(StorageRoom); obs = all_inventory(sroom); ! obs2 = ({}); ! foreach(object tempob in obs){ ! string *base_names = ({}); ! foreach( object tempob2 in obs2 ) base_names += ({ base_name(tempob2) }); ! if(!sizeof(obs2)) { ! obs2 = ({tempob}); ! } ! else if(member_array(base_name(tempob), base_names) == -1) obs2 += ({ tempob }); ! } ! maxi = sizeof(obs2); if(number = to_int(what)) { number = number - 1; ! list2 = ({(obs2[0]->GetKeyName())}); for(int counter = 1;counter < maxi;++counter) { ! if(member_array((obs2[counter]->GetKeyName()),list2) < 0) { ! list2 += ({ ( obs2[counter]->GetKeyName()) }); } } maxi = sizeof(list2); if((number >= 0) && (number < sizeof(obs2))) { ob = obs2[number]; } else { *************** *** 457,463 **** return 1; } } else { ! if( !(ob = present(what, sroom)) ) { eventForce("say I have nothing like that to sell"); return 1; } --- 479,488 ---- return 1; } } else { ! if( !(ob = present(what, sroom))) ! foreach(object tempob in obs2) ! if(answers_to(what,tempob)) ob = tempob; ! if(!ob){ eventForce("say I have nothing like that to sell"); return 1; } diff -c -r --new-file ds2.0r28/lib/lib/teacher.c ds2.0r29/lib/lib/teacher.c *** ds2.0r28/lib/lib/teacher.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/teacher.c Fri Jul 7 19:41:43 2006 *************** *** 14,22 **** --- 14,33 ---- private string array TeachingLanguages; private mapping Students; private int commercial = 0; + private int AllLangs = 0; private int teaching_fee = 50; private string local_currency = "silver"; + int SetAllLanguages(int i){ + if(!i) AllLangs = 0; + else AllLangs = 1; + return AllLangs; + } + + int GetAllLanguages(){ + return AllLangs; + } + int GetCommercial(){ return commercial; } *************** *** 153,159 **** eventForce("speak I am already teaching you!"); return 0; } ! if( member_array(language, this_object()->GetTeachingLanguages()) == -1 ) { eventForce("speak I know nothing about the " +capitalize(language)+" language."); return 0; } --- 164,171 ---- eventForce("speak I am already teaching you!"); return 0; } ! if( !GetAllLanguages() && ! member_array(language, this_object()->GetTeachingLanguages()) == -1 ) { eventForce("speak I know nothing about the " +capitalize(language)+" language."); return 0; } diff -c -r --new-file ds2.0r28/lib/lib/teller.c ds2.0r29/lib/lib/teller.c *** ds2.0r28/lib/lib/teller.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/lib/teller.c Sat Jul 8 23:30:59 2006 *************** *** 22,27 **** --- 22,29 ---- sentient::create(); BankName = "Town Trust"; LocalCurrency = "silver"; + LocalFee = 1; + NonLocalFee = 5; OpenFee = 5; Currencies = ({ "copper", "silver", "electrum", "gold", "platinum" }); SetCommandResponses( ([ *************** *** 91,102 **** "surcharge of %d %s.", type, charge, currency)); return amount; } ! else if( (amount + charge) <= (int)who->GetCurrency(currency) ) { ! who->eventPrint(sprintf("The bank charges you a %s %d %s " ! "surcharge.", type, charge, currency)); ! who->AddCurrency(currency, -charge); ! return amount; ! } else { who->eventPrint(sprintf("You are unable to afford the " "%s surcharge of %d %s.", type, charge, currency)); return 0; --- 93,105 ---- "surcharge of %d %s.", type, charge, currency)); return amount; } ! //else if( (amount + charge) <= (int)who->GetCurrency(currency) ) { ! // who->eventPrint(sprintf("The bank charges you a %s %d %s " ! // "surcharge.", type, charge, currency)); ! //who->AddCurrency(currency, -charge); ! // return amount; ! // } ! else { who->eventPrint(sprintf("You are unable to afford the " "%s surcharge of %d %s.", type, charge, currency)); return 0; *************** *** 167,173 **** } int eventWithdraw(object who, string currency, int amount) { ! int i, x; x = amount; if( amount < 1 ) { --- 170,176 ---- } int eventWithdraw(object who, string currency, int amount) { ! int i, x, charge; x = amount; if( amount < 1 ) { *************** *** 186,201 **** return 1; } if( !(amount = AddSurcharge(who, currency, amount)) ) return 1; ! if( (int)who->AddCurrency(currency, amount) < 0 ) { eventForce("speak You are unable to carry that " "much "+currency+"!"); ! if( x > amount ) { ! who->eventPrint("The bank returns the fee."); ! who->AddCurrency(currency, (amount - x)); ! } return 1; } ! who->AddBank(GetBankName(), currency, -amount); who->eventPrint(sprintf("You withdraw %d %s from your account.", amount, currency)); environment()->eventPrint(sprintf("%s withdraws some %s.", --- 189,206 ---- return 1; } if( !(amount = AddSurcharge(who, currency, amount)) ) return 1; ! charge = x - amount; ! if( (int)who->AddCurrency(currency, x) < 0 ) { eventForce("speak You are unable to carry that " "much "+currency+"!"); ! //if( x > amount ) { ! who->eventPrint("The bank credits your account with the fee."); ! //who->AddCurrency(currency, (amount - x)); ! //} return 1; } ! who->AddCurrency(currency, -charge); ! who->AddBank(GetBankName(), currency, -x); who->eventPrint(sprintf("You withdraw %d %s from your account.", amount, currency)); environment()->eventPrint(sprintf("%s withdraws some %s.", diff -c -r --new-file ds2.0r28/lib/obj/stargate.c ds2.0r29/lib/obj/stargate.c *** ds2.0r28/lib/obj/stargate.c Wed Jul 5 00:00:58 2006 --- ds2.0r29/lib/obj/stargate.c Sun Jul 9 19:04:29 2006 *************** *** 57,72 **** seems, and i need to test some ideas before i can say "do it this way" */ inherit LIB_STARGATE; ! int readScreen(); void create() { ::create(); ! setOrigin("default", "/obj/room"); ! // SetRead(([ ({ "screen" }) : (: readScreen :) ]) ); ! // SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); } void init() --- 57,78 ---- seems, and i need to test some ideas before i can say "do it this way" */ + + #include + #include + #include + #include "/lib/include/stargate.h" + inherit LIB_STARGATE; ! int ReadScreen(); void create() { ::create(); ! SetOrigin("ORIGIN_NAME", "/ORIGIN/GOES/HERE"); ! SetRead(([ ({ "screen" }) : (: ReadScreen :) ]) ); ! SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); } void init() *************** *** 74,80 **** ::init(); } ! int readScreen() { write("stargate network status\n"); write("-----------------------\n"); --- 80,86 ---- ::init(); } ! int ReadScreen() { write("stargate network status\n"); write("-----------------------\n"); diff -c -r --new-file ds2.0r28/lib/obj/stargate.example ds2.0r29/lib/obj/stargate.example *** ds2.0r28/lib/obj/stargate.example Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/obj/stargate.example Sat Jul 8 23:30:59 2006 *************** *** 0 **** --- 1,89 ---- + #include + #include + #include "/lib/include/stargate.h" + + /** + * based on portal.c by Brodbane - March 2006 + * + * $Id: stargate.c,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + * The desired functionality is much like a "star gate": users dialed + * letters or full words that lined up with destinations. A portal opens to + * that destination briefly. To define destinations you must setup a + * constant below then add it to the switch statement in the cmdDial + * function. This object is crude and basic, but gets the job done. + * + * 2006-03-22, jonez + * - original version of this file is from Daelas@Moraelinost + * 2006-03-23, jonez + * - altered so code uses existing verbs (touch, enter) where possible. last add_action is for dial command. + * - added single mapping called "database" and made the "dial" command use it. + * - dial command no longer uses switch/case, making adding a new destination simpler + * - made use of SetPreventGet() / SetPreventPut() + * - made use of new stargate daemon + * - made use of LIB_STARGATE + * - made use of STARGATE_D + * + * IDEAS: + * - create a daemon that holds the stargate network [DONE] + * - allow for stargate failure + * - add dhd object + * - change the code so that it uses a single mapping of names and + * destinations, perhaps in a database file. currently an update to the + * object requires an update for all the objects. [DONE] + * - dhd skill (thanks plato) + * - delay when dialing gate. destination dhd lights up? + * - player should not be able to dial earth if earth is already connected elsewhere (need daemon) [DONE] + * - make use of existing verbs (enter, touch) instead of doing our own thing. [DONE] + * - daemon should contain a class that maps the various gates to each other. see lib/include/door.h [DONE] + * - shout "off world activation" into the gateroom when the gate engages. + * - track status as "incoming" or "outgoing".. you can only "enter" an outgoing gate (rhk) [DONE] + * - if room is empty, shut down the gate (rhk) + * - change callout time when someone goes through the gate (rhk) + */ + + /* + Cratylus@Dead Souls but let me give you a quick outline + Cratylus@Dead Souls i type dial thing + Cratylus@Dead Souls the thing inherits LIB_DIAL + Cratylus@Dead Souls which is in /lib/events/dial.c + Cratylus@Dead Souls and all that contains is like direct_dial_ob() return 1; this kind of thing + Cratylus@Dead Souls take a look at LIB_TURN + Cratylus@Dead Souls what LIB_DIAL does is provide the object with hooks, so it *can* be dialed + Cratylus@Dead Souls so, when i type dial thing, the thing goes, yeah i + can be dialed, and then the parser enters the can_dial and do_dial funcs + in the verb + Cratylus@Dead Souls tellya what. i'd like to work with you on this one. i think it's less straightforward than it + seems, and i need to test some ideas before i can say "do it this way" + + */ + + #include + #include + #include + #include "/lib/include/stargate.h" + + inherit LIB_STARGATE; + + int ReadScreen(); + + void create() + { + ::create(); + SetOrigin("ORIGIN_NAME", "/ORIGIN/GOES/HERE"); + SetRead(([ ({ "screen" }) : (: ReadScreen :) ]) ); + SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); + } + + void init() + { + ::init(); + } + + int ReadScreen() + { + write("stargate network status\n"); + write("-----------------------\n"); + write("\n"); + + } diff -c -r --new-file ds2.0r28/lib/realms/template/area/obj/table.c ds2.0r29/lib/realms/template/area/obj/table.c *** ds2.0r28/lib/realms/template/area/obj/table.c Wed Jul 5 00:01:15 2006 --- ds2.0r29/lib/realms/template/area/obj/table.c Sat Jul 8 23:30:59 2006 *************** *** 15,22 **** SetMaxCarry(5000); SetInventory( ([ MY_OBJ "/key" : 1, ]) ); } void init(){ ::init(); ! } \ No newline at end of file --- 15,23 ---- SetMaxCarry(5000); SetInventory( ([ MY_OBJ "/key" : 1, + "/secure/obj/glasses" :1, ]) ); } void init(){ ::init(); ! } diff -c -r --new-file ds2.0r28/lib/secure/cmds/creators/force.c ds2.0r29/lib/secure/cmds/creators/force.c *** ds2.0r28/lib/secure/cmds/creators/force.c Wed Jul 5 00:01:12 2006 --- ds2.0r29/lib/secure/cmds/creators/force.c Wed Dec 31 19:00:00 1969 *************** *** 1,53 **** - /* /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(!args || args==""){ - who->eventPrint("Force whom to do what?"); - return 1; - } - if( sscanf(args, "%s to %s", name, cmd) < 1 ) { - if(sscanf(args, "%s %s", name,cmd) < 1) { - who->eventPrint("Force whom to do what?"); - return 1; - } - } - target = present(lower_case(name),environment(who)); - if( !target ) { - who->eventPrint("Cannot find any living thing called: " + name); - return 1; - } - if(archp(target) && !archp(who)){ - who->eventPrint(target->GetName()+" shakes "+possessive(target)+ - " head and forces you to dest yourself."); - tell_room(environment(who), who->GetName()+" dests "+objective(who)+ - "self while trying to pull a foolish joke on "+target->GetName()+".", who); - who->eventDestruct(); - 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() { - return "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 ds2.0r28/lib/secure/daemon/chat.c ds2.0r29/lib/secure/daemon/chat.c *** ds2.0r28/lib/secure/daemon/chat.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/secure/daemon/chat.c Sun Jul 9 19:04:29 2006 *************** *** 131,136 **** --- 131,137 ---- if(pmsg) plainmsg += pmsg; if(pwho && pwho !="") plainmsg = pwho+" "+plainmsg; if(pchan && pchan != "admin"){ + chan = GetLocalChannel(chan); unguarded( (: write_file("/log/chan/"+chan,"["+timestamp()+"] "+plainmsg+"\n") :) ); if( file_size("/log/chan/"+chan) > 200000) { unguarded( (: rename("/log/chan/"+chan,"/log/chan/"+chan+"."+timestamp() ) :) ); *************** *** 150,156 **** object ob = 0; int emote; ! if(first(str,1) == ":" && sizeof(str) > 3){ if(!grepp(verb,"emote")) verb += "emote"; str = trim(replace_string(str,":","",1)); } --- 151,159 ---- object ob = 0; int emote; ! if(first(str,1) == ":" && ! (member_array(str[1..1], ({ "Q", "O", "P", "D", "I", "X" })) == -1 && ! alphap(str[1..1]) && sizeof(str) > 3)){ if(!grepp(verb,"emote")) verb += "emote"; str = trim(replace_string(str,":","",1)); } diff -c -r --new-file ds2.0r28/lib/secure/daemon/finger.c ds2.0r29/lib/secure/daemon/finger.c *** ds2.0r28/lib/secure/daemon/finger.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/secure/daemon/finger.c Fri Jul 7 19:41:43 2006 *************** *** 128,134 **** else ret += "On since " + ctime(LoginTime); } else ret += "Last on " + ctime(LoginTime); ! if( !WhereBlock || (this_player(1) && archp(this_player(1))) ) ret += " from " + HostSite + "%^BR%^\n"; else ret += "%^BR%^\n"; mail_stat = (mapping)FOLDERS_D->mail_status(who); --- 128,134 ---- else ret += "On since " + ctime(LoginTime); } else ret += "Last on " + ctime(LoginTime); ! if( this_player(1) && creatorp(this_player(1)) ) ret += " from " + HostSite + "%^BR%^\n"; else ret += "%^BR%^\n"; mail_stat = (mapping)FOLDERS_D->mail_status(who); *************** *** 173,179 **** } if( !Email ) Email = "#CHANGE"; tmp = ({ CapName, GetTitle(), RealName, (Email[0] != '#' ? Email : 0), ! ctime(LoginTime), (ob && interactive(ob) ? query_idle(ob) : -1), 0, (creator ? "Creator" : "" + Level), plan }); return tmp; } --- 173,179 ---- } if( !Email ) Email = "#CHANGE"; tmp = ({ CapName, GetTitle(), RealName, (Email[0] != '#' ? Email : 0), ! ctime(LoginTime), ((ob && interactive(ob) && !(ob->GetInvis())) ? query_idle(ob) : -1), 0, (creator ? "Creator" : "" + Level), plan }); return tmp; } diff -c -r --new-file ds2.0r28/lib/secure/daemon/master.c ds2.0r29/lib/secure/daemon/master.c *** ds2.0r28/lib/secure/daemon/master.c Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/secure/daemon/master.c Sun Jul 9 19:04:30 2006 *************** *** 27,32 **** --- 27,33 ---- private static string PlayerName, rlog; private static object NewPlayer; private static mapping Groups, ReadAccess, WriteAccess; + private static string *ParserDirs = ({ "secure", "verbs", "daemon", "lib", "spells" }); void create() { Unguarded = 0; *************** *** 219,273 **** else stack = ({ ob }) + previous_object(-1); } else i = sizeof(stack = previous_object(-1) + ({ ob })); - //tc("me: "+identify(this_object()), "red"); - //tc("prevs: "+identify((previous_object(-1)+({ob}))), "red"); - //tc("get_stack: "+get_stack(), "white"); - //tc("oper: "+oper, "red"); while(i--) { if(!stack[i] || stack[i] == this_object()) { - //tc("stack check true"); continue; } if(file_name(stack[i]) == SEFUN) { - //tc("sefun check true"); continue; } if(!(priv = query_privs(stack[i]))) { - //tc("priv check FALSE"); return 0; } - //tc("priv: "+priv,"yellow"); - //tc("prevs: "+identify(previous_object(-1))); if(!ok && oper == "read") { - //tc("trivial read check passed"); continue; } privs = explode(priv, ":"); if(member_array(PRIV_SECURE, privs) != -1) { - //tc("priv secure check true"); - //tc("prevs: "+identify(previous_object(-1)),"white"); - //tc("stack: "+get_stack(),"white"); continue; } if(stringp(file) && member_array(file_privs(file), privs) != -1) { - //tc("file: "+file+", checks true"); continue; } - //foreach(string sub_priv in privs){ - // if(sizeof(ok) && member_array(sub_priv, ok) != -1) privcheck = 1; - //} - //if(ok) tc("ok: "+identify(ok)); - //tc("current ob: "+identify(stack[i])); - //tc("privcheck: "+privcheck+"\n\n"); - //if(privcheck) continue; if(!ok && oper == "write") { - //tc("verde","green"); if(userp(stack[i]) && check_user(stack[i], fun, file, oper)) continue; else return 0; } if(sizeof(privs & ok)) { - //tc("azul","blue"); continue; } if(userp(stack[i]) && check_user(stack[i], fun, file, oper)) continue; --- 220,251 ---- *************** *** 394,402 **** } int valid_object(object ob) { ! string file; file = file_name(ob); if( !strsrch(file, DIR_TMP) ) return 0; else if( !strsrch(file, DIR_FTP) ) return 0; else if( !strsrch(file, DIR_LOGS) ) return 0; --- 372,388 ---- } int valid_object(object ob) { ! string file, contents; file = file_name(ob); + contents = read_file(base_name(ob)+".c"); + if(strsrch(contents,"parse_add_rule") != -1 + || strsrch(contents, "SetRules") != -1) { + string prefix; + if(!sscanf(file,"/%s/%*s",prefix)) return 0; + if(member_array(prefix, ParserDirs) == -1) return 0; + } + if( !strsrch(file, DIR_TMP) ) return 0; else if( !strsrch(file, DIR_FTP) ) return 0; else if( !strsrch(file, DIR_LOGS) ) return 0; diff -c -r --new-file ds2.0r28/lib/secure/include/dirs.h ds2.0r29/lib/secure/include/dirs.h *** ds2.0r28/lib/secure/include/dirs.h Wed Jul 5 00:01:05 2006 --- ds2.0r29/lib/secure/include/dirs.h Sun Jul 9 19:04:30 2006 *************** *** 16,21 **** --- 16,22 ---- #define DIR_SUICIDE DIR_DATA "/suicide" #define DIR_RID DIR_DATA "/rid" #define DIR_SECURE_DAEMONS_SAVE DIR_DATA "/daemons" + #define DIR_SECURE_VERBS DIR_SECURE "/verbs" #define DIR_VOTES DIR_DATA "/votes" #define DIR_GOSSIP DIR_DATA "/gossip" diff -c -r --new-file ds2.0r28/lib/secure/sefun/mud_info.c ds2.0r29/lib/secure/sefun/mud_info.c *** ds2.0r28/lib/secure/sefun/mud_info.c Wed Jul 5 20:52:30 2006 --- ds2.0r29/lib/secure/sefun/mud_info.c Sun Jul 9 22:52:34 2006 *************** *** 27,33 **** string mudlib() { return "Dead Souls"; } ! string mudlib_version() { return "2.0r28"; } int query_host_port() { return __PORT__; } --- 27,33 ---- string mudlib() { return "Dead Souls"; } ! string mudlib_version() { return "2.0r29"; } int query_host_port() { return __PORT__; } diff -c -r --new-file ds2.0r28/lib/secure/sefun/query_names.c ds2.0r29/lib/secure/sefun/query_names.c *** ds2.0r28/lib/secure/sefun/query_names.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/secure/sefun/query_names.c Sun Jul 9 19:04:30 2006 *************** *** 27,32 **** } int answers_to(string name, object what){ if(member_array(lower_case(name),query_names(what)) != -1) return 1; ! else return 0; } --- 27,59 ---- } int answers_to(string name, object what){ + string *adjs = what->GetAdjectives(); + string *preargs = ({}); + string s1,s2,s3,s4; + int hits; if(member_array(lower_case(name),query_names(what)) != -1) return 1; ! if(!sizeof(adjs)) return 0; ! hits = sscanf(name,"%s %s %s %s",s1, s2, s3, s4); ! //tc("hits: "+hits); ! if(hits < 4) hits = sscanf(name,"%s %s %s",s1, s2, s3); ! //tc("hits: "+hits); ! if(hits < 3) hits = sscanf(name,"%s %s",s1, s2); ! //tc("s1: "+s1); ! //tc("s2: "+s2); ! //tc("s3: "+s3); ! //tc("s4: "+s4); ! if(!hits) return 0; ! hits--; ! if(sizeof(s1)) preargs += ({s1}); ! if(sizeof(s2)) preargs += ({s2}); ! if(sizeof(s3)) preargs += ({s3}); ! if(sizeof(s4)) preargs += ({s4}); ! ! if(member_array(preargs[hits],query_names(what)) == -1) return 0; ! preargs -= ({ preargs[hits] }); ! ! foreach(string prearg in preargs){ ! if(member_array(prearg, adjs) == -1) return 0; ! } ! return 1; } diff -c -r --new-file ds2.0r28/lib/secure/sefun/sefun.c ds2.0r29/lib/secure/sefun/sefun.c *** ds2.0r28/lib/secure/sefun/sefun.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/secure/sefun/sefun.c Sun Jul 9 19:04:30 2006 *************** *** 80,85 **** --- 80,92 ---- #include "/secure/sefun/compare_array.c" #include "/secure/sefun/legacy.c" + //void parse_add_rule(string verb, string rule){ + //parse_init(); + //tc("parse_add_rule. verb: "+verb+", rule: "+rule,"white"); + //tell_player("cratylus","parse_add_rule. verb: "+verb+", rule: "+rule); + //tell_player("cratylus","previous_object(): "+identify(previous_object())); + //efun::parse_add_rule(verb, rule); + //} object find_object( string str ){ if((int)master()->valid_apply(({ "SECURE", "ASSIST", "SNOOP_D" }))) return efun::find_object(str); diff -c -r --new-file ds2.0r28/lib/secure/sefun/sefun.h ds2.0r29/lib/secure/sefun/sefun.h *** ds2.0r28/lib/secure/sefun/sefun.h Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/secure/sefun/sefun.h Fri Jul 7 19:41:43 2006 *************** *** 214,218 **** --- 214,219 ---- int assistp(mixed guy); int elderp(object ob); int testp(object ob); + string alpha_strip(mixed arg); #endif /* l_sefun_h */ diff -c -r --new-file ds2.0r28/lib/secure/sefun/strings.c ds2.0r29/lib/secure/sefun/strings.c *** ds2.0r28/lib/secure/sefun/strings.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/secure/sefun/strings.c Fri Jul 7 19:41:43 2006 *************** *** 608,613 **** --- 608,627 ---- return 0; } + string alpha_strip(mixed arg){ + string raw, ret; + string *blown; + if(!arg || pointerp(arg)) return ""; + if(!sscanf(arg,"%s",raw)) return ""; + if(!sizeof(raw)) return ""; + blown = explode(raw,""); + ret = ""; + foreach(string element in blown){ + if(alphap(element)) ret += element; + } + return ret; + } + int numericp(mixed arg){ string *alphabet = ({"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"}); if(intp(arg)) arg = itoa(arg); diff -c -r --new-file ds2.0r28/lib/secure/verbs/creators/force.c ds2.0r29/lib/secure/verbs/creators/force.c *** ds2.0r28/lib/secure/verbs/creators/force.c Wed Dec 31 19:00:00 1969 --- ds2.0r29/lib/secure/verbs/creators/force.c Sun Jul 9 19:04:30 2006 *************** *** 0 **** --- 1,43 ---- + #include + + inherit LIB_VERB; + + static void create() { + verb::create(); + SetVerb("force"); + SetRules("LIV STR", "LIV to STR"); + SetErrorMessage("Force whom to do what?"); + SetHelp("Syntax: \n" + " \n" + "Allows you to command some living things to do " + "your bidding."); + } + + mixed can_force_liv_to_str(string str) { return 1; } + + mixed can_force_liv_str(string str) { + return can_force_liv_to_str(str); + } + + mixed do_force_liv_to_str(object target, string cmd) { + object who = this_player(); + + if(!who) return 0; + if(archp(target) && !securep(who)){ + who->eventPrint(target->GetName()+" shakes "+possessive(target)+ + " head and forces you to dest yourself."); + tell_room(environment(who), who->GetName()+" dests "+objective(who)+ + "self while trying to pull a foolish joke on "+target->GetName()+".", who); + tell_player(target,who->GetName()+" tried to force you to "+cmd); + who->eventDestruct(); + return 1; + } + target->eventPrint(who->GetName() + " forces you to: " + cmd); + who->eventPrint("You force " + target->GetShort() + " to: " + cmd); + target->eventForce(cmd); + return 1; + } + + mixed do_force_liv_str(object ob, string str) { + return do_force_liv_to_str(ob, str); + } diff -c -r --new-file ds2.0r28/lib/verbs/creators/copy.c ds2.0r29/lib/verbs/creators/copy.c *** ds2.0r28/lib/verbs/creators/copy.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/verbs/creators/copy.c Fri Jul 7 19:41:43 2006 *************** *** 41,47 **** write("in your workroom."); return 1; } ! if(userp(ob)){ write("No."); return 1; --- 41,48 ---- write("in your workroom."); return 1; } ! //debug("str: ",str); ! //debug("path_prefix(str): ",path_prefix(str)); if(userp(ob)){ write("No."); return 1; *************** *** 51,57 **** targetfile = ""; if(last(str,2) != ".c") str += ".c"; str = absolute_path((string)this_player()->query_cwd(), str); ! if( !directory_exists(path_prefix(str)) ) return "Directory not found."; sourcefile = base_name(ob)+".c"; targetfile = str; --- 52,63 ---- targetfile = ""; if(last(str,2) != ".c") str += ".c"; str = absolute_path((string)this_player()->query_cwd(), str); ! //debug("str: ",str); ! //debug("path_prefix(str): ",path_prefix(str)); ! if( !directory_exists(path_prefix(str)) ) { ! write("Directory not found."); ! return 1; ! } sourcefile = base_name(ob)+".c"; targetfile = str; *************** *** 74,80 **** } mixed do_copy_str(string str) { ! string tmp, new_room; mixed source_update; object staff; staff = present("tanstaafl",this_player()); --- 80,86 ---- } mixed do_copy_str(string str) { ! string str2, tmp, new_room; mixed source_update; object staff; staff = present("tanstaafl",this_player()); *************** *** 84,93 **** write("in your workroom."); return 1; } if(last(str,2) != ".c") str += ".c"; ! str = absolute_path((string)this_player()->query_cwd(), str); ! if( !file_exists(str) ) return "File " + str + " not found."; else if( !(tmp = read_file(str)) || !tmp || tmp == ""){ write("Unable to read file " + str + "."); return 1; --- 90,115 ---- write("in your workroom."); return 1; } + //debug("str: ",str,"yellow"); + str2 = str; + str = absolute_path((string)this_player()->query_cwd(), str); + //debug("str: ",str,"yellow"); + + //debug("path_prefix(str): ",path_prefix(str),"green"); if(last(str,2) != ".c") str += ".c"; ! //debug("str: ",str,"yellow"); ! ! if( !file_exists(str) ){ ! str = path_prefix(base_name(environment(this_player())))+"/"+str2; ! if(last(str,2) != ".c") str += ".c"; ! } ! ! if( !file_exists(str) ){ ! write("Directory not found."); ! return 1; ! } ! else if( !(tmp = read_file(str)) || !tmp || tmp == ""){ write("Unable to read file " + str + "."); return 1; diff -c -r --new-file ds2.0r28/lib/verbs/items/put.c ds2.0r29/lib/verbs/items/put.c *** ds2.0r28/lib/verbs/items/put.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/verbs/items/put.c Sat Jul 8 23:31:00 2006 *************** *** 134,156 **** mixed do_put_wrd_wrd_word_obj(string num, string curr, mixed wort, object ob) { object pile, env; int amt; - //tc("ob: "+identify(ob),"yellow"); - //tc("wort: "+wort,"yellow"); if(wort == "on") wort = "onto"; if(wort == "in") wort = "into"; - //tc("wort: "+wort,"yellow"); if(wort == "onto" && !inherits( LIB_SURFACE, ob ) ) { - //tc("wtf1"); write("That isn't a load-bearing surface."); return 1; } if(wort == "into" && inherits( LIB_SURFACE, ob ) ) { - //tc("wtf2"); write("That's a surface. Try \"put on\""); return 1; } amt = to_int(num); env = environment(this_player()); --- 134,157 ---- mixed do_put_wrd_wrd_word_obj(string num, string curr, mixed wort, object ob) { object pile, env; int amt; if(wort == "on") wort = "onto"; if(wort == "in") wort = "into"; if(wort == "onto" && !inherits( LIB_SURFACE, ob ) ) { write("That isn't a load-bearing surface."); return 1; } if(wort == "into" && inherits( LIB_SURFACE, ob ) ) { write("That's a surface. Try \"put on\""); return 1; } + if((inherits(LIB_SIT,ob) && sizeof(ob->GetSitters())) || + (inherits(LIB_LIE,ob) && sizeof(ob->GetLiers()))){ + write("There appears to be someone blocking your access."); + return 0; + } + amt = to_int(num); env = environment(this_player()); diff -c -r --new-file ds2.0r28/lib/verbs/players/follow.c ds2.0r29/lib/verbs/players/follow.c *** ds2.0r28/lib/verbs/players/follow.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/verbs/players/follow.c Sun Jul 9 19:04:30 2006 *************** *** 13,19 **** ::create(); SetVerb("follow"); SetRules("", "LIV"); ! SetErrorMessage("Who would you like to follow?"); SetHelp("Syntax: follow\n" " follow LIV\n" "\n" --- 13,19 ---- ::create(); SetVerb("follow"); SetRules("", "LIV"); ! SetErrorMessage("Whom would you like to follow?"); SetHelp("Syntax: follow\n" " follow LIV\n" "\n" *************** *** 40,46 **** // Format follow string. if(this_player()->CanLead() && leader = this_player()->GetLeader()) { tmp = "You are "; ! if(leader->GetAllowed(this_player())) tmp += "following"; else tmp += "trailing"; tmp += " " + leader->GetName() + ".\n"; } --- 40,46 ---- // Format follow string. if(this_player()->CanLead() && leader = this_player()->GetLeader()) { tmp = "You are "; ! if(leader->GetFollowed(this_player())) tmp += "following"; else tmp += "trailing"; tmp += " " + leader->GetName() + ".\n"; } *************** *** 53,59 **** // Format lead string. tmp += "You are leading "; obs = map( ! filter(followers, (:this_player()->GetAllowed($1):)), (:$1->GetName():)); size = sizeof(obs); if(size) tmp += conjunction(obs); --- 53,59 ---- // Format lead string. tmp += "You are leading "; obs = map( ! filter(followers, (:this_player()->GetFollowed($1):)), (:$1->GetName():)); size = sizeof(obs); if(size) tmp += conjunction(obs); *************** *** 63,69 **** // Format evasion string. tmp += "You are evading "; obs = map( ! filter(followers, (:!this_player()->GetAllowed($1):)), (:$1->GetName():)); size = sizeof(obs); if(size) tmp += conjunction(obs); --- 63,69 ---- // Format evasion string. tmp += "You are evading "; obs = map( ! filter(followers, (:!this_player()->GetFollowed($1):)), (:$1->GetName():)); size = sizeof(obs); if(size) tmp += conjunction(obs); *************** *** 82,87 **** --- 82,88 ---- if(leader = this_player()->GetLeader()) { leader->RemoveFollower(this_player()); this_player()->eventPrint("You stop trailing " + leader->GetName() + "."); + return 1; } if(member_array(this_player(), ob->AddFollower(this_player())) == -1) diff -c -r --new-file ds2.0r28/lib/verbs/players/lead.c ds2.0r29/lib/verbs/players/lead.c *** ds2.0r28/lib/verbs/players/lead.c Wed Jul 5 00:01:06 2006 --- ds2.0r29/lib/verbs/players/lead.c Sat Jul 8 23:31:00 2006 *************** *** 13,19 **** verb::create(); SetVerb("lead"); SetRules("LIV"); ! SetErrorMessage("Who would you like to lead?"); SetHelp("Syntax: lead LIVING\n" "\n" "Allows one to assist a living being who is " --- 13,19 ---- verb::create(); SetVerb("lead"); SetRules("LIV"); ! SetErrorMessage("Whom would you like to lead?"); SetHelp("Syntax: lead LIVING\n" "\n" "Allows one to assist a living being who is " diff -c -r --new-file ds2.0r28/lib/www/ds-creator-faq.html ds2.0r29/lib/www/ds-creator-faq.html *** ds2.0r28/lib/www/ds-creator-faq.html Wed Jul 5 00:00:59 2006 --- ds2.0r29/lib/www/ds-creator-faq.html Fri Jul 7 19:41:43 2006 *************** *** 485,495 **** style="font-weight: bold;">anglicize me

To make yourself fluent in all languages, type:

polyglottize me

Obviously these commands are available only to creators.


When I try to call test->SetLanguage("Bozo", 50), it sets it to 100%

Bozo is probably a newbie. If Bozo's player level is at or below
what is defined as newbie in /secure/include/config.h, then he understands
all languages at 100%. Raise his level above that, and you should see
his proficiency in that language drop to what you specified.


How do I update an .h file?

You don't, really. That's a header file, which contains code to
be included by a .c file. Only a .c file gets loaded into memory, so
to "update" an .h file, you update the .c file that includes it. In
the case of a global include, like daemons.h, you would update the
master object (also called the master daemon) thusly:

update /secure/daemon/master



Section 3: Intermud and channel stuff


anglicize me

To make yourself fluent in all languages, type:

polyglottize me

Obviously these commands are available only to creators.


When I try to call Bozo->SetLanguage("Clownish", 50), it sets it to 100%

Bozo is probably a newbie. If Bozo's player level is at or below
what is defined as newbie in /secure/include/config.h, then he understands
all languages at 100%. Raise his level above that, and you should see
his proficiency in that language drop to what you specified.


How do I update an .h file?

You don't, really. That's a header file, which contains code to
be included by a .c file. Only a .c file gets loaded into memory, so
to "update" an .h file, you update the .c file that includes it. In
the case of a global include, like daemons.h, you would update the
master object (also called the master daemon) thusly:

update /secure/daemon/master



Section 3: Intermud and channel stuff


Dead Souls - Installation FAQ

By Cratylus @ Frontiers, February 2006. Updated ! June 2006.

--- 17,23 ---- *************** *** 329,335 **** like "alpha.bravo". If your machine is under the impression that its name is localhost.localdomain, it will supply that name to mudos, which will eventually choke on it.
-
If you're good at C, you can edit lines 66 and 76 of v22.2b14/swap.c and correct this behavior. But the common sense fix is to stop being a noob and give your computer a proper hostname already. --- 329,334 ---- *************** *** 340,346 **** various versions of SuSE and Fedora, as well as Solaris 8, 9, and 10, various BSD's, and even IRIX (!). If you can get them to give me a free temporary account for testing purposes, I'll take a look and see if I ! can help.

--- 339,353 ---- various versions of SuSE and Fedora, as well as Solaris 8, 9, and 10, various BSD's, and even IRIX (!). If you can get them to give me a free temporary account for testing purposes, I'll take a look and see if I ! can help. !
  • If you've tried everything but the compile keeps breaking, try ! compiling as root (obviously a last resort, and just for testing).
  • !
  • If the problem is that it compiles, but when you run the driver ! no sefuns load and the driver segfaults, it is possible that you ! compiled on a 64-bit x86 box. It seems that MudOS compiled on 64-bit ! x86 Linux doesn't work right. A fix is in the works, but until it is ! available, you can do one of two things: boot into 32-bit mode and then ! compile, or compile it on a 32-bit box and move it to the 64-bit box.

  • diff -c -r --new-file ds2.0r28/lib/www/hotfix.html ds2.0r29/lib/www/hotfix.html *** ds2.0r28/lib/www/hotfix.html Wed Jul 5 19:58:20 2006 --- ds2.0r29/lib/www/hotfix.html Fri Jul 7 19:41:43 2006 *************** *** 39,64 **** is available now. This patch can be applied to any version of Dead Souls ! above 2.0r20. If you plan to patch from pre- r26 to r27, you must reboot the mud between the installation of the two separate patches.

    !

    For Dead Souls 2.0r27, the following fixes are available:

      !
    • Right as I was about to release r27, someone asked an innocent ! question about bulletin boards, and I made a minor change to how they ! work to address a problem. You'd think I'd have learned my lesson about ! this sort of thing. The result is that bulletin boards don't work well ! on 2.0r27. To fix it, copy this file over ! /secure/daemon/bboard.c and this file over ! /secure/obj/arch_board.c .

    --- 39,60 ---- is available now. This patch can be applied to any version of Dead Souls ! above 2.0r20. If you plan to patch from pre- r26 to r28, you must reboot the mud between the installation of the two separate patches.

    !

    For Dead Souls 2.0r28, the following fixes are available:

      !
    • Some folks are still having trouble with the church elevator ! buttons. If you are one of those people, replace the ones currently in ! /domains/town/obj/ with both this and this.

    diff -c -r --new-file ds2.0r28/lib/www/news.html ds2.0r29/lib/www/news.html *** ds2.0r28/lib/www/news.html Wed Jul 5 19:58:21 2006 --- ds2.0r29/lib/www/news.html Fri Jul 7 19:41:45 2006 *************** *** 19,24 **** --- 19,115 ----

    + 07 July 06
    +
    +     A really surprising thing happened today. I
    + decided to reorganize my .plan file and remove
    + anything that wasn't either an important feature
    + enhancement or a bugfix. I wanted to know *exactly*
    + how close I am to releasing Dead Souls 2.1.
    +
    +     After slogging through and tearing out pages
    + of wishlists and maybes, this is what was left:
    +
    + - fix /obj/stargate
    + - update colors with %%^^ data
    + - verbify force
    + - can't delete glass case?
    + - are people defaulting to the start room?
    + - sell machine to cat
    + - make an npc's living body go away BEFORE the corpse is moved into the + room
    + - make channels understand ) after : can have non emote messages after
    + - SetMaxHealth shouldn't need to be in init()
    + - help area
    + - help newbie
    + - apostrophes
    + - add damage types to dummy
    + - intergossip logging to two files?
    + - review setinventory, is addstuff necessary?
    + - Beggar says in English, "Hi, A mangy little rat."
    + - shop in the town is confusing the maglite with the cheap one.
    + - If a piece of gear is set for a "left foot" attribute, why can I also + wear it on my right foot?
    + - the handbook says that its easier to kill things as a mage,
    + - bug: cp sefun.c  /
    + - delete mfinger
    + - SetEmptyName(), SetEmptyLong() and SetEmptyShort().
    + - install faq: if compile problems, try as root, try non 64bit amd
    + - wipe the unused tc's
    +
    +     That's it. Now compare the size of this list with
    + the size of stuff in the release + notes. That's how close
    + I am. I was shocked.
    +
    +     So folks, I need your help. Any bugs that have been
    + bothering you but you haven't gotten around to telling me,
    + this is the time. If you feel like knocking about the code
    + trying to break stuff, please log into the demo mud
    + at rugose.com 6666 and have at + it.
    +
    +     It's ok that you'll make the list longer. That's
    + what I *want*. I want to get these bufixes as over with
    + as possible.
    +
    +
    + 06 July 06
    +
    + more update news:
    +
    +     I overlooked a couple of important things when
    + I released 2.0r27. They have been addressed in
    + 2.0r28.
    +
    +     There may be a compat buster here. One of the
    + things that needed fixing was a peculiar bug that
    + would generate extra corpses under unusual circumstances,
    + during combat. This bug had some relationship to
    + another combat bug that prevented the accurate
    + recording of a player's deaths.
    +
    +     In the end, the fixes for these two involved the
    + manipulation of persistent player variables. The
    + good news is that things now seem to work just fine,
    + and the bugs are seemingly gone.
    +
    +     The bad news is that since new player variables
    + are involved, you may find that test chars created
    + before an upgrade to r28 do weird things in combat...
    + like not fight.
    +
    +     The fix is to create new test chars.
    +
    +     If Dead Souls was widespread enough that that
    + there were muds out there that were open, with players,
    + I'd look into some sort of system for updating
    + older player files. Since this is not the case,
    + I expect that people will be able to tolerate this
    + minor inconvenience with minimal discomfort.
    +
    +
    +
    05 July 2006

    router news:
    *************** *** 132,138 **** 18 June 2006

        The 2.0r26 patch is out. Anyone under that rev is
    subject to having their mud compromised by any creator
    at any time. Please upgrade 18 June 2006

        The 2.0r26 patch is out. Anyone under that rev is
    subject to having their mud compromised by any creator
    at any time. Please upgrade 23


    !
    How do I set it up?

    To --- 56,71 ---- style="font-weight: bold;"> 23


    !
    Is ! is "secure"?
    !
    !
    Nope. Read this: http://dead-souls.net/ds-admin-faq.html#90
    !
    Bottom line: Don't tell secrets on the router.
    !
    ! How do I set it up?


    To *************** *** 75,80 **** --- 84,103 ---- reset, your mud will be authenticated. Just be patient.
    If it's been more than a day or so, email me at
    <my name here>@comcast.net
    +
    +     Also note, the name is yatmim, with an M at the end
    + and not an N. It stands for + Yet Another TMI Mud. yatmim.
    + Lower case letters. I'll see if I can make the router
    + more forgiving of that typo.
    +
    +     Getting the router name wrong is the number one + cause of
    + errors. Also, once you get it wrong, your own client
    + cache might keep the old one, even if you change your
    + intermud client code. Make sure you purge the i3 data
    + cache before you try again.


    What's the diff -c -r --new-file ds2.0r28/lib/www/router_rules.html ds2.0r29/lib/www/router_rules.html *** ds2.0r28/lib/www/router_rules.html Wed Jul 5 19:58:23 2006 --- ds2.0r29/lib/www/router_rules.html Sat Jul 8 23:31:01 2006 *************** *** 33,39 ****
    3) The router is not up for testing security of an I3 router. Attempting
    !    to exploit the router is not permitted, and not "cool". If you find
       a security weakness please email me so I can handle it discreetly.
    --- 33,39 ----
    3) The router is not up for testing security of an I3 router. Attempting
    !    to exploit the router is not ok, and not "cool". If you find
       a security weakness please email me so I can handle it discreetly.
    *************** *** 139,146 ****
    !
    !
    --- 139,145 ----
    !