Results 1 to 3 of 3

Thread: Need help with finding ore in LRC

  1. #1
    Join Date
    Jan 2012
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Need help with finding ore in LRC

    hey i'm trying to fix this script it seems to can't find the ore properly i need to rotate the camera 90 degree and it will find it, but after i do that the walking process seems to mess up. Thanks

    Code:
    Function FindGold:
    Var
      H1,H2, I2, CTS, A, B, C, D, Walk,Height,Width,ColorCount: Integer;
      pArray: TPointArray;
      aPArray: T2DPointArray;
    Begin
      If Debug Then
        FunctionStop:= 'FindGold: Entered';
    
      If Not LoggedIn Then
        Exit;
    
      If FindNormalRandoms Then
      Begin
        MakeCompass('N');
        SetAngle(SRL_ANGLE_HIGH);
        If Debug Then
          Writeln('FOUND NORMAL RANDOM');
      End;
    
      If InvFull Then
      Begin
        If Debug Then
          Writeln('IN GOLD INV FULL');
        Result := True;
        Exit;
      End;
    
      If Walk >= 2 Then
      Begin
        If Debug Then
          Writeln('CLICKED TWICE ON ROCK, NO MORE!');
        Result := True;
        Walk := 0;
        Exit;
      End;
    
      If Spot = 1 Then
      Begin
        If OnScreen Then
          SMART_DrawText(E,F,StatChars,'Looking For Gold, Low Spot',clWhite);
    
        A:=140;
        B:=120;
        C:=251;
        D:=259;
    
        Width:= 10;
        Height:= 18;
        ColorCount := 80;
    
        If Debug Then
          Writeln('LOOKING FOR GOLD LOW SPOT');
    
     //   If Debug Then
    //      SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
      End Else
        Begin
          If OnScreen Then
            SMART_DrawText(E,F,StatChars,'Looking For Gold, High Spot',clWhite);
    
          A:=101;
          B:=40;
          C:=379;
          D:=240;
    
          Width:= 15;
          Height:= 10;
          ColorCount := 80;
    
          If Debug Then
            Writeln('LOOKING FOR GOLD HIGH SPOT');
    
     //     If Debug Then
     //       SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
        End;
    
      If ((EmptySpot>=3) And (Spot = 1)) Then
      Begin
        SMART_ClearMS;
    
        If OnScreen Then
          SMART_DrawText(E,F,StatChars,'Looking For Coal, Low Spot',clWhite);
    
        A:=26;
        B:=110;
        C:=365;
        D:=MSY2;
    
        Width:= 20;
        Height:= 20;
        ColorCount := 80;
    
        If Debug Then
          Writeln('LOOKING FOR COAL');
    
     //   If Debug Then
     //     SMART_DrawBoxEx(False, IntToBox(A, B, C, D), clRed);
      End;
    
      Wait(RandomRange(400,500));
      MouseSpeed := RandomRange(17, 18);
    
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.04, 0.12);
      FindColorsSpiralTolerance(MSCX, MSCY, pArray, 4284788, MSX1, MSY1, MSX2, MSY2, 5);
      aPArray := SplitTPAEx(pArray, 10, 10);
    
      SortATPASize(aPArray,True);
    
      If Debug Then
        DebugATPABounds(aPArray);
    
      If (Length(aPArray) = 0) Then
      Begin
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        If Debug Then
          Writeln('DIDNT FIND ANY DEPOSIT ROCK');
        Result := False;
      End;
    
      H1 := High(aPArray);
      If H1 < 2 Then
      Begin
        H2 := H1;
      End Else
        Begin
          If Spot = 1 Then
          Begin
            H2 := 1;
          End Else
            H2 := 2;
        End;
    
      For I2 := 0 To H2 Do
      Begin
        MiddleTPAEx(aPArray[I2], GoldX, GoldY);
    
        If Length(aPArray[I2]) < 900 then
          Continue;
    
        MMouse(GoldX, GoldY, 8, 8);
    
        If (WaitUpTextMulti(['posit','neral','depo'],RandomRange(300,400))) Then
        Begin
          If Debug Then
            Writeln('FOUND ORE DEPOSIT, CLICKING');
    
          ClickMouse2(False);
    
          ColorToleranceSpeed(CTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
    
          If WaitOptionMulti(['ine Min', 'ine M', 'ne Min'],RandomRange(400,500)) Then
          Begin
            If Debug Then
              Writeln('FOUND MINE OPTION');
    
            Result := True;
    
            MMouse(GoldX, GoldY, 4, 4);
    
            Wait(RandomRange(200,300));
            GetMousePos(GoldX,GoldY);
    
            Exit;
          End Else
          Begin
            If Debug Then
              Writeln('DID NOT FIND MINE OPTION, TRYING AGAIN');
            MMouse(50,50,100,100);
            Exit;
    
          End;
        End;
      End;
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      If Debug Then
        FunctionStop:= 'FindGold: Finished';
    End;
    Script it's not mine.

  2. #2
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    just change the compass back to north after...?

  3. #3
    Join Date
    Dec 2011
    Posts
    414
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    If it gets screwed up after turning the camera 90 degrees, once you're done mining just change the camera angle back to what it was originally then the walking will be fine.

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •