Re: [Circle] SEMI-NEWBIE QUESTION: Circle Data types???

From: Joshua Mentzer (galion@bga.com)
Date: 07/26/96


> I have noticed that at numerous points in the code there is a listing 
> that includes the line (int), normally this appears in an array, such
> as: titles[(int) GET_CLASS (ch)][(int) GET_LEVEL(ch)]
> 
  This is casting, you are right, it's taking the byte and casting it into
an int.
  I'm not sure, haven't look at printf %<letter> things in awhile, but I 
think %u is byte, or unsigned.
> 
> One last thought, unrelated to coding itself...well sorta...I'm thinking
> about iplementing something into my code that will allow players to
> hide/bury things in outdoor rooms, such that they could dig them up (or
> anyone else could) at a later date.  I would like to make it so that 
> the rooms will keep their items buried even through a reboot.  I'm just
> curious as to whether anyone has implemented this or seen it implemented
> somewhere?
> 

  Cool idea, I've never seen this done, but I could see it working. 
Here's kind of a general idea(though it may not be the best way of 
accomplishing this)
 create an index that saves to file and in it have
 vnum of room and vnum of the item.
 and then a pointer to the next one.

then have a bury command which would push an item onto that index, and an
dig command that would pop it off..
then if someone did a "dig" in your room, check and see if that room is 
on the list, if so, move the object into the room, or into their inventory.
Then you have some other things to consider as well..like multiple things 
buried in one room..
 This feature would be quite useful and neat, buried treasure, a murderer 
might bury the corpse...etc..


  -josh


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



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