37 lines
1.0 KiB
Plaintext
37 lines
1.0 KiB
Plaintext
|
#include "x4_inc_functions"
|
||
|
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") == 2)
|
||
|
{
|
||
|
//Retrieve PC's message
|
||
|
string sMessage = GetLocalString(OBJECT_SELF, "SPOKEN");
|
||
|
if (sMessage == "#no")
|
||
|
{
|
||
|
//Go back
|
||
|
SetLocalInt(OBJECT_SELF, "STAGE", 1);
|
||
|
|
||
|
//Set token
|
||
|
int nStarter = GetLocalInt(OBJECT_SELF, "STARTER");
|
||
|
string sCurrent = "oP"+IntToString(nStarter);
|
||
|
object oPlayer = GetLocalObject(OBJECT_SELF, sCurrent);
|
||
|
SetCustomToken(916, GetName(oPlayer));
|
||
|
SetLocalString(OBJECT_SELF, "CURRENT", sCurrent);
|
||
|
|
||
|
return TRUE;
|
||
|
}
|
||
|
|
||
|
return FALSE;
|
||
|
}
|
||
|
|
||
|
return FALSE;
|
||
|
}
|