Kamras

Member
I wish to remove the scroll for the secure trade window, this allows the exchange of currency based on the new TOL expansion.

I'm using an older custom client intentionally so that is most of the issue I'm sure of it, however I just want that scroll to be hidden. I've searched through the gold script and cannot locate the section where secure trade uses the new TOL system. I want the Gold system for the banks, just not the trading window. Is that even possible?
 

Attachments

  • Capture.PNG
    Capture.PNG
    73.2 KB · Views: 32
If you have full ServUo updated review CurrentExpansion.cs

Here you can configure:

Core.Expansion = Expansion;

AccountGold.Enabled = Core.TOL;
AccountGold.ConvertOnBank = true;
AccountGold.ConvertOnTrade = false;
VirtualCheck.UseEditGump = true;
 
I was over anaylyzing this it seems. lol.

So I did locate currentexpansion.cs and made the changes, the virtual check 'offer of currency' still existed when starting a trade, the check could not be used to add currency which is a step in the right direction, i just would like it to be hidden entirely.

Code:
            AccountGold.Enabled = Core.TOL;
            AccountGold.ConvertOnBank = true;
            AccountGold.ConvertOnTrade = false;
            VirtualCheck.UseEditGump = false;
 
In SecuretradeContainer.cs you may find these lines;
C#:
		public override bool IsChildVisibleTo(Mobile m, Item child)
		{
			if (child is VirtualCheck)
			{
				return AccountGold.Enabled && (m.NetState == null || !m.NetState.NewSecureTrading);
			}

			return base.IsChildVisibleTo(m, child);
		}

You can comment out the first 'return' and add an explicit 'return false' there, which should hide the check for all clients.

I guess the UseEditGump option should be reworked to be more meaningful.
 
Thanks Voxpire! That did the trick

Code:
        public override bool IsChildVisibleTo(Mobile m, Item child)
        {
            if (child is VirtualCheck)
            {
                return false;
            }

            return base.IsChildVisibleTo(m, child);
        }

I was going at it a different way and kept crashing my server after each trade attempt..
Modifying the core script SecureTrade.cs and commenting out this section
Code:
        public SecureTradeInfo(SecureTrade owner, Mobile m, SecureTradeContainer c)
        {
            Owner = owner;
            Mobile = m;
            Container = c;

            Mobile.AddItem(Container);

   //         VirtualCheck = new VirtualCheck(0, 0);
   //         Container.DropItem(VirtualCheck);
        }

        public void Dispose()
        {
//            VirtualCheck.Delete();
//            VirtualCheck = null;

            Container.Delete();
            Container = null;

            Mobile = null;
            Owner = null;

            IsDisposed = true;
        }

yeah that was not going very well lol.
 
Yea, unfortunately the VirtualCheck acts as the medium for trading currency between accounts for TOL.
VirtualCheck is a backing store for the amounts offered, but it is hidden for TOL clients.
 

Active Shards

  • Unchained
    Custom (Classic)
    • Players
    • 138 Online
    • 273 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 90 Online
    • 137 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 87 Online
    • 190 Peak
  • Insane UO
    Endless Journey
    • Players
    • 83 Online
    • 105 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 33 Online
    • 85 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 28 Online
    • 30 Peak
  • Arth
    Custom (Modern)
    • Players
    • 22 Online
    • 34 Peak
  • Heritage
    New Legacy
    • Players
    • 20 Online
    • 41 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 19 Online
    • 48 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 19 Online
    • 172 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back