Hi!

I noticed something and i didn't understand.

I'm using TOL latest client with latest servuo.

One thing that i realize is that I'm going to buy something. If i had the money on bank account, i can buy.

How to disable it, please? I want the players have money IN BAG to buy stuffs, not in bank.

Thank you!
 
in BaseVendor.cs try changing this to false and should work for all Vendors
Code:
					if (totalCost <= Int32.MaxValue)
					{
						if (Banker.Withdraw(buyer, (int)totalCost))
						{
							bought = true;
							fromBank = true;
						}
					}
					else if (buyer.Account != null && AccountGold.Enabled)
					{
						if (buyer.Account.WithdrawCurrency(totalCost / AccountGold.CurrencyThreshold))
						{
							bought = true;
							fromBank = true;
						}
					}
				}

				if (!bought)
				{
					cont = buyer.FindBankNoCreate();

					if (cont != null && ConsumeGold(cont, totalCost))
					{
						bought = true;
						fromBank = true;
					}
fromBank = false and all instances you find and might wanna check Genericbuy/Sell.cs
 
in BaseVendor.cs try changing this to false and should work for all Vendors
fromBank = false and all instances you find and might wanna check Genericbuy/Sell.cs

Thank you very much for your help.

I changed all frombank to false but it isn't it =( It stills take out gold from the bank...
Here are my BaseVendor.cs: https://pastebin.com/uAFjkP4q

I searched too into GenericBuy.cs and GenericSell.cs but don't find anything about bank....

Any idea?

Thank you!
[doublepost=1492394195][/doublepost]I've commented out some lines of the file: Scripts\Mobiles\NPCs\BaseVendor.cs and changed some values on vars: bought and frombank.

Anyway, now is working. I can buy only if money is on my backpack. I don't knew if it will crash someother thing, but i wish not.

There are my working BaseVendor.cs
 

Attachments

  • BaseVendor.cs
    42.5 KB · Views: 0
Look in misc/CurrentExpansion.cs where the variable AccountGold.Enabled is set. Change the following line:
Old Line: AccountGold.Enabled = Core.TOL;
New Line: AccountGold.Enabled = false;
This will get you what you want.
 
Back