generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
54
_module/nss/gamble_stats.nss
Normal file
54
_module/nss/gamble_stats.nss
Normal file
@@ -0,0 +1,54 @@
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
int iTLwager = GetLocalInt(oPC, "TLwager");
|
||||
int iTWwager = GetLocalInt(oPC, "TWwager")/2;
|
||||
int iPlaced = GetLocalInt(oPC, "bets_placed");
|
||||
int iTTwager;
|
||||
int iDice;
|
||||
string sStatus;
|
||||
string iMessage;
|
||||
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user