| Message |
Yo. The phone thing is something I was thinking
of doing myself.. here's a few tips.
First, of course, you need to add a new obj type.
Assuming that your obj type for phone is ITEM_PHONE,
Add the following somewhere or other.
OBJ_DATA *find_phone( CHAR_DATA *ch )
{
OBJ_DATA *phone;
for ( phone = ch->last_carrying; phone; phone = phone->prev_content )
if ( phone->item_type == ITEM_PHONE
&& can_see_obj( ch, phone ) )
return phone;
return NULL;
}
Then, in function do_tell, make sure you define OBJ phone,
OBJ_DATA *phone;
and then the following in the middle of the checks.
phone = find_phone( ch );
if (!phone)
{
send_to_char("You don't have a phone to place a call with!\n\r", ch);
return;
}
That'll take care of the basic problems. You may want to
rename 'tell' to 'phone', and so forth. Hope you understand, and can use it =)
~M3GR!M |
ASJ Games - .Dimension 2, Resident Evil, and snippets - oh my!
http://asj.mudmagic.com
Drop by the area archives and find something for your mud. http://areaarchives.servegame.com | top |
|