Results 1 to 12 of 12

Thread: click on found bmp?

  1. #1
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default click on found bmp?

    what is the SRL-Code to click on a bmp?

    here is the bmp -> string, if you want it, and can make the code fore me :P

    SCAR Code:
    bones := BitmapFromString(23, 16, 'beNqdU9EVxCAIcxRHYRRHYRQ' +
           '/bhAH6TCHBCm12us7nh9UISYpEu0ipdRaY2ZJKPfPWj89fxdphIBU' +
           'BbFcQRA/29vRENIlTEphgGBHYI3e6l6/DpVeHOUAs2iXbHpMV3Dot' +
           'cps/oBS3I8gcsq6lvIhsA6Hz3WVM9GGJ4Jj1hw9jzSWUStPzN0c5N' +
           'DYjQqbAO8uDTLOEAbi1HqVxshPHNRc/nje/i/eCMEUlULbsRnSFn5' +
           'misKRPEysCplH4l55P3Vj48PZgTjnHYjQIHqi8eYBspv2F4hP4FuQ' +
           'L0bHPnw=');

    so essentiallly, i want it to right click on that, and then click on another bmp for me, and then type in 28.... ok, well, yeah, just need that command

  2. #2
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think it's something like this:

    SCAR Code:
    if FindBitmap(x, y, Bones, MSX1, MSY1, MSX2, MSY2) then
      Mouse(x, y, 0, 0, True);

    Pretty sure. The only thing that could be wrong with that are the params for FindBitmap.

  3. #3
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    SCAR Code:
    function FindBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer): Boolean;
    Works like FindBitmapIn but with a tolerance parameter for finding any similar colored bitmap. Tolerance is used to find a colored bitmap in range of the bitmap you are looking for. The greater color range you want, the higher the tolerance parameter should be.

    SCAR Code:
    function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
    Search for the bitmap in coordinates specified by x1, y1, x2, y2 starting from x, y. bitmap contains handle to bitmap generated by LoadBitmap.

    SCAR Code:
    function FindBitmapSpiralTolerance(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean;
    Works like FindBitmapSpiral but with a tolerance parameter for finding any similar colored bitmap. Tolerance is used to find a colored bitmap in range of the bitmap you are looking for. The greater color range you want, the higher the tolerance parameter should be.

    SCAR Code:
    function FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean;
    Essentially it works like FindBitmapIn except it identifies using the masks/shape of an object in the bitmap. Masks are specified by the colors black and white. ContourTolerance is the minimal tolerance for color difference between shape of a mask and the background in a bitmap, It makes sure the shape differs from the background.
    <-- sample mask for finding letter A in any color.

    SCAR Code:
    function FindDeformedBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;
    Works similar to FindBitmapToleranceIn but allows searching for partially covered or transformed bitmaps. If range is 0, it checks pixels at positions that match bitmap we are looking for; if Range ir 1, it checks neighbor pixels as well, if range is bigger, it checks further. AllowPartialAccuracy allows accuracy that is not 100% match. accuracy returns accuracy of found bitmap to bitmap we are looking for. accuracy = 1.0 means it was 100% perfect match.





    I suggest you look through the Scar Divi CDE Manual before you ask for help, or just look for a tut on bitmaps(or whatever you want to know)

  4. #4
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ...Why can't he just use FindBitmap?

  5. #5
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    He could... but would if its mainscreen, then he needs tolerance. I was just giving him some more options, and showing him what there is out there!

  6. #6
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    You need a smaller bitmap, that is way to big or learn DTM's. What TViYH and Morman said would work. I personally would use FindBitmapToleranceIn if you use bitmaps.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  7. #7
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You should use DTMs most of the time but if you really need to use bmps you shouldn't use any that big 1 or 2 pixels is a good size.

  8. #8
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Parameters for Main inventory are
    MIX1 (top left corner x)
    MIY1 (top left corner y)
    MIX2 (bottom right corner x)
    MIY2 (bottom right corner y)

    And Mouse(x, y, 2, 2, false); <- that FALSE makes it right-click! true is left-click. (2, 2) are randomness parameters (clicks on a random 2*2 square-area around the point [x, y])

    MouseItem(1, true) This clicks on an item thats in the top left corner in your inventory

    MouseItem(2, true) This clicks an item that's next to the top left corner
    etc etc... again, true=left-click, false=left-click

  9. #9
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    Parameters for Main inventory are
    X1 (top left corner x)
    Y1 (top left corner y)
    X2 (bottom right corner x)
    Y2 (bottom right corner y)

    And Mouse(x, y, 2, 2, false); <- that FALSE makes it right-click! true is left-click. (2, 2) are randomness parameters (clicks on a random 2*2 square-area around the point [x, y])

    MouseItem(1, true) This clicks on an item thats in the top left corner in your inventory

    MouseItem(2, true) This clicks an item that's next to the top left corner
    etc etc... again, true=left-click, false=left-click
    you mean MIX1, MIY1, MIX2, MIY2, don't you?

  10. #10
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    SCAR Code:
    function FindBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer): Boolean;
    Works like FindBitmapIn but with a tolerance parameter for finding any similar colored bitmap. Tolerance is used to find a colored bitmap in range of the bitmap you are looking for. The greater color range you want, the higher the tolerance parameter should be.

    SCAR Code:
    function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
    Search for the bitmap in coordinates specified by x1, y1, x2, y2 starting from x, y. bitmap contains handle to bitmap generated by LoadBitmap.

    SCAR Code:
    function FindBitmapSpiralTolerance(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean;
    Works like FindBitmapSpiral but with a tolerance parameter for finding any similar colored bitmap. Tolerance is used to find a colored bitmap in range of the bitmap you are looking for. The greater color range you want, the higher the tolerance parameter should be.

    SCAR Code:
    function FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance, ContourTolerance: Integer): Boolean;
    Essentially it works like FindBitmapIn except it identifies using the masks/shape of an object in the bitmap. Masks are specified by the colors black and white. ContourTolerance is the minimal tolerance for color difference between shape of a mask and the background in a bitmap, It makes sure the shape differs from the background.
    <-- sample mask for finding letter A in any color.

    SCAR Code:
    function FindDeformedBitmapToleranceIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;
    Works similar to FindBitmapToleranceIn but allows searching for partially covered or transformed bitmaps. If range is 0, it checks pixels at positions that match bitmap we are looking for; if Range ir 1, it checks neighbor pixels as well, if range is bigger, it checks further. AllowPartialAccuracy allows accuracy that is not 100% match. accuracy returns accuracy of found bitmap to bitmap we are looking for. accuracy = 1.0 means it was 100% perfect match.





    I suggest you look through the Scar Divi CDE Manual before you ask for help, or just look for a tut on bitmaps(or whatever you want to know)
    you got it wrong
    SCAR Code:
    function FindBitmapSpiralTolerance(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; Tolerance: Integer): Boolean;
    it searches from the center of x1, y1, x2, y2 not from x, y
    it stores the point it was found in in x and y

    ~shut

  11. #11
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Those are taken exactly from the manual... so i didn't do anything wrong except maybe copying it?

  12. #12
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Found Another Bot?
    By Naum in forum RuneScape News and General
    Replies: 14
    Last Post: 10-27-2007, 07:59 PM
  2. Found Another Bot?
    By Naum in forum RuneScape News and General
    Replies: 0
    Last Post: 10-24-2007, 10:08 AM
  3. Find a Chest & Left Click,Right Click
    By yanix in forum OSR Help
    Replies: 3
    Last Post: 10-03-2007, 06:40 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
  •