> Date: Thu, 25 Jul 1996 13:50:11 -0500 (CDT)
> From: Alex <fletcher@cspo.queensu.ca>
> To: Circle <circle@cspo.queensu.ca>
> Subject: [Circle] CODE: Casino Games
> From: "Sean P. Mountcastle" <mountcas@krusty.ee.cua.edu>
> To: circle@cspo.queensu.ca
> Subject: CODE: Casino Games
>
>
> Well since a few ppl asked for it, I'm sending the entire file that I
> have, several of the games I wrote myself, others I took from EnvyMUD, so
> if you use these games, please put EnvyMUD in the credits, and if you
> feel like it you can also add me: Glasgian of The Dominion
>
> NOTES: The slot machine requires an object with a SPECIAL() to call this
> function, not too hard to write, just look at the bank code.
> The other games require a mobile. I added another flag, MOB_DEALER,
> but now that I think about it you can just use:
> struct char_data *dealer = (struct char_data *) me;
> Again, using the if (CMD_IS("xxxxxx")) you should be able to
> write a quick and dirty interface to the the functions.
>
> If I was still using this code I'd port the special procs, but since I
> dropped it, they were erased from my spec_procs.c file -- if anyone
> writes them please be sure to post them to the group for others to use.
>
> - Sean
>
> /* ***********************************************************************\
> * _____ _ ____ _ _ *
> * |_ _| |__ ___ | _ \ ___ _ __ ___ (_)_ __ (_) ___ _ __ *
> * | | | '_ \ / _ \ | | | |/ _ \| '_ ` _ \| | '_ \| |/ _ \| '_ \ *
> * | | | | | | __/ | |_| | (_) | | | | | | | | | | | (_) | | | | *
> * |_| |_| |_|\___| |____/ \___/|_| |_| |_|_|_| |_|_|\___/|_| |_| *
> * *
> * File: GAMBLE.C Based on CircleMUD 3.0 *
> * Usage: Implementation of casino games *
> * Programmer(s): Original code by the EnvyMUD Development Team *
> * All Modifications by Sean Mountcastle (Glasgian) *
> \*********************************************************************** */
>
> #include "sysdep.h"
> #include "config.h"
>
> #include "structs.h"
> #include "utils.h"
> #include "comm.h"
> #include "interpre.h"
> #include "handler.h"
> #include "db.h"
> #include "spells.h"
> #include "screen.h"
>
>
> /* New for TD 6/10/95 */
> void play_slots(struct char_data *ch)
> {
> int num1, num2, num3, win = 0;
> char slot_msg[] = {
This should be:
char *slot_msg[] = {
or it will crash your mud
> "*YOU SHOULDN'T SEE THIS*",
> "a mithril bar", /* 1 */
.....
> "a beggar", /* 10 */
> };
>
> if (GET_GOLD(ch) < 1) {
> send_to_char("You do not have enough money to play the slots!\r\n", ch);
> return;
> } else
> GET_GOLD(ch) -= 1;
>
> act("$N pulls on the crank of the Gnomish slot machine.",
> FALSE, 0, 0, ch, TO_NOTVICT);
This should be:
Act(".....", FALSE, ch, 0 ,0, TO_ROOM);
etc etc etc.....
Ok here's what i added to Interpreter.c
{ "play" , POS_STANDING, do_not_here , 0, 0 },
And my snippet from spec_procs.c
SPECIAL(slot)
{
void play_slots(struct char_data *ch);
if(!cmd) return FALSE;
if(CMD_IS("play")) {
play_slots(ch);
return TRUE;
}
return FALSE;
}
And don't forget to add the appropriate stuff to spec_assign.c (like
the obj you have assigned to be the slot machine)
I also upped the odds of winning a little bit... Added some more
payouts and such... thanx for not making me re-invent the wheel... I
have been working on something similar...
If anyone has written the mob Specials for the dealers can you
forward the info to me?? Thanx a mil!
-Peace
Argus
http://www.argy.com
telnet: eclipse.argy.com 7777
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://cspo.queensu.ca/~fletcher/Circle/list_faq.html |
+-----------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/07/00 PST