Hey everyone. I'm working on a SMAUG-based mud that's set in modern times. You can imagine the picking through that I've had to do to clean some aspects up. Well it's not done yet. But I have an idea, and I really need some help doing it.
I want to implament a phone system in the mud. But I'm no master coder. If there's anybody out there that could help me out with this, or maybe knows of some existing code that would be helpful, please let me know.
-Ricwi
If your using SMAUG then couldn't you just mess around with the tell command? Seem's to me like that would be the best way to deal with it. Its easy, but people would need a number issued or something, if you wanted that. Just needs a bit of messing around with...
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