[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Coding Project

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Coding Project

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Ricwi   Canada  (2 posts)  [Biography] bio
Date Wed 16 Apr 2003 01:51 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Reply #1 on Wed 16 Apr 2003 02:23 AM (UTC)  quote  ]
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
[Go to top] top

Posted by Dace K   Canada  (169 posts)  [Biography] bio
Date Reply #2 on Sat 10 May 2003 03:54 AM (UTC)  quote  ]
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
[Go to top] 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.


1,764 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]