[CODE] More on scribe

From: Chuck (creed@EXIT1.I-55.COM)
Date: 06/29/98


I've been working more on the scribe skill, and I've gotten everything to
work fine except two things.  After the scroll is completed, it is just
BAD.  It looks fine, it id's fine and all that jazz.  However, whenever you
try to recite it or quit with it, it crashes the mud with useless gdb
output of ?? Cannot access memory at address blah.
However, if you save before you try and use the scrol (or quit), then crash
the mud, then get back on with the re-loaded scroll, it works just fine.
Now, after all that trash, my question is what would the rebooting of the
mud do to the scroll that makes it work?  The code used in do_scribe to
make the scroll is added below.

        final_scroll = read_object(10097, VIRTUAL); // A blank scroll
        equip_char(ch, final_scroll, pos);

        sprintf(buf2, "scroll %s", spells[spellnum]);
        final_scroll->name = str_dup(buf2);

        final_scroll->description = "A scroll is lying on the ground here.";
        sprintf(buf2, "a scroll of %s", spells[spellnum]);
        final_scroll->short_description = str_dup(buf2);
        GET_OBJ_VAL(final_scroll, 0) = GET_LEVEL(ch);

   /* Give the blank scroll one charge of this spell */
        GET_OBJ_VAL(final_scroll, 1) = spellnum;

        GET_OBJ_COST(final_scroll) = GET_LEVEL(ch) * 500;

Oh, and I got the scrolls to save the names by adding strings in
obj_file_ele for name, description, and short_description, then
saving/loading them in objsave.c in case anyone wants to know.

Any help is much appreciated.
Chuck


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST