Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Sign in to follow this  
BryceTheCoder

07's InvCount

Recommended Posts

Hello wanted...

Not sure whats going on here.

This prints absolutely correct:

repeat
  writeln(inttostr(InvCount(true)));
until false;

However... when I do something like this:

repeat
    FindOre;       
    writeln(inttostr(InvCount(true)));
    waitRR(333,666);
  until (InvCount(true) = 28);

It always prints 0.

 

Any ideas???

P.S. if I were to remove the FindOre; it works properly again.

MY FindOre procedure contains a color finding:

ColorToleranceSpeed(2);
  SetColorspeed2Modifiers(0.03, 0.38);  
  if FindColorTol(x, y, 4028566, 60, 50, 450, 310, 16) then
click on object.....

Sooo maybe the colrTolSpeed an ColorMods need to be changed back before checking the InvCount ??? Not sure.... Please help :(

Share this post


Link to post
Share on other sites

Does your code reset  ColorToleranceSpeed?

ColorToleranceSpeed(1);

The 'bug' is not with InvCount it is with TabExists/GetCurrentTab which rely on ColorToleranceSpeed 1 not 2. You need reset ColToleranceSpeed immediately after changing it to 2 and using it it with FindColor etc. . If your code is for sure doing  (not missing it in an early exit loop or something) this then try adding it to the test script, if it is still doing this then osrs has updated and I need to change the tolerance parameters. If it stops after you reset it then you need to make your code incorporate the reset. This should be done in any function or produce etc. in your entire script when switching from 1 to 2 CTS

Share this post


Link to post
Share on other sites
On 5/3/2018 at 2:46 AM, Wanted said:

Does your code reset  ColorToleranceSpeed?


ColorToleranceSpeed(1);

The 'bug' is not with InvCount it is with TabExists/GetCurrentTab which rely on ColorToleranceSpeed 1 not 2. You need reset ColToleranceSpeed immediately after changing it to 2 and using it it with FindColor etc. . If your code is for sure doing  (not missing it in an early exit loop or something) this then try adding it to the test script, if it is still doing this then osrs has updated and I need to change the tolerance parameters. If it stops after you reset it then you need to make your code incorporate the reset. This should be done in any function or produce etc. in your entire script when switching from 1 to 2 CTS

Okay. If those colors needs it set to 1. Then that is the problem. I am using 2.

Thanks for the info!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...