Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Coding Project
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Ricwi
Canada (2 posts) Bio
|
Date
| Wed 16 Apr 2003 01:51 AM (UTC) |
Message
| 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 |
Ricwi
Fountain of Useless Knowledge | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #1 on Wed 16 Apr 2003 02:23 AM (UTC) |
Message
| 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... |
~Nick Cash
http://www.nick-cash.com | Top |
|
Posted by
| Dace K
Canada (169 posts) Bio
|
Date
| Reply #2 on Sat 10 May 2003 03:54 AM (UTC) |
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 |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
12,145 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top