Results 1 to 22 of 22

Thread: Mark's OSR Fisher

  1. #1
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default Mark's OSR Fisher

    Marks OSR PowerFisher



    About:
    Not much to shout about here simple script to help bring me back up2 speed with all what has changed since i took a break.
    what this does right now is simply fishes to full inventory drop rinse repeat.
    ive not wrote any break handling or anything to stop this script running once started tho if much interest or requests i will continue to work o this and add more ive also removed cooking from this for now as im unsure whether to just post for Jr members

    Setup:
    First two Inventory slots are reserved for fly fishing rod and feathers
    Start anywhere next to a fishing spot either Barb fishing above the waterfall or fly fishing at barbarian village

    Requirements---> Sake Of Repetition Read Quote below

    Quote Originally Posted by slacky View Post
    As a core developer of the latest SRL for OSRS it is my duty to recommend it over AeroLib! @Flight

    To get started with SRL for OSRS you need the following:
    > Simba 1.2rc with leakfixes (drop the .exe in Simba folder, and use it instead of Simba.exe)
    > SRL for OSRS
    > RSWalker
    > A hamburger
    > A buckload of Redbull
    > A shovel, a mattock and a lantern as well (in case you give up).
    > And finally a fair bit of patience
    Update:0.2
    Updated a couple of suggested things but still reading up..... @slacky
    Changes:
    Left cooking in and is turned on by default you can change this yourself on line 12
    Simba Code:
    DoCooking = True;//can be changed to false
    added fire detection
    few failsafes
    changes to logic see how it goes

    All small minor updates will be added to this as a write them so copy paste over any downloaded version you have
    Current v0.2b
    V0.3
    more improvements to the logic improved finding by 4 seconds but we do lose out on accuracy.
    The auto color functions where causing big hangs in my code so im trying to work out more solutions tho ive not noticed any problems with the new improvements.

    Simba Code:
    program new;
    //{$DEFINE SMART}
    {$I SRL/osr.simba}
    (*
     TODO:
          BreakHandler:
                      --just started
          Debug:
                Needs Salmon and trout counting fixing.
                Make pretty.
          ScreenSorting:
                        Works without fail but can take upto 1.3 second.s

          Cooking:
                  works but ugly as hell
    *)




      type  TCell = Record
        Cell : TBox;
        Points  : TPointArray;
        NumP : Integer;
      end;

      const
      UsePixelShift = True;//Used to Increase accuracy at the cost of speed  Note you need this at barb village and for cooking
      DoCooking = true;//well do you want to Cook

      type  TFFinder  = Record
        Grid  :  Array of  Array of Tcell;
        SGrid : Array of Tcell;
        FishingAt : Tcell;
        FireCell : Tcell;
        Rows, Cols  : Integer;

        BestFound : Integer;
        RandomsIgnored  : Integer;
        LevelUpFishing  : Integer;
        LevelUpCooking  : Integer;
        SalmonCooked  : Integer;
        TroutCooked  : Integer;

        FireLogColor : Integer;
        SFireLogCol  : TColorSettings;
        FireColor : Integer;
        SFireCol  : TColorSettings;

        WaterColor  : Integer;
        SWaterCol : TColorSettings;
        FSpeckle  : Integer;
        SSpeckleCol : TColorSettings;

        DebugImage : TMufasaBitmap;
      end;

    var
      LastAngle : Integer;
      FFinder,  EFinder : TFFinder;
      FishCaught, InvCountTimer,  LastInvCount  : Integer;
      MapAngle  : array [0..2]  of  Integer;

    function TFFinder.SettupScreen(W, H : Integer) : Array of  Array of Tcell;
    var i,  j : integer;
    begin
        Rows  :=  Round(514 / W);
        Cols  :=  Round(336 / H);
        SetLength(Result , Rows, Cols);
      for i := 0 to Rows-1 do
        for j := 0 to Cols-1 do
          Result[i][j].Cell  :=  pointtobox(Point((W * i),  (H * j)), Point((W+W) + (W * i), H + (H * j)));
    end;

    {removed grabing of speckle colors}
    Function  TFFinder.SortByColorAndArea(BoxesToSort : Array  of array of TCell) : Array of  TCell;
    var
      j,  i,  X,  Y,  C,  B,  Dist, TDist : Integer;
      SpeckleTPA, FireTPA  : TPointArray;
      TempArrayA, TempArrayB : Array of  TCell;
    begin
      for i := 0 to Rows-1 do
      begin
        for j := 0 to Cols-1 do
        if  (CountColorTolerance(WaterColor,  BoxesToSort[i][j].Cell, 9,  SWaterCol) > 4) then
        begin
          SetLength(TempArrayA, C  + 1);
          TempArrayA[C].Cell  :=  BoxesToSort[i][j].Cell;
          inc(C);
        end else
        begin
          if  DoCooking then
          begin
            if  (CountColorTolerance(FireColor,  BoxesToSort[i][j].Cell, 14,  SFireCol) > 2) and (FindColorsTolerance(FireTPA,  FireLogColor, BoxesToSort[i][j].Cell, 15,  SFireLogCol))then
            begin
                if  (srl.GetPixelShift(BoxesToSort[i][j].Cell,  75) > 2) then
              begin
                if FFinder.FireCell.NumP < 1 then
                begin
                  writeln('found fire');
                  FFinder.FireCell.Points  :=  FireTPA;
                  FFinder.FireCell.NumP  :=  Length(FFinder.FireCell.Points);
                  FFinder.FireCell.Cell  := IntToBox(BoxesToSort[i][j].Cell.X1, BoxesToSort[i][j].Cell.Y1,  BoxesToSort[i][j].Cell.X2 + 8,  BoxesToSort[i][j].Cell.Y2 + 8);
                end;
              end;
            end;
          end;
        end;
      end;
      for C :=  0 to  Length(TempArrayA)-1  do
      begin
        if (FindColorTolerance(x, y,  15123625, TempArrayA[C].Cell, 16{,  SSpeckleCol}))then
        begin
          SetLength(TempArrayB, B  + 1);
          //TempArrayB[B].Points  :=  SpeckleTPA;
         // TempArrayB[B].NumP  :=  Length(TempArrayA[C].Points);
          TempArrayB[B].Cell  :=  TempArrayA[C].Cell;
          Inc(B);
        end;
      end;
        B :=  0;
      for C :=  0 to  Length(TempArrayB)-1  do
      begin
          if  (srl.GetPixelShift(TempArrayB[C].Cell, 75) > 2) then
          begin
         // if  PointInBox(TempArrayB[C].Points[0],  IntToBox(TempArrayB[C].Cell.X1,  TempArrayB[C].Cell.Y1,  TempArrayB[C].Cell.X2 +  10,  TempArrayB[C].Cell.Y2 + 10))then
            SetLength(Result, B  + 1);
           // Result[B].Points  :=  TempArrayB[C].Points;
            //Result[B].NumP  :=  TempArrayB[C].NumP;
            Result[B].Cell  :=  TempArrayB[C].Cell;
            inc(B);
          end;
      end;
      TDist :=  9999;
      for i :=  0 to  Length(Result)-1 do
      begin
        Dist  :=  Distance(Result[i].Cell.Middle, MainScreen.GetMiddle);
        if Dist < TDist then
        begin
          TDist :=  Dist;
          FFinder.BestFound  :=  i;
          FFinder.FishingAt  := Result[i];
          FFinder.FishingAt.Cell  :=  IntToBox(Result[i].Cell.X1,  Result[i].Cell.Y1,  Result[i].Cell.X2 + 10,  Result[i].Cell.Y2  + 10);
         // FFinder.FishingAt.Cell.Middle
        end;
      end;
    end;
    {
    //Draws and Offsets the text to be centred at given position

      Offset       Normal
        ^         ^
    }

    procedure TMufasaBitmap.DrawText(Text  : String; At  : TPoint;  Color: TColor; Centred : Boolean); overload;
    begin
        if  Centred then  Self.DrawText(Text, Point((At.X  - Length(Text) * 3), At.Y),  Color)
        else  Self.DrawText(Text, 'StatChars', At, True, Color);
    end;

    //drawTextMulti
    procedure TMufasaBitmap.drawTextMulti(Text1, Text2  : String; At  : TPoint;  Color1, Color2: TColor);
    begin
        Self.DrawText(Text1, At,  Color1);
        Self.DrawText(Text2, Point((At.X  + Length(Text1) * 5), At.Y),  Color2);
    end;

    //spam mouse
    procedure TMouse.Click(Middle: TPoint; Radius, Button: Int32; NumClicks : Integer = 1); overload;
    var
      i : Integer;
    begin
      for i :=  1 to NumClicks  do
        Self.Click(srl.RandomPoint(Middle, Radius), Button);
    end;

    procedure PrintDebug;
    var
    i,  j,  Debugim : Integer;
    begin
        FFinder.DebugImage  :=  GetMufasaBitmap(BitmapFromClient(MainScreen.GetBounds));
        FFinder.DebugImage.SetSize(527, 400);
        for i := 0 to Length(FFinder.SGrid)-1 do
        begin
          FFinder.DebugImage.DrawCross(FFinder.SGrid[i].Cell.Middle, 5,  clRed);
          FFinder.DebugImage.DrawBox(FFinder.SGrid[i].Cell,  False,  clGreen);
          if PointInbox(FFinder.FireCell.Cell.Middle, MainScreen.FBounds)then FFinder.DebugImage.DrawBox(FFinder.FireCell.Cell,  False,  clRed);
        end;
        FFinder.DebugImage.DrawBox(FFinder.FishingAt.Cell,  False,  clBlue);
        FFinder.DebugImage.DrawText('Marks OSR  PowerFisher', Point(Round(FFinder.DebugImage.GetWidth / 2)-50,  340) ,  clGreen);
        FFinder.DebugImage.DrawText('Time Running  = ' + SRL.TimeRunning , Point(Round(FFinder.DebugImage.GetWidth / 2),  20) ,  clAqua, true);
        FFinder.DebugImage.drawTextMulti('Fish Caught  = ',  IntToStr(FishCaught), Point(385,  350) ,  clRed,  clWhite);
        FFinder.DebugImage.drawTextMulti('Fishing Lvls Gained  = ',  IntToStr(FFinder.LevelUpFishing), Point(385,  362) ,  clRed,  clWhite);
      if  DoCooking then
      begin
        FFinder.DebugImage.DrawText('Fish Cooked  = ' + 'Salmon : ' + IntToStr(FFinder.SalmonCooked)  + ' Trout : ' +  IntToStr(FFinder.TroutCooked), Point(0,  350) ,  clRed);
        FFinder.DebugImage.drawTextMulti('Cooking Lvls Gained  = ', IntToStr(FFinder.LevelUpCooking), Point(0,  363) ,  clRed, clWhite);
        FFinder.DebugImage.drawTextMulti('Fish Cooked H/R  = ', IntToStr(Round((FishCaught * 3600) / (GetTimeRunning / 1000))), Point(0,  375) ,  clRed, clWhite);
      end else  FFinder.DebugImage.drawTextMulti('Fish Caught H/R  = ', IntToStr(Round((FishCaught * 3600) / (GetTimeRunning / 1000))), Point(385,  375) ,  clRed, clWhite);
        FFinder.DebugImage.drawTextMulti('Randoms Avoided  =   ',  IntToStr(FFinder.RandomsIgnored), Point(0,  385) ,  clRed, clWhite);
       // FFinder.DebugImage.Debug;//this shit flickers????why
        Debugim :=  BitmapFromString(FFinder.DebugImage.GetWidth,  FFinder.DebugImage.GetHeight, FFinder.DebugImage.ToString);
        DrawBitmapDebugImg(DebugIm);
        DisplayDebugImgWindow(FFinder.DebugImage.GetWidth,  FFinder.DebugImage.GetHeight);
        FreeBitMap(DebugIm);
        FFinder.DebugImage.Free;
    end;

    function IsFishSpotActive(WaitTime  : Integer) : Boolean;
    var X,  Y : Integer;
    begin
        if  (srl.GetPixelShift(FFinder.FishingAt.Cell,  WaitTime) > 1) and (FindColorTolerance(X, Y,  FFinder.FSpeckle, FFinder.FishingAt.Cell, 16,  FFinder.SSpeckleCol)) then
          Result  :=  True
        else  Result  :=  False;
    end;

    procedure TFFinder.Free;
    begin
        FFinder.Grid  :=  EFinder.Grid;
        FFinder.FishingAt := EFinder.FishingAt;
        FFinder.FireCell  :=  EFinder.FireCell;
        FFinder.SGrid   :=  EFinder.SGrid;
    end;

    procedure TFFinder.Find;
    var X,  Y,  SortTimer : Integer;
    begin
      SortTimer :=  GetTimeRunning;

      if (IsFishSpotActive(Random(75, 150))) and FindColorTolerance(X, Y,  FFinder.FireColor, FFinder.FireCell.Cell, 15, FFinder.SFireCol) then exit;
        FFinder.Free;
    {* Color Setup}
        WaterColor  :=  8153439;
        SWaterCol :=  ColorSetting(2, 0.12, 0.53);
        FSpeckle  :=  14461113;//Fishing Spot Speckle
        SSpeckleCol :=  ColorSetting(2, 0.97, 1.58);

        FireColor :=  2269658;
        SFireCol :=  ColorSetting(2, 0.16, 1.20);
        FireLogColor  :=  11576;
        SFireLogCol :=  ColorSetting(2, 0.19, 0.00);

    {* Grid Setup}
      FFinder.Grid :=  FFinder.SettupScreen(9, 9);

    {* Find Spot}
      FFinder.SGrid  :=  FFinder.SortByColorAndArea(FFinder.Grid);

      WriteLn('Took '  + FloatToStr((GetTimeRunning - SortTimer) / 1000) + ' Seconds to find spot');
      PrintDebug;
    end;

    procedure AntiBan;
    var   R,  Ra, Rb  : Integer;
    begin
        R :=  Random(100, 200);
      if  not Inrange(R,  123,  152)  then  Mouse.Move(Point(Random(0, 600),  Random(0, 500)));
      case  R  of
        123..152  : Begin
                      Rb := Random(2);
                      repeat
                        inc(Ra);
                        mouse.Speed :=  Random(12,  16);
                        Mouse.Move(Point(Random(0, 600),  Random(0, 500)));
                        //mouse.Click(1);
                      Until Ra > Rb;
                      Ra  :=  0;
                    end;
        173..176  : begin
                      MiniMap.SetCompassAngle(Random(-360,  360), True);
                    end;
      end;
    end;

    procedure FlipAngle;
    begin
        MiniMap.SetCompassAngle(Random(-360,  360), True);
     { case  LastAngle  of
        1 : begin
              MiniMap.SetCompassAngle(Random(85, 95), True);
              LastAngle :=  Random(2, 3);
            end;
        2 : begin
              MiniMap.SetCompassAngle(Random(250, 270), True);
              repeat
                LastAngle := Random(2);
              until(LastAngle =  1) or (LastAngle = 3);
            end;
        3  : begin
              MiniMap.SetCompassAngle(Random(-15, 15), True);
              LastAngle := Random(1,  2);
             end
      end;}

    end;

    function  TFFinder.ClickCellUpText(Cell : TCell;  UpText  : TStringArray;  ClickType : Integer): Boolean;
    begin
      FFinder.Find;
      if  Assigned(Cell)  then
      begin
        case Random(1,2)  of
          1 : mouse.Move(Cell.Cell);
          2 : Mouse.Miss(Cell.Cell.Middle, True, Random(0, 150));
        end;
        if  MainScreen.IsUpText(UpText)then
        begin
          Mouse.Click(ClickType);
          True;
        end else
        begin
          Mouse.Click(2);
          if  ChooseOption.Select(UpText, 1,  true,  true)  then  True
          else  False;
        end;
      end else  False;
      while MiniMap.isFlagPresent do  wait(75);
    end;

    function TFFinder.Click  : Boolean; //
    var X,  Y : Integer;
    begin
        mouse.Speed :=  Random(13,  17);
      if  (FFinder.FishingAt.Cell.X1 > 0) and (FindColorTolerance(X, Y,  FFinder.FSpeckle, FFinder.FishingAt.Cell, 16, FFinder.SSpeckleCol))  then
      begin
        case Random(1,2)  of
          1 : mouse.Move(Point(X, Y));
          2 : Mouse.Miss(Point(X, Y), True, Random(0, 150));
        end;
        if  MainScreen.IsUpText(['ure', 'od'])then
        begin
          mouse.Click(1);
          MiniMap.WaitPlayerMoving();
          Result  :=  True;
          AntiBan;
        end else
        begin
          WriteLn('Failed To Find Fishing Spot');
          Result  :=  False;
        end;
      end else  Result  :=  False;
        PrintDebug;
    end;

    procedure FindFish;
    begin
      if  Inventory.IsFull  then Exit;
      if  IsFishSpotActive(Random(75, 150)) then Exit;
      if  not FFinder.Click then FFinder.Find;
    end;

    //DropItemsExcept not working correctly take a look
    procedure DropAll;
    var i : integer;
    DropOrder : TIntegerArray = [2, 3,  7,  6,  5,  4,  8,  9,  10, 11, 15, 14, 13, 12, 16, 17, 18, 19, 23, 22, 21, 20  ,24,  25, 26, 27];
    begin
      for i  := 0  to 25 do
      if  inventory.IsSlotUsed(DropOrder[i], False)then
      begin
        KEYBOARD.KeyDown(VK_SHIFT);
        Mouse.Move(Point(Random(inventory.GetSlotBox(DropOrder[i]).Middle.X-5,  inventory.GetSlotBox(DropOrder[i]).Middle.X+5)  ,Random(inventory.GetSlotBox(DropOrder[i]).Middle.Y-5,  inventory.GetSlotBox(DropOrder[i]).Middle.Y+5)));
        mouse.Click(1);
        wait(Random(77,265));
        KEYBOARD.KeyUp(VK_Shift);
      end;
      //Inventory.DropItemsExcept([1,2],  DROP_PATTERN_SNAKE);//does not work correctly
    end;

    //rewrite this
    function TFFinder.Cook(UpText  : String;DTM, ChatButtonCol : Integer)  : Boolean;
    var
      TPA : TPointArray;
      X,  Y,  TimeOut : Integer;
    begin
        FFinder.Find;
        FindDTMs(DTM,  TPA,  Inventory.FBounds);
      if not PointInbox(FFinder.FireCell.Cell.Middle, MainScreen.FBounds)then
      begin
         FlipAngle;
         Result :=  False;
         exit;
      end;
      If  Length(TPA) > 0 then
      begin
        if Inventory.GetActiveSlot  <>  0  then Mouse.Move(TPA[0]);
        if (MainScreen.IsUpText(UpText))then
        begin
          if Inventory.GetActiveSlot  <>  0  then  Mouse.Click(1);
          Mouse.Move(FFinder.FireCell.Cell);
          if  MainScreen.IsUpText('Fire')then //chooseoption.Select  add right click option
          begin
            mouse.Click(1);
            MiniMap.WaitPlayerMoving();
            Timeout :=  GetTimeRunning;
            Repeat
              if GetTimeRunning - TimeOut > 8000  then Exit;
            Until FindColorTolerance(X, Y,  ChatButtonCol,  ChatBox.FBounds,  15);
            mouse.Click(X,  Y,  1);
            Timeout :=  GetTimeRunning;
            FindDTMs(DTM,  TPA,  Inventory.FBounds);
            Repeat
            if GetTimeRunning - TimeOut > Random(31344, 51241)  then
            begin
              Result  :=  False;
              Exit;
            end;
              FindDTMs(DTM,  TPA,  Inventory.FBounds);
              writeln(UpText+' Left to cook: ' + IntToStr(Round(Length(TPA) / 9)));
              Result  :=  True;
              if  ChatBox.HandleLevelUp then
              begin
                Inc(FFinder.LevelUpCooking);
                Result  :=  False;
                Exit;
              end;
            Until Length(TPA) < 1;
          end else
          begin
            FlipAngle;
            Result :=  False;
            Exit;
          end;
        end else
        begin
          Result  :=  False;
          Exit;
        end;
      end else
      begin
        Result  :=  False;
        Exit;
      end;
    end;

    procedure Cook;//rewrite
    var
      RawTroutDTM,  RawSalmonDTM, CookTimer,  a,  b : Integer;
    begin
        RawTroutDTM := DTMFromString('mFQEAAHicvcuxCoJQAIXh/+YQFErYq7o2Oil4h5tCEVJLbUKbttXiIg2BQvQs0QFbeoEOfMs5HB/IJ7CXg5Syk40U4iSTRFKxspaZgbe+nhlNzdj5spBQlhLI/LufT0e21lI6R54mXOuae9vy6DqaquLZ97yGgdulIYtjVlGEbn/xkw/VvSQC');
        RawSalmonDTM := DTMFromString('mKgEAAHic42NgYDjIxMCwFYhPAfF+IN4HxHuAeCcQbwPiHVDxI0B8DIgPAfFJIH4G1PsOiG8D8QMgfswAEXsBxK+gcm+hYiC5h1B1m4pSGQ4uXcDQmp/NkB4axFDi6cTQFe7HMC0hlGHzlH6GIyuWMCzrbGU431rKsKEghSHFwZJhZU4CA9BKsjAjmRgVAAAdsywG');
        CookTimer  :=  GetTimeRunning;
      repeat
        if  GetTimeRunning  - CookTimer  > 60000  then break;
          if  FFinder.Cook('almon',  RawSalmonDTM, 6977467) then  a :=  1;
            if  FFinder.Cook('rout',  RawTroutDTM, 12040385)then b  :=  1;
      Until( a = 1)  and (b = 1);

      if  ((GetTimeRunning  - CookTimer)  > 60000)  then  writeln('Failed To Cook After' + IntToStr(Round((GetTimeRunning - CookTimer) / 1000 ))  + ' Seconds');
        FreeDTMs([RawSalmonDTM, RawTroutDTM]);
    end;

    procedure HandleInventory;
    begin
      if Inventory.IsFull then
      begin
        if  DoCooking then  Cook; ///cooking needs more work
        DropAll;
        Inc(FishCaught, 26);
        if  not IsFishSpotActive(Random(400,  743)) then
        begin
          FindFish;
        end else FFinder.Click;
      end;
      if  ChatBox.HandleLevelUp then
      begin
          Inc(FFinder.LevelUpFishing);
      end;
        ChatBox.ClickContinue;
      if  GetTimeRunning  - InvCountTimer > Random(6852,  7152)  then
      begin
        InvCountTimer :=  GetTimeRunning;
        if LastInvCount = Inventory.Count then
        begin
          LastInvCount  :=  Inventory.Count;
          if  not IsFishSpotActive(Random(400,  743)) then
          begin
            FindFish;
          end else FFinder.Click;
        end;
        LastInvCount  :=  Inventory.Count
      end;
    end;


    {In minutes}
    function SetBreakTime(Minutes  : Integer): Integer;
    begin

      Result :=  Minutes * 60000;
    end;

    //make an advanced breaking handling fatigue style example toilet, drink, food, browse net allow to timeout
    (*procedure BreakHandling;
    var
    player  : Tplayer;
    begin
      if  GetTimeRunning  - WhenToBreak > WhenToBreak then
      begin
        Case Random(121,1212)  of
        0..121  : begin
                    Wait(Random(SetBreakTime(Random(1,15))));
                    {Browse the net for 1 -  15 minutes
                     Allow to time out dont log out
                     LogBack  In
                    }
                    if  LoginScreen.IsOpen  then
                    begin
                      if  not player.Login  then
                      begin
                        writeln('failed to log back in do something');
                        TerminateScript;
                      end;
                    end;

                    //player.Login
                    WhenToBreak :=  SetBreakTime(Random(6,77))  + GetTimeRunning;//6 to 77 minutes   sets a new time to break at
                  end;
        122..555  :
        556..824  :
        825..1012 :
        1013..1212  :
        end;
      end;
    end;    *)


    begin
        SRL.Setup;
        Inventory.ShiftDrop :=  true;
        InvCountTimer :=  GetTimeRunning;
        LastInvCount  :=  Inventory.Count;
        FFinder.Find;
        findfish;
        MapAngle  :=  [Random(85, 95),  Random(-15, 15), Random(175, 185)];
        LastAngle :=  Random(3);
      repeat
        //FFinder.Find;///working
        PrintDebug;
        if  SRL.DismissRandom then Inc(FFinder.RandomsIgnored);
        if  not IsFishSpotActive(Random(400,  743)) then
        begin
          FlipAngle;
          findfish;
        end;
        HandleInventory;
      until false;
    end.
    Attached Files Attached Files
    Last edited by Mark; 01-20-2018 at 12:40 AM.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Congrats on the release!
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Congrats on the release!
    Cheers pal far from finished buts it's a working start.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  4. #4
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Awesome release! Keep going

  5. #5
    Join Date
    Jan 2018
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Tested with my computer, working fine with debug console as shown. But when I use VM Windows 7, official OSRS client freezes. May I know why? Is there a way I can use this script without having my mouse being all over the place?

  6. #6
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Gratz on a release!


    A few notes I made myself:
    Could probably simplify some stuff by getting more familiar with SRL. And naming the include-folder OSR will cause some issues with certain plugins. But I fully understand it, you are one of the first to publicly deploy SRL for a script, so not much to build upon.

    Anyhow: Drop patterns, we have them all, and functions that take such a pattern are also defaulted to the "regular" pattern:
    https://github.com/SRL/SRL/blob/mast...tory.simba#L48
    I also saw you commented out the DropItemsExcept, and wrote your own one, DropItemsExcept should work here, at least if your SRL is up to date, then it's just a matter of setting `Inventory.ShiftDrop := True` on script startup.

    Perhaps use IsUpText to check for a string instead of GetUpText alongside Pos
    https://github.com/SRL/SRL/blob/mast...reen.simba#L96
    Line 196: `if (Pos('Lure', MainScreen.GetUpText)) or (Pos('rod', MainScreen.GetUpText))then`
    Can be made to: `if MainScreen.IsUpText(['Lure', 'rod']) then`


    Other than that, a lot of functions have default values, so you don't have to specify it. Specially if you are unsure what actually goes into it.
    Like, you did `MiniMap.isPlayerMoving(2)`, but that will be overly sensitive, and return true if just a player walks past you. Leaving it default by calling it like: `MiniMap.isPlayerMoving()` is probably a good idea, or use that default value as guidance.

    Other than that, have a look at the Mouse.simba-file you will find that there are plenty of overloads making randomness easier for you to achieve.

    Hope it helps, happy scripting
    Last edited by slacky; 01-09-2018 at 09:39 PM.
    !No priv. messages please

  7. #7
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

  8. #8
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Quote Originally Posted by P1nky View Post
    Awesome release! Keep going
    cheers pal, ive now decided to try get 99 with my test account =] so i will be updating until then...
    Quote Originally Posted by slacky View Post
    Gratz on a release!


    A few notes I made myself:
    Could probably simplify some stuff by getting more familiar with SRL. And naming the include-folder OSR will cause some issues with certain plugins. But I fully understand it, you are one of the first to publicly deploy SRL for a script, so not much to build upon.

    Anyhow: Drop patterns, we have them all, and functions that take such a pattern are also defaulted to the "regular" pattern:
    https://github.com/SRL/SRL/blob/mast...tory.simba#L48
    I also saw you commented out the DropItemsExcept, and wrote your own one, DropItemsExcept should work here, at least if your SRL is up to date, then it's just a matter of setting `Inventory.ShiftDrop := True` on script startup.

    Perhaps use IsUpText to check for a string instead of GetUpText alongside Pos
    https://github.com/SRL/SRL/blob/mast...reen.simba#L96
    Line 196: `if (Pos('Lure', MainScreen.GetUpText)) or (Pos('rod', MainScreen.GetUpText))then`
    Can be made to: `if MainScreen.IsUpText(['Lure', 'rod']) then`


    Other than that, a lot of functions have default values, so you don't have to specify it. Specially if you are unsure what actually goes into it.
    Like, you did `MiniMap.isPlayerMoving(2)`, but that will be overly sensitive, and return true if just a player walks past you. Leaving it default by calling it like: `MiniMap.isPlayerMoving()` is probably a good idea, or use that default value as guidance.

    Other than that, have a look at the Mouse.simba-file you will find that there are plenty of overloads making randomness easier for you to achieve.

    Hope it helps, happy scripting
    thanks alot mate @slacky i did notice the DropItemsExcept but it was too late i already wrote that thankyou tho for reminding me about using git for referencing the OSR include very tired right now to completely read and rewrite but i will continue this till 99 fishing =]


    Quote Originally Posted by Dan the man View Post
    Gratz on the release. Always nice to see a new public script
    thanks, had alot of spare time over the holidays ended getting hooked again ...

    Quote Originally Posted by Evening Breakfast View Post
    Tested with my computer, working fine with debug console as shown. But when I use VM Windows 7, official OSRS client freezes. May I know why? Is there a way I can use this script without having my mouse being all over the place?
    you could try adding $DEFINE SMART} before {$I osr.simba} at the top of the script.
    Last edited by Mark; 01-10-2018 at 03:28 AM.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  9. #9
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    Didn't make myself clear about the include name :3 C:/Simba/Includes/srl/ is where the include goes `{$I SRL/osr.simba}` is how it should look done right.
    This is mainly so that certain alternative plugins will work
    Last edited by slacky; 01-10-2018 at 06:47 AM.
    !No priv. messages please

  10. #10
    Join Date
    Apr 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks for the release!

  11. #11
    Join Date
    Dec 2011
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I used to run bots all the day, but since moving to a new PC I can't get anything to work. Even when I've check all the paths in settings its telling mg : Error: File "SRL/osr.simba" not found Anyone an idea?

  12. #12
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Quote Originally Posted by slacky View Post
    As a core developer of the latest SRL for OSRS it is my duty to recommend it over AeroLib! @Flight

    To get started with SRL for OSRS you need the following:
    > Simba 1.2rc with leakfixes (drop the .exe in Simba folder, and use it instead of Simba.exe)
    > SRL for OSRS copied into your SRL include folder
    > RSWalker
    > A hamburger
    > A buckload of Redbull
    > A shovel, a mattock and a lantern as well (in case you give up).
    > And finally a fair bit of patience
    Please read the setup instructions.

    Have made many changes is now on 0.6a will upload later on phone now??

    Edit: have updated
    more improvements still work in progress 77/99 fishing 63/99 cooking tho cooking could do with a rewrite when i have time.
    Last edited by Mark; 01-15-2018 at 11:26 PM.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  13. #13
    Join Date
    Jan 2018
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Latest script does not work. Once fish are full in inventory, it will just rotate the screen.

  14. #14
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Will have to test when I'm home see what's happening on phone right now so can't test maybe an update??
    Can you check the debug screen and make sure it's finding the fire.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  15. #15
    Join Date
    Jan 2018
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Waiting patiently for an update to help find the fire more easily if there are a couple people surrounding the fire it waste a lot of time until it eventually goes back to fishing.

  16. #16
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Quote Originally Posted by icyxen View Post
    Waiting patiently for an update to help find the fire more easily if there are a couple people surrounding the fire it waste a lot of time until it eventually goes back to fishing.
    I will add an option to right click the fire instead for if/when a player maybe stood over it.
    about to sit down and chill so will be tomorrow i add this.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  17. #17
    Join Date
    May 2015
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Hey Mark,

    Not sure what i'm doing wrong but I'm getting this error: UError: Unknown declaration "Self" at line 35
    Compiling failed.

  18. #18
    Join Date
    May 2007
    Location
    England/Liverpool
    Posts
    1,004
    Mentioned
    9 Post(s)
    Quoted
    106 Post(s)

    Default

    Quote Originally Posted by jsand View Post
    Hey Mark,

    Not sure what i'm doing wrong but I'm getting this error: UError: Unknown declaration "Self" at line 35
    Compiling failed.
    you need to follow the setup again download slacky's fixes and you should be set.
    Previously Known or not Known as CRU1Z1N.
    If you want to succeed you should strike out on new paths, rather than travel the worn paths of accepted success.(John D. Rockefeller)

  19. #19
    Join Date
    May 2015
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by Mark View Post
    you need to follow the setup again download slacky's fixes and you should be set.
    I figured it was something like that so i uninstalled and am currently re-installing everything. Thanks

  20. #20
    Join Date
    May 2015
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Got it working Mark thanks! Will post any proggies I get.

    Edit: When the invent is full, it left clicks the first fish and uses it on the 2nd fish >_<
    Last edited by jsand; 02-16-2018 at 12:03 AM.

  21. #21
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

    Default

    Quote Originally Posted by jsand View Post
    Got it working Mark thanks! Will post any proggies I get.

    Edit: When the invent is full, it left clicks the first fish and uses it on the 2nd fish >_<
    The script might use shift drop. Make sure that's enabled on your client.

  22. #22
    Join Date
    Jan 2018
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Mark View Post
    I will add an option to right click the fire instead for if/when a player maybe stood over it.
    about to sit down and chill so will be tomorrow i add this.
    Awesome, appreciate it

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
  •