LoT_PRC8/_module/nss/gm_include.nss
Jaysyn904 ec287507a1 Initial upload
Initial upload.
2023-09-25 21:32:17 -04:00

40 lines
605 B
Plaintext

// Gambling Include
// Amount of gold in the house at the start of the server.
int HOUSESTART=1000;
object oMod=GetModule();
void SetHouse(int nAmt)
{
SetLocalInt(oMod,"HOUSETOTAL",nAmt);
}
int GetHouse()
{
return GetLocalInt(oMod,"HOUSETOTAL");
}
int CheckPayout(int nAmt)
{
if( (GetHouse()-nAmt) < 0)
{
nAmt=GetHouse();
SetHouse(0);
return nAmt;
}
return nAmt;
}
void AddHouse(int nAmt)
{
SetHouse((nAmt+GetHouse()));
}
void SubHouse(int nAmt)
{
if((GetHouse()-nAmt) < 0)
SetHouse(0);
else
SetHouse((GetHouse()-nAmt));
}