Results 1 to 4 of 4

Thread: Can't Find Bitmap

  1. #1
    Join Date
    May 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Can't Find Bitmap

    I'm attempting a flax picker as my first script, but I can't get it to walk to the flax field. I tried DTM's and Bitmaps but whenever I do it doesn't find either. So in this one, it's lookin' for the woodcutting bitmap in the lower part of the minimap, always returns that it can't find it.. Any help would be extremely grateful.

    Also, the script is NOWHERE near finished.. So don't bother me about that...

    Code:
    {.Script Info:
    # ScriptName  = Basic Flax Picker
    # Author      = Vagrant
    # Description = Picks flax and banks it.
    # Version     = BETA
    # Date        =
    # Comments    =
    /Script Info}
    
    program BasicFlaxPicker;
    {.include SRL/SRL.scar}
    
    const Bank=99; //Amount of times you'd like to bank
    
    var Clicks,Banked,WcIcon: Integer;
    
    procedure AntiRandoms;
    begin
         FindTalk;
         FindNormalRandoms;
         if (FindFight = true) then
         begin
              RunAwayDirection('N');
              Wait(10000+random(2000));
              RunBack;
         end
    end;
    
    procedure WalkToFlax;
    begin
         repeat
               If FindBitmap(WcIcon,x,y)Then
               begin
                    Mouse(x-10,y-10,2,2,true)
                    Wait(5000+random(5000));
               end else
                    Writeln('Could not find WcIcon, Trying again...');
         until(FindBitmapToleranceIn(WcIcon,x,y,541,89,739,164,10));
         FreeBitmap(WcIcon);
    end;
    
    procedure PickFlax;
    begin
         if (IsUpText('lax')) then
         begin
              GetMousePos(x, y);
              Mouse(x, y, 3, 3, true);
              repeat
                    AntiRandoms;
              until (not (FlagPresent)) and (not (InvCount = 0));
         end
    
         if (FindObj3(x,y,'Pick Flax',15065494,15)) then
         begin
              Mouse(x, y, 1, 1, true);
              repeat
                    AntiRandoms;
              until (not (FlagPresent)) and (not (InvCount = 0));
         end
         Clicks:=Clicks + 1;
    end;
    
    procedure ProgressReport;
    begin
         Cleardebug;
         Writeln('=======Progress Report=======');
         Writeln(TimeRunning);
         Writeln('Clicked ' +IntToStr(Clicks)+ ' Time[s]');
         Writeln('Banked ' +IntToStr(Banked)+ ' Time[s]');
         Writeln('=============================');
    end;
    
    begin
         SetUpSRL;
         Cleardebug;
         Clicks:=0;
         Banked:=0;
         WcIcon := BitmapFromString(15, 15, 'z78DAADD4510E80200800D0' +
         '2B6153CBCF5875FF2395D91A2E409CD1E687C513590AA086539FD' +
         'E20B918316092C68E55040D5CD8F39B19EB9159C56082F3F72C6F' +
         '8AFEAF728A29244E6E98AABC2E3B78B13323B2D099966CE806A99' +
         '976A647B6765B97BF7EF97E3A1CC29BCB9BCC1F28F834EBDAF601' +
         '95D03055998EB4E6C6A9B49FC12DCF17B954DE611AEE0DBAF7A7D' +
         'B233170D79DF8DA170B');
         repeat
               PerfectNorth;
               MakeCompass('N');
               GameTab(4);
               WalkToFlax;
               repeat
                     PickFlax;
               until(InventoryFull)
               //WalkToBank
               ProgressReport;
         until(Banked=Bank);
    end.

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

    Default

    There is a funtion in SRL that searches for a rare tree icon. But I don't know if the name is 'tree'. Check if it works GL
    SCAR Code:
    procedure WalkToFlax;
    begin
         repeat
               If(FindSymbol(x, y, 'tree'))then
               begin
                    Mouse(x-10,y-10,2,2,true)
                    flag; // This waits until the flag on the MiniMap is gone.(until it
                           //stopped walking)
               end else
                    Writeln('Could not find WcIcon, Trying again...');
         until(FindSymbol(x, y, tree))
    end;

  3. #3
    Join Date
    May 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Zomg, thank you so much! Works perfectly.

  4. #4
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Vagrant View Post
    Zomg, thank you so much! Works perfectly.
    No problem If you have any other questions about your script you can post here or PM me.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find Bitmap in Bitmap file
    By fORCE_wORKS in forum RS3 Outdated / Broken Scripts
    Replies: 8
    Last Post: 12-13-2007, 11:04 PM
  2. find bitmap
    By fORCE_wORKS in forum OSR Help
    Replies: 2
    Last Post: 12-13-2007, 04:26 AM
  3. Did debugging and can't find Bitmap
    By fsfhunter in forum OSR Help
    Replies: 0
    Last Post: 10-21-2007, 02:52 AM
  4. Cant' find Bitmap?
    By steth1010 in forum OSR Help
    Replies: 2
    Last Post: 05-09-2007, 08:51 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
  •