Files
HeroesStone_PRC8/_module/nss/dm_sm_player.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

32 lines
952 B
Plaintext

int StartingConditional()
{
int iResult;
object oWidget = GetLocalObject(OBJECT_SELF, "DM_SM_oWidget");
int iMaxUses = GetLocalInt(oWidget, "iMaxUses");
int iCurrentUses = GetLocalInt(oWidget, "iCurrentUses");
int iSimUses = GetLocalInt(oWidget, "iSimUses");
int iCurrentSets = GetLocalInt(oWidget, "iCurrentSets");
if(iMaxUses == -1)
{ SetCustomToken(11030, "Unlimited");
SetCustomToken(11031, "uses"); }
else if(iMaxUses == 1)
{ SetCustomToken(11030, IntToString(iCurrentUses) + " of " + IntToString(iMaxUses));
SetCustomToken(11031, "use"); }
else
{ SetCustomToken(11030, IntToString(iCurrentUses) + " of " + IntToString(iMaxUses));
SetCustomToken(11031, "uses"); }
if(iSimUses == -1)
{ SetCustomToken(11032, "Unlimited"); }
else
{ SetCustomToken(11032, IntToString(iSimUses)); }
SetCustomToken(11033, IntToString(iCurrentSets));
iResult = iMaxUses;
return iResult;
}