At 03:35 PM 4/14/96 -0700, you wrote: > >Hello all >I'm trying to write an ACMD(do_home) function... >it pretty much follows the format of recall... >and it would allow ppl with houses to goto them >with the house command... >BUT! >How would I check to see if that person had a house? >'Cause if the player doesn't have a house and types home >it core dumps (of course, since he doesn't have a house to goto), >so I need to first check if the player has a house.. how would >I do that? > I got this from the circle mailing list some time back (sorry, don't remembr the author) it returns the real number of a players house if he has one e;se returns -1) (then again, it may be part of house.c, I don'[t remember :P) /* Find rnum of players house */ int find_rnum_by_ch(struct char_data * ch) { int d=0; int deg = -1; for (;d < num_of_houses + 1; d++) if (GET_IDNUM(ch) == house_control[d].owner) deg = real_room(house_control[d].vnum); return deg; } Brazil - IMP of AddictMUD tolkien.realms.org 4000 or addict.realms.org 4000 or 206.185.33.2 4000 **** NOTE IP ADDRESS CHANGE ****
This archive was generated by hypermail 2b30 : 12/18/00 PST