ALWAYS BACKUP YOUR CODE BEFORE ADDING ANYONE ELSES CODE, OR EVEN YOUR OWN! This is my first real snippet, and as such it is a simple one. However, what it does I've found to be remarkably useful considering just how easy it was to code. Because of it's simplicity, I require no credit, or email, or addition to snippet helpfiles in any way. If you do want to add me, thats fine :P This code was written for a QuickMUD (ROM 2.4b6 with OLC and colour) base but should work for any stock ROM 2.4 code. This code will add a "keep" extra flag you can set for objects that will make them stay with a character after death. On my game we use this mainly for quest or special items, in most cases used with the no_drop no_uncurse flags (if it's a weapon, with no_remove too) to make sure the player keeps the item. I'll try and keep my explanations clear and concise. Where you see a block of code, add in anything with a + before it. BACKUP YOUR CODE! ****** add to merc.h ****** /* Find this part of the file, it is the extra flag declarations used for objects. Do a search in the file for ITEM_GLOW and you'll find it directly. Then add the keep flag */ #define ITEM_ROT_DEATH (P) #define ITEM_VIS_DEATH (Q) + #define ITEM_KEEP (R) <- Make sure the letter is one you are not already using! #define ITEM_NONMETAL (S) ****** add to tables.c ****** /* Find the const struct flag_type extra_flags statement. Again, do a search on ITEM_GLOW and you should go straight to it. Then add the following in the same position you added it to merc.h (in my case, below ITEM_VIS_DEATH) */ {"rotdeath", ITEM_ROT_DEATH, TRUE}, {"visdeath", ITEM_VIS_DEATH, TRUE}, + {"keep", ITEM_KEEP, TRUE}, {"nonmetal", ITEM_NONMETAL, TRUE}, ****** add to fight.c ****** /* The only slightly tricky bit. Find the make_corpse call, and add the line stated. If you search for "void make_corpse" you should find it straight away. Then add the following lines. */ if (IS_SET (obj->extra_flags, ITEM_ROT_DEATH) && !floating) { obj->timer = number_range (5, 10); REMOVE_BIT (obj->extra_flags, ITEM_ROT_DEATH); } REMOVE_BIT (obj->extra_flags, ITEM_VIS_DEATH); + if (IS_SET (obj->extra_flags, ITEM_KEEP)) + obj_to_char (obj, ch); ****** END OF SNIPPET ****** Thats it! As you can see it is all of 4 extra lines of code, but the uses for the flag are considerable. When you create an object in OLC, just set the extra flag "keep" and the item will stay with a character even if they die. You can also use this flag to implement tattoo's if you create the wear location for them, although I know there is already a snippet floating around that details how to do this in a slightly different way. If you have problems, I will try to answer your questions as best I can, but as long as you remember to do a clean make it should compile cleanly and without a hitch. Happy Coding! Chris Jenkins (Xerihae of the Winds of Lor'an) xerihae@windsofloran.co.uk