Results 1 to 7 of 7

Thread: *Sigh*, FindDeformedBitmapToleranceIn runtime freeze?

  1. #1
    Join Date
    Feb 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default *Sigh*, FindDeformedBitmapToleranceIn runtime freeze?

    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:
    Code:
    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
    Code:
    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.

    Code:
       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?

  2. #2
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

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

  3. #3
    Join Date
    Feb 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  4. #4
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    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.

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    At least he won't have to search the whole screen. What were you trying to find?
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  6. #6
    Join Date
    Feb 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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
    Code:
    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?

  7. #7
    Join Date
    Feb 2007
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have some more information

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

    Code:
       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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. FindDeformedBitmapToleranceIn
    By Olaf Forkbeard in forum OSR Help
    Replies: 9
    Last Post: 03-02-2009, 03:45 AM
  2. Question about FindDeformedBitmapToleranceIn
    By Rambozin in forum OSR Help
    Replies: 30
    Last Post: 05-05-2007, 11:13 AM
  3. FindDeformedBitmapToleranceIn
    By raimis89 in forum OSR Help
    Replies: 9
    Last Post: 01-12-2007, 03:04 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •