Initial upload
Initial upload.
This commit is contained in:
39
_module/nss/gm_include.nss
Normal file
39
_module/nss/gm_include.nss
Normal file
@@ -0,0 +1,39 @@
|
||||
// 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));
|
||||
}
|
||||
Reference in New Issue
Block a user