void main()
{
object oPC = GetLastUsedBy();
object oMod = GetModule();
int iTLwager = GetLocalInt(oPC, "TLwager");
int iTWwager = GetLocalInt(oPC, "TWwager");
int iPlaced = GetLocalInt(oPC, "bets_placed");
int iTTwager;
int iDice;
string sStatus;
string iMessage;
int iCheck = GetLocalInt(oPC, "luciferdead");

if (GetLocalInt(oMod, "mod_mode")==1)
{
PlaySound("sim_cntresist");
     FloatingTextStringOnCreature
    ("*** Not used in campaign manager mode ***", oPC);
    return;
}

if (iCheck==1)
{

iDice = d8();
    switch(iDice)
    {
     case 1: {iMessage = "In gambling the many must lose in order that the few may win!";}break;
     case 2: {iMessage = "A man's gotta make at least one bet a day, else he could be walking around lucky and never know it!";}break;
     case 3: {iMessage = "Gambling is a disease of barbarians superficially civilized!";}break;
     case 4: {iMessage = "Gambling is the son of avarice and the father of despair!";}break;
     case 5: {iMessage = "Gold's father is dirt, yet it regards itself as noble!";}break;
     case 6: {iMessage = "There are two great pleasures in gambling: that of winning and that of losing!";}break;
     case 7: {iMessage = "Gambling is a principle inherent in nature!";}break;
     case 8: {iMessage = "The gambling known as business looks with severe disfavor on the business known as gambling!";}break;
     case 9: {iMessage = "Gambling promises the poor what property performs for the rich!";}break;
     case 10: {iMessage = "The most dangerous thing about gambling is winning!";}break;
    }


iTTwager = iTWwager-iTLwager;
if (iTTwager<0){sStatus = "Down"; iTTwager+=iTTwager*-2;}
else if (iTTwager>0){sStatus = "Up";}
else {sStatus = "Even";}

PlaySound("gui_select");

string SpeakText = "\n====================\n";
    SpeakText += "Betting Statistics";
    SpeakText += "\n--------------------\n";
    SpeakText += "\nCustomer: ";
    SpeakText += GetName(oPC);
    SpeakText += "\n\nBets Placed: ";
    SpeakText += IntToString(iPlaced);
    SpeakText += "\nTotal Winnings: ";
    SpeakText += IntToString(iTWwager);
    SpeakText += "\nTotal Losses: ";
    SpeakText += IntToString(iTLwager);
    SpeakText += "\n\nCurrent Standing: ";
    SpeakText += IntToString(iTTwager);
    SpeakText += " ";
    SpeakText += sStatus;
    SpeakText += "\n--------------------\n";
    SpeakText += iMessage;

    SpeakString(SpeakText);
}
else
{
PlaySound("sim_cntresist");
FloatingTextStringOnCreature
("*** Not availible until the [Holy War] feature is unlocked ***", oPC);
   }

}