Re: MSP Sound

From: Doppleganger Software (doppsoft@TZC.COM)
Date: 03/22/98


>uhm.. i still have problem understanding...
>if i have "&M(xxxxx)" in a description of  a room,
>if ha player have the flag, they will hear the sound "!!MUSIC(xxxxx)"
>if they don't have the flag, i have to remove the entire "&M(xxxxx) " or
>the player will see the (xxxxx). so i still need a procedure to remove a
>substring.

Nope, the idea is that if they don't have the flag, they don't see a
thing.

>the parse_color is a nidification of if/case that use the & + 2 char...
>in this case, the (xxxxx) may be different every time.

Well, what you can do is that in the detection for a &, it then checks
the next character, if the next character is a -, +, M or S, it goes on.
If it's an M or S, it does a special 'grabber' that takes everything
between ()'s.  (It's possible, I've done it numerous times in my prompt
code)  Basically, what you do, is you step character by character through
the string, adding each character to a separate string, until you hit the
other ).  At that point, the string is ended with a \0, and then the
whole thing is decided what to do with, either sent as an !!MUSIC() or
!!SOUND, or trashed.  The biggest problem will probably be patching your
color codes to accept this.

"One hundred years from now, none of this will matter because you and I
will be dead -- unless the Grim Reaper has switched his record-keeping to
a Windows 95-based system, in which case we all might live forever. "
-- Associated Press


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST