SRL Archive - SRL Bugs

SolveRewardBox


Coh3n

2011-02-14 23:49:46

So I posted this in the Randoms - Bugs thread, and I even debugged some procedures to see if I could find what was up, and no luck. :( This was posted on an MSI thread earlier today, so I was hoping we could pull together and figure this out as it is rather annoying. It's happened to me quite a few times.
From: noidea
Ok, how it walks away is - The box opens, the box solver clicks the coins button then does not click the confirm button. It waits several seconds then clicks the box in the inventory. This closes the rewards screen. The mouse tries the click the coins button, but its no longer there, so it clicks the main screen and the character walks away. It then loops this. My character just ran around for several hours doing this. Any suggestions as to what to do to prevent ban?

If anyone has any accounts with reward boxes in their inventory, please PM them to me if you trust me. I would REALLY like your account if you experienced this problem. So far, all the accounts I've gotten have solved the box perfectly, so that didn't really help me. :(

I really don't want to have to try rewriting the whole thing, so hopefully we can get to the bottom of this.

Thanks in advance,
Coh3n

NCDS

2011-02-15 00:06:31

I've got a few I can test with. I've got no problem making it a priority for the night. I'll chat with you on MSN.

Edit: Tested 2 accounts on 2 different worlds, both solved perfectly with lamp. :/

Edit2: Everyone, if you see the RewardBox fail to solve, please post what it was trying to select. S far there are reports of it failing with Coins and Costume. I'm going to see if it is anything to do specifically with them.

tarajunky

2011-02-15 01:50:18

What happens if it chooses Costume, but you already have all the pieces to the set? Does the SolveRewardBox procedure detect this and choose something else, or just think it's done and give up?

Sgt Soul

2011-02-15 02:15:14

what I think happens is that if you start with the box in your inventory the solver works, but if you get it while your running a script after a through a random event of course. I don't know how this works but I 'think' this is what occurs because I have watched the box get solved from login but I haven't seen my characters solve them straight after a random event :/

Coh3n

2011-02-15 03:10:35

From: tarajunky
What happens if it chooses Costume, but you already have all the pieces to the set? Does the SolveRewardBox procedure detect this and choose something else, or just think it's done and give up?

Not sure. I have watched it fail on the costume selection, though. It didn't give me any messages or anything, it just didn't confirm.

From: Sgt Soul
what I think happens is that if you start with the box in your inventory the solver works, but if you get it while your running a script after a through a random event of course. I don't know how this works but I 'think' this is what occurs because I have watched the box get solved from login but I haven't seen my characters solve them straight after a random event :/

Well that would explain why every time we try and test separately it works. That doesn't really make much sense though. :unsure:

Nava2

2011-02-15 08:07:08

Perhaps its not waiting for the box screen to close..

Coh3n

2011-02-15 13:32:36

From: Nava2
Perhaps its not waiting for the box screen to close..

The problem is it doesn't click confirm to begin with so the window never actually closes. So when it clicks the box again (with the window already open), it detects that it's open and tries to choose the reward; however, once you click the box, the window closes and reopens.

So I now understand what the problem is, I just can't find why it's happening. :(

YoHoJo

2011-02-18 17:16:43

  if (not Result) then
begin
SRL_Warn('UseRewardBox', 'Could not open Reward Screen', Warn_AllVersions);
Exit;
end;
Wait(Random(100));
if (not FindBoxOption(B, Index)) then
begin
SRL_Warn('UseRewardBox', 'Could not find a usable option.', Warn_AllVersions);
Exit;
end;

Shouldn't accounts be set to false if this happens?

Search for randoms> Find Box> No Options Found> Exit > Script goes on > Search for Randoms> FOREVER?!

Doesn't this pretty much result in an infinite loop opening the box and trying to find an option it cant?

It is a rare occurrence, but should be fixed/failsafed immediately, just last night I had an account opening/scrolling the box menu for FIVE HOURS.

http://villavu.com/forum/showpost.php?p=780818&postcount=3

Coh3n

2011-02-28 23:25:03

If anyone gets any accounts with the reward box could you please PM me. I'm going to rewrite (or at least reorganize) how the box solver works since I can't figure out what would be causing this.

E: See http://villavu.com/forum/showthread.php?p=784999#post784999