Troubles with bitmaps...sometimes?

Discussion in 'Scar/Simba Help' started by wargy, Jun 23, 2008.

Troubles with bitmaps...sometimes?
  1. Unread #1 - Jun 23, 2008 at 3:22 AM
  2. wargy
    Referrals:
    0

    wargy Guest

    Troubles with bitmaps...sometimes?

    Can't quite figure out what the problem is, pretty sure my actual code is correct because FindBitmap() works for text but not for NPCS,trees,etc.
    I load the BMP for banker with
    Code:
    procedure LoadBMPS;
    begin
           banker := BitmapFromString(9, 8, 'beNpzd8/PyCjMyrIyNYWjuIiI' +
           'hvLyutLS3NRUIJpeEhZopwtB69uTq4oKa4qLwwMDgSg7ORmOyvJyI' +
           'SjIxwdoQlJ0NBxBFACNCvXzg6Co4GAgAiqDI09XVwgCakdGQClnOz' +
           'sIgigI8PKEI1sLCyBysLaGI193dxACAARnR0Q=');
    end;
    and try to move my mouse to the banker and right click with

    Code:
    procedure BankOpen;
    begin
    FindBitmap(banker,x,y);
    Wait(1000);
    MoveMouseSmooth(x,y);
    Wait(10 + Random(10));
    ClickMouse(x,y,False);
    end;
    
    EDIT: Mmm, read somewhere main screen items are not static? Explains a lot, yet text such as bank quick deposit must be static.

    Never seems to work, just puts my mouse at (0,0) client coords and clicks there. Thanks for the help, once I get this fixed I'll be able to write scripts a LOT more effectively than using coordinates to find things -.-
     
  3. Unread #2 - Jun 25, 2008 at 9:23 AM
  4. Nightmare0
    Joined:
    Mar 31, 2007
    Posts:
    104
    Referrals:
    0
    Sythe Gold:
    0

    Nightmare0 Active Member

    Troubles with bitmaps...sometimes?

    It moves to (0,0) because it could not locate your bitmap. Bitmaps are tricky because the image has to be good, and remember when you minimize the size, you also change the background to black - a color SCAR doesn't look for. What works even better are DTM's, because you can pinpoint certain colors on certain locations of the image that SCAR will look for. Also, if this script is just for learning, that's fine, but if you're applying it to the actual runescape game, you'll want to use better functions than MoveMouseSmooth and ClickMouse. Neither of those are humane enough to keep their banning system away. SRL is great for that.

    Lastly, you've made the procedure to call upon your bitmap of the banker, however you don't include it in your banking procedure. You would need to call upon that procedure in your banking procedure:

    Code:
    procedure BankOpen;
    begin
    LoadBMPS;
    FindBitmap(Banker,x,y);
    //rest of script
    FreeBitmap(banker);
    ALWAYS free your bitmaps.
     
< Need Help Please! | [HELP] Scar. >

Users viewing this thread
1 guest


 
 
Adblock breaks this site