Results 1 to 14 of 14

Thread: Lumby Bank Chest

  1. #1
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Lumby Bank Chest

    Hi

    I'm having a lot of trouble getting my script to consistently find the bank chest in the lumbridge cellar. it seems the colors are too similar to the surrounds to get a consistent hit. I have used FindColorTolerance and FindColorSpiralTolerance but they consistently hit off target even with a tightly defined search area - due to the constant small movement of the RS screen.

    I have tried finding an item nearby and using coordinates relative to that point - eg the cabbage and the painting - which have unique colors. This has had more success but eventually the script will still hit off target after about 10 minutes of operation.

    Here is the relevant extract of the script.

    program New;
    {.include SRL\SRL.scar}
    var
    x,y,c,d:integer;
    const
    Painting=723982; //find the painting
    a=-11;
    b=-57;

    begin

    If(FindColorSpiralTolerance(x,y,Painting,690,400,7 50,450,300)) then

    begin
    Mouse(x+a,y+b,0,0,true);
    Writeln('Found Painting');
    GetMousePos(c,d);
    end else
    Writeln('No Painting Found')

    end.


    I guess questions are:

    1) Why does the relative coordinate approach not work - surely if the whole screen is moving then my reference point is moving at exactly the same time and in the same direction so I should theoretically keep hitting the chest by referencing off that unique color....?

    2) Is there any other relatively easy way to hit the chest? My experience does not yet extend to BitMap referencing but if that is the only way then I will learn it.

    Thanks for any advice.

  2. #2
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Hi. I didnt knew that there was a bank in the cellar of lumbi castle o_O.

    Anyways. To make a flawless function to find such an object, you would need to first scan for points on the screen in a certain color with FindColorsTolerance(...), than you would need to morph those points to boxes with TPAtoATPA, than you would need a function that would remove boxes which are too small or too big, after that you would need to hover the center of every box till the uptext shows the bank(which should usually be the case for the first mouse move).

    If you wan't I'll write such a function for you ;].

    ~caused

  3. #3
    Join Date
    Jan 2010
    Location
    Finland
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Use FindObjTPA and you can debug the boxes using caused's DebugATPABounds.

  4. #4
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow - ok so I was right about one thing and that was it doesn't sound like an easy task!

    And yes Caused - is a bank chest that is accessible after a player has started Recipe for Disaster quest.

    Have not yet used those functions/procedures (..don't want to start a flame war for getting the wrong term! that you guys have suggested (other than the FindColorTolerance) so will do some more study but yes any help would be mega appreciated and am happy to do any leg work to get it moving.

    Thanks again.

  5. #5
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why is there so much randomness in Mouse? It wouldn't even click the target by the looks of it. You could also try Auto coloring, and [scar] [/scar.] tags around your script.

  6. #6
    Join Date
    Jan 2010
    Location
    Finland
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah use auto coloring (in your Includes\SRL\Scripting Tools folder), if the chest has any trims or something similar use those and then get the item bounds (coords are in auto coloring program down left) and use the item bounds (width/height) with FindObjTPA, there's some tutorials to auto coloring somewhere here on the forums.

  7. #7
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    There is no randomness in the Mouse function - random set at 0,0. The +a and +b was to set the mouse position relative to an easier find color but seems the problem is in finding any color so the other suggestions being made might have to be explored as the solution - they are complex though at my level!

  8. #8
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok am really struggling with the ACAv2 AutoColor - have attempted to code the scripts as suggested but not finding colors and don't have the technical muscle to debug.

    Have tried the BitMap finding approach below to find the chest but also no luck.

    What seems strange is if the tolerance is set to >200 it returns the Bitmap as found but finds it at the first coordinate of the search field....which it obviously is not at - why would this be?

    If the tolerance is set at <100 then it returns as Bitmap not found.

    Can anyone help me find this chest!!?? Comments on the script below appreciated as to how to make it work.



    program New;

    {.include SRL\SRL.scar}

    var
    x,y:integer;
    BankChest4:integer;

    begin

    BankChest4 := BitmapFromString(28, 71, 'beNrt2GlT49gVBuDGCz' +
    'YYDNg0DXiXtetql2XJ+8pmFkND09NMTyeVmWTy//9AXknAGDNB6mT' +
    'mQ6qiuqVymdLjc+5y7hXv3v2PXisraCvxWGw1mVxfS2XW0qvJ BL75' +
    '4/yVWGwluP6c+FceU4jHk4lEMpnAHbnEn67/xHyS19fS7/M7Bx92d' +
    '7a2ctvb7/O5/fe7+3u73x3hwmeYe7u7tXKRoaoCTRGuroqsKjBvPP' +
    '46vKBLn0cQZrlwIHGMTgRTFlxDbplK21K+w1yBGXv+OoizUji 0FMk' +
    '11aYuO4bsmh4b3Vz6Ep8z62vVUtExFIVnmrrkGGTQqE9dNtoo/84P' +
    'PJu2JisCg84cN+koJh5MJOKYJ8j69Z+2NjfKyF2VXppMqBnHQ lrox' +
    'qU4iwf7BhE8k6+PmvTQrk/CzLd/Lp1O7e/taSIHU4Zp/7cmrtXV5N' +
    '5uXhYYjBFMgH+AmUzu5nKEo5/N0febQfcGs8DLPZXay+cJB5BG88w' +
    'm/bbp16IYkLh3j6NWYJJjXNbSKa9orCZz21uHHz4oAgtQeTYd+u1 a' +
    'kVpd3chkspubW9nsNgrFzg7adja7ubGBL3M725hLS+b4TRMXo srnc' +
    'qVCoVIslNEKh6XCIeZPYf9D4WC/eHiAOa+KnGcKnjmOYCLO/M4OVS' +
    'nzTJ2jKa5OsfVavVqmqxW6VkE5qpVLMDHhH02HBvu2mYjHkWB gmip' +
    'pmpptqKYq27rqmLpj6dUnEyUuMEdhJgbo0aQpXRZPJ4OLk8ns aDQ7' +
    'GuN+fjypvTQnkcy4n3sJcRqydDzqfZqfiywlMpTgt99MMaqZS CQQJ' +
    'zpQ8Exx0m/DFJ5AgalVS4smBXMYZuLa2fZMkaVRzMe91t18tpnJcP' +
    'UqT9fQfJOFqfkm+hPRhi4c7F/oT8SpiFzPte+uZpsbmQB8NrEwo5t' +
    'Yh2vpNPqTq9cwt7tO4+PFCUzEGbRl0y+hoWOUWV/3x4iC2XMfTaSP' +
    'IMsFbyEoT6bildB6v0GFjhHWJua2yHq5dx1rfnYUmBJHo3r48 TOLZ' +
    's+i3u5MVLPsxgYeJDyD8e3YxtXpJDAFBqPGty3Z1iSYqkg/mmZInE' +
    'nfxADJAgvTtbRnUxG4pk5GLcOUucCUeQoD1DVrobmj/mAiQdAk3jH' +
    'V+dnUMzcypix2bc3RJWQNTRVomfPMjlELXe8oa4RnVYk3ZKFp KBdH' +
    'o8BsamTgaLYqtEyZcBjBOuFqMNt6NdTM+qZ3elFEx1TOjwaB6 bOCS' +
    'Th0KUykT9jawKZaYWbcjxM9CdDWZddSZ5N+9slEw6zoNBSJpZ C4BL' +
    'NBuVol1MRTSNxCoYNpqqej7pLZ9cwaEpfYKkxHjWRidBoaQcP RaNp' +
    'voTeezU3fFFmAj2ZTKUcxDSLiUIQ4W5Y67jY3l0xbERkPlBjP tOUw' +
    'MxaDgCoH0/ZOg8qwbb82caITmSpa36IacilKnDLP+ol7J8y+ay2Zn' +
    'QaWkvhk1ixSCo0TJoo85hLOb66p9BxzyWxbxFIEga6ITKVn1k ypGF' +
    'LrYjHUJezsOGCjLmFGoUuX47SIKfOeSVe6RtUUi6E1GecOHBK w8/i' +
    'lnu/Y+mvTIBxMtI5eMYRClJqMOFHWcG7H0P9Of1pEJyzvmeW2VtFD' +
    'zVgsnU6jfgK0NdK21NHSuG9k2qakSyxfL8NsaWWNPww3UymRo dGTq' +
    'GydhjbtOUtmyxQ1iYGJ5qqRTOSOko44HV3u2vrxwF02DVGXUP A901' +
    'FKGncYZdxRPC0UJUxOxzgZtl7H+WSWYKrcQUidTyQg6JLgLUx TGbj' +
    'm6ah9ezF92Z++SXlmUy6+bQb7EUxN5NGZMBEnzPur40WzY3lj xFHY' +
    'r0s2KYbGGezFEov+FPHeF5if5yeLZrchGYRlYVKlBingZTZ0z iNUl' +
    'qoaBKFKQ9ecTTpLZs/GOsLrDA25oXCOxoebq6v1SkmXOLz2jtrW1X' +
    'H/4ePZotlvyjCh9Wxp0lKO2kqomUql6GoZcWIvm3Qa85PBl5vTly b' +
    'BxtSxxElbmQ30+cQMf1lLpbzcZRwPlKNe8+Zs9OPtbHH7GDRJ r0EA' +
    'nvX166l1OdLDa0g6zVIV7OYwj/ue+Zf7y0Vz6MhI+bSnI+uxI6l8J' +
    'UpdwvktyP2479zOxj8/XC+aQRu5yrBJ+rbUtYQoJqaHKQuI83To3l' +
    '1M/vbl6rWZz6HM4sVnHVMrWpw1zE+YJwP34ebklx9/izP7ykSLMu5' +
    'MtQKz01Bn49bX27O/f735N2Y6irmwxbM4byD3H65PAjP70tzNe2YO' +
    'Zj7cDN7m8JbRMsm0a99fTn9+mP/yMP/r58tv9xc/3c2+fTpHD//60' +
    '+2v327/8fXjP7/dRTFxYmRqZRwLMefvr6Zfbk5+uD6+mY1uz8e3F5' +
    'NPl9PP82MsBKTw9Xb25fo0ion06WoRx8Kha0x79lHPnnQbWKe jljl' +
    'smaO2Oe400Ka9JiYbxjGyWUKcrkFwR0M9aWqireJ84t2bmtRQ RUcn' +
    'qF1v/B9sKXeWKuNxnA3QsE6xBHSCkzOHD7hj9qLI4NCLD9i5opio9' +
    'nhx0f3H/TcXhnA0Nim8jEj+B+L9P4QJvseu/e7/F65/AVTKs9A=');

    if FindBitmapToleranceIn(BankChest4, x, y, 600, 380, 780, 500,150) then

    begin
    Writeln('x='+IntToStr(x));
    Writeln('Found Bitmap');
    end else
    Writeln('Didnt Find it!');
    end.

  9. #9
    Join Date
    Aug 2009
    Location
    Inside the Matrix...yes it has me, and it has you too.
    Posts
    1,896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jollyjumbuck View Post
    Ok am really struggling with the ACAv2 AutoColor - have attempted to code the scripts as suggested but not finding colors and don't have the technical muscle to debug.

    Have tried the BitMap finding approach below to find the chest but also no luck.

    What seems strange is if the tolerance is set to >200 it returns the Bitmap as found but finds it at the first coordinate of the search field....which it obviously is not at - why would this be?

    If the tolerance is set at <100 then it returns as Bitmap not found.

    Can anyone help me find this chest!!?? Comments on the script below appreciated as to how to make it work.



    program New;

    {.include SRL\SRL.scar}

    var
    x,y:integer;
    BankChest4:integer;

    begin

    BankChest4 := BitmapFromString(28, 71, '...big-ass bitmap...');

    if FindBitmapToleranceIn(BankChest4, x, y, 600, 380, 780, 500,150) then

    begin
    Writeln('x='+IntToStr(x));
    Writeln('Found Bitmap');
    end else
    Writeln('Didnt Find it!');
    end.
    Bitmaps on objects on the main screen don't work that well. bitmaps should be used on pictures, not 3d objects that can change view very easily. If you can, try using TPAs to find your chest
    NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN NYAN

  10. #10
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Try SmartColors. That will begin with a range, and automatically select and refine the unique colors that best identify the object. If there's any true difference between the chest and its surroundings, it will eventually find the best possible colors to use as the script runs.

    http://villavu.com/forum/showthread.php?t=52915


  11. #11
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thank you for that - picked up from the tutorials that DTM's would not have sufficient detail for a main screen object but didn't pick up that might be the case with Bitmaps as well. So will try the new suggestions and report back.

  12. #12
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by tarajunky View Post
    Try SmartColors. That will begin with a range, and automatically select and refine the unique colors that best identify the object. If there's any true difference between the chest and its surroundings, it will eventually find the best possible colors to use as the script runs.

    http://villavu.com/forum/showthread.php?t=52915
    Ok starting with something simple as a uniquely colored painting in the same room as the lumby bank chest I have the following SmartColors script:

    begin
    ClearDebug;
    MakeObj('Painting', 10984529, 20, 0.055, 0.84, ['Pai', 'tin', 'aint', 'ing'], ['xamin']);
    SmartColors('Painting');
    end.

    this returns:

    SC Array: 0
    first finder
    Successfully executed

    but I don't seem to have found anything. My understanding of the tut there is that SmartColor will click on the object - is that right? If so have I not defined enough parameters in the script?

  13. #13
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok was able to get a solution thanks to the helpful suggestions on this forum.

    Was able to work through a TPA solution with the help of a couple of the tutorials. I used a unique color of a nearby picture and set that as a relative reference point to find my bank chest.

    I really would like to be able to use the SmartColors as it sounds like a perfect solution to a number of tricker color find problems, however, I just wasnt able to get it to function properly....not for a minute suggesting there is anything wrong with the scripts... purely just was not able to figure out what I needed to do to get it to work based on my early-stage scripting skills (or lack thereof!). I guess as more comment and material becomes available it will become easier for keen to learn scripters such as myself to include this with their scripts as well.

    Thanks again though for all the good help.

  14. #14
    Join Date
    Mar 2010
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Also, just as a reference point for possible future newbie scripters (as I was/am), I came across two tutorials on TPA's on the forums here. One which started at a much more basic level:

    http://villavu.com/forum/showthread.php?t=32182

    and although I found this next one first, it was a bit tougher to understand from the basic level but I found it very helpful to go back to once I kind of got more of the concept from the first tutorial.

    http://villavu.com/forum/showthread.php?t=21786

    Cheers.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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