dice.c
DiCEv6.6/dice.c · 33.8 KB
From the archive DiCEv6.6.tar.gz
Download the archive « Back to the archive contents
/*
* Erm, made a calculation mistake on something, but fixed it
* and now it works just right. Fix put in: December 31, 2001
*/
/*
* Original buggy and crappy and small version by NtPotJmaU
* Bug fixes made by OleAndEr, Addition of ASCII art by OleAndEr
* Addition of not enough money by OleAndEr, Addition of non residency
* cannot play by OleAndEr, Addition of dice log, wdice log and ldice log
* by OleAndEr, Addition of DiCE vervion by OleAndEr, and the Addition of
* just about everything else by OleAndEr
*/
/*
* Updates started on May 12th 2001 through May 13th
* Dice Align on August 09 ;)
* A Jackpot added to the code
* Easy Colour Change of the Dice
* Easy JaCKpOT amount added
* Some other bits added too
* Fix so's not to get negative money by stratcaster
* Easy Pricing Change added on Octobet 17th
* Internal Changes made on October 20th
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "include/config.h"
#include "include/player.h"
#include "include/proto.h"
void dice(player * p, char *str)
{
int diceFaces = ( rand() % 36 ) + 1;
/* You might wanna change these numbers to fix your talker */
/* Cost to play DiCE */
int price = 200;
/* Winnings */
/* Six & Six */
int win1 = jpot;
/* Six & One */
int win2 = 900;
/* Two & Two */
int win3 = 300;
/* Six & Two */
int win4 = 300;
/* Six & Three */
int win5 = 300;
/* Six & Four */
int win6 = 300;
/* Four & Four */
int win7 = 300;
/* Three & Three */
int win8 = 300;
/* Losses */
/* Six & Five */
int los1 = 300;
/* Five & Five */
int los2 = 300;
/* One And One */
int los3 = 1000;
char dicen[50];
char dpotn[50];
char dc[10];
char hc[10];
/* NOTICE: do NOT change these 2 lines */
sprintf (dc, "%s", get_config_msg("dc"));
sprintf (hc, "%s", get_config_msg("hc"));
sprintf (dicen, "%s", get_config_msg("dice_name"));
sprintf (dpotn, "%s", get_config_msg("jpot_name"));
/* Dont want this? take out the next 9 lines and line #523 (after taking out these 9) */
if (p->residency == NON_RESIDENT ) /* Hey, if they arent a resident, why let em play? */
{
TELLPLAYER(p, "%s", LINE);
TELLPLAYER(p, "^BSorry, but only residents may gamble their money away on %s\n"
"^YPlease talk to a staff member about residency^A\n", dicen);
TELLPLAYER(p, "%s", LINE);
}
else
{
/* Well, if they dont have the money, Why let them play? */
if (p->pennies < price)
{
TELLPLAYER(p, "%s", LINE);
TELLPLAYER(p, " Sorry, But, you can't lose what you don't have.\n"
" (You need at least %d %s to play)\n", price, get_config_msg("cash_name"));
TELLPLAYER(p, "%s", LINE);
if (strcmp (get_config_msg ("vdlog"), "yes"))
{
}
else
{
LOGF("dice", "%s is short %s to roll the %s^N", p->name, get_config_msg("cash_name"), dicen);
}
return;
}
else
{
TELLPLAYER(p, "\n%s", LINE);
p->pennies -= price;
jpot = (jpot + price);
TELLPLAYER(p, "^Y\t\tYou pay %d %s to roll the %s^N\n\n", price, get_config_msg("cash_name"), dicen);
/* Does this get a little spammy for you when people play? Take it out and rm -rf ~/pgplus/logs/dice.log */
if (strcmp (get_config_msg ("vdlog"), "yes"))
{
}
else
{
LOGF("dice", "%s ^ypays ^P%d ^C%s^y to roll the %s^N", p->name, price, get_config_msg("cash_name"), dicen);
}
switch (diceFaces)
{
case 1: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | |\n"
" | %s O%s | | %sO%s"" |\n"
" | | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc);
break;
case 2: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | %sO%s |\n"
" | %sO%s | | |\n"
" | | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc);
break;
case 3: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | %sO%s |\n"
" | %sO%s | | %sO%s"" |\n"
" | | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 4: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | %sO O%s |\n"
" | %sO%s | | |\n"
" | | | %sO O%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc);
break;
case 5: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | %sO O%s |\n"
" | %sO%s | | %sO%s |\n"
" | | | %sO O%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 6: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | | | %sO O%s |\n"
" | %sO%s | | %sO O%s |\n"
" | | | %sO O%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 1! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 7: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | |\n"
" | | | %sO%s |\n"
" | %sO%s | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc, hc, dc);
break;
case 8: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s |\n"
" | | | |\n"
" | %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 9: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s |\n"
" | | | %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 10: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 11: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | | | %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 12: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 2! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 13: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 14: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s | | |\n"
" | %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 15: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 16: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 17: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 18: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 3! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 19: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | |\n"
" | | | %sO%s |\n"
" | %sO%s %sO%s | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 20: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 21: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 22: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 23: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 24: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 4! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 25: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 26: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 27: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 28: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 29: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 30: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 5! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 31: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 1!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 32: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 2!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 33: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 3!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 34: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 4!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 35: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 5!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
case 36: TELLPLAYER(p, " %s _________ _________\n"
" | | | |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" | %sO%s %sO%s | | %sO%s %sO%s |\n"
" |_________| |_________|\n\n"
" ^XOn Die One You got a 6! ^XOn Die Two You got a 6!^A\n", dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc, hc, dc);
break;
}
if ( diceFaces == 36 ) /* I guess we gotta let them win something ;) */
{
p->pennies += win1;
TELLPLAYER(p, " Double Sixes, You just won the %s^N of %d %s\a\n", dpotn, jpot, get_config_msg("cash_name"));
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s ^Ygets ^RDouble ^Ysixes^R and ^Ywins ^R%d ^Y%s^N", p->name, jpot, get_config_msg("cash_name"));
}
jpot = (jpot - jpot);
}
else if ( diceFaces == 32 )
{
p->pennies += win4;
TELLPLAYER(p, "\t\t Not bad, You got %d %s\n", win4, get_config_msg("cash_name"));
jpot = (jpot - win4);
if (strcmp (get_config_msg ("wdlog"), ""))
{
}
else
{
LOGF("wdice", "%s gets a 6 on the first die", p->name);
}
}
else if ( diceFaces == 33 )
{
p->pennies += win5;
TELLPLAYER(p, "\t\t Not bad, You got %d %s\n", win5, get_config_msg("cash_name"));
jpot = (jpot - win5);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s gets a 6 on the first die", p->name);
}
}
else if ( diceFaces == 34 )
{
p->pennies += win6;
TELLPLAYER(p, "\t\t Not bad, You got %d %s\n", win6, get_config_msg("cash_name"));
jpot = (jpot - win6);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s gets a 6 on the first die", p->name);
}
}
else if ( diceFaces == 35 )
{
p->pennies -= los1;
if (p->pennies < 0) p->pennies = 0;
TELLPLAYER(p, "\t\t You just lost %d %s\n", los1, get_config_msg("cash_name"));
jpot = (jpot + los1);
if (strcmp (get_config_msg ("ldlog"), "yes"))
{
}
else
{
LOGF("ldice", "%s gets a 6 and a 4 and loses %d %s", p->name, los1, get_config_msg("cash_name"));
}
}
else if ( diceFaces == 31 ) /* 7 is an awesome number */
{
p->pennies += win2;
TELLPLAYER(p, "\t Awesome, that adds up to 7 You get %d %s\n", win2, get_config_msg("cash_name"));
jpot = (jpot - win2);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s ^Hgets a ^P6^H and a ^Y1^N", p->name);
}
}
else if ( diceFaces == 8 )
{
p->pennies += win3;
TELLPLAYER(p, "\t\tDouble Twos, thats another %d %s\n", win3, get_config_msg("cash_name"));
jpot = (jpot - win3);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s gets doubles", p->name);
}
}
else if ( diceFaces == 15 )
{
p->pennies += win8;
TELLPLAYER(p, "\t\tDouble Threes, thats another %d %s\n", win8, get_config_msg("cash_name"));
jpot = (jpot - win8);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s gets doubles", p->name);
}
}
else if ( diceFaces == 22 )
{
p->pennies += win7;
TELLPLAYER(p, "\t\tDouble Fours, thats another %d %s\n", win7, get_config_msg("cash_name"));
jpot = (jpot - win7);
if (strcmp (get_config_msg ("wdlog"), "yes"))
{
}
else
{
LOGF("wdice", "%s gets doubles", p->name);
}
}
else if ( diceFaces == 29 ) /* What, you expect them to win on all doubles? */
{
p->pennies -= los2;
if (p->pennies < 0) p->pennies = 0;
TELLPLAYER(p, "\t You just lost %d %s for getting double fives\n", los2, get_config_msg("cash_name"));
jpot = (jpot + los2);
if (strcmp (get_config_msg ("ldlog"), "yes"))
{
}
else
{
LOGF("ldice", "%s just lost %d %s", p->name, los2, get_config_msg("cash_name"));
}
}
else if ( diceFaces == 1 )
{
p->pennies -= los3;
if (p->pennies < 0) p->pennies = 0;
TELLPLAYER(p, "\t Ohh Man, Snake eyes, You just lost %d %s\a\n", los3, get_config_msg("cash_name"));
jpot = (jpot + los3);
if (strcmp (get_config_msg ("ldlog"), "yes"))
{
}
else
{
LOGF("ldice", "%s ^Ygets ^PSnake Eyes^N", p->name);
}
}
else
{
TELLPLAYER(p, "\t\tOhh well, better luck on the next roll\n");
}
if (jpot > 0)
{
TELLPLAYER(p, "\t\t The %s^N is now worth %d\n", dpotn, jpot);
}
else if (jpot <= 0)
{
TELLPLAYER(p, "\t The %s^N is now empty, and is being reset to %d\n", dpotn, atoi(get_config_msg("dice_pot")));
}
TELLPLAYER(p, "%s", LINE);
}
/* This next line is the one you want to delete if you want to let non-ressies play */
}
}
void dice_version(void)
{
stack += sprintf(stack, "^Y -=*> You are using ^BD^N^Hi^RC^N^HE^N ^Rv6^G.^R6^Y (by ^gOleAndEr^Y)^N\n");
}