[code] house creating/saving at start

From: pjh (wart@trilidun.kuntrynet.com)
Date: 12/31/96

Okidoki i have finally figgered out how to like code :>.  (barely)

at any rate I am trying to get it so that during the void_do_start in
class.c it will do a hcontrol build 6600 w GET_NAME(ch)
for now.  Later i will add a structure for what house is built blah blah.
But for a test i wanted to basically turn 6600 into a house for the next
puppy that logged in.  Well it works fine.  I mean it gives it the HOUSE
flag.... well first here is the code.
void do_start(struct char_data * ch)
  void advance_level(struct char_data * ch);
  extern struct room_data *world;

   struct house_control_rec house_control[MAX_HOUSES];

   sh_int virt_house, real_house, real_atrium, virt_atrium, exit_num;
   long owner;

   struct house_control_rec temp_house;
   int num_of_houses = 0;

  GET_LEVEL(ch) = 1;
  GET_EXP(ch) = 1;

... blah blah down a little

  GET_COND(ch, THIRST) = 24;
  GET_COND(ch, FULL) = 24;
  GET_COND(ch, DRUNK) = 0;
  virt_house=6600; // make a randomizing thinger here
  exit_num=3; // exit west
  real_atrium = TOROOM(real_house, exit_num);
  virt_atrium = world[real_atrium].number;
  owner = get_id_by_name(GET_NAME(ch));

   temp_house.mode = HOUSE_PRIVATE;
   temp_house.vnum = virt_house;
   temp_house.atrium = virt_atrium;
   temp_house.exit_num = exit_num;
   temp_house.built_on = time(0);
   temp_house.last_payment = 0;
   temp_house.owner = owner;
   temp_house.num_of_guests = 0;

 house_control[num_of_houses++] = temp_house;


  ch->player.time.played = 0;
  ch->player.time.logon = time(0);

ok there it is.  Now my queustion lies in that it creats the ROOM_HOUSE,
ROOM_PRIVATE, and ROOM_ATRIUM flags on 6600 and 6601 *the atrium* fine!

but when i do a hcontrol show it doesnt list 6600 in there
and when i compiled this is the error i got:
(only one.. amazing huh?)

class.c: In function Do_start':
class.c:879: warning: implicit declaration of function House_save_control'

Now for anyone wanting to implement this or a variant for the newbi-ish
ppl you need to add house.h to the class.o in the Makefile and also
#include house.h at the top of class.c 

also another more realistic thing to do (i dunno why it was in there) is
get rid of the double-sided door to an atrium check in house.c and get rid
of the entire atrium check for guest list in act.movement.c ... its more
realistic that way i think.

Anyway anyone willing to help please do so!  If you want more info and so
forth please let me know.  Im stumped. 


*-=-=-=-=-=-=-=* w0nderful *-=-* w0rld *-=-* 0f *-=-* wart *-=-=-=-=-*
Eudaemonia Mud: Port 4000

| 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/18/00 PST