Results 1 to 7 of 7

Thread: How do u guys find Ladders?

  1. #1
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default How do u guys find Ladders?

    Well I need to go up a ladder, So I was wondering how everyone else goes up a ladder. Atm I'm using FindcolorTolerance which I hate using. So should I use a bmp and autocolor this? I hate BMPs atm they keep failing more often then they used to.
    Is there an SRL procedure that finds ladders? they made one for doors why not ladders?
    Sleeping...

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

    Default

    There is a FindLadderColor function in SRL that I wrote. It sucks though.

    If I wrote a new one, it would probably be based on the fact that a ladder rotated in any direction has about 30 pixels (26-34?) of the same color out of a total of 40 something pixels.

    I believe the RGB color characteristics in the FindLadderColor are accurate.

    I may whip one up if I get some time today...

  3. #3
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    thx and is this for MM or MS...nevermind I'll check it out. But heh wat's RGB

    EDIT: God wtf happened to ur standards when you wrote that lol
    Sleeping...

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

    Default

    It would be for MM. Is that what you need?

    RGB are the color components of the color you're finding.

    Red, Green, Blue.

  5. #5
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    Oh....and yeah and yeah I need for MM should I just use autocolorthis for MS or findcolor?
    Sleeping...

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

    Default

    Try this out. Seems to work fine.

    Code:
    Function FindLadderColor2:integer;
    var
      GenericColor, a, b, TestColor, Red, Green, Blue : integer;
    var
      i, j, n, ColorCount : integer;
    var
      ColorArray : array of integer;
    begin
      GenericColor := 10837;
      Flag;
      a := MMX1;
      b := MMY1;
      repeat
        b := b + 1;
        repeat;
          a := a + 1;
          if FindColorTolerance(x, y, GenericColor, a, b, MMX2, b, 60) then
          begin
            a := x;
            TestColor := GetColor(x, y);
            red := (TestColor mod 256);
            green := ((TestColor / 256) mod 256);
            blue := ((TestColor / 256) / 256);
            if Green >= 5 then if Green <= 70 then
            if Green - Blue >= 5 then if Green - Blue <= 60 then
            if Red >= 55 then if Red <= 115 then
            if Blue <= 30 then
            if Red - Green >= 25 then if Red - Green <= 65 then
            if Red - Blue >= 55 then if Red - Blue <= 105 then
            begin
              SetArrayLength(ColorArray,32);
              n:=0;
              for i:= 0 to 3 do
              begin
                for j:= 0 to 7 do
                begin
                  ColorArray[n]:=GetColor(a+i,b-3+j); //Will get the colors around the found color to count the pixels
                  n:=n+1;
                end;
              end;
              ColorCount:=0;
              for n:= 0 to 31 do
              begin
                if ColorArray[n]=TestColor then ColorCount:=ColorCount+1;
              end;
              if ColorCount<17 then if ColorCount>12 then
              begin
                Result := TestColor;
                WriteLn('Ladder color = ' + IntToStr(TestColor)
                +
                ' at ' + IntToStr(a) + ',' + IntToStr(b));
                Exit;
              end;
            end;
          end else a := MMX2;
        until a >= MMX2;
        a := MMX1;
      until b >= MMY2;
      WriteLn('Could not find Ladder Color!');
      Result := 0;
    end;
    BTW, when anything is committed to SRL, it has to be 'standardized', and for some reason the if..then statements had to be tabbed in each time. I hate it, but that's how it ended up looking. It originally looked this this one.

    And I would probably use a FindObj type procedure or a FindColorTolerance scan to find the ladder on the MS once you get to it.

  7. #7
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    THX! works awesomely. But while ur still Hopefully watching this thread could you plz plz plz! tell me why this stupid Stupid ClickOption doesn't work. Actually I don't think it's the ClickOption problem but anyway. It moves the mouse and then it doesn't begin the loop. and it isn't the IsUpText because the text is up and I even took the IsUpText bit out and it didn't work. Doesn't matter what I replace the ClickOption is it just doesn't do that loop all together.

    SCAR Code:
    procedure makebowstring;
    begin
      Wait(500+random(300))
      if (FindColorTolerance(x, y, 7444647, 180, 59, 333, 161, 30)) then
     begin
       MMouse(x, y, 2, 2)
       if (IsUpText('ake')) then
       begin
         repeat
           ClickOption('X',1)
           wait(2000+random(700))
         until(FindText(x, y, 'eed flax', smallchars, 52, 414, 113, 432))
       end;
    end else
    begin
      Writeln('Text wasn''t up for making bowstring')
    end;
    end;

    Hope it's not something too obvious :s

    thx again and in advance!

    EDIT: dw I'm an idiot forgot mouse
    Sleeping...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with doors and ladders
    By senrath in forum OSR Help
    Replies: 4
    Last Post: 04-18-2007, 02:18 PM
  2. yo guys
    By hkftz in forum Who Are You ? Who ? Who ?
    Replies: 1
    Last Post: 02-03-2007, 01:47 PM
  3. Hi Guys
    By Sky1992 in forum Who Are You ? Who ? Who ?
    Replies: 0
    Last Post: 01-21-2007, 07:43 PM
  4. Hello!!!!!!!!!!!!!!!!!!!!guys!!!!
    By zhdyummy in forum Who Are You ? Who ? Who ?
    Replies: 3
    Last Post: 01-21-2007, 07:12 PM
  5. HAHAHA guys guys look at this (chinese people and there bot)
    By Mutant Squirrle in forum Bot Information and Spottings
    Replies: 15
    Last Post: 05-30-2006, 02:54 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
  •