SRL Archive - OSR Help

*Sigh*, FindDeformedBitmapToleranceIn runtime freeze?


~~~~

2007-07-07 21:11:25

GAAA!! I thought I squashed all of my bugs!!! Unfortunately, this spider-like bug crept up on me after I recently solved my previous bug with the help of Starblaster100.

I sure hope this is the last error I encounter.

Anyways, after fixing the bitmap error, using Starblaster100's wonderful solution, I ran another test run, only to find my last, hopefully, bug. After a little debugging, I found what statement was causing the error:

FindDeformedBitmapToleranceIn(currentBitmap, xStepLocation, yStepLocation, 0, 0, 765, 503, 30, 1, true, accuracy);

Let me explain: currentBitmap, at the time of the error was bitmapped from

BitmapFromString(13, 20, 'z78DAE5D24B0A03210C80E12B99C' +
'72474A9A3F7BF528789854AC752358BC220FC2BF954A224E16339' +
'55553314EBBA46510325EBBAFC2EF4DAEC677DF4CFFA45AB3D9D8' +
'B826E2FFFF38D735AADD3DDBC34401420489C41563413ACC81260' +
'F7D248B68434A735B7CA9843F17AA969D601AD639A237170A65F2' +
'7FB175AAF4119E32DB4F10AEEB5C7AFBFEA13EDA45D40');
The next two arguments should be obvious.
The next four: 0, 0, 765, 503, are meant to scan the entire Runescape client.

1, for small tolerance, true for range accuracy, and finally store the result in accuracy which resultantly will be checked with the minimum range.

When this happens, which has even happened after restarting SCAR twice, the CPU increases to 99-100%, Runescape freezes, the computer is very slow (because of the CPU), and no statements -including the accuracy comparism- gets executed after FindDeformedBitmapToleranceIn.

It probably isn't, but in case it's a different statement which I have failed to follow, remember that no statements -including the accuracy comparism- gets executed after FindDeformedBitmapToleranceIn.

I apologize for another bug happening so soon!

Any help here?

Thanks in advance

-Krabby Krap












Edit: -posted below-


I have some more information

Okay, I finally tried a few other functions, not one of them working.


case randomResult of
...
51: currentBitmap:=BitmapFromString(16, 12, 'z78DAADD3490E80200C05D02B39' +
'F5034B19BCFF91C4615152D41284E42F58BC364D81C398AF4833C' +
'0C256921010786E7332C9C363C997653A0FBA7D2917A9F7359A48' +
***************
'************F55311356AC3C1BA6FDBA3F52D6F8FAFD6CF53F3A' +
'EFF09FFEACE67FE9******************9');
52: currentBitmap:=BitmapFromString(12, 10, 'z78DA3377313701421CA4999399' +
********************************
***********************************
'9F2D');
end;

xStepLocation:=0;
yStepLocation:=0;



checkForRandomsOrigin;
FindBitmapRotated(currentBitmap, xStepLocation, yStepLocation, uselessVariable, 0, 0, 765, 503);
// Next line=original function
// FindDeformedBitmapToleranceIn(KKBBcurrentBitmap, KKBBxStepLocation, KKBByStepLocation, 0, 0, 765, 503, 30, 1, true, KKBBaccuracy)
// Previous line
if(xStepLocation>=2)AND((yStepLocation>=2)))
// Next line=original statement
// if(accuracy>=0.85)
// Previous line
then
begin
Sleep(31+random(3)-random(1)+random(3));
Mouse(xStepLocation+random(3), yStepLocation+random(3), 1+random(2), 1+random(2), true);
// ...

Any help here?

jhildy

2007-07-07 23:14:58

its probably the check for accuracy part do you have to have that because you could use a different procedure.

~~~~

2007-07-07 23:29:25

Yes, I do have check for accuracy. Thank you for your reply, but it is completely contradicting my post. As I said before, it is probably not the accuracy check, and I do for sure have the accuracy check implemented in my code.

I'm assuming it might have to do assigning the X and Y position to the most accurate bitmap if it is at minimum 85% similar.

Does anyone have any suggestions? Thank you for your help.

jhildy

2007-07-08 02:05:23

what is the rest of the accuracy check and everything and how high did you set the check to. idk if this would help but i just would like to see, who knows, mayb ill see something.

edit: there are global vars set with runescapes client x's and y's so use it like MSX1,MSY1,MSX2,MSY2 in that order when it asks for those. so instead of manually putting that in use those insted. i know that wont help your problem but just let you know for future referance.

Santa_Clause

2007-07-08 03:37:55

At least he won't have to search the whole screen. What were you trying to find?

~~~~

2007-07-08 10:59:30

xStepLocation and yStepLocation. It locates a minimap location and clicks on it.

I still need help, and I am still trying to fix it myself. I'll experiment around with different functions.

Okay, I don't know if this function is completely necessary. I captured about 52 different minimap locations to randomly choose if it can't find a bone, which after a certain amount of time if not found will logout and switch players(false).

In short, RadialWalk is unnecessary and I must find a minipad location and click on it no matter the compass rotation. I don't care if

FindDeformedBitmapToleranceIn(currentBitmap, xStepLocation, yStepLocation, 0, 0, 765, 503, 30, 1, true, accuracy);
is the correct function, I just need a function that can find the minimap location and click it.

Can anyone help me find a function that works for this situation?

~~~~

2007-07-08 12:13:57

I have some more information

Okay, I finally tried a few other functions, not one of them working.


case randomResult of
...
51: currentBitmap:=BitmapFromString(16, 12, 'z78DAADD3490E80200C05D02B39' +
'F5034B19BCFF91C4615152D41284E42F58BC364D81C398AF4833C' +
'0C256921010786E7332C9C363C997653A0FBA7D2917A9F7359A48' +
***************
'************F55311356AC3C1BA6FDBA3F52D6F8FAFD6CF53F3A' +
'EFF09FFEACE67FE9******************9');
52: currentBitmap:=BitmapFromString(12, 10, 'z78DA3377313701421CA4999399' +
********************************
***********************************
'9F2D');
end;

xStepLocation:=0;
yStepLocation:=0;



checkForRandomsOrigin;
FindBitmapRotated(currentBitmap, xStepLocation, yStepLocation, uselessVariable, 0, 0, 765, 503);
// Next line=original function
// FindDeformedBitmapToleranceIn(KKBBcurrentBitmap, KKBBxStepLocation, KKBByStepLocation, 0, 0, 765, 503, 30, 1, true, KKBBaccuracy)
// Previous line
if(xStepLocation>=2)AND((yStepLocation>=2)))
// Next line=original statement
// if(accuracy>=0.85)
// Previous line
then
begin
Sleep(31+random(3)-random(1)+random(3));
Mouse(xStepLocation+random(3), yStepLocation+random(3), 1+random(2), 1+random(2), true);
// ...

Any help here?