[NEWBIE] [CODE] dealing with equipment after remort

From: Co-Sysop (dmodem@CYBNETONLINE.COM)
Date: 09/17/97


I am planning on adding remort to my MUD.  I think I have everything ok so
far but I want to ask a few questions here about things I'm not sure how to do.

First, I have to remove all of their equipment but its valuable equipment.
I don't want it to be completely gone so when it is removed I want it to go
to a little shop where (at a certain level) the remorted player is allowed
to go there and purchase the equipment for a lot of money.  I want the stuff
to be saved in case the mud is rebooted or crashes (GASP!  newbie + code =
frustrated newbie and bad code) before the player gets a chance to buy back
the equipment. what I need/want to do:
equipment removed from player (inv and equipped)
the stuff gets saved to a file
stuff is some how told who it belongs to (without making it change the
actually    item, just seperate files for each remort or something in the
file that says    the thing belongs to this person).  that way someone else
can't buy eq that     was never their's.  ** About here and saving the stuff
is where I am having     trouble **
player comes back to that place after reaching a certain level
the player acts just like the room is a shop without a shop keeper
(spec-proc      for the room.  I think I have this part worked out) they
decide to buy an    item and are forced to pay about 3 or 4 or 5 times its
value (its not cruel.    If they can get high enough to remort they can find
enough gold to buy some    expensive eq)
they buy it and its no longer available (removed from the file)
a few other concerns I have are making sure items in containers are removed
from    the containers and made available to the person.
the files would be saved periodically in case of a crash
I know its a lot to ask but I could use some input from people have been
coding for a long time.

Second, I want to "clean up" the player after their remort.  This involves
removing any flags and bits and spell effects they have on them.  No, this
doesn't give them a way to get a killer or thief falg removed without dying.
My remort is done by an implementor only command.  a bit sloppy but much
easier to control.  but back to the removal of flags...  Is there a function
that removes them all or should I write a function (something my coding
knowledge does very easily allow).  also, could I just have use
REMOVE_BIT(ch, flagsandstuff) or whatever (i'll find it later) but if the
bit is not set would removing it anger the computer faeries that live in my
computer?  or should i just do if (bitisset) then remove bit and just have
if statements before I remove each one? I am running my mud on win95.

Don't bother with replies like "read the code" because I have read it but
without much knowledge of c (i am learning quite a bit from all of my
annoying little screw ups) I really can't understand some of it (the parts i
want to understand).  And don't reply with a "get out your learning c book"
because its not that simple.  I have 100+ books on c++ but none on c.  not
to mention local book stores don't seem to carry them.  I am reading the
code as much as I can and if I find a book or two then I will quickly learn
all that I can and maybe my questions will become less frequent and less
newbiish.  sorry if the stupidity of the questions bothers you but, I did
put a [NEWBIE] thing there...


     +------------------------------------------------------------+
     | 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/08/00 PST