Results 1 to 4 of 4

Thread: Stop mouse from searching in a specified area?

  1. #1
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Stop mouse from searching in a specified area?

    Im writing a bone collector + burier for the chicken pens, but when it is looking for the bones on the ground...

    SCAR Code:
    Procedure FindBones;
    begin
    repeat
          repeat
          FindMSColorTol(x,y,boneColor,2)
          MMouse(x,y,0,0)
          wait(10+random(10));
    until(isUpText('ake'))
    Mouse(x, y, 2, 2, False);
    Wait(150 + Random(100));
    ChooseOption(x,y,'ones')
    Flag;
    Wait(100+Random(150));
    until(InvFull)
    end;

    It is constantly searching the chickens and peoples hair, generally ignoring the bones. My question is:
    Is it possible for scar not to move the mouse to a location to see what the up text is for something similar to the following?

    SCAR Code:
    repeat
          FindMSColorTol(x,y,boneColor,2)
          if (an area 10 by 10 around x,y is in the array dont bother moving the mouse to check for up text and try and find the color again, but with the uptext.)
          MMouse(x,y,0,0)
          wait(10+random(10));
          if (not(isUpText('ake'))) then
                add the x,y coords to an array
    until(isUpText('ake'))

    unless someone has a better way to differentiate items on the ground to monsters. I have seen others use bmp's, but i don't know how that would work, if the item is obscured.

  2. #2
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    1,330
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    finddeformed. best way EVER. trust me you will never go back. I use this in my yew cutter to differentiate the tree colors with the actual trees. Due to the ground beign green. First i use say

    findcolors(array, blah blah blah)

    then using those x and y arrays i search in a 10 by 10 box around them for the bmp. Works extremely well.

  3. #3
    Join Date
    Oct 2006
    Posts
    412
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so would it be something along these lines? cause i cant seem to get it to find anything
    SCAR Code:
    Procedure LoadBMPs;
    begin
    boneBMP := BitmapFromString(13, 8, 'z78DAA5515B8E042108BC12' +
           '2ADAF85980DEFF48CB34F3313D99C76EB6482A44E55125D133266' +
           '4CBD6A55DD98A8A1E8FB7CEE6E6C9F40B78B76DDB8717A7281117' +
           'A656CB11F5C37A32FD11D6143A1DDE23C4AB171BB1EFA27FC0580' +
           '33E9D23AA05BEE83AE726875F5D2E2AEE1ACFAD523BC6D489CF3D' +
           '972C5ECCBDF572F15C090CCE29773F4FC642457DBBE10E8790DD2' +
           '2292832858E9DF9E5E5A9375907142FF64C15D92D7525EBADF70B' +
           'AFE24F604856D7A62DCF7F003DEC83CA');
    end;

    begin
    LoadBMPs;
    repeat
    FindMSColorTol(x,y,13158607,5);
    if (FindDeformedBitmapToleranceIn(boneBMP,x,y,10,10,513,335,5,10,true,acc))then
    begin
    MMouse(x,y,0,0);
    wait(10+random(10));
    end;
    until(isUpText('ake'))
    end.

  4. #4
    Join Date
    Feb 2006
    Location
    New Zealand
    Posts
    1,330
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No. Theres things about the accuracy etc that you dont quite understand. Open up srl/bitmap.scar. There is a function in there called find deformed. Use that. Also use a WAY smaller bitmap. Maybe around 2*2

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Spaming area
    By teamdark6 in forum NOTA
    Replies: 14
    Last Post: 12-21-2008, 03:38 PM
  2. Find all the bitmaps in an area?
    By Infantry001 in forum OSR Help
    Replies: 13
    Last Post: 12-08-2008, 08:46 PM
  3. Should I (Yanix) Stop Make threads And Stop Post?
    By yanix in forum News and General
    Replies: 11
    Last Post: 08-31-2007, 09:10 PM

Posting Permissions

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