Changed folder name.
Changed folder name.
This commit is contained in:
85
_module/nss/wager5c.nss
Normal file
85
_module/nss/wager5c.nss
Normal file
@@ -0,0 +1,85 @@
|
||||
//Created By Genisys 7/28/08
|
||||
|
||||
// A Friendlly Game of Chance!
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = GetPCSpeaker();
|
||||
object oSelf = OBJECT_SELF;
|
||||
|
||||
//The wager:
|
||||
int nInt = 10000;
|
||||
|
||||
//Take the wager from the player.
|
||||
TakeGoldFromCreature(nInt, oPC, TRUE);
|
||||
|
||||
//the radomizer!
|
||||
int nDice = d8(1);
|
||||
|
||||
//The reward
|
||||
//Note the odds are bad, so if they continue to play they will lose!
|
||||
int nReward = nInt * 6;
|
||||
|
||||
string s1 = "SKULL";
|
||||
string s2 = "WAND";
|
||||
string s3 = "BOW";
|
||||
string s4 = "AXE";
|
||||
string s5 = "POTION";
|
||||
string s6 = "SCROLL";
|
||||
string s7 = "DAGGER";
|
||||
string s8 = "SWORD";
|
||||
|
||||
if(nDice ==1)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString( "The " + s1 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==2)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s2 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==3)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s3 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You Win!")));
|
||||
GiveGoldToCreature(oPC, nReward);
|
||||
}
|
||||
|
||||
else if(nDice ==4)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s4 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==5)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s5 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==6)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s6 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==7)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s7 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else if(nDice ==8)
|
||||
{
|
||||
DelayCommand(1.0, AssignCommand(oSelf, ActionSpeakString("The " + s8 + " Appears..")));
|
||||
DelayCommand(1.5, AssignCommand(oSelf, ActionSpeakString("You lose!")));
|
||||
}
|
||||
|
||||
else
|
||||
{ } //report an error!
|
||||
|
||||
//script end
|
||||
}
|
Reference in New Issue
Block a user