SRL Archive - SRL Bugs

ChooseOption Bug (Pretty important?)


YoHoJo

2011-12-13 17:42:07

When something is right clicked, and the mouse is already over the option that chooseoption is called to do, it is not found (?) and then mouse moves to the top left of the client (often times top left outside of the client itself) and then script continues on.

Ex:
Ore was right clicked, and then ChooseOption('Drop') was called
http://i.imgur.com/VgSho.png

All other ores were dropped fine, but often times for bottom ores, after right clicked the Drop option is already highlighted, and when chooseoption is called the mouse goes off-client, and then continues on.

(Same happens with logs… not like that matters though :p)

Kind of a big problem I'd say?

Kyle Undefined

2011-12-13 17:47:07

It might be that background color that's throwing it off? Does it only do it for bottom row?

DeSnob

2011-12-13 18:03:15

I had that issue too, until I created my own inventory dropping procedures. It seems like an issue with DropItem.

YoHoJo

2011-12-16 02:13:00

Um.Bump.

Flight

2011-12-16 02:41:26

In my custom dropping procedure I simply looked for the right-click menu header at the top and from that I'd drop down 'X' amount of Y coordinates and click, depending on which option I want to choose.

YoHoJo

2011-12-22 18:48:34

This still happens guise :]
Pretty sure it does at least.

Kyle Undefined

2011-12-22 18:50:31

I'll do some debugging when I get home.

Narcle

2011-12-24 00:24:38

Yeah I still don't know how this is happening. I checked picture and it returns everything fine for me. I even use a similar thing for eating food in invy and it works fine when it clicks food on the bottom. Let me know what u find Camo.

Hero

2011-12-24 02:42:51

DropPattern¶
procedure DropPattern(Which: Integer);
Drops all items in inventory according to pattern which.

Note by Rasta Magician
Example:

DropPattern(dp_Snake);

Why not just use DropPattern :3

dp_Random, dp_Snake, dp_UpToDown

YoHoJo

2011-12-24 02:47:38

Yeah true, but it's a bug in chooseoption, why bypass it instead of fix it?! :p

Hero

2011-12-24 02:52:53

Yeah it is good that you brought it up. I just figured I would post a temp work around until someone gets to it. :)

Swatarianess

2011-12-24 08:12:47

It happened to me once but Stopped maybe its the "copper" text which looks like the ore? so the drop feature is confused becuase it looks similar to me the Copper ore item and the

Kyle Undefined

2011-12-24 13:56:04

From: Narcle
Yeah I still don't know how this is happening. I checked picture and it returns everything fine for me. I even use a similar thing for eating food in invy and it works fine when it clicks food on the bottom. Let me know what u find Camo.


I can't look into it till Monday :/ And I totally forgot about this, lol.

Valkyrie

2011-12-24 15:36:49

I remember using your powerminer mate and it still bugged me about that random ore that was left there on the corner and without being dropped although it doesnt change alot the perfomance of the script but as you said it should be fixed.

Wanted

2011-12-25 00:00:30

It's because the choose option SRL uses relies (a)TPA text within TPAs that are generated by looping find color through every known Option Text color
Colors := [14210562, 14803165, 2850770, 8560553, 317398];//Object Blue, Player White, Item Orange, Action Tan, NPC Yellow
and combining them.

When the desired option is already highlighted the text color is different, so there in scenarios where the mouse is already on top of it, such as dropping at the bottom of your inventory, the function would fail because it would not have generated a TPA because the color is not in the array that is looped.

The easy solution would be to just go through and get all the highlighted text colors and add them to the array in the FindColor loop that generates the TPAs used in the text recognition.

However a good solution would involve using a different method such as using OCR that uses the text shadow not paying attention to color at all, and then probably not relocating the mouse if it's already on top of the desired text, as that may look suspicious.

YoHoJo

2011-12-25 01:05:55

Wait why are colors used at all amd not OCR? I'm lost.
What do colors have to do with chooseoption? I thought it only looked for text? I'm obviously a bit lost here.

I'm getting that you're saying right now color/TPA are used?

Narcle

2011-12-25 06:35:22

From: Wanted
It's because the choose option SRL uses relies (a)TPA text within TPAs that are generated by looping find color through every known Option Text color
Colors := [14210562, 14803165, 2850770, 8560553, 317398];//Object Blue, Player White, Item Orange, Action Tan, NPC Yellow
and combining them.

When the desired option is already highlighted the text color is different, so there in scenarios where the mouse is already on top of it, such as dropping at the bottom of your inventory, the function would fail because it would not have generated a TPA because the color is not in the array that is looped.

The easy solution would be to just go through and get all the highlighted text colors and add them to the array in the FindColor loop that generates the TPAs used in the text recognition.

However a good solution would involve using a different method such as using OCR that uses the text shadow not paying attention to color at all, and then probably not relocating the mouse if it's already on top of the desired text, as that may look suspicious.


We are doing both more or less. Grabbing the colors in the array with a tolerance of 40 then checking and filtering it with the shadow (tol 24). What I noticed is happening is it changes by more then 40 sometimes and possibly the findcolors for shadow is picking up to much.

I have a temp fix that works, but still going over it. Thinking of just using shadows but using both with ocr filter seems more reliable (which is what we are currently using).

Edit: Got it fixed.
Out of all of the colors I had set it just happens that Action Tan was a tolerance higher then 40, all the rest were only 20 or so. I went and got the average of colors between highlighted and non, setting a tolerance of 50 just in case.

Also fixed the MMouse to 0,0 bug.

Edit2:
I'll wait for confirmation before putting "Resolved" on this. Let me know if it happens!

z92

2011-12-30 13:12:00

I also have this problem with Withdraw function.


It opens ^this^ interface and does not select an option. I have been thinking about using Mousekeys to scroll down, but I find this method to fail even when doing it humanly, so I havent looked into it.

I attempted to make the script add "x,y" to the current mouse position, since the distance from mousepos(x,y) to "all" would always be the same. This could probably be spotted by Jagex, so I tried adding "+random" but Simba didnt like this at all.

My herb cleaning script is working perfectly besides this flaw. It is also avoiding me from making my iron powerminer script. So any help is very appreciated, as I am eager to see my new scripts in full function :)

Coh3n

2011-12-30 23:12:58

Just tested several times, and it works fine for me.