Results 1 to 16 of 16

Thread: Problem with Bitmap

  1. #1
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Problem with Bitmap

    Alright, so I read a few tutorials with bitmap and made a nice little script for it.

    One problem: It doesn't find the text I need it to. In my script, I use FindBitmapTolerance. When I set my tolerance to 19+, it will click all text any character says in that box and perform the procedure no matter what. When I make it 18 or less, it won't click any text at all and the procedure won't do anything. I believe the problem is that the text is black, and I don't think SCAR picks that up. (findbitmapin doesn't work either)

    If you can figure out how to fix this, please tell me!

    Here is the bitmap image I'm using (imageshack changed it to something other then .bmp I believe, but it is orginally in .bmp in my script, but I used Paint to convert it to .bmp and it had a few differnet options of bmp files. That might be a problem there, if it is please tell me how I can change it to bmp right!).


    Here is what the screen looks like when I try to get the bitmap.


    Here is my script (the tolerance is on 19, meaning it will repeat the procedure over and over. When its 18 or less, it won't do the procedure at all).
    Code:
    program Bitmapblocker;
    
    var
    SS_move_left: Integer;
    x,y: integer;
    
    procedure LoadBmps;
    begin
      SS_move_left := BitmapFromString(100, 11, 'beNrtljkOxDAIRec' +
           'qLl1yHVpKX4PSh55h817MAYis6AfDN35SnFDtrX7i6g06VR+tdgxB' +
           'qkVowkizqe1x0QieMIOgPhFfDLfVLY6bkIRzFs4eGjz6wUtcPrr62' +
           'yemRnmikEztQYJM3g/jT5cudxmJYqIgCFF7TGkJsIiSKCYKDbK9Ze' +
           'glHvTjKFE4CsZi5azafYwS+n4ThaFYfKa/CmusJIqBgrXPzcfTwid' +
           'R0N8+ieLyOfvRNNl4oggUTx+JT5EophifOY7jiCl+Nb8a3GfO');
    end;
    
    procedure UseBitmap;
    begin
      if(FindBitmapToleranceIn(SS_move_left,x,y,192,666,677,698,19)) then
       begin
        wait(100)
          KeyDown(37);
        wait(500);
          KeyUp(37);
        wait(5000)
      end;
    end;
    
    procedure FreeBmps;
    begin
      FreeBitmap(SS_move_left);
    end;
    
    begin
    repeat
      LoadBmps;
        UseBitmap;
      FreeBmps;
    until(isfkeydown(8))
    end.

  2. #2
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    what game is that???

    SCAR is only for RS2

    They are sisters...
    Runescape Classic

  3. #3
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    WRONG. Thats what differenciates us from bots. Scar is versitile. You can basically use it for any game. SRL is mainly for RS2. But some functions can stil be used for other purposes.
    STOP PM'ING ME

  4. #4
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It can be used in this game (which is endless-online. the download at endless-online.com if you want). I've used loads of times, and have seen it used loads of times. There are actually some pretty good scripters with SCAR who play endless.

    I know that bitmap and this has to work someway, I've seen it being used by someone else before. I haven't see that guy lately so I can't ask him how he did it, but it can deffinetly work somehow.

  5. #5
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Hobbit View Post
    WRONG. Thats what differenciates us from bots. Scar is versitile. You can basically use it for any game. SRL is mainly for RS2. But some functions can stil be used for other purposes.
    okay.... let me rephrase...

    SCAR is Best used with RS2

    They are sisters...
    Runescape Classic

  6. #6
    Join Date
    Feb 2006
    Location
    Locked in RAM's closet !
    Posts
    2,001
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    the bitmap and image on your screen are diffrent.
    Darky has stopped by to say hello :).
    10-21-2010
    Updated-
    10-09-2012

  7. #7
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by legendaryhero90 View Post
    okay.... let me rephrase...

    SCAR is Best used with RS2

    ehmmm Scar creator, Kaitnieks made scar for autoing in online games, not only for rs2, but he included some commands used only for rs2, like gets text from up-corner, he added even letter font... but he did not made it only for rs, scar is a compiler, you can use it for whatever you want...
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  8. #8
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oops Darksniper, I uploaded the wrong screenie. They are the same in game though... let me edit that.

    Edit: Its fixed. Anyone have any ideas or any time to spear to help me (in game/msn/whatnot. It'd help a lot of you could do that for me).

  9. #9
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    This works =]]
    SCAR Code:
    var
      x, y, Characters : Integer;

    begin
      Characters := LoadCharsFromFont2('Microsoft Sans Serif', 8, False, False, False, False);
      if IsTextInAreaEx(179, 425, 443, 476, x, y, 'move', 2, Characters, False, False, 0 ,0, 0) then DOSOMETHING;
    end.

    You may need to change the coords (179, 425, 443, 476) tho idk where they are on the game screen.

  10. #10
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried that before and it didn't work Derek, but I guess I can try again, I'll get back to you if it does work.

    Edit: Didn't work for some reason. Do you play EO, if you can then it'd be really helpful to talk to me ingame =)

  11. #11
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Try using a BitmapMask (look at SCAR's picture to string utility; it has a really easy way to convert bitmaps to bitmapmasks) and FindBitmapMaskTolerance.
    Interested in C# and Electrical Engineering? This might interest you.

  12. #12
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How would I set up my script to use bitmapmask? I tried and and it has some errors, here is my script using mask...

    Code:
    program Bitmapblocker;
    
    var
    Mask: Integer;
    x,y: integer;
    
    procedure LoadBmps;
    begin
      Mask := BitmapFromString(100, 11, 'beNrtlkEOwzAIBPv/T7unRql' +
           'hx0Mr9VQOlmLwGgwsWevxLusl1+e1bjt31XYE7Lf9Cr6ZVd8qSLuO' +
           'cBitNUvaowqkIkMizKVtIjwORMo4bZF47fFhU/nVTXBAxiVxkip1V' +
           'gJJD8ulWHuQj7MbkDJf7fxiPkZ2INFIumsUQsryqPE5p96fFsfQlF' +
           'dN8yvTcaz/tn0SXzE/eCYB3mAcGDq+/mV/+WD9IPjGH9+DgMbzd1S' +
           '66yZHTja/NG2zH8lTjjZJtqnk5KwEG4hIssoHBsaY/yfBZ25Gc4p5' +
           'YHT7L3HkyPuv6wlLngcy');
    end;
    
    procedure UseBitmap;
    begin
      if(FindBitmapMaskTolerance(Mask,x,y)) then
       begin
        wait(100)
          KeyDown(37);
        wait(500);
          KeyUp(37);
        wait(5000)
      end;
    end;
    
    procedure FreeBmps;
    begin
      FreeBitmap(Mask);
    end;
    
    begin
    repeat
      LoadBmps;
        UseBitmap;
      FreeBmps;
    until(isfkeydown(8))
    end.

  13. #13
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    begin
      LoadBmps;
      repeat
        UseBitmap;
        wait(20);
      until(isfkeydown(8))
      FreeBmps;
    end.

    Get a new bitmap, paste it into the picture to string utility, then click bitmap mask, then use that string in place of the old one.
    Interested in C# and Electrical Engineering? This might interest you.

  14. #14
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But wouldn't you have to change FindBitMapToleranceIn to something with mask instead? I tried and it said

    (20:4): Unknown identifier 'FindBitmapMaskToleranceIn'

  15. #15
    Join Date
    Aug 2007
    Posts
    1,404
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Something:= LoadCharsFromFont2('Microsoft---'...)
    CreateBitmapMaskFromText('Supersepi /move left',Something)
    if(FindBitmapMaskTolerance...)....

    That is what I would do...

    -Knives

  16. #16
    Join Date
    Sep 2007
    Location
    USA
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by King of Knives View Post
    Something:= LoadCharsFromFont2('Microsoft---'...)
    CreateBitmapMaskFromText('Supersepi /move left',Something)
    if(FindBitmapMaskTolerance...)....

    That is what I would do...

    -Knives
    I don't think that will work because it doesn't seem to pick-up the text on endless (the game I play). I've tried it a few times and it always comes out the same, nothing.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Bitmap problem
    By Pauwelke in forum OSR Help
    Replies: 5
    Last Post: 06-08-2008, 04:56 PM
  2. Bitmap problem
    By Pietpatat in forum OSR Help
    Replies: 3
    Last Post: 02-12-2008, 04:58 PM
  3. Bitmap Problem
    By Kingofptw in forum OSR Help
    Replies: 5
    Last Post: 03-22-2007, 01:43 AM
  4. Multiple Bitmap problem
    By extreme300 in forum OSR Help
    Replies: 3
    Last Post: 02-25-2007, 01:20 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
  •