17 lines
		
	
	
		
			433 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			433 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #include "mn_checkinv"
 | |
| 
 | |
| void main()
 | |
| {
 | |
|    int amount = 50000; // Amount to withdraw
 | |
|    object bankToken = findItem( GetPCSpeaker(), "MN_MISC_BANKTOK" );
 | |
|    int balance = GetLocalInt( bankToken, "BALANCE" );
 | |
| 
 | |
|    if (balance >= amount)
 | |
|    {
 | |
|       balance = balance - amount;
 | |
|       GiveGoldToCreature( GetPCSpeaker(), amount );
 | |
|       SetLocalInt( bankToken, "BALANCE", balance );
 | |
|       SetCustomToken(100, IntToString(balance) );
 | |
|    }
 | |
| }
 |