Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Unable to Close Trade Windows

Post Reply
Vlek
Neophyte
Neophyte
Posts: 21
Joined: 03.10.2014 1:15

Unable to Close Trade Windows

Post by Vlek »

I have run into another interesting problem. Stealth does not seem able to close certain things like trade windows. I used what I thought was the most appropriate function, CancelTrade, but that only removes the checkmark from the player's accept trade box. Is there another function I should be using to do this?
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Unable to Close Trade Windows

Post by Vizit0r »

it must remove secure trade with selected number from stealth securetrades_list.
Does TradeCount return same value after calling CancelTrade as before?
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Vlek
Neophyte
Neophyte
Posts: 21
Joined: 03.10.2014 1:15

Re: Unable to Close Trade Windows

Post by Vlek »

But that doesn't make sense because UO only ever allows one secure trade at a time. Why would stealth be setup to handle more than one?

I waited until I knew I had a trade window open and ran the following code:

Code: Select all

#Python 2.7
import stealth

stealth.CancelTrade(0)
The above code removed my checkmark from the window, but did not close it.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Unable to Close Trade Windows

Post by Vizit0r »

Vlek wrote:UO only ever allows one secure trade at a time. Why would stealth be setup to handle more than one?
Negative. Technically allowed multiply secure trades.

Vlek wrote:The above code removed my checkmark from the window, but did not close it.
How do you check this?
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Vlek
Neophyte
Neophyte
Posts: 21
Joined: 03.10.2014 1:15

Re: Unable to Close Trade Windows

Post by Vlek »

Vizit0r wrote:Negative. Technically allowed multiply secure trades.
That's some weird Russian Sphere server stuff then because RunUO and OSI UO both disallow more than one trade at a time.

Vizit0r wrote:How do you check this?
Just how I said. I log two characters in, initiate a trade with one of the characters, then run that script.
User avatar
Vizit0r
Developer
Developer
Posts: 3958
Joined: 24.03.2005 17:05
Contact:

Re: Unable to Close Trade Windows

Post by Vizit0r »

Vlek wrote:
Vizit0r wrote:Negative. Technically allowed multiply secure trades.
That's some weird Russian Sphere server stuff then because RunUO and OSI UO both disallow more than one trade at a time.
Stealth support all shard, not only OSI etc.
Vizit0r wrote:How do you check this?
Just how I said. I log two characters in, initiate a trade with one of the characters, then run that script.[/quote]

you use stealth.CancelTrade(0) on first character, and what you check on second? Visually on logged EA client? or by stealth?
"Пишите код так, как будто сопровождать его будет склонный к насилию психопат, который знает, где вы живете". (с) Макконнелл, "Совершенный код".
Post Reply