Results 1 to 10 of 10

Thread: need a uber gas finding function

  1. #1
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    need a uber gas finding function

    Dos anyone have a non reflection gas finding function?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  2. #2
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    i could make u one if u could upload some pics

  3. #3
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    thanks pics of gas?
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  4. #4
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    ye pm me im going out make when i get back round 9:00-10:00
    make sure u get right detail as well just get whole main screen
    (MSX1, MSY1, MSX2, MSY2)

  5. #5
    Join Date
    Sep 2008
    Location
    Chicago
    Posts
    224
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Heres some pics I have but last time I checked the srl gas finder worked fine.







  6. #6
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    thanks man..
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  7. #7
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {*******************************************************************************
    function FindGas(gx, gy: Integer): Boolean;
    By: Nielsie95 and Sumilion
    Description: gx, gy are the coordinates of the found ore color
    *******************************************************************************}


    function FindGas(gx, gy: Integer): Boolean;
    var
      arP: TPointArray;
      c: TIntegerArray;
      i, l, t, m, r, g, b, x, y: Integer;
      Bounds: TBox;
      P: TPoint;
    begin
      if not InRange(gx, MSX1, MSX2) or not InRange(gy, MSY1, MSY2) then
        Exit;
       
      ColorToleranceSpeed(2);
      t := 0;
      m := 0;
      SetColorspeed2Modifiers(0.13, 0.77);
      if not FindColorTolerance(x, y, 10070706, gx - 30, gy - 30, gx + 30, gy + 30, 9) then
      begin
        ColorToleranceSpeed(1);
        SetColorspeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      FindColorsTolerance(arP, 5335923, 3, 3, 515, 336, 6);
      while True do
      begin
        if (Length(arP) < 3) then Break;
        Bounds := GetTPABounds(arP);
        SetColorspeed2Modifiers(0.1, 0.4);
        FindColorsTolerance(arP, 7244690, Max(Bounds.x1 - 15, 0), Max(Bounds.y1 - 15, 0), Min(Bounds.x2 + 15, 515), Min(Bounds.y2 + 35, 336), 20);
        if (Length(arP) < 65) then Break;
        c := GetColors(arP);
        l := High(c);
        for i := 0 to l do
        begin
          ColorToRGB(c[i], r, g, b);
          m := m + r + g + b;
        end;
        m := (m / (l + 1)) / 3;
        for i := 0 to l do
        begin
          ColorToRGB(c[i], r, g, b);
          r := iAbs(m - (r + b + g) / 3);
          if (r < 15) then
            Inc(t);
        end;
        Result := ((t / l * 1.0) < 0.85) and (Extended(t / l * 1.0) > 0.15);
        if Result then
        begin
          P := MiddleTPA(arP);
          Result := (Distance(P.x, P.y, MSCX, MSCY) < 80);
        end;
        Break;
      end;

      ColorToleranceSpeed(1);
      SetColorspeed2Modifiers(0.2, 0.2);
    end;

    You should already have it. It is in includes/srl/srl/skill/mining.scar

  8. #8
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    i only asked as i was told that wasnt working very well!
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  9. #9
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    It doesn't work that well.
    Use Wizzups:

    SCAR Code:
    function GasFinder(GX, GY : Integer): Boolean;   //Thanks Wizzup!
    Var
       x1, y1, x2, y2, I, time, c: Integer;
       R, G, B: Integer;
       H, S, L: ExtEnded;
       X, Y, Z: ExtEnded;
       Gas, Gas2: TPointArray;
       Colors, C2: TIntegerArray;
    begin
      Try
        x1 := gx - 35;
        If x1 < 0 Then
          x1 := 0;
        y1 := gy - 35;
        If y1 < 0 Then
          y1 := 0;
        x2 := gx + 35;
        If x2 > 515 Then
          x2 := 515;
        y2 := gy + 35;
        If y2 > 336 Then
          y2 := 336;
        Time := GetSystemTime;
        Result := False;
        c := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2ModIfiers(0.2, 0.2);
        FindColorsTolerance(Gas, 8886170, x1, y1, x2, y2, 20);
        ColorToleranceSpeed(c);
        If length(Gas) < 10 Then
          Exit;
        Colors := GetColors(Gas);
        C2 := Colors;
        ClearSameIntegers(C2);
      //  writeln('Colors Length: ' + inttostr(length(colors)));
       // writeln('C2 Length: ' + inttostr(length(C2)));
        If Length(C2) < 40 Then
          Exit;
        For I := 0 To High(Gas) Do
        Begin
          ColorToRGB(Colors[I], R, G, B);
          If Abs(R - G) <= 10.0 Then
          Begin
            ColorToHSL(Colors[I], H, S, L);
            If (H > 11.5) And (H < 16.0) And (S < 12.0) Then
            Begin
              ColorToXYZ(Colors[I], X, Y, Z);
              If (Abs(X - Y) < 5.0) And (Abs(X - Z) < 5.0) And (Abs(Y - Z) < 5.0) Then
              Begin
                SetLength(Gas2, Length(Gas2) + 1);
                Gas2[High(Gas2)] := Gas[I];
              End;
            End;
          End;
        End;
        //WriteLn('time: ' + IntToStr(GetSystemTime - Time));
        //WriteLn('gas2 length: ' + IntToStr(Length(Gas2)));
        Result := (Length(Gas2) > 30); // The only number you might want to tweak.
        //debugtpa(Gas2, '');
        if result then
        begin
          SaveScreenshot(ScriptPath + 'Found WIZZUP gas ' + TimeRunning + '.bmp')
          Exit;
        end;
        //debugtpa(gas2, '');
      Except WriteLn('No window selected'); end;
    End;

  10. #10
    Join Date
    Dec 2007
    Posts
    2,112
    Mentioned
    71 Post(s)
    Quoted
    580 Post(s)

    Default

    here this is the one i made with the pics posted has Not been tested!!!
    SCAR Code:
    Function FindColRecGas(X, Y : Integer) : Boolean;
    Var
      ColorRecord : TAutoColorInfo;
    Begin  
      With ColorRecord Do
      Begin
        MinCount := 50;
        Color := 6850196;
        HueMod := 0.08;
        SatMod := 0.71;
        LumTol := 10;
        MinR := 126; MaxR := 167;
        MinG := 110; MaxG := 156;
        MinB := 76; MaxB := 140;
        MinX := 15.76; MaxX := 31.10;
        MinY := 16.40; MaxY := 32.90;
        MinZ := 9.34; MaxZ := 29.15;
      End;
      Result := FindColorRecordEx(x, y, ColorRecord, MSX1, MSY1, MSX2, MSY2, True);
    End;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-23-2008, 03:37 AM
  2. Good Tree Finding Function?
    By TViYH in forum OSR Help
    Replies: 11
    Last Post: 09-03-2008, 12:48 AM
  3. function InSector (may be useful for ent finding)
    By markuska815 in forum RS3 Outdated / Broken Scripts
    Replies: 0
    Last Post: 05-10-2007, 09:51 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
  •