Results 1 to 12 of 12

Thread: Confused

  1. #1
    Join Date
    Dec 2007
    Location
    Indiana
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Confused

    SCAR Code:
    procedure Find_Ladders_Up;
    var x,y,ladder1,ladder2,Tol,i: integer;
    begin
      activateclient;
      ladder1:= AutoColorIt(3040897);
      ladder2:= AutoColorIt(4157320);
      Tol:= 5;
      i:= 0;
      repeat
        i:= i + 1;
        if FindObjEx(x,y,['adder'],[ladder1,ladder2],Tol,50,msx1,msy1,msx2,msy2) then
        begin
          Mouse(x,y,0,0,true);
          Flag;
          Exit;
        end;
        Tol:= Tol + 5;
        ChangeCompass;
        if i = 2 then
        begin
          Find_Entrance;
        end;
      until (i>=3);
      Logout;
    end;

    ok so this is my ladder finding procedure, right outside of the mining guild. the only problem is that the mouse just moves along the bottom edge of the mainscreen (msx1,msy1,msx2,msy2). what am i doing wrong?
    Current Project:
    *Massive Multi-Miner*

    if (not(OnSrlForums)) then
    begin
    CheckBed;
    CheckWork;
    end;

  2. #2
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    use FindObjCustom

    also instead of repeat use

    SCAR Code:
    for i:=0 to 3 do
    ...//whatever you want to do
    Project: Welcome To Rainbow

  3. #3
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    repeat works just as well...
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  4. #4
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    for looks cleaner

    that's all, just a suggestion
    Project: Welcome To Rainbow

  5. #5
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Try to find ladders in MSX1-10, MSY1-10, MSX2-10, MSY2-10
    Should work. If not, the problem is propably in the autocoloring or smtng

  6. #6
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why not use FindLadderColor?

    Pretty sure it exists
    Project: Welcome To Rainbow

  7. #7
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by benjaa View Post
    Why not use FindLadderColor?

    Pretty sure it exists
    couldin't find it using Ctrl + space..

    don't think it exists =X

  8. #8
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes it does...

    SCAR Code:
    {*******************************************************************************
    function FindLadderColor: Integer;
    By: Tarajunky
    Description: Autodetects Ladder Color on Minimap
    *******************************************************************************}


    function FindLadderColor:integer;
    var
      GC, ColorCount, a, i, j, n, l, TestColor, Red, Green, Blue : integer;
    var
      ColorArray : array of integer;
    var
      P : array of Tpoint;
    begin
      GC := 10837;
      Flag;
      FindColorsSpiralTolerance(MMCX, MMCY, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
      l:=GetArrayLength(P);
      SetArrayLength(ColorArray,32);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        if rs_OnMinimap(P[a].x,P[a].y) then
        begin
          TestColor := GetColor(P[a].x,P[a].y);
          if SimilarColors(TestColor,GC,60) then
          begin
            ColorToRGB(TestColor,Red,Green,Blue);
            if Blue <= 30 then if Red - Blue <= 105 then if Red <= 115 then
              if Green <= 70 then if Green >= 5 then if Green - Blue >= 5 then
                if Green - Blue <= 60 then if Red >= 55 then
                  if InRange((Red - Green),25,65) then
                    if Red - Blue >= 55 then
                    begin
                      n:=0;
                      for i:= 0 to 3 do
                      begin
                        for j:= 0 to 7 do
                        begin
                          ColorArray[n]:=GetColor(P[a].x+i,P[a].y-3+j);
                          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(P[a].x) + ',' + IntToStr(P[a].y));
                        Exit;
                      end;
                    end;
          end;
        end;
      end;
      WriteLn('Could not find Ladder Color!');
      Result := 0;
    end;
    Project: Welcome To Rainbow

  9. #9
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you want to find the ladders in the minimap? then you should use RadialWalk for that and the coords are MMX1, MMY1, MMX2 and MMY2.


  10. #10
    Join Date
    Dec 2007
    Location
    Indiana
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by benjaa View Post
    use FindObjCustom

    also instead of repeat use

    SCAR Code:
    for i:=0 to 3 do
    ...//whatever you want to do
    why would i want to use FindObjCustom? I wanted to input my own cords and i dont think FindObjCustom allows for that.

    Quote Originally Posted by marpis View Post
    Try to find ladders in MSX1-10, MSY1-10, MSX2-10, MSY2-10
    Should work. If not, the problem is propably in the autocoloring or smtng
    I just tried this and it solves my problem . now i just gotta get my autocoloring straight so the mouse doesnt search all around real botty-like.
    Thanx

    Quote Originally Posted by benjaa View Post
    Why not use FindLadderColor?

    Pretty sure it exists
    I'll try it.

    Quote Originally Posted by Cazax View Post
    Do you want to find the ladders in the minimap? then you should use RadialWalk for that and the coords are MMX1, MMY1, MMX2 and MMY2.
    Nah, i was trying to find the ladders on the MS. i already have a procedure to get the ladders in view using DDTM finding on the MM. Btw im sure u noticed im using ur autocoloring function h):
    Current Project:
    *Massive Multi-Miner*

    if (not(OnSrlForums)) then
    begin
    CheckBed;
    CheckWork;
    end;

  11. #11
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by massive630 View Post
    why would i want to use FindObjCustom? I wanted to input my own cords and i dont think FindObjCustom allows for that.



    I just tried this and it solves my problem . now i just gotta get my autocoloring straight so the mouse doesnt search all around real botty-like.
    Thanx



    I'll try it.



    Nah, i was trying to find the ladders on the MS. i already have a procedure to get the ladders in view using DDTM finding on the MM. Btw im sure u noticed im using ur autocoloring function h):
    My AutoColor function only works for the minimap, and FindLadderColor too.


  12. #12
    Join Date
    Dec 2007
    Location
    Indiana
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Cazax View Post
    My AutoColor function only works for the minimap, and FindLadderColor too.
    jeez man well that solves my problem. haha darn, so i guess that means im gunna have to learn how to auto color the hard way
    Current Project:
    *Massive Multi-Miner*

    if (not(OnSrlForums)) then
    begin
    CheckBed;
    CheckWork;
    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. confused
    By Dynamite in forum OSR Help
    Replies: 2
    Last Post: 01-27-2008, 10:09 AM
  2. I'm a little confused
    By 499185 in forum SRL Site Discussion
    Replies: 5
    Last Post: 09-21-2007, 04:23 AM
  3. UID.dat .. really confused to what it does :S:S
    By koolkishan in forum News and General
    Replies: 13
    Last Post: 09-07-2007, 08:25 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
  •