Results 1 to 4 of 4

Thread: Capturing a bitmap?

  1. #1
    Join Date
    Jul 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Capturing a bitmap?

    How can I capture a DTM/or bitmap while a script is running and use it temporarily in the script?


    function CreateBitmap(w,h :integer) : integer;

    var bmp, x, y: integer;
    begin
    bmp := CreateBitmap(10, 10); // Create a bitmap of size (10, 10)
    if FindBitmapIn(bmp, x, y, 0, 0, 300, 300) then
    writeln('Found it!');
    FreeBitmap(bmp); // Don't forget to free it when we are done.
    end;

    I don't understand how the bmp is specsific
    Last edited by Too Soon; 01-29-2014 at 06:37 PM.

  2. #2
    Join Date
    Jul 2012
    Posts
    437
    Mentioned
    10 Post(s)
    Quoted
    165 Post(s)

    Default

    Quote Originally Posted by Too Soon View Post
    How can I capture a DTM/or bitmap while a script is running and use it temporarily in the script?


    function CreateBitmap(w,h :integer) : integer;

    var bmp, x, y: integer;
    begin
    bmp := CreateBitmap(10, 10); // Create a bitmap of size (10, 10)
    if FindBitmapIn(bmp, x, y, 0, 0, 300, 300) then
    writeln('Found it!');
    FreeBitmap(bmp); // Don't forget to free it when we are done.
    end;

    I don't understand how the bmp is specsific
    try bitmapfromclient,the example will make a bitmap of the entire client.
    Code:
      bmp := bitmapFromClient(0, 0, getClientBounds().x2 -1, getClientBounds().y2 -1);
      debugBitmap(bmp);//displays the bitmap
    Dynamically creating dtms is little bit harder but here's a guide on it http://villavu.com/forum/showthread....highlight=ddtm

  3. #3
    Join Date
    Feb 2013
    Location
    Narnia
    Posts
    615
    Mentioned
    8 Post(s)
    Quoted
    252 Post(s)

    Default

    use the green crosshairs to select your screen, click on the tools option, select DTM Editor. this will allow you to capture a image while the script is running and design a DTM or you can copy and paste the image into paint and cutout the part you want, shade the outside in black and use as a bitmap by using the Bitmap Conversion under the Tools option. I would recomend using a dtm. bitmaps should be used if you have a static 2Dimensional object or text

    ur bitmap should look something like this (similiar to what your dtm should look like):
    Code:
      bronzearrowbmp := BitmapFromString(13, 34, 'meJxjYKAJYAQjgmrkTF0ltUxxqY' +
            'QYomzjJ2fkKKSoxYgqhaZMzzsRaBoQMSKJIxsOUcZpGiGjZwVEjHA' +
            '3GDmKqRogKwOqYZDUYIRpQTYcbj5EGURW0dITYhFcGdx8uFGq9kFw' +
            'XyDrZYApA7KNgrORfQERRAFgo4DK4L6Am48Zbsi+wGIUkjI09ZjKC' +
            'BrFQJxRDMQZxUCcUfAAwW8UA0aAEFSGP+kSYxQDcUYxEGcUA3FGAQ' +
            'GfWD4xyohRQ7yykQMA0Soo7Q==');
    to search for the bitmap you should have something like this (there are other bitmap search functions, just google simba bitmap and select the documenation):

    This will search your inventory for a bronze arrow and wield it if it finds it

    Code:
    procedure Wield_Arrow2;
    var
      a, b: integer;
    begin
      Open_Inv_Tab;
      if FindDeformedBitmapToleranceIn(bronzearrowbmp, a, b, MIX1, MIY1, MIX2, MIY2, 30, 0, false, accFoundarr) then
      begin
        repeat
          MMouse(randomrange(a-7,a+7),randomrange(b-0,b+30),0,0);
          wait(randomrange(50,150));
          ClickMouse2(mouse_left);
          wait(randomrange(675,999));
        until(Not FindDeformedBitmapToleranceIn(bronzearrowbmp, a, b, MIX1, MIY1, MIX2, MIY2, 30, 0, false, accFoundarr));
        Exit;
      end;
    end;

    View my OSR Script Repository!


    Botted to max
    Guides: How to Report Bugs to the Scripter
    ~~~~ Moved to Java. Currently Lurking ~~~~

  4. #4
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    What exactly are you trying to do?

    I would suggest using the first link posted, I do believe a DDTM would be much more accurate. This all depends on the case though, post a bit more info and I can probably help more.

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
  •