Re: Dynamic obj descriptions and castle.c

From: Skylar (skylar@ifconfig.intserv.com)
Date: 06/03/96


On Mon, 3 Jun 1996, Ground Zero Enterprises wrote:

> Castle.c is only used for that specific area correct?  I took out all of 
> the stock areas and am writing my world from scratch and was wondering if 
> i can delete the castle.c file from the makefile and my src.

Yeah, I'm pretty sure it stands alone.  Ditch it from the Makefile, and
the assign_kings_castle (I think thats what it was) from spec_asssign.c


> Also, is it possible to make objects with dynamic descriptions? I want to 
> make it so althoug gold is still kept track of in the char file that 
> players will have an object that looks like "x gold coins" where x would 
> = GET_GOLD(ch) but i cant figure out how to do it without putting checks 
> in show_obj_to_char (i think tahst the function name) that check if the 
> item is TYPE_MONEY or not and if it is then 
> 
> send_to_char("%d gold coins", GET_GOLD(ch)); 
> 
> or something like that. Anyone have any suggestions?

Yes, cheat.  Its going to get cumbersome making coins into obj's on the
fly, then combining all the piles whenever they "meet" in someone's inv
or on the ground or in a container and all that.  If you MUST do it this
way, just check out money_desc() in handler.c, but I would suggest just
doing it quick and simple like this...

in act.informative.c, ACMD(do_inventory)

after "You are carrying," and before list_obj_to_char, just add:

if (GET_GOLD(ch) > 0) {
  sprintf(buf, "%d gold coins\r\n", GET_GOLD(ch));
  send_to_char(buf, ch);
}



-Sky



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