Ejemplo n.º 1
0
bool cCharStuff::cBankerAI::DoAI(int c, P_CHAR pBanker, const QString& comm)
{
	P_CHAR pc_currchar = currchar[c];

	string search2("BALANCE");
	string search3("WITHDRAW") ;
	string search4("CHECK") ;

	if (SrvParams->useSpecialBank())
	{
		if ((comm.contains(SrvParams->specialBankTrigger(), false)) &&(!(pc_currchar->dead)))
		{
			openspecialbank(c, currchar[c]);
			return true;
		}
	}
    else if ((comm.contains("BANK")) &&(!(pc_currchar->dead)))
	{
		OpenBank(c);
		return true;
	}
    else if ((comm.contains("BALANCE")) &&(!(pc_currchar->dead)))
	{
		return Balance(c, pBanker);
	}
	else if ((comm.contains("WITHDRAW")) &&(!(pc_currchar->dead)))
	{
		return Withdraw(c, pBanker, comm.latin1());
	}
	else if ((comm.contains("CHECK")) &&(!(pc_currchar->dead)))
	{
		return BankCheck(c, pBanker, comm.latin1());
	}
	return true;
}
Ejemplo n.º 2
0
void DoWithdraw( void)
{
	bool stat = IsEngaged();
	if (stat == 1)
	{
		Withdraw();
	}
}
Ejemplo n.º 3
0
void StageUnload( void )
{	
	bool stat = IsEngaged();
	
	StageMoveSPM(1500,1);   // Z + is up
	StageMoveAxis(1,-30000,1,0,100,0);  // y-axis - is unload
	// Do withdrawing at last, its really slow
	if (stat == 1)
	{
		Withdraw();
	}
}
Ejemplo n.º 4
0
bool Account::Transfer(long double funds, Account* toAccount)
{
	if(funds == 0)
	{
		return false;
	}

	if(tryTransfer(funds, toAccount))
	{
		Withdraw(funds);
		toAccount->Deposit(funds);
		return true;
	}
	if(this->transferAttemptsRemaining > 0)
	{
		this->transferAttemptsRemaining--;
	}
	return false;
}