Re: [NEWBIE?][CODE]

From: Richard Glover (magik@thegrid.net)
Date: 02/10/99


Looks like you'll need to figure out how you want to do a couple things.
With the implants[x] being in char_data, you have to determine what is going
to be stored in implants[x].  Is it an obj_vnum value or an entire object?
Since equipment[x] is an object value I'll assume you just copied that.
This will work fine through death by the player since there is currently no
code to remove implants after death in your mud.

You'll need to have a way of putting an implant onto the character's data,
which you said you'd have a mob do.  That could be some kind of shop proc.
Take a look at equip_char() in handler.c.  You could use roughly the same
method there.

Finally, you'll need a permanent storage method.  All of the above is only
when the mud is running.  char_data doesn't store anything to disk.
char_file_u does.  You have 3 ways that you can save your information that I
can see.
    a) Take a look at save_char, load_char, store_to_char, and
char_to_store, you'll have to add some code in there.  This will ruin your
pfiles, but it sounds like you are early in the game, so no worries there.
    b) Normally objs are stored using objsave.c and you can copy the method
there and attach the implants to the code that saves with objects.  This
will ruin your rent files.
    c) Copy some of the objsave.c code to develope a new set of files for
implants.

Rick

-----Original Message-----
From: Chris Proper <jproper@erols.com>
To: CIRCLE@post.queensu.ca <CIRCLE@post.queensu.ca>
Date: Tuesday, February 09, 1999 10:41 PM
Subject:  [NEWBIE?][CODE]


>Greetings,


<snip>

>I also added this to the char_data structure in utils.h...
>
>#define GET_IMPLANTS(ch, i)  ((ch)->implants[i])
>
>Finally, I tried to add support for implants into Oasis OLC (v1.5) but
>that is pretty far from working.  And quite frankly I'd be happy to just
>get the implant code working.  Which brings me to the main question
>of... what else do I have to do besides make it so you keep implants
>through death (I saw a tattoo patch that I can probably figure that out
>from)?  As it is now just typing implant on the mud shows that I have
>nothing implanted.  Any help on this would be GREATLY appreciated,
>thanks!
>
>Chris
>jproper@erols.com


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



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