After searching all over for an Autosac snippet and not finding one, I decided to cheat a little and try messing with Ron Hensley's Autoloot and Autosplit snippet. Here is the result. Please keep in mind: I installed Ron's snippet in bpl15 using MSVC6 and am currently running on a Windows98 platform. Everything should be the same for a basic shell, but no promises. Assumptions: 1. You are editing a stock, or close to stock MUD. If anything has been changed, please keep that in mind while you add this. 2. You already have do_sacrifice working on your MUD and defined as ACMD do_sac; ######################################################################### I always edit the .h files when adding anything, so I can compile as I go along. This helps me find spelling errors quickly. Open: interpreter.h search for: /* do_gen_tog */ At the bottom of this table under: #define SCMD_AUTOEXIT 15 Add: #define SCMD_AUTOSAC 16 NOTE: Number should be next in sucession to previous number in the list. save and close interpreter.h Open: structs.h search for: #define PRF_ROOMFLAGS (1 << 21) Add: #define PRF_AUTOSAC (1 << 22) NOTE: The second number should be next in sucession to the previous one on the list as shown in the example. save and close structs.h ######################################################################### Now that the .h files have been edited, I like to go in alphabetical order from there. (silly no?) Open: act.informative.c search for: " Auto Show Exit: %-3s " Add: " Auto Sacrifice: %-3s " NOTE: If this is the last entry on this block, be sure to \r\n it like the others. This makes the output for the TOGGLE command look neat. Now search for: ONOFF(PRF_FLAGGED(ch, PRF_AUTOEXIT)), Add: ONOFF(PRF_FLAGGED(ch, PRF_AUTOSAC)), at the bottom of this table. save and close act.informative.c NOTE: If using a compatible compiler, now would be a good time to compile act.informative.c and check for spelling errors. Open: act.other.c search for: "autoexits enabled.\r\n}" add a comma to the end of this! Add: {"AutoSaccing disabled.\r\n", "AutoSaccing enabled.\r\n"} If this is the last sentence in the table, do NOT add a comma to the end of this! Now search for: case SCMD_AUTOEXIT: result = PRF_TOG_CHK(ch, PRF_AUTOEXIT); break; Add: case SCMD_AUTOSAC: result = PRF_TOG_CHK(ch, PRF_AUTOSAC); break; save and close act.other.c NOTE: If using a compatible compiler, now would be a good time to compile act.other.c and check for spelling errors. Open: fight.c search for: int damage(struct char_data * ch, struct char_data * victim, int dam, int attacktype) { Under this add: ACMD(do_sac); NOTE: add this before int exp; if you have it. bpl15 doesn't. If you don't know what this means, you don't have it. Now search for: if (MOB_FLAGGED(ch, MOB_MEMORY)) forget(ch, victim); } die(victim); Add: /* If Autosac enabled, get all corpse */ if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOSAC)) { do_sac(ch,"corpse",0,0); } save and close fight.c ######################################################################### This should just about do it for autosac. For those of you who don't have the sacrifice command, I've included the following: in act.item.c add this at the very bottom (to make it easier to find it in the future): ****ADD EVERYTHING BELOW THIS LINE UNTIL THE STOP LINE**** ACMD(do_sac) { struct obj_data *obj; one_argument(argument, arg); // note, I like to take care of no arg and wrong args up front, not // at the end of a function, lets get the wrongness out of the way :) if (!*arg) { send_to_char("What so you wish to sacrifice?\n\r",ch); return; } // if it's not in the room, we ain't gonna sac it if (!(obj = get_obj_in_list_vis(ch, arg, world[ch->in_room].contents))) { send_to_char("You don't see that here.\n\r",ch); return; } // nifty, got the object in the room, now check its flags if (!CAN_WEAR(obj, ITEM_WEAR_TAKE)) { send_to_char("You can't sacrifice THAT!\n\r",ch); return; } // seems as if everything checks out eh? ok now do it act("$n sacrifices $p.", FALSE, ch, obj, 0, TO_ROOM); act("You sacrifice $p to your deity.\r\nFire gives you one gold coin for your humility.", FALSE, ch, obj, 0, TO_CHAR); GET_GOLD(ch) += 1; /* simple addition that gives one coin to the char's inventory -spl */ extract_obj(obj); } *******STOP!******* close and save act.item.c *NOTE: Be sure to change the line: Fire gives you one gold coin for your humility. To reflect someone besides Fire (My char on Randor).* Open: interpreter.c search for: ACMD(do_save); Above it add: ACMD(do_sac); *NOTE: commands should be in alphabetical order in interpreter.c* Now search for: { "save" , POS_SLEEPING, do_save , 0, 0 }, *NOTE: This may look different if you are using another bpl other than bpl15, simply copy and paste a your version of save and edit it appropriately.* Above it add: { "sac" , POS_STANDING, do_sac , 0, 0 }, ######################################################################### This should do it for sacrifice. Compile and run your game as usual and try it out. PEOPLE TO THANK: * Ron Hensley for his autosplit snippet. I couldn't have figured this out alone. * JTRhone for his fix-up of the sacrifice command. I messed with it a bit, but for the most part it should all be there. * Julian Buckley, for his extensive email support during my trail-and-error days. I wouldn't have gotten this far without him:. Shane P. Lee 11:45 PM 1/19/00