From owner-merc-l@webnexus.com Tue Jun 25 05:25:47 1996
Received: from webnexus.com (greatdane.webnexus.com [165.227.96.3]) by earth.mat.net (8.6.12/8.6.12) with ESMTP id FAA02954; Tue, 25 Jun 1996 05:25:36 -0400
Received: (from daemon@localhost) by webnexus.com (8.7.1/8.7.1) id BAA28493 for merc-l-outgoing; Tue, 25 Jun 1996 01:03:36 -0700 (PDT)
Received: from paaltjens.si.hhs.nl (pp@paaltjens.si.hhs.nl [145.52.80.3]) by webnexus.com (8.7.1/8.7.1) with SMTP id BAA11339 for <merc-l@webnexus.com>; Tue, 25 Jun 1996 01:03:19 -0700 (PDT)
From: v942346@si.hhs.nl
Received: from si.hhs.nl by paaltjens.si.hhs.nl 
          id <22692-0@paaltjens.si.hhs.nl>; Tue, 25 Jun 1996 10:03:58 +0200
Received: by buning.si.hhs.nl (5.0/SMI-SVR4) id AA13930;
          Tue, 25 Jun 1996 10:01:47 --100
Date: Tue, 25 Jun 1996 10:01:47 --100
Message-Id: <9606250801.AA13930@buning.si.hhs.nl>
To: merc-l@webnexus.com
Subject: CODE: Reading #GAMES section in area file, new games upgrade
X-Sun-Charset: US-ASCII
Sender: owner-merc-l@webnexus.com
Precedence: bulk
Status: OR

Hi... this is the updated version of Maniac's Dice games, released
a few months ago.
This version reads the #GAMES section from area files, using the syntax
described in the area.txt file from base Envy2.0 code.
(As fas as I know this is how the envy dudes wanted dice games to be)

Here is the code and everything needed to include them.
this snippet is usefull for people who don't have dice games yet in their mud
and for people who already use my first snippet (dice.games)


This snippets (along with many others) can be found at my snippets page
http://www.si.hhs.nl/~v942346/snippets/snippets.html


				-- Maniac --
				
				
For (C) and license stuff see the snippet....


- -------------------------code follows---------------


Well... nice you got my latest snippet... games.c
This snippet replaces and improves another snippet I wrote dice.games...

This snippet allows more than one mob to host a game...

In the other (old) version of gambling/games an ACT flag (ACT_GAMBLE)
was set on mobiles that played gambling games. And a check was made
using the mob's vnum (Hardcoded in the mud source) what game was supposed
to be played.
This new version uses a system simular to the spec_fun system. To be precise...
that's what I used to create this version.

What to do to implement this...

1.	Remove the ACT_GAMBLE bit from merc.h, this saves you on of those
	ever needed bits... lucky for you.

2.	Remove the local game functions section from merc.h
	this declared game_u_l_t (and if you used my other dice.game patch
	it also declared game_high_dice and game_seven)

3.	Add a file called games.c to your Makefile(s)
	If you used to have the older patch by me, remove the file gamble.c
	from the directory and the Makefile(s)

4.	In db.c add these sections:

	Under 'local booting procedures' add this line
		void    load_games      args( ( FILE *fp ) );

	in boot_db, add this... (just 2 lines, not all of it...)

                else if ( !str_cmp( word, "ROOMS"    ) )
                    load_rooms   ( fpArea );
                else if ( !str_cmp( word, "SHOPS"    ) )
                    load_shops   ( fpArea );
                else if ( !str_cmp( word, "SPECIALS" ) )
                    load_specials( fpArea );
                else if ( !str_cmp( word, "GAMES"    ) )    /* <- ADD THIS */
                    load_games ( fpArea );		    /* <- And this */
                else
                {
                    bug( "Boot_db: bad section name.", 0 );
                    exit( 1 );
                }
            }

	Somewhere in db.c add this section....

- ---------------snip here----------------------
/*
 * Snarf games proc declarations.
 */
void load_games( FILE *fp )
{
    for ( ; ; )
    {
        MOB_INDEX_DATA *pMobIndex;
        char            letter;

        switch ( letter = fread_letter( fp ) )
        {
        default:
            bug( "Load_games: letter '%c' not *MS.", letter );
            exit( 1 );

        case 'S':
            return;

        case '*':
            break;

        case 'M':
            pMobIndex           = get_mob_index ( fread_number ( fp ) );
            pMobIndex->game_fun = game_lookup   ( fread_word   ( fp ) );
            if ( pMobIndex->game_fun == 0 )
            {
                bug( "Load_games: 'M': vnum %d.", pMobIndex->vnum );
                exit( 1 );
            }
            break;
        }

        fread_to_eol( fp );
    }
}
- -----------------------snip here-------------------

	in create_mobile, add this line (just one)

    mob->long_descr     = pMobIndex->long_descr;
    mob->description    = pMobIndex->description;
    mob->spec_fun       = pMobIndex->spec_fun;
    mob->game_fun       = pMobIndex->game_fun;		/* <- THAT ONE */

    mob->level          = number_fuzzy( pMobIndex->level );
    mob->act            = pMobIndex->act;
    mob->affected_by    = pMobIndex->affected_by;


5.	In act_wiz.c add this to do_mstat (after the check for spec_fun)

	if ( IS_NPC( victim ) && victim->game_fun != 0 )
	    strcat( buf1, "Mobile has game fun.\n\r" );

6.	In do_mset add game to the list of things that can be changed (string)
	and add this section just after the spec section.

    if ( !str_cmp( arg2, "game" ) )
    {
        if ( !IS_NPC( victim ) )
        {
            send_to_char( "Not on PC's.\n\r", ch );
            return;
        }

        if ( ( victim->game_fun = game_lookup( arg3 ) ) == 0 )
        {
            send_to_char( "No such game fun.\n\r", ch );
            return;
        }

        return;
    }

7.	If you have a do_string function, do the same for that function (see 6)
	/* not every mud version has this function. I think it came from ROM */

        if ( !str_prefix( arg2, "game" ) )
        {
            if ( !IS_NPC(victim) )
            {
                send_to_char( "Not on PC's.\n\r", ch );
                return;
            }
            if ( ( victim->game_fun = game_lookup( arg3 ) ) == 0 )
            {
                send_to_char( "No such game fun.\n\r", ch );
                return;
            }

            return;
        }


8.	If it's not allready there... (I think It is standard envy2.0)
	Add this to merc.h, in 'Accomodate old non-Ansi compilers'

/*
 * Accommodate old non-Ansi compilers.
 */
#if defined( TRADITIONAL )
#define const
#define args( list )                    ( )
#define DECLARE_DO_FUN( fun )           void fun( )
#define DECLARE_SPEC_FUN( fun )         bool fun( )
#define DECLARE_SPELL_FUN( fun )        void fun( )
#define DECLARE_GAME_FUN( fun )         void fun( )	/* <- This */
#else
#define args( list )                    list
#define DECLARE_DO_FUN( fun )           DO_FUN    fun
#define DECLARE_SPEC_FUN( fun )         SPEC_FUN  fun
#define DECLARE_SPELL_FUN( fun )        SPELL_FUN fun
#define DECLARE_GAME_FUN( fun )         GAME_FUN  fun	/* <- and this */
#endif

	If you didn't have the code mentioned at 8, you need this also...
	under the heading Function types: (only the last one)

/*
 * Function types.
 */
typedef void DO_FUN                     args( ( CHAR_DATA *ch,
                                               char *argument ) );
typedef bool SPEC_FUN                   args( ( CHAR_DATA *ch ) );
typedef void SPELL_FUN                  args( ( int sn, int level,
                                               CHAR_DATA *ch, void *vo ) );
typedef void GAME_FUN                   args( ( CHAR_DATA *ch,
                                               CHAR_DATA *croupier,
                                               char *argument ) );



9.	In merc.h in mob_index_data and in char_data structs add a line like
	this (after the spec_fun one)
		    GAME_FUN *          game_fun;


10.	Under 'Our function prototypes' at the end of merc.h add this (1) line

/*
 * Our function prototypes.
 * One big lump ... this is every function in Merc.
 */
#define CD      CHAR_DATA
#define MID     MOB_INDEX_DATA
#define OD      OBJ_DATA
#define OID     OBJ_INDEX_DATA
#define RID     ROOM_INDEX_DATA
#define SF      SPEC_FUN
#define GF      GAME_FUN		/* <- That one over there */

	and add this section somewhere below that...

/* games.c */
GF *    game_lookup     args( ( const char *name ) );

	and at the end add again one line...


#undef  CD
#undef  MID
#undef  OD
#undef  OID
#undef  RID
#undef  SF
#undef  GF		/* <- That one... this is the last line in merc.h */


11.	And finally the most imprortant part... the code that goes in games.c
	just cut it out of this one (or copy it and cut the shit above out. */

- -------------------cut here-------------cut here--------------------------

/***************************************************************************
 *  Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer,        *
 *  Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe.   *
 *                                                                         *
 *  Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael          *
 *  Chastain, Michael Quan, and Mitchell Tse.                              *
 *                                                                         *
 *  Envy Diku Mud improvements copyright (C) 1994 by Michael Quan, David   *
 *  Love, Guilherme 'Willie' Arnold, and Mitchell Tse.                     *
 *                                                                         *
 *  EnvyMud 2.0 improvements copyright (C) 1995 by Michael Quan and        *
 *  Mitchell Tse.                                                          *
 *                                                                         *
 *  In order to use any part of this Envy Diku Mud, you must comply with   *
 *  the original Diku license in 'license.doc', the Merc license in        *
 *  'license.txt', as well as the Envy license in 'license.nvy'.           *
 *  In particular, you may not remove either of these copyright notices.   *
 *                                                                         *
 *  Much time and thought has gone into this software and you are          *
 *  benefitting.  We hope that you share your changes too.  What goes      *
 *  around, comes around.                                                  *
 ***************************************************************************/

 /* Games.c was written by maniac to support the GAMES section in the
    Envy 2 area format... it was discribed in the area.txt but the code
    was not implemented... so i wrote my own... -- Maniac --

    This stuff is (C) 1996 The Maniac from Mythran Mud

    snippets can be found at my snippets page:
    	http://www.hhs.nl/~v942346/snippets/snippets.html

    Well... so much for the legal bullshit... now the code... */

#if defined( macintosh )
#include <types.h>
#else
#include <sys/types.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "merc.h"

/*
 * The following game functions are available for the mud.
 */
DECLARE_GAME_FUN( game_u_l_t     );
DECLARE_GAME_FUN( game_high_dice );
DECLARE_GAME_FUN( game_seven     );

/*
 * Given a name, return the appropriate spec fun.
 */
GAME_FUN *game_lookup( const char *name )
{
    if ( !str_cmp( name, "game_u_l_t"		) )	return game_u_l_t;
    if ( !str_cmp( name, "game_high_dice"	) )	return game_high_dice;
    if ( !str_cmp( name, "game_seven"		) )	return game_seven;
    return 0;
}


/*
 *  Menu for all game functions.
 *  Thelonius (Monk)  5/94
 */
void do_bet( CHAR_DATA *ch, char *argument )
{
    CHAR_DATA *croupier;

    if ( IS_AFFECTED( ch, AFF_MUTE )
        || IS_SET( ch->in_room->room_flags, ROOM_CONE_OF_SILENCE ) )
    {
        send_to_char( "You can't seem to break the silence.\n\r", ch );
        return;
    }

    /*
     *  The following searches for a valid croupier.  It allows existing
     *  ACT_GAMBLE mobs to attempt to gamble with other croupiers, but
     *  will not allow them to gamble with themselves (i.e., switched
     *  imms).  This takes care of ch == croupier in later act()'s
     */
     /* Maniac: modified it to disband ACT_GAMBLE... this saves us a hard
     	needed extra bit and makes the game system more usefull
	now uses a system like specials... game_fun and game_lookup */
    for( croupier = ch->in_room->people; croupier;
        croupier = croupier->next_in_room )
    {
        if ( IS_NPC( croupier )
            && (croupier->game_fun != 0 )
            && !IS_AFFECTED( croupier, AFF_MUTE )
            && croupier != ch )
            break;
    }

    if ( !croupier )
    {
        send_to_char( "You can't gamble here.\n\r", ch );
        return;
    }

    /* Now for the new game approach... by Maniac */
    if ( croupier->game_fun == game_lookup( "game_u_l_t" ) )
	    game_u_l_t( ch, croupier, argument );
    if ( croupier->game_fun == game_lookup( "game_high_dice" ) )
	    game_high_dice( ch, croupier, argument );
    if ( croupier->game_fun == game_lookup( "game_seven" ) )
	    game_seven( ch, croupier, argument );

    return;
}



/*
 * Upper-Lower-Triple
 * Game idea by Partan
 * Coded by Thelonius
 */
void game_u_l_t( CHAR_DATA *ch, CHAR_DATA *croupier, char *argument )
{
    char msg    [ MAX_STRING_LENGTH ];
    char buf    [ MAX_STRING_LENGTH ];
    char limit  [ MAX_STRING_LENGTH ] = "5000";
    char wager  [ MAX_INPUT_LENGTH  ];
    char choice [ MAX_INPUT_LENGTH  ];
    int  ichoice;
    int  amount;
    int  die1;
    int  die2;
    int  die3;
    int  total;

    argument = one_argument( argument, wager );
    one_argument( argument, choice );

    if ( wager[0] == '\0' || !is_number( wager ) )
    {
        send_to_char( "How much would you like to bet?\n\r", ch );
        return;
    }

    amount = atoi( wager );

    if ( amount > ch->gold )
    {
        send_to_char( "You don't have enough gold!\n\r", ch );
        return;
    }

    if ( amount > atoi( limit ) )
    {
        act( "$n tells you, 'Sorry, the house limit is $t.'",
            croupier, limit, ch, TO_VICT );
        ch->reply = croupier;
        return;
    }
/*
 *  At the moment, the winnings (and losses) do not actually go through
 *  the croupier.  They could do so, if each croupier is loaded with a
 *  certain bankroll.  Unfortunately, they would probably be popular
 *  (and rich) targets.
 */

         if ( !str_cmp( choice, "lower"  ) ) ichoice = 1;
    else if ( !str_cmp( choice, "upper"  ) ) ichoice = 2;
    else if ( !str_cmp( choice, "triple" ) ) ichoice = 3;
    else
    {
        send_to_char( "What do you wish to bet: Upper, Lower, or Triple?\n\r",
                     ch );
        return;
    }
/*
 *  Now we have a wagering amount, and a choice.
 *  Let's place the bets and roll the dice, shall we?
 */
    act( "You place $t gold coins on the table, and bet '$T'.",
        ch, wager, choice,   TO_CHAR    );
    act( "$n places a bet with you.",
        ch, NULL,  croupier, TO_VICT    );
    act( "$n plays a dice game.",
        ch, NULL,  croupier, TO_NOTVICT );
    ch->gold -= amount;

    die1 = number_range( 1, 6 );
    die2 = number_range( 1, 6 );
    die3 = number_range( 1, 6 );
    total = die1 + die2 + die3;

    sprintf( msg, "$n rolls the dice: they come up %d, %d, and %d",
            die1, die2, die3 );

    if( die1 == die2 && die2 == die3 )
    {
        strcat( msg, "." );
        act( msg, croupier, NULL, ch, TO_VICT );

        if ( ichoice == 3 )
        {
            char haul [ MAX_STRING_LENGTH ];

            amount *= 37;
            sprintf( haul, "%d", amount );
            act( "It's a TRIPLE!  You win $t gold coins!",
                ch, haul, NULL, TO_CHAR );
            ch->gold += amount;
        }
        else
            send_to_char( "It's a TRIPLE!  You lose!\n\r", ch );

        return;
    }

    sprintf( buf, ", totalling %d.", total );
    strcat( msg, buf );
    act( msg, croupier, NULL, ch, TO_VICT );

    if (   ( ( total <= 10 ) && ( ichoice == 1 ) )
        || ( ( total >= 11 ) && ( ichoice == 2 ) ) )
    {
        char haul [ MAX_STRING_LENGTH ];

        amount *= 2;
        sprintf( haul, "%d", amount );
        act( "You win $t gold coins!", ch, haul, NULL, TO_CHAR );
        ch->gold += amount;
    }
    else
        send_to_char( "Sorry, better luck next time!\n\r", ch );

    return;
}

/*
 * High-Dice
 * Game idea by The Maniac!
 * Coded by The Maniac (based on code from Thelonius for u_l_t)
 *
 * The croupier roll's 2 dice for the player, then he roll's 2 dice
 * for himself. If the player's total is higher he wins his money*2
 * if the player's total is equal to or lower than the croupier's total
 * the bank wins... and the player loses his money
 */
void game_high_dice( CHAR_DATA *ch, CHAR_DATA *croupier, char *argument )
{
    char msg    [ MAX_STRING_LENGTH ];
    char buf    [ MAX_STRING_LENGTH ];
    char limit  [ MAX_STRING_LENGTH ] = "5000";
    char wager  [ MAX_INPUT_LENGTH  ];
    int  amount;
    int  die1;
    int  die2;
    int  die3;
    int  die4;
    int  total1;
    int  total2;

    argument = one_argument( argument, wager );

    if ( wager[0] == '\0' || !is_number( wager ) )
    {
        send_to_char( "How much would you like to bet?\n\r", ch );
        return;
    }

    amount = atoi( wager );

    /* Does char have enough gold to play the game */
    if ( amount > ch->gold )
    {
        send_to_char( "You don't have enough gold!\n\r", ch );
        return;
    }

    /* Doesn't the char bet too much */
    if ( amount > atoi( limit ) )
    {
        act( "$n tells you, 'Sorry, the house limit is $t.'",
            croupier, limit, ch, TO_VICT );
        ch->reply = croupier;
        return;
    }

/*
 *  Now we have a wagering amount...
 *  Let's place the bets and roll the dice, shall we?
 */
    switch (number_range(1, 5))
    {
	case 1:
	   strcpy ( msg, "Roll some dice");
	   break;
	case 2:
	   strcpy ( msg, "Lets see those dice");
	   break;
	case 3:
	   strcpy ( msg, "You'd better let me win !");
	   break;
	case 4:
	   strcpy ( msg, "Here's some cash, now roll 'em!");
	   break;
	case 5:
 	   strcpy ( msg, "Today's my lucky day...");
	   break;
    }
    act( "You place $t gold coins on the table, and say '$T'.",
        ch, wager, msg, TO_CHAR    );
    act( "$n places a bet with you.",
        ch, NULL,  croupier, TO_VICT    );
    act( "$n plays a dice game.",
        ch, NULL,  croupier, TO_NOTVICT );
    ch->gold -= amount;

    die1 = number_range( 1, 6 );
    die2 = number_range( 1, 6 );
    die3 = number_range( 1, 6 );
    die4 = number_range( 1, 6 );
    total1 = die1 + die2;
    total2 = die3 + die4;

    sprintf( msg, "$n rolls your dice: they come up %d, and %d",
            die1, die2 );

    sprintf( buf, ", totalling %d.", total1 );
    strcat( msg, buf );
    act( msg, croupier, NULL, ch, TO_VICT );

    sprintf( msg, "$n rolls his dice: they come up %d, and %d",
            die3, die4 );

    sprintf( buf, ", totalling %d.", total2 );
    strcat( msg, buf );
    act( msg, croupier, NULL, ch, TO_VICT );


    if ( total1 > total2 )
    {
        char haul [ MAX_STRING_LENGTH ];

        amount *= 2;
        sprintf( haul, "%d", amount );
        act( "You win $t gold coins!", ch, haul, NULL, TO_CHAR );
        ch->gold += amount;
    }
    else
        send_to_char( "Sorry, better luck next time!\n\r", ch );
    return;
}

/*
 * Under and Over Seven
 * Game idea by Maniac
 * Coded by Maniac (with bits from Thelonius)
 *
 * This is a very simple and easy dice game... and the nice thing is...
 * the operator never goes broke (he practically always wins)
 * (better not tell the players...)
 * The player can choose to bet on: Under 7, Seven or Over 7
 * The croupier rolls 2d6 and pays double if the player chose under or
 * over 7 and was correct and the croupier pay's 5x the amount if the player
 * chose SEVEN and was right.
 */

void game_seven( CHAR_DATA *ch, CHAR_DATA *croupier, char *argument )
{
    char msg    [ MAX_STRING_LENGTH ];
    char buf    [ MAX_STRING_LENGTH ];
    char limit  [ MAX_STRING_LENGTH ] = "5000";
    char wager  [ MAX_INPUT_LENGTH  ];
    char choice [ MAX_INPUT_LENGTH  ];
    int  ichoice;
    int  amount;
    int  die1;
    int  die2;
    int  total;

    argument = one_argument( argument, wager );
    one_argument( argument, choice );

    if ( wager[0] == '\0' || !is_number( wager ) )
    {
        send_to_char( "How much would you like to bet?\n\r", ch );
        return;
    }

    amount = atoi( wager );

    if ( amount > ch->gold )
    {
        send_to_char( "You don't have enough gold!\n\r", ch );
        return;
    }

    if ( amount > atoi( limit ) )
    {
        act( "$n tells you, 'Sorry, the house limit is $t.'",
            croupier, limit, ch, TO_VICT );
        ch->reply = croupier;
        return;
    }
/*
 *  At the moment, the winnings (and losses) do not actually go through
 *  the croupier.  They could do so, if each croupier is loaded with a
 *  certain bankroll.  Unfortunately, they would probably be popular
 *  (and rich) targets.
 */

         if ( !str_prefix( choice, "under" ) ) ichoice = 1;
    else if ( !str_cmp   ( choice, "-"     ) ) ichoice = 1;
    else if ( !str_prefix( choice, "over"  ) ) ichoice = 2;
    else if ( !str_cmp   ( choice, "+"     ) ) ichoice = 2;
    else if ( !str_prefix( choice, "seven" ) ) ichoice = 3;
    else if ( !str_cmp   ( choice, "7"     ) ) ichoice = 3;
    else
    {
        send_to_char( "What do you wish to bet: Under(-), Over(+), or Seven(7)?\n\r", ch );
        return;
    }

/*
 *  Now we have a wagering amount, and a choice.
 *  Let's place the bets and roll the dice, shall we?
 */
    act( "You place $t gold coins on the table, and bet '$T'.",
        ch, wager, choice,   TO_CHAR    );
    act( "$n places a bet with you.",
        ch, NULL,  croupier, TO_VICT    );
    act( "$n plays a dice game.",
        ch, NULL,  croupier, TO_NOTVICT );
    ch->gold -= amount;

    die1 = number_range( 1, 6 );
    die2 = number_range( 1, 6 );
    total = die1 + die2;

    sprintf( msg, "$n rolls the dice: they come up %d, and %d",
            die1, die2 );

    if( total == 7 )
    {
        strcat( msg, "." );
        act( msg, croupier, NULL, ch, TO_VICT );

        if ( ichoice == 3 )
        {
            char haul [ MAX_STRING_LENGTH ];

            amount *= 5;
            sprintf( haul, "%d", amount );
            act( "It's a SEVEN!  You win $t gold coins!",
                ch, haul, NULL, TO_CHAR );
            ch->gold += amount;
        }
        else
            send_to_char( "It's a SEVEN!  You lose!\n\r", ch );

        return;
    }

    sprintf( buf, ", totalling %d.", total );
    strcat( msg, buf );
    act( msg, croupier, NULL, ch, TO_VICT );

    if (   ( ( total < 7 ) && ( ichoice == 1 ) )
        || ( ( total > 7 ) && ( ichoice == 2 ) ) )
    {
        char haul [ MAX_STRING_LENGTH ];

        amount *= 2;
        sprintf( haul, "%d", amount );
        act( "You win $t gold coins!", ch, haul, NULL, TO_CHAR );
        ch->gold += amount;
    }
    else
        send_to_char( "Sorry, better luck next time!\n\r", ch );

    return;
}

- -------------------snip here--------------snip here----------------------

Oh yeah... i case you didn't know... this is the syntax of the #GAMES
section in the area files (this came from the envy2 area.txt file)
(the section shoud be placed after the reset section...

- ------------------snip----------------------

=== The #GAMES section
( Games and gambling structure developed by Thelonius for EnvyMud )

Use this section to allow your mobs to host gambling games.

The syntax of this section is:

#GAMES
    {
     * <comment_to_eol>
    }
    {
     M <mob-vnum:number> <game-fun:string>~ <bankroll:number> \
       <max_wait:number> <cheat:number>                       \
       <comment:to_eol>
    }
    S

Like the #RESETS and #SPECIALS sections, the #GAMES section has one command
per line.

The 'M' command assigns 'game-fun' to all mobiles of with virtual number
'mob-vnum'.  All game-fun's are assigned by name.

The 'bankroll' is the amount of gold that the croupier (the mob running
the game) has when it is loaded.  When the bankroll goes below zero, the
mob shuts down its game.

The 'max_wait' value is the number of PULSE_MOBILE's the croupier will wait
for each person to make a decision.  PULSE_MOBILE is defined in merc.h, and
is currently 1 second per pulse.  The wait between rounds depends upon the
number of players, not 'max_wait'.

If 'cheat' is non-zero (meaning TRUE), this mobile will cheat at the given
game, if such code is in place.

An 'M' line may have a comment at the end.

The following game functions are available for mobiles:

game_blackjack  (Not yet here)  Blackjack or twenty-one, dealer participates
game_u_l_t                      Upper-Lower-Triple, a dice game
game_sevem			Game by Maniac, throwing seven wins most
game_high_dice			Game by Maniac, highest dice wins


#GAMES
*
M  3160 upper-lower-triple~     100000    4     0       /* Croupier    */
M  3161 blackjack~              1000000   8     0       /* Dealer      */
*
S




Final notes....

	If the compiler complains about the bet function it's probably already
	used in another file... but in my mud a lot of functions have moved
	source files... just remove it from the other file and all should
	work fine again.

	Here some more legal shit...

		- If you use this code credit me for it...
		- If you use this code mail me you do (adress follows below)
		- Follow the Diku, Merc and Envy licences
		- Spread some of your code, mail me or merc-l@webnexus.com


Personals:
	My name is:	The Maniac	(real name Mark, no i'm not saying more)
	My Email is:	v942346@si.hhs.nl	(just mail some stuff)
	Hobbies:	Mud Mud Mud and Lots of C

	My snippets can always be found at
	http://www.si.hhs.nl/~v942346/snippets/snippets.html
	here you can find the latest versions of my snippets.

	My homepage is at the same URL, only /home.html

		C Ya out there Knee deep in the Mud, or stuck in the Web

			-- Maniac --


------------------------------ End of forwarded message 1


----- End Included Message -----


