Results 1 to 6 of 6

Thread: minimap ladder finding help

  1. #1
    Join Date
    Jun 2006
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default minimap ladder finding help

    hey guys i am trying to make a procedure or function that can find the ladder symbol on the minimap how ever the ladder keeps changing slightly i got about 5 different bitmaps of it but it still doesnt working

    anyway what i was wondering is if there is a better way to find a ladder symbol thing on the minimap i have tried using dtm an bitmaps but none of them seems to work for me if you could write up a function or procecure that can find it i would be very very very happy.

    this is what i had so far:

    SCAR Code:
    begin

    repeat
    if not LoggedIn then Exit;
    wait(100 +random(100));
    F:=F+1
    if F=25 then begin writeln('ERROR: can not find ladder bitmap'); Logout; exit; TerminateScript end;
    until(FindBitMapTol(X, Y, ladder, 552, 8, 714, 148)) or (FindBitMapTol(X, Y, ladder5, 552, 8, 714, 148)) or (FindBitMapTol(X, Y, ladder6, 552, 8, 714, 148)) or (FindBitMapTol(X, Y, ladder7, 552, 8, 714, 148))  or (FindBitMapTol(X, Y, ladder8, 552, 8, 714, 148)) or (FindBitMapTol(X, Y, ladder9, 552, 8, 714, 148));
    Mouse(x-15, y-25 , 4 , 4, true);

    end;


    these are the bitmaps i use:


    SCAR Code:
    ladder := BitmapFromString(4, 8, 'z78DA3373327636B030C3413A' +
           '193B5A3AA29066834C3D00654C2B99');

    ladder5 := BitmapFromString(8, 10, 'z78DA7334B234B734752491' +
           '347135B43030C04F62AAC76F1AFDCDC76F172EF7506E3EA9E1EC4' +
           '8561C4148003B86679E');

     ladder6 := BitmapFromString(8, 10, 'z78DAB37036773577B32091' +
           '347531363370C14F62AAC76FDAA8F9C49B4F3C090085A77081');

    ladder7 := BitmapFromString(10, 11, 'z78DAB37036773177B5A01' +
           '2696664EC68E0829FC4AF975459626CC4AF97181FD1D35E6264E9' +
           '19C2C4C73BB5521100A2279A57');

    ladder8 := BitmapFromString(8, 10, 'z78DAB374B270B670B52491' +
           '347533723470C34F62AAC76FDAA8F9C49B4F3C090013B57211');

    ladder9 := BitmapFromString(8, 10, 'z78DA733271B47074742291' +
           '3475353234208A44564F8C99B4301F53967893A96B3E2E9F1213C' +
           'EA4C60E840D00B2636E88');




    if anyone could please help me make or find a better function or procedure i would be very very very happy thanks for reading this

  2. #2
    Join Date
    Sep 2006
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    For one, just make the script easier on the parser and on the eyes. I'm doing an essay right now, so I can't open RS, but I'll edit with a solution.
    SCAR Code:
    procedure whatever;
    begin
    repeat
      if(not(LoggedIn)) then Exit;
      Wait(100 + random(100));
      F := F + 1;
      if(F = 25) then
      begin
        WriteLn('ERROR: Cannot find ladder bitmap');
        Logout;
        exit;
        TerminateScript;
      end;
    until(FindBitMapTol(X, Y, ladder, 552, 8, 714, 148) or FindBitMapTol(X, Y, ladder5, 552, 8, 714, 148) or FindBitMapTol(X, Y, ladder6, 552, 8, 714, 148) or FindBitMapTol(X, Y, ladder7, 552, 8, 714, 148)  or FindBitMapTol(X, Y, ladder8, 552, 8, 714, 148) or FindBitMapTol(X, Y, ladder9, 552, 8, 714, 148));
    Mouse(x-15, y-25 , 4 , 4, true);
    end;

  3. #3
    Join Date
    Oct 2006
    Location
    Ontario,Canada
    Posts
    1,718
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    would this work instead?

    function FindLadderColor: Integer;
    By: Tarajunky
    Description: Autodetects Ladder Color on Minimap

    just have the script find the color then click the color

    eg:
    SCAR Code:
    Procedure ladder;
    var
      laddercolor:integer;
    begin
      Laddercolor:=Findladdercolor;
      if FindColor( x, y, LadderColor, MMX1, MMY1, MMX2, MMY2 ) then
      Mouse( x, y, 2, 2, true );
      else
      Logout;
      TerminateScript;
    end;

  4. #4
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, that procedure should work pretty well. You do need the minimap to be nearly north for it to work reliably though.

    If it doesn't work there are two possible problems. One is if the actual color of the ladder is outside the range I set for the search. I tested 40-50 ladder colors, so that should not be a problem MOST of the time, but it's still possible. The other possible problem is if the ladder is rotated too much. The closer to north it is, the more reliable it should be. If the ladder is perfectly upright then it should work 100%. If it doesn't please post the color here or PM it to me so I can update the color range.

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    autocolor.scar pwns

  6. #6
    Join Date
    Jun 2006
    Posts
    69
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    whos proceudure mine or xcanadamanx ?
    if you mean mine then i always have minimap north

    thanks xcanadamanx i will give yours a try an see how it go's

    edit: still having trouble nothing seems to work

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Finding things on the Minimap..
    By itSchRis917 in forum OSR Help
    Replies: 13
    Last Post: 07-27-2007, 03:44 AM
  2. stair/ladder and door and gate finding help plz???
    By RudeBoiAlex in forum OSR Help
    Replies: 2
    Last Post: 06-13-2007, 04:57 PM
  3. ladder finding
    By Mjordan in forum OSR Help
    Replies: 12
    Last Post: 02-06-2007, 12:05 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
  •