Page 33 of 53 FirstFirst ... 23313233343543 ... LastLast
Results 801 to 825 of 1302

Thread: [C]Livid Farmer

  1. #801
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did everything i was supposed to, i think. anyway i am getting this error:

    [Hint] C:\Simba\Includes\SRL/SRL/core/antirandoms\randomtool.simba(215:3): Variable 'T' never used at line 214
    Compiled successfully in 967 ms.
    SRL Compiled in 16 msec
    ** Smart Cannot Spawn Clients **
    Successfully executed.

  2. #802
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm using the latest simba/srl/smart.

    I'm having an issue where the script will only fertilize. The cursor hovers over the diseased plants as if to cure but only does it about 1/10 of the time.

    Any ideas as to what I'm doing wrong?

  3. #803
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by hfbrads2 View Post
    I'm using the latest simba/srl/smart.

    I'm having an issue where the script will only fertilize. The cursor hovers over the diseased plants as if to cure but only does it about 1/10 of the time.

    Any ideas as to what I'm doing wrong?
    It doesn't sound like a problem on your end as the script still correctly finds the diseased plants. It sounds to me like an UpText issue. What version of the script are you using mate?

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #804
    Join Date
    May 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried using 1.4 and 1.3 and both had the same issues.

    I ran it for about 30 minutes and I was getting about 15k farming xp/hr. Graphic settings on minimum in fixed mode.

  5. #805
    Join Date
    Jan 2011
    Posts
    350
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I've had it miss a couple plants and fertilizing on the too row.

  6. #806
    Join Date
    Apr 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    v1.3 misses plants for me also, usually the one directly in front of me, (north) and both plants and fertilize spots in the farthest north row. Cursor hovers over them but doesn't appear to realize they need taken care of.

    v1.4 only seems to walk back and forth, North/South over and over, but never seems to get going.

  7. #807
    Join Date
    Jan 2011
    Posts
    350
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by ADR1234 View Post
    v1.3 misses plants for me also, usually the one directly in front of me, (north) and both plants and fertilize spots in the farthest north row. Cursor hovers over them but doesn't appear to realize they need taken care of.

    v1.4 only seems to walk back and forth, North/South over and over, but never seems to get going.
    same here except v1.4 does the walking after every fertilize or plant.

    V1.3 works but misses plants and spots sometimes.

  8. #808
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by adr1234 View Post
    v1.3 misses plants for me also, usually the one directly in front of me, (north) and both plants and fertilize spots in the farthest north row. Cursor hovers over them but doesn't appear to realize they need taken care of.

    V1.4 only seems to walk back and forth, north/south over and over, but never seems to get going.


    same!

  9. #809
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Sure is weird, the last time I've used the script the diseased plants were recognized 100% of the time. I'm quite sure that was under two weeks ago; could there have been a graphical update in that area since then? When I get back from running this morning I'll go ahead and run the script myself. Should worst come to worst I'll only need to change some colors for the diseased plants.

    Sorry about the problems fellas. :/

    Edit:
    Running it right now (V.1.41) and it's working just fine on both PS and Lape. Who would like to test out V.1.41? Any one of you who are having trouble with the script not finding & curing the diseased plants.
    Last edited by Flight; 09-06-2012 at 09:53 AM.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  10. #810
    Join Date
    Apr 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Running it right now (V.1.41) and it's working just fine on both PS and Lape. Who would like to test out V.1.41? Any one of you who are having trouble with the script not finding & curing the diseased plants.
    I would be happy to give it a go

  11. #811
    Join Date
    Feb 2012
    Location
    Florida
    Posts
    153
    Mentioned
    1 Post(s)
    Quoted
    7 Post(s)

    Default

    I'd like to test it out !

  12. #812
    Join Date
    Jul 2012
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'd like 1.41 please

  13. #813
    Join Date
    Jan 2011
    Posts
    350
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Why not I'll take 1.41 also

  14. #814
    Join Date
    Apr 2012
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Would be awsome if i could be one of the first to use 1.41, good luck 99 farming!

  15. #815
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Well Flight you captured my interest. Needed some epic farming xp so decided to try out your script. I came across a couple of issues.

    First, as stated above, it couldn't decide if I was on the correct tile so it kept moving me one space back and for from the correct spot to one spot south and back. Since I was just doing the garden section only I took out that check.

    Second, I noticed that most of the time when a diseased plant it on the closest spot directly north of the player, the script would ignore it. I just decreased the no no zone around the player you put in and now it works everytime.

    Third, sometimes the diseased plants were found and the mouse would go to it, but it would not be able to detect which type it was and would thus loop for the next few minutes until the spots reset (goto jump). What I did for this was to instead of just retrying to find which type it was, I had it guess 1, then if that was wrong, try to identify again, if still no identify - guess 2, so on until it has guessed all 4 options.

    Fourth, there were some random misidentifications and failure to identify soil spots. I am too dumb for how you identified them so I came up with my own method. Pretty much what it does is breaks each spot up into a box and it searches each box for the green color, if it doesn't find the green color it searches for a dtm I made of the empty patch that is pretty general, but it won't misidentify the diseased plants either. If it finds the dtm it will go to the spot and check for it. It will randomly mix up the order in which it searches the boxes so it won't always go left to right top to bottom.

    I also prefer a custom progress report so i put in one of mine too. For the progress report to work accurately, your first counter must be set to magic and your second set to farming.
    Ex:
    Progress Report:
    =========Flights LividFarmer=========
    ============Version: 1.41============
    Time Running: 1 Hours, 53 Minutes and 50 Seconds
    Magic XP: 50790
    Magic XP/H: 26770
    Farming XP: 63250
    Farming XP/H: 33337
    =====================================


    I took out all the functions I wasn't using so this code is only good if you are in the designated spot in the OP. You are more than welcome to take whatever suggestions or code from here! If you would prefer I take it down, no problem!

    Simba Code:
    Program LividFarmer;
      {$DEFINE SMART}
      {$i SRL/srl.simba}
      {$i SRL/SRL/misc/MouseHandler.simba}
      {$i SRL/SRL/misc/SmartGraphics.simba}
      {$I SRL/SRL/Misc/Debug.Simba}

    //Top xp bar MUST be set to magic, 2nd xp bar MUST be set to farming (IF YOU DON'T IT WILL TIMEOUT AFTER 10MINUTES AND SHUTDOWN!!!)
    //Stand in the spot specified in flights thread
    //Have mud staff equipped and a buttload of nature and astral runes

    ///////////////////////////////////////////////////////////////////////
    //                                                                   //
    //                  Begin of user setup                              //
    //                Fill in the fields below                           //
    //                                                                   //
    ///////////////////////////////////////////////////////////////////////
    Const
      Debug =True;            // ***Keep this on for purty colors***
      SwitchWorlds = False;   // ***Switch worlds after a break?***
      BreakIn      = 280;     // ***How long before we take a break? (minutes)***
      BreakFor     = 20;      // ***How long will we break for? (minutes)***
      Bir          = 30;      // ***Random minutes to add/subtract from how long until we break***
      Bfr          = 7;       // ***Random minutes to add/subjtract from break duraction***

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      With Players[0] Do
      Begin
        Name        := '';
        Pass        := '';
        BoxRewards  := ['Coins', 'oins'];
        WorldInfo   := [96,96];
        Active      := True;
      End;
    End;

    ///////////////////////////////////////////////////////////////////////////////////////////
    //                                                                                       //
    //                            End of user setup                                          //
    //           Don't touch below this line unless you know what you're doing!!             //
    //                                                                                       //
    ///////////////////////////////////////////////////////////////////////////////////////////

    Var
      Version: String;
      Timeout,W,X,Y,Z,RealBTime,CurrentBTime,BreakRounds,TotalBreaks: Integer;
      FarmXP,MageXP,ReportTime,StartFarm,StartMagic,SpotDTM: Integer;
      Box1,Box2,Box3,Box4,Box5,Box6,Box7,Box8,Box9,Box10,Box11,Box12,Box13,Box14,Box15: TBox;
      FarmGrid: TBoxArray;
      SCols,PCols: TIntegerArray;

    Procedure LoadVars;
    begin
      Version := '1.41';

      W := (BreakIn * 60000);
      X := (BreakFor * 60000);
      Y := RandomRange(-BIR * 60000, BIR * 60000);
      Z := RandomRange(-BFR * 60000, BFR * 60000);

      Box1 :=IntToBox(131,95-50,164,142-50);
      Box2 :=IntToBox(180,95-50,214,142-50);
      Box3 :=IntToBox(236,95-50,276,142-50);
      Box4 :=IntToBox(288,95-50,328,142-50);
      Box5 :=IntToBox(343,95-50,395,142-50);

      Box6 :=IntToBox(104,162-50,157,225-50);
      Box7 :=IntToBox(168,162-50,217,225-50);
      Box8 :=IntToBox(230,162-50,273,225-50);
      Box9 :=IntToBox(293,162-50,341,225-50);
      Box10:=IntToBox(365,162-50,400,225-50);

      Box11:=IntToBox(95,261-50,144,310-50);
      Box12:=IntToBox(159,261-50,214,310-50);
      Box13:=IntToBox(229,261-50,283,310-50);
      Box14:=IntToBox(294,261-50,350,310-50);
      Box15:=IntToBox(359,261-50,426,310-50);

      FarmGrid:= [Box1,Box2,Box3,Box4,Box5,Box6,Box7,Box8,Box9,Box10,Box11,Box12,Box13,Box14,Box15];

      If Debug Then
        Smart_DrawBoxes(True,False,FarmGrid,clgreen);

      SpotDTM := DTMFromString('mggAAAHicY2NgYGBnZGBQAOI6ILsYiAOAeDsQPwTiBCi/D4itgWpsgDg82JuhduNDhqo0F4bFU2sZfJyMGBb35zD8B6rhx4IZcWAIAABSuA5L');

      SCols := [5073267, 5204854, 5465452, 5402748];          //Soil colors
      PCols := [4542282, 4674124, 4871760, 5003346, 5135188]; //Healthy livid colors
    end;

    Procedure FreeGlobals;
    begin
      FreeDTM(SpotDTM);
    end;

    Function WaitLoggedIn(Time:Integer): Boolean;
    Var
      T: Integer;
    Begin
      MarkTime(T);
      Repeat
        SRL_ResetNavBar;
        If TimeFromMark(T)>Time Then
        Begin
          Result:=False;
          Exit;
        End;
      Until (GetColor(472, 490) = 16777215);
      Result:=True;
    End;

    Procedure ProgressReport;
    Var
      FXPH,MXPH: Integer;
    Begin

      FarmXP:=GetXPBar(2) - StartFarm;
      MageXP:=GetXPBar(1) - StartMagic;

      FXPH := Round(FarmXP * (3600.0 / (GetTimeRunning / 1000.0)));
      MXPH := Round(MageXP * (3600.0 / (GetTimeRunning / 1000.0)));

      Writeln('=========Flights LividFarmer========');
      Writeln('===========Version: '+Version+'=============');
      Writeln('Time Running: ' + TimeRunning);
      Writeln('Magic XP: ' + IntToStr(MageXP));
      Writeln('Magic XP/H: ' + IntToStr(MXPH));
      Writeln('Farming XP: ' + IntToStr(FarmXP));
      Writeln('Farming XP/H: ' + IntToStr(FXPH));
      Writeln('====================================');

      MarkTime(ReportTime);
    End;

    Procedure FailSafe;
    Var
      X,Y: Integer;
    Begin
      If Debug Then
        Writeln('Misclicked, doing failsafe');
      Mouse(249,177,2,2,True);

      Wait(RandomRange(2000,3000));

      Repeat
        Wait(100);
      Until (Not(Ismoving));

      If FindDTM(SpotDTM,X,Y,MSX1,MSY1,MSX2,MSY2) Then
      Begin
        HumanMMouse(X,Y,2,2);
        FastClick(Mouse_Left);
        Wait(RandomRAnge(2000,3000));
      End;

      Repeat
        Wait(100);
      Until (Not(Ismoving));
    End;

    Procedure QuickBoxSort(var A: TIntegerArray; var B: TBoxArray; iLo, iHi: Integer; SortUp: Boolean);
    Var
      Lo, Hi, Mid, T: Integer;
      TP: TBox;
    Begin
      If (Length(A) <> Length(B)) Then
        Exit;
      Lo := iLo;
      Hi := iHi;
      Mid := A[(Lo + Hi) shr 1];
      Repeat
        If SortUp Then
        Begin
          While (A[Lo] < Mid) Do Inc(Lo);
          While (A[Hi] > Mid) Do Dec(Hi);
        End Else
        Begin
          While (A[Lo] > Mid) Do Inc(Lo);
          While (A[Hi] < Mid) Do Dec(Hi);
        End;
        If (Lo <= Hi) Then
        Begin
          T := A[Lo];
          A[Lo] := A[Hi];
          A[Hi] := T;
          TP := B[Lo];
          B[Lo] := B[Hi];
          B[Hi] := TP;
          Inc(Lo);
          Dec(Hi);
        End;
      Until Lo > Hi;
      If (Hi > iLo) Then QuickBoxSort(A, B, iLo, Hi, SortUp);
      If (Lo < iHi) Then QuickBoxSort(A, B, Lo, iHi, SortUp);
    End;


    {*
      Sorts A TBoxArray by Mid-Point. Closest OverallBox by Midpoint to the From-Point First.
    *}

    Procedure MidSortBoxArrayFrom(Var BoxArray: TBoxArray; Const From: TPoint);
    Var
       I,L: Integer;
       Mid: TPoint;
       DistArr: TIntegerArray;
    Begin
      L := High(BoxArray);
      If (L < 0) Then
        Exit;
      SetLength(DistArr, L + 1);

      For I := 0 To L Do
      Begin
        Mid := MiddleBox(BoxArray[I]);
        DistArr[I] := Round(Sqr(From.X - Mid.X) + Sqr(From.Y - Mid.Y));
      End;

      QuickBoxSort(DistArr,BoxArray,0,l,True);
    End;

    Procedure SortFarmGrid;
    Var
      X,Y: Integer;
    Begin
      GetMousePOS(X,Y);
      MidSortBoxArrayFrom(FarmGrid,Point(X,Y));
    End;

    Function FindLivid(Var X,Y,I2: Integer): Boolean;
    Var
      B: TBox;
      ME: MEvent;
      I,H,CTS: Integer;
      ATPA: T2DPointArray;
      TPA,PAR: TPointArray;
    Begin
      Result := False;
      If Not WaitLoggedIn(1000) Then
        Exit;

      CTS:= GetColorToleranceSpeed;
      CombineTPAWrap(TPAFromBox(IntToBox(245, 150, 275, 190)), TPAFromBox(IntToBox(430, 20, 515, 230)), PAR);

      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(4.17,0.56);

      FindColorsSpiralTolerance(MSCX,MSCY,TPA,1447447,FarmGrid[I2].X1,FarmGrid[I2].Y1,FarmGrid[I2].X2,FarmGrid[I2].Y2,4);

      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2,0.2);
      ClearTPAFromTPAWrap(TPA,PAR,TPA);

      If (Length(TPA) < 1) Then
        Exit;

      SplitTPAExWrap(TPA,10,10,ATPA);

      If Debug Then
        Smart_DebugATPA(True,ATPA);

      H:=High(ATPA);

      For I := 0 To H Do
      Begin
        If (GetArrayLength(ATPA[I]) > 10) Then
        Begin
          B := GetTPABounds(ATPA[I]);
          B := IntToBox(B.X1-10,B.Y1-10,B.X2+10,B.Y2+25);

          With B Do
          Begin
            ColorToleranceSpeed(2);
            SetColorSpeed2Modifiers(0.46,0.11);

            FindColorsSpiralTolerance(MSCX,MSCY,TPA,9012621,B.X1,B.Y1,B.X2,B.Y2,13);
            ColorToleranceSpeed(CTS);
            SetColorSpeed2Modifiers(0.2, 0.2);

            If (Length(TPA) > 0) Then
            Begin
              MiddleTPAEx(ATPA[I],X,Y);
              ME := ConMEvent('human',X,Y,3,6,Mouse_Move);
              Wait(Random(200));
              If StreamMouse(ME,['Cure', 're-p', '-pl', 'lant', 'Dise', 'seas', 'd li'],[],500,0) Then
              Begin
                Result := True;
                GetMousePos(X, Y);
                Exit;
              End;
            End;
          End;
        End;
      End;
    End;

    Procedure ReturnValues(colors: TIntegerArray; Var HueMods, SatMods: Extended; Var color, Tolerance: Integer);
    Var
      H,S,T: Extended;
      I,II: integer;
      HSLColor: Array[1..3] Of Extended;
      HSL: Array[0..1] Of Array[1..3] Of Extended;
    begin;
      For I:= 1 to 3 do
      begin;
        HSL[0][i] := 255;
      end;

      For I:= 0 to High(Colors) do
      begin;
        ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
        For II:= 1 to 3 do
        begin;
          HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
          HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
        end;
      end;

      H := (HSL[1][1] - HSL[0][1]);
      S := (HSL[1][2] - HSL[0][2]);
      T := (HSL[1][3] - HSL[0][3]);

      Try
        HueMods := (H/T);
        SatMods := (S/T);
        Tolerance := Round(T);
      Except
        HueMods := 0;
        SatMods := 0;
        Tolerance := Round(0.0);
      End;

      Color := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
    End;

    Function FindSoil(I: Integer): Boolean;
    Var
      ME: MEvent;
      B,B2: TBox;
      TPA,TPA2,PAr: TPointArray;
      Hmod,Hmod2,Smod2,Smod: Extended;
      I2,H,Tol,Tol2,CTS,Col2,Col,HA,HB: Integer;
      TBA: TBoxArray;
      MBP: TPoint;
      ATPA: T2DPointArray;
    Begin
      Result := False;

      CTS := GetColorToleranceSpeed;
      CombineTPAWrap(TPAFromBox(IntToBox(245,150,275,190)),TPAFromBox(IntToBox(430,20,515,230)),PAR);

      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.40, 0.80);

      If (CountColorTolerance(3557184,FarmGrid[I].X1,FarmGrid[I].Y1,FarmGrid[I].X2,FarmGrid[I].Y2,8) = 0) Then
      Begin
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2,0.2);

        ColorToleranceSpeed(2);
        ReturnValues(SCols,Hmod,Smod,Col,Tol);
        SetColorSpeed2Modifiers(Hmod,SMod);

        FindColorsSpiralTolerance(MSCX,MSCY,TPA,Col,FarmGrid[I].X1,FarmGrid[I].Y1,FarmGrid[I].X2,FarmGrid[I].Y2,Tol);
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2,0.2);

        ClearTPAFromTPAWrap(TPA,PAR,TPA);

        If (Length(TPA) < 1) Then
          Exit;

        SplitTPAExWrap(TPA,30,30,ATPA);

        HA:=High(ATPA);
        For I2 := 0 To HA Do
        Begin
          B := GetTPABounds(ATPA[I2]);

          ReturnValues(PCols,Hmod2,Smod2,Col2,Tol2);
          SetColorSpeed2Modifiers(Hmod2,SMod2);

          If Not FindColorsSpiralTolerance(MSCX,MSCY,TPA2,Col2,B.X1,B.Y1,B.X2,B.Y2,Tol2) Then
          Begin
            If Debug Then
              Smart_DebugATPA(True,ATPA);
            B2 := GetTPABounds(ATPA[I2]);
            SetArrayLength(TBA, Length(TBA)+1);
            TBA[High(TBA)] := B2;
          End;
        End;

        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2,0.2);

        HB:=High(TBA);
        For H:= 0 To HB Do
        Begin
          MBP:= MiddleBox(TBA[H]);
          ME:= ConMEvent('human',MBP.X,MBP.Y,5,5,Mouse_Move);
          Wait(Random(200));

          If StreamMouse(ME,['Fertilise', 'Empty', 'patch'],[],500,0) Then
          Begin
            Case Random(10) Of
              0..1:
              Begin
                FastClick(Mouse_Right);
                If WaitOption('Empty',500) Then
                Begin
                  Result:=True;
                  Wait(RandomRange(2215,2570));
                  Exit;
                End;
              End;
              2..9:
              Begin
                FastClick(Mouse_Left);
                If Not DidYellowClick Then
                Begin
                  Result:=True;
                  Wait(RandomRange(2215,2570));
                  Exit;
                End Else
                  FailSafe;
              End;
            End;
          End;
        End;
      End;
    End;

    Function GetLividType(X, Y: Integer): Integer;
    Begin
      Result := 0;

      If (IntInBox(X,Y,Box1) Or IntInBox(X,Y,Box2) Or IntInBox(X,Y,Box3) Or IntInBox(X,Y,Box5)) Then
          Result := 1 Else
          If (IntInBox(X,Y,Box4) Or IntInBox(X,Y,Box8) Or IntInBox(X,Y,Box9) Or IntInBox(X,Y,Box10)) Then
            Result := 2 Else
            If (IntInBox(X,Y,Box7) Or IntInBox(X,Y,Box11) Or IntInBox(X,Y,Box15)) Then
              Result := 3 Else
              If (IntInBox(X,Y,Box6) Or IntInBox(X,Y,Box12) Or IntInBox(X,Y,Box13) Or IntInBox(X,Y,Box14)) Then
                Result := 4;

    End;

    Function LividMenu: Boolean;
    Var
      X,Y: Integer;
    Begin
      Result := FindText(X,Y,'train',SmallChars,MIX1,MIY1,MIX2,MIY2);
    End;

    Procedure CureLivid(Strain: Integer);
    Var
      SPoint: TPoint;
    Begin
      Case Strain Of
        1: Begin SPoint := Point(590,280); End;
        2: Begin SPoint := Point(680,280); End;
        3: Begin SPoint := Point(590,400); End;
        4: Begin SPoint := Point(680,400); End;
      End;

      MissMouse2(SPoint.X,SPoint.Y,10,10);
      If WaitUpText('Continue',500) Then
        FastClick(Mouse_Left);
    End;

    Function HandleLivids(I: Integer): Boolean;
    Var
      X,Y,Tries: Integer;
    Label
      Start;
    Begin
      Tries:=0;
      Start:
      If (Not WaitLoggedIn(1000)) Then
        Exit;

      If FindLivid(X,Y,I) Then
      Begin
        Case Random(10) Of
          0..1:
          Begin
            ClickMouse2(False);
            If WaitOptionMulti(['Cure','re-p','-pl','lant','Dise','seas','d li'],500) Then
              BrakeMMouse(635,310,65,70) Else
              Exit;
          End;
          2..9:
          Begin
            FastClick(Mouse_Left);
            If Not DidYellowClick Then
              BrakeMMouse(635,310,65,70) Else
              Begin
                FailSafe;
                Exit;
              End;
          End;
        End;

        If (Not WaitFunc(@LividMenu,50,3000)) Then
          Exit;

        If LividMenu Then
        Begin
          If (GetLividType(X,Y) = 0) Then
          Begin
            Inc(Tries);
            If Tries=5 Then
              Exit;
            CureLivid(Tries);
          End Else
            CureLivid(GetLividType(X,Y));

          Wait(RandomRange(1915,2570));
          Result:=True;
        End;
      End;
    End;

    Procedure FindStuff;
    Var
      I,H,Win: Integer;
      Jump: Boolean;
    Label
      Start;
    Begin
      Win:=0;
      Start:
      Jump:=False;
      If (Not WaitLoggedIn(1000)) Then
        Exit;

      SortFarmGrid;
      H:=High(FarmGrid);
      For I:=0 To H Do
      Begin
        If FindSoil(I) Then
        Begin
          Jump:=True;
          Inc(Win);
          Break;
        End;
        If HandleLivids(I) Then
        Begin
          Jump:=True;
          Inc(Win);
          Break;
        End;
      End;

      If Jump Then
        GoTo Start;

      If Win>0 Then
        If Debug Then
          Smart_DrawBoxes(True,False,FarmGrid,clgreen);

    End;

    Procedure FoundARandom;
    Begin
      Writeln('Found a random!');
      PlaySound(ScriptPath+'evilaugh.wav');
      Wait(RandomRange(10000, 20000));
      TerminateScript;
    End;

    Procedure OffMM(Direction, WaitTime, RandomWait: Integer);
    Var
      W,H,RX,RY: Integer;
    Begin
      GetClientDimensions(W,H);
      H:=H+50;
      RX := RandomRange(0,W);
      RY := RandomRange(0,H);
      Case (Direction) Of
        0..1: HumanMMouse(W/2,RandomRange(-110,-60),RX,0);
        2: HumanMMouse(RandomRange(-50,-10),H/2,0,RY);
        3: HumanMMouse(W/2,H+RandomRange(10,50),RX,0);
        4: HumanMMouse(W+RandomRange(10,50),H/2,0,RY);
      End;
      Wait(WaitTime+Random(RandomWait));
    End;

    //by Home
    function AreaToBoxArray(const AreaX1, AreaY1, AreaX2, AreaY2, Width, Height: Integer): TBoxArray;
    var
      AreaW, AreaH: Integer;
      BoxX, BoxY: Integer;
      x, y, i: Integer;
    begin
      // Calculate the area dimensions
      AreaW := AreaX2 - AreaX1 + 1;
      AreaH := AreaY2 - AreaY1 + 1;

      // Calculate the number of boxes in each dimension
      BoxX := AreaW div Width;
      if AreaW mod Width <> 0 then Inc(BoxX);
      BoxY := AreaH div Height;
      if AreaH mod Height <> 0 then Inc(BoxY);

      // Set the number of boxes
      SetLength(Result, BoxX * BoxY);

      // Calculate the boxes
      i := 0;
      for y := 0 to BoxY - 1 do
        for x := 0 to BoxX - 1 do
        begin
          Result[i] := IntToBox(AreaX1 + x * Width,
            AreaY1 + y * Height,
            Min(AreaX2, AreaX1 + (x + 1) * Width - 1),
            Min(AreaY2, AreaY1 + (y + 1) * Height - 1));
          Inc(i);
        end;
    end;

    Procedure CheckMovingObjs(RClick: Boolean);
    var
      TBA: TBoxArray;
      MidBox: TPoint;
      TIA: TIntegerArray;
      H,I,J,X,Y,T: Integer;
      TPA,PBox: TPointArray;
      RCOpts: Array of TOptions;
    begin
      if not waitLoggedIn(1000) then Exit;

      ColorToleranceSpeed(1);
      SetColorSpeed2Modifiers(0.2, 0.2);

      PBox := TPAFromBox(IntToBox(240, 130, 275, 185));
      TBA := AreaToBoxArray(MSX1, MSY1, MSX2, MSY2, 35, 35);
      TIA := PixelShiftMulti(TBA, 300);

      for H := 0 to High(TBA) do
      begin
        if (TIA[H] > 100) then
        begin
          MidBox := MiddleBox(TBA[H]);
          SetArrayLength(TPA, Length(TPA)+1);
          TPA[High(TPA)] := MidBox;
        end;
      end;

      ClearTPAFromTPAWrap(TPA, PBox, TPA);
      if (Length(TPA) < 1) then Exit;

      I := Random(Length(TPA));
      MissMouse2(TPA[I].X, TPA[I].Y, 5, 5);
      if RClick then
      begin
        FastClick(Mouse_Right);
        RCOpts := GetChooseOptions('All');
        J := Length(RCOpts);
        Wait(RandomRange(J*75, J*120));

        MarkTime(T);
        repeat
          GetMousePos(X, Y);
          BrakeMMouse(X-10,Y-10,15,5);
          if (TimeFromMark(T) > 5000) then
            break;
        until(not FindTextEx(X,Y,['Choose','Option'],['UpCharsEx'],MSX1,MSY1,MSX2,MSY2))

        if FindTextEx(X,Y,['Choose','Option'],['UpCharsEx'],MSX1,MSY1,MSX2,MSY2) then
          MMouse(RandomRange(MIX1,MIX2),RandomRange(MIY1,MIY2),0,0);
      end;

    end;

    Procedure DoAntiban;
    Var
      I: Integer;
    Begin
      I := Random(600);
      Case I Of
        1..3:     Begin RandomRClick; End;
        4,5:      Begin HoverSkill('Farming',False); End;
        6,7:      Begin HoverSkill('Magic',False); End;
        8..11:    Begin CheckMovingObjs(True); End;
        12..200:  Begin SleepAndMoveMouse(RandomRange(400,500)); End;
        201..400: Begin Wait(RandomRange(250,1500)); OffMM(Random(4),RandomRange(5000,7000),15000); End;
        401..600: Begin Wait(RandomRange(250,3000)); End;
      End;
      Wait(RandomRange(1150,2350));
    End;

    Function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
    Var
      H,M,S: Integer;
    Begin
      If Not LoggedIn Then
        Exit;

      If (HowManyPlayers = 1) Then
      Begin
        If (GetTimeRunning < ((W) + (Y) + BreakRounds)) Then
          Exit Else
          If (GetTimeRunning > ((W) + (Y) + BreakRounds)) Then
          Begin
            RealBTime := ((X+Z)/60000);
            Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
            Logout;
            MarkTime(CurrentBTime);
            Repeat
              Wait(21000);
              ConvertTime((X+Z)-TimeFromMark(CurrentBTime),H,M,S);
              Writeln('Breaktime left: '+IntToStr(H)+':'+IntToStr(M)+':'+IntToStr(S));
            Until(TimeFromMark(CurrentBTime)>(X+Z));
            Writeln('Logging in.');
            If SwitchWorlds Then
              If LoginPlayerToLob Then
                ChangeWorld(RandomWorld(True, False)) Else
                LoginPlayer;
            Wait(4000);
            Result := LoggedIn;
            ClickNorth(SRL_ANGLE_HIGH);
            MarkTime(Timeout);
            IncEx(BreakRounds, (W) + (X));
            Inc(TotalBreaks);
            Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
            W := (BreakIn * 60000);
            X := (BreakFor * 60000);
            Y := RandomRange(-BIR * 60000, BIR * 60000);
            Z := RandomRange(-BFR * 60000, BFR * 60000);
          End;
      End;
    End;

    Begin
      {$IFDEF SIMBAMAJOR980}
        SMART_SERVER := 10;
        SMART_MEMBERS := TRUE;
        SMART_SIGNED := TRUE;
        SMART_SUPERDETAIL := FALSE;
      {$ELSE}
        SRL_SIXHOURFIX := TRUE;
        SMART_FIXSPEED := TRUE;
      {$ENDIF}

      SetupSRL;
      DeclarePlayers;

      AddOnTerminate('FreeGlobals');
      LoadVars;

      If (Not WaitLoggedIn(1000)) Then
        LogInPlayer;

      ClickNorth(SRL_ANGLE_HIGH);
     // SRL_Procs[SRL_OnFindRandom] := @FoundARandom;
      StartFarm:= GetXPBar(2);
      StartMagic:= GetXPBar(1);
      MarkTime(Timeout);

      Repeat
        If (Not WaitLoggedIn(1000)) Then
        Begin
          LoginPlayer;
          ClickNorth(SRL_ANGLE_HIGH);
        End;

        If FindNormalRandoms Then
        Begin
          LoginPlayer;
          ClickNorth(SRL_ANGLE_HIGH);
        End;

        FindStuff;

        If FarmXP < (GetXPBar(2) - StartFarm) Then
        Begin
          FarmXP:=(GetXPBar(2) - StartFarm);
          MarkTime(Timeout);
        End;

        If (TimeFromMark(ReportTime)>=30000) Then
          ProgressReport;

        If TimeFromMark(Timeout)>600000 Then
        Begin
          Writeln('Nothing has happened for too long, shutting down.');
          ProgressReport
          TerminateScript;
        End;

        DoAntiban;

        If TimeFromMark(Timeout)>300000 Then
        Begin
          Writeln('Nothing has happened for too long, resetting focus.');
          SmartSetEnabled(False);
          SmartSetEnabled(True);
        End;

        BreakHandler(BreakIn,BreakFor,Bir,Bfr);
      Until(AllPlayersInactive)
    End.

    xpbars like so:

    Last edited by Ashaman88; 10-05-2012 at 04:45 PM.

  16. #816
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Whatever works, you're more than welcome to modify it for your own use however you wish. Timba and I are testing it with different variables such as Simba versions and SRL Lape usage.

    For me, every un-fertilized soil was spotted and every diseased plant was cured correctly. The only difference is I'm running a version of Simba Wizzup recommended for use with Lape, along with SRL Lape itself. So I gave those both to Timba to see if they make a difference or not. We'll see soon enough. Thanks for the input, Ashaman88.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  17. #817
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Whatever works, you're more than welcome to modify it for your own use however you wish. Timba and I are testing it with different variables such as Simba versions and SRL Lape usage.

    For me, every un-fertilized soil was spotted and every diseased plant was cured correctly. The only difference is I'm running a version of Simba Wizzup recommended for use with Lape, along with SRL Lape itself. So I gave those both to Timba to see if they make a difference or not. We'll see soon enough. Thanks for the input, Ashaman88.
    Ah yeah I didn't use Lape, so maybe that is it. Also I implemented the search restrictions on the finding diseased plants that i used on the findsoil, so it won't ever hover over a player with similar colors, by restricting it to search withing the tboxarray farmgrids. Oh and you are a great scripter, most of your scripts contain functions I didn't even know existed! Thanks for helping me learn!

  18. #818
    Join Date
    May 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What am I doing wrong?:


    Exception in Script: File "SRLLape.simba" not found at line 30, column 11 in file "C:\Simba\Includes\SRL\srl.simba"

    I have Simba fully updated, MSI updated, SPS updated, Extensions updated, SRL updated.

    Running on Lape interpreter.

  19. #819
    Join Date
    May 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I fixed the other thing... Now I'm getting:

    "Exception in Script: Unknown declaration "HumanMMouse" at line 980, column 13"

  20. #820
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by MelanieBobScott View Post
    I fixed the other thing... Now I'm getting:

    "Exception in Script: Unknown declaration "HumanMMouse" at line 980, column 13"
    You'll need the newest MouseHandler (currently V.1.04). You can get it here:
    http://paste.villavu.com/show/3279/

    Just replace your current with that one.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  21. #821
    Join Date
    Jan 2012
    Location
    Texas.
    Posts
    771
    Mentioned
    4 Post(s)
    Quoted
    122 Post(s)

    Default

    This was the reflection bot I was using all the way up until they nuked us.

    Only got to 94 farming.. Must... Get... 99!!!
    ^Made by: DannyRS


    Check out my Tutorials: Miscellania Tutorial ~ 1 - 99 Smithing
    Avatar made by: Vinyl Scratch[/CENTER]

  22. #822
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    <3

    Progress Report:
    =========Flights LividFarmer=========
    ============Version: 1.41============
    Time Running: 6 Hours, 36 Minutes and 33 Seconds
    Magic XP: 169263
    Magic XP/H: 25610
    Farming XP: 211507
    Farming XP/H: 32002
    =====================================


    Manually stopped, you da best flight!

  23. #823
    Join Date
    Mar 2007
    Posts
    378
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Hi, just curious, at current prices, how much does it cost to run this per hour? Or if anyone has an estimate of runes used per hour, and Ill calculate it. Just need to roughly estimate the runes required.

  24. #824
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    141
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Used Ashaman's version and got over a million xp the past couple of days, thanks a lot works great!
    SMARTmanager- Run your script past 6 hours


    I'm slowly learning to script

  25. #825
    Join Date
    Nov 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    tried to run the script but this don't work , wtf ??

Page 33 of 53 FirstFirst ... 23313233343543 ... LastLast

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
  •