Initial Commit
Initial Commit
This commit is contained in:
43
_module/nss/mpoker_nogbet2.nss
Normal file
43
_module/nss/mpoker_nogbet2.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
#include "x4_inc_functions"
|
||||
#include "mpoker_include"
|
||||
int StartingConditional()
|
||||
{
|
||||
object oStool1 = GetNearestObjectByTag("mpoker_stool1");
|
||||
object oStool2 = GetNearestObjectByTag("mpoker_stool2");
|
||||
|
||||
object oP1 = GetSittingCreature(oStool1);
|
||||
object oP2 = GetSittingCreature(oStool2);
|
||||
|
||||
SetLocalObject(OBJECT_SELF, "oP1", oP1);
|
||||
SetLocalObject(OBJECT_SELF, "oP2", oP2);
|
||||
|
||||
if (GetLocalInt(OBJECT_SELF, "STAGE") == 5)
|
||||
{
|
||||
//Retrieve PC's message
|
||||
int nBet = GetLocalInt(OBJECT_SELF, "BET");
|
||||
string sMessage = GetLocalString(OBJECT_SELF, "SPOKEN");
|
||||
if (sMessage == "#yes")
|
||||
{
|
||||
if (GetGold(oP1) < nBet || GetGold(oP2) < nBet)
|
||||
{
|
||||
//Next stage
|
||||
SetLocalInt(OBJECT_SELF, "STAGE", 6);
|
||||
|
||||
//Set token
|
||||
string sCurrent = GetLocalString(OBJECT_SELF, "CURRENT");
|
||||
object oPlayer = GetLocalObject(OBJECT_SELF, sCurrent);
|
||||
SetCustomToken(916, GetName(oPlayer));
|
||||
|
||||
//Show hands
|
||||
SendMessageToPC(oPlayer, "The pot is: " + IntToString(GetLocalInt(OBJECT_SELF, "POT")));
|
||||
SendMessageToPC(oPlayer, ShowMHandAndScores("PLAYER2"));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
Reference in New Issue
Block a user