[CODE] [MSP] Sound function

From: Phillip A. Ames (kirk47@JUNO.COM)
Date: 10/25/98


Hey all, I wrote a sound function, works rather nice(IMHO :))  You can
stick this in your own file(That's what I did) and figure out the
dependencies for it yourself, or you can stick it in something like
act.comm.c(just the function, not the includes).  Currently it only works
for people with windows, in a directory called c:\MSP but I suppose you
can fix that for other clients/OS's if you want. You need to make a new
preference flag in structs.h like #define PRF_SOUND (1 << XX) where XX is
the next number in line.  Before you put in other sounds, I suggest that
you find out what the different options mean from a page like the one
found at www.zuggsoft.com because that page explains it the best.  The
usage for this code is:
sound(ch, X); where X is the sound number used in the switch block below.
 If you use this code, please credit me SOMEWHERE in your MUD, be it a
whole page or a single line :)  Anyway, to the code....

/*
************************************************************************
*   File: sound.c                                       Part of CircleMUD
*
*  Usage: Code to implement MSP.
*
*  Written by Gowron of Star Trek: Armageddon MUD(Hostless).
*
*  All rights reserved.  See license.doc for complete information.
*
*
*
*  Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University
*
*  CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991.
*
************************************************************************
*/

#include "conf.h"
#include "sysdep.h"

#include "structs.h"
#include "utils.h"
#include "comm.h"
#include "interpreter.h"
#include "handler.h"

/* Local Functions */
void sound(struct char_data *ch, int sound);

void sound(struct char_data *ch, int sound)
{
int sound_num;
        if(!PRF_FLAGGED(ch, PRF_SOUND)){
                return;
        }
        switch(sound){
        case 1:
                send_to_char("!!SOUND(C:\\MSP\\sound1.wav l=1 p=75
v=100)", ch);
                break;
        case 2:
                send_to_char("!!SOUND(C:\\MSP\\sound2.wav l=1 p=75
v=100)", ch);
                break;
        default:
                send_to_char("Please report exactly what you were doing
when this message arrived using the 'bug' command", ch);
                break;
        }
}

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
or call Juno at (800) 654-JUNO [654-5866]


     +------------------------------------------------------------+
     | 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