Results 1 to 9 of 9

Thread: Help With Woodcutting Script

  1. #1
    Join Date
    Oct 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Question Help With Woodcutting Script

    Hey guys! Very new to scripting this is my first script v2 pretty much. I took my first script and beefed it .
    Functions
    -Cuts Mages in Seers village
    -Uses bank command when full
    -Banks logs and candies from hween event.
    -Repeats
    Bugs I've came across
    -Script stops when trying to deposit all logs(store-bmp)
    Error: The bitmap[1] does not exist at line 23
    Execution failed.
    The following bitmaps were not freed: [Minimap Mask]
    -After depositing and closing retypes bank command and gets stuck clicking Mage logs in bank(sometimes)
    -When going to store the logs it right clicks then just goes to exit without clicking deposit all
    -The following bitmaps were not freed: [48] on end of script sometimes get [0] [1] [49]

    Huge thanks to GoodGameScripts and Cody44 <3

    Code:
    program SeersMageCutter;
    {$i SRL-6/srl.simba}
    //{$i Runique/RuniqueInclude.simba}
    //{$i Runique/eZForm.simba}
    
    var
    Store1, Store2:integer;
    
    Procedure LoadBMPs;
    begin
    Store1:= BitmapFromString(126, 11, 'meJzVlc0NwjAMhTNI7j10CUbkw' +
            'i5MwFpQUckyfvbLD0kElQ/JqxvHXxw3b3ve9tv9cVp+T9eYG1Qr7p' +
            'Yu1+dhXJlhM6KcCaaUilnPDqp1MzYEtIjKPPIDo0h255oycLOeFBR' +
            'PvEheyk+mf0c+B+W9hjynzckb69tqfQ+ZdL5Rv3VbQbfovhVrIn+I' +
            'OMCjiY5M63L1iA+Sb41i6oTA1w3BcHD/CNg90DNavI+8QNOKjEU3X' +
            '7k6+ujjwLh9UdLnE8HHrIt8it3DXapmZVJ7vBqRVeUY7cvVyG0qZl' +
            '3PB9vIMvJYdT9C3txQXedRx+gmH92sNeSHsBpLHteJipP/N8kZYdk' +
            'vI2/udVMXyrQnEE/NjURx/aPiRN2tZP4teetOozEJRzaJumFYk2CT' +
            'J4mi/V/mFF3J');
    Store2:= BitmapFromString(156, 10, 'meJztVssNwzAIzSC+55AlOmIv3' +
            'aUTdK22qiWE4PFJTJ1LJA7kxQH8nsFp69bW7fF8dWu/xzkGk3IEln' +
            'S7v7/mI2fZnEoyWTp1y7KEfBYaTMpx4YsdcVAj52r670rCLMRbX0M' +
            'O5LNcUJ7r0rQwC2zJOZr6Ol6ajmSx7jU4GA+D8C3ZXk3pWuF77L64' +
            'cSBYiItXmu18VRzMZOHL9CfWvaanMbx59SzVK63gI5pyh++aiuGPm' +
            'oFxHJYEC+Zk+lnEoXWyWD6UVfMZMh/OUhgqE3mvprwYffh9Ng77oa' +
            'ZO04XRQtzX1OIzz7weqvM1hW0yrp0zByxWw+YtP13Um9b8PKypmDZ' +
            'Vmmp6LYY1pVX9yDc1qOmgb/W71VD+n4+jvm7VWk3FRiyGrTOQ6Tsn' +
            'OJkf3yogU1Veu26i3z/cpztG');
    
    
    end;
    
    Procedure FreeBMPs;
    begin
      FreeBitmap(Store1);
      FreeBitmap(Store2);
      end;
    
      Procedure StoreLogs;
    var
      X, Y, a, b:Integer;
    begin
    if findColorTolerance(X, Y, 9806377, 550, 255, 725, 500, 10) then
    begin
      mouse(x, y,1,1);
      wait(250);
      ClickMouse(X, Y, mouse_Right);
      wait(250);
        if findBitmapToleranceIn(Store1, a, b, 520, 215, 760, 542, 145) then
        begin
        mouse(a, b,1,1);
        wait(250);
        ClickMouse(a, b, mouse_Left);
        wait(1250);
        end;
      end;
    end;
    
       Procedure StoreCandy;
    var
      X, Y, a, b:Integer;
    begin
    if findColorTolerance(X, Y, 9840246, 550, 255, 725, 500, 10) then
    begin
      mouse(x, y,1,1);
      wait(250);
      ClickMouse(X, Y, mouse_Right);
      wait(250);
        if findBitmapToleranceIn(Store2, a, b, 520, 215, 760, 542, 145) then
        begin
        mouse(a, b,1,1);
        wait(250);
        ClickMouse(a, b, mouse_Left);
        wait(1250);
        end;
      end;
    end;
    
    function IsCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(230, 130, 270, 255);
        if (getPixelShiftAverage(PBox, 250, 500) > 700) then
          result := true
    end;
    
    function IsntCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (getPixelShiftAverage(PBox, 250, 500) < 395) then
          result := true;
    end;
    
    function IsWalking: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (getPixelShiftAverage(PBox, 250, 500) > 400) then
          result := true;
    end;
    
    function InvIsFull: Boolean;
    var
      x, y, a, b : Integer;
    begin
     if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
      result := true;
    end;
    
    function InvIsntFull: Boolean;
    begin
     if not InvIsFull then
      result := true;
    end;
    
    function CutTree: Boolean;
    var
      x, y: Integer;
    begin
      if findColorTolerance(x, y, 4221298, 8, 50, 485, 350, 10) then
    begin
       mouse(x, y, 1, 1);
         Wait(250);
         ClickMouse(x, y, mouse_Left);
         Repeat
          Wait(500);
         Until((IsntCutting));
           Wait(500);
      end;
    end;
    
    procedure ClickMiniMapTrees;
    
    var
     x, y: Integer;
    begin
      if FindColorTolerance(x, y, 49525, 570, 65, 680, 185,  3) then
    begin
      mouse(x, y, 0);
        repeat
           Wait(100);
        until(Not (IsWalking));
      end;
    end;
    
    function BankIsOpen:boolean;
    
    var
        x, y:integer;
    begin
        if findColorTolerance(x, y, 2070783, 179, 62, 312, 80, 10) then
          result := true
    end;
    
    function BankIsClosed:boolean;
    begin
        if not BankIsOpen then
        result:= true;
    end;
    
    Procedure Closebank;
    var
    i:integer;
    closetbox:tbox;
    begin
      closetbox:= intTobox(484, 66,495, 77);
      if BankIsOpen then
      begin
          mouse(closetbox.getmiddle,MOUSE_LEFT,MOUSE_HUMAN);
      end;
    end;
    
    function OpenBank:boolean;
    begin
      SendKeys('::bank',2,1);
      wait(250);
      PressKey(13);
      begin
      if BankIsOpen then
      StoreLogs;
      wait(500);
      StoreCandy;
      begin
      if InvIsntFull then
      Closebank;
      end;
      end;
      end;
    
    Procedure CutMages;
    var
      x, y: Integer;
    begin
     if IsntCutting then
    begin
      If Not InvIsFull then
       CutTree;
        Wait(750);
    begin
        if InvisFull then
        OpenBank;
    begin
           if not InvIsFull then
              CutMages;
        end;
       end;
      end;
      end;
    
    
    begin
    MouseSpeed := 20;
    LoadBMPs;
    AddOnTerminate('FreeBMPs');
    //ClearDebug;
    repeat;
    CutMages;
    until false;
    end.

  2. #2
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    the bitmap not found error , just means simba couldn't find the bitmap you could up the tolerance a bit. or redo it.

    print screen in paint, zoom in and the select the portion you want with the select tool and go to the bitmap tool and click from clipboard.

    that could be the issue where it doesn't find deposit all the logs as well, and gets stuck cause i believe you can only do that command every 2 mins or so. and where you have it banking in a loop it well just keep trying to bank if the invo is full.

    i noticed you have downloaded my runique include lol, you could check out runique/core/chooseoption.simba to deposit your stuff lol. it may not be the best way of doing it but works fine for me =s

    and as for those other bitmaps it just prob built in the srl-6 include. you could just edit it a bit and get rid of all the unused files.
    all the files you need to use are
    Simba Code:
    {$include_once utilities/wrappers.simba}
    {$include_once utilities/time.simba}
    {$include_once core/debug.simba}
    {$include_once core/globals.simba}
    {$include_once utilities/math.simba}
    {$include_once core/mouse.simba}
    {$include_once utilities/drawing.simba}
    {$include_once utilities/pixelshift.simba}
    {$include_once utilities/types/types.simba}
    {$include_once utilities/color.simba}

    so you can delete everything else and edit srl.simba

    for your cut mages procedure you can do this as well

    Simba Code:
    Procedure CutMages;
    var
      x, y: Integer;
    begin
     if IsntCutting  and not invisfull then
        begin
        CutTree;
        Wait(750);
           end else
              begin
              OpenBank;
              end;
    end;

    i think that should do it i may have forgot something but you get the idea here lol and where it is repeated in the main loop it should just keep repeating it.

    you can also use [SIMBA] [/ SIMBA] with no spaces on the last bit, to show simba code. you could also free bitmaps like
    Simba Code:
    freeBitmaps([Store1, Store2]);

  3. #3
    Join Date
    Oct 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    How do I clear the system memory/cache of all previous Bmps? it seems my system has a lot of unfreed bitmaps and my script literally wont even run anymore.

  4. #4
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by Learn View Post
    How do I clear the system memory/cache of all previous Bmps? it seems my system has a lot of unfreed bitmaps and my script literally wont even run anymore.
    you try restarting your computer?
    btw here is my deposit all procedure
    Simba Code:
    procedure DepositAll;
    var
    DepositAllbox:tbox;
    begin
      DepositAllbox:= intTobox(338, 336,372, 360);
         if BankIsOpen then
          begin
            wait(300 + random(600));
            mouse(DepositAllbox.getmiddle,MOUSE_LEFT);
            wait(300 + random(600));
          end;
    end;
    So you can do away with all the bitmaps and depositing candy/logs

    oh and edit on this procedure after that.
    Simba Code:
    function OpenBank: boolean;
    begin
      SendKeys('::bank', 2, 1);
      wait(250);
      PressKey(13);
      begin
      waitfunc(@BankIsOpen,300,3000);
        if BankIsOpen then
        DepositAll;
        waitfunc(@InvIsntFull,300,3000);
          if InvIsntFull then
            Closebank;
        end;
      end;

  5. #5
    Join Date
    Jun 2016
    Posts
    23
    Mentioned
    3 Post(s)
    Quoted
    15 Post(s)

    Default

    Hey, i didnt want to open new thread so ill ask here. I was making my first script which cuts and drops logs. First the drop part was working fine, but later i started to get "Error: Exception: The bitmap[0] does not exist at line 76". I copied few useful lines from the script that is posted here, to help my script run. Also when the script drops all logs from inventory, it clicks summoning icon because of the black color. If i change coords, so it wouldn't press on the bottom buttons, then it wont click on Drop bitmap. Here is the code:

    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    
     var
     Drop:integer;
    
     Procedure LoadBMPs;
    begin
    Drop := BitmapFromString(107, 15, 'meJztlUsOwzAIRH207nyBbHOn3' +
              'jiNEgkRYPAPt2qUiAVG2JRnPM3Lmpd1Y18+IuH2em+7+REdRznj1W' +
              'PtRJdSmsfwbGEv4UR0HOWMV58EkPwH4CDA8Fo+QP1s7wHQ1EYkmL6' +
              'QUgvESjSVjs8HeC6FoPlLE6B5TmXc1NIiQOqOLzkrFEcAuVM5geTz' +
              'W0BwxLA1nePE6WsCyLcUMzMQgRqAg7452JWX0jH5TQCbMn8CUFgsQ' +
              'FKYviccAtDstKh7TQCpwRkAHX3IV/03FQ8li0wddxjynI6nJLbzu9' +
              'DV68/RY4wuXdhVI+XoOsliMvUJxb26EPL97aaPGvF/hgCO4AQaerZ' +
              '/auipzrMbAOR/EA/AEYa+1s2z71ec10V9Lx9hLgcI');
              end;
    
     procedure FreeBMP;
     begin
       FreeBitmap(Drop);
       end;
    
    function InvIsFull: Boolean;
    var
      x, y: Integer;
    begin
     if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
      result := true;
    end;
    
    function InvIsntFull: Boolean;
    begin
     if not InvIsFull then
      result := true;
    end;
    
    function IsntCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (AveragePixelShift(PBox, 250, 500) < 395) then
          result := true;
    end;
    
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 1650986, 13, 53, 513, 377, 10) then
      begin
        moveMouse(x, y);
        wait(250);
        ClickMouse(x, y, mouse_left);
        Repeat
         wait(500);
        Until(IsntCutting);
         wait(500);
      end;
    end;
    
    procedure DropLog;
    var
      X,Y: Integer; Drop:Integer;
    begin
      if FindColorTolerance(X, Y, 65536, 557, 256, 733, 490, 5) then
      begin
        MoveMouse(x, y);
        wait(500);
        ClickMouse(X, Y, mouse_right);
        wait(500);
          If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 516, 145) then
          begin
            Movemouse(x, y);
            wait(250);
            ClickMouse(X, Y, mouse_left);
            Wait(250);
            repeat;
            DropLog;
            until(InvIsntFull);
    
          end;
      end;
    end;
    
    
    
    
    
    Begin
      SetupSRL;
      FreeBitmap(Drop);
      LoadBMPs;
      AddOnTerminate('FreeBMP');
      MouseSpeed := 15;
      DropLog;
      Repeat;
        ClickTree;
      until(InvIsFull);
    end.

  6. #6
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by hawkzz View Post
    Hey, i didnt want to open new thread so ill ask here. I was making my first script which cuts and drops logs. First the drop part was working fine, but later i started to get "Error: Exception: The bitmap[0] does not exist at line 76". I copied few useful lines from the script that is posted here, to help my script run. Also when the script drops all logs from inventory, it clicks summoning icon because of the black color. If i change coords, so it wouldn't press on the bottom buttons, then it wont click on Drop bitmap. Here is the code:

    Code:
    Program ChopTree;
    {$i srl/srl.simba}
    
     var
     Drop:integer;
    
     Procedure LoadBMPs;
    begin
    Drop := BitmapFromString(107, 15, 'meJztlUsOwzAIRH207nyBbHOn3' +
              'jiNEgkRYPAPt2qUiAVG2JRnPM3Lmpd1Y18+IuH2em+7+REdRznj1W' +
              'PtRJdSmsfwbGEv4UR0HOWMV58EkPwH4CDA8Fo+QP1s7wHQ1EYkmL6' +
              'QUgvESjSVjs8HeC6FoPlLE6B5TmXc1NIiQOqOLzkrFEcAuVM5geTz' +
              'W0BwxLA1nePE6WsCyLcUMzMQgRqAg7452JWX0jH5TQCbMn8CUFgsQ' +
              'FKYviccAtDstKh7TQCpwRkAHX3IV/03FQ8li0wddxjynI6nJLbzu9' +
              'DV68/RY4wuXdhVI+XoOsliMvUJxb26EPL97aaPGvF/hgCO4AQaerZ' +
              '/auipzrMbAOR/EA/AEYa+1s2z71ec10V9Lx9hLgcI');
              end;
    
     procedure FreeBMP;
     begin
       FreeBitmap(Drop);
       end;
    
    function InvIsFull: Boolean;
    var
      x, y: Integer;
    begin
     if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
      result := true;
    end;
    
    function InvIsntFull: Boolean;
    begin
     if not InvIsFull then
      result := true;
    end;
    
    function IsntCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (AveragePixelShift(PBox, 250, 500) < 395) then
          result := true;
    end;
    
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 1650986, 13, 53, 513, 377, 10) then
      begin
        moveMouse(x, y);
        wait(250);
        ClickMouse(x, y, mouse_left);
        Repeat
         wait(500);
        Until(IsntCutting);
         wait(500);
      end;
    end;
    
    procedure DropLog;
    var
      X,Y: Integer; Drop:Integer;
    begin
      if FindColorTolerance(X, Y, 65536, 557, 256, 733, 490, 5) then
      begin
        MoveMouse(x, y);
        wait(500);
        ClickMouse(X, Y, mouse_right);
        wait(500);
          If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 516, 145) then
          begin
            Movemouse(x, y);
            wait(250);
            ClickMouse(X, Y, mouse_left);
            Wait(250);
            repeat;
            DropLog;
            until(InvIsntFull);
    
          end;
      end;
    end;
    
    
    
    
    
    Begin
      SetupSRL;
      FreeBitmap(Drop);
      LoadBMPs;
      AddOnTerminate('FreeBMP');
      MouseSpeed := 15;
      DropLog;
      Repeat;
        ClickTree;
      until(InvIsFull);
    end.
    ahh you don't have to change the coords. You could just run the drop loop 28 times
    or edit your drop functions to check each backpack space for an item to drop. You can use tbox's and tbox array.
    Simba Code:
    procedure DropLog;
    var
      X,Y,i: Integer; Drop:Integer; //added i as int
    begin
      for i:= 1 to 28 do //for to do loop to drop logs 28 times
      begin
        if FindColorTolerance(X, Y, 65536, 557, 256, 733, 490, 5) then
        begin
          MoveMouse(x, y);
          wait(500);
          ClickMouse(X, Y, mouse_right);
          wait(500);
            If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 516, 145) then
            begin
              Movemouse(x, y);
              wait(250);
              ClickMouse(X, Y, mouse_left);
              Wait(250);
            end;
        end;
      end;
    end;
    couple of more edits.

    Simba Code:
    Begin
      SetupSRL;
      FreeBitmap(Drop);//Don't to free a bitmap you haven't loaded yet. just needs to be removed , be cause you are freeing it on script end anyway.
      LoadBMPs;
      AddOnTerminate('FreeBMP');
      MouseSpeed := 15;
      DropLog;//why would you drop the logs before you have them =p?
      Repeat;
        ClickTree;
      until(InvIsFull);//this works it will click the the tree till the invo is full
    end.

  7. #7
    Join Date
    Jun 2016
    Posts
    23
    Mentioned
    3 Post(s)
    Quoted
    15 Post(s)

    Default

    I have changed those few things things that u showed, but now when i start the script it will press right click on logs in inventory but wont press Drop. It keeps pressing on the logs for few secs then script stops and says "Successfully executed.". Also i have downloaded your runique includes which i found very useful, but whenever i try to include them and compile the script i get this error: "Unknown compiler directives". Here is how the script looks now, tried some random stuff to fix the drop the logs thing, maybe I messed it up even more

    Code:
    Program WillowPowerChopper;
    {$i srl/srl.simba}
    {$i Runique/RuniqueInclude.simba}
    {$i Runique/eZForm.simba}
     var
     Drop:integer;
    
     Procedure LoadBMPs;
    begin
    Drop := BitmapFromString(107, 15, 'meJztlUsOwzAIRH207nyBbHOn3' +
              'jiNEgkRYPAPt2qUiAVG2JRnPM3Lmpd1Y18+IuH2em+7+REdRznj1W' +
              'PtRJdSmsfwbGEv4UR0HOWMV58EkPwH4CDA8Fo+QP1s7wHQ1EYkmL6' +
              'QUgvESjSVjs8HeC6FoPlLE6B5TmXc1NIiQOqOLzkrFEcAuVM5geTz' +
              'W0BwxLA1nePE6WsCyLcUMzMQgRqAg7452JWX0jH5TQCbMn8CUFgsQ' +
              'FKYviccAtDstKh7TQCpwRkAHX3IV/03FQ8li0wddxjynI6nJLbzu9' +
              'DV68/RY4wuXdhVI+XoOsliMvUJxb26EPL97aaPGvF/hgCO4AQaerZ' +
              '/auipzrMbAOR/EA/AEYa+1s2z71ec10V9Lx9hLgcI');
              end;
    
     procedure FreeBMP;
     begin
       FreeBitmap(Drop);
       end;
    
    function InvIsFull: Boolean;
    var
      x, y: Integer;
    begin
     if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
      result := true;
    end;
    
    function InvIsntFull: Boolean;
    begin
     if not InvIsFull then
      result := true;
    end;
    
    function IsntCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (AveragePixelShift(PBox, 250, 500) < 395) then
          result := true;
    end;
    
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 1650986, 13, 53, 513, 377, 10) then
      begin
        moveMouse(x, y);
        wait(250);
        ClickMouse(x, y, mouse_left);
        Repeat
         wait(500);
        Until(IsntCutting);
         wait(500);
      end;
    end;
    
    procedure DropLog;
    var
      X,Y,i: Integer; Drop:Integer;
      begin
      for i:= 1 to 28 do
    begin
      if FindColorTolerance(X, Y, 65536, 557, 256, 733, 490, 5) then
      begin
        MoveMouse(x, y);
        wait(500);
        ClickMouse(X, Y, mouse_right);
        wait(500);
          If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 510, 145) then
          begin
            Movemouse(x, y);
            wait(250);
            ClickMouse(X, Y, mouse_left);
            Wait(250);
            repeat;
            DropLog;
            until(InvIsntFull);
    
          end;
      end;
    end;
    end;
    
    
    
    
    
    Begin
      SetupSRL;
      LoadBMPs;
      AddOnTerminate('FreeBMP');
      MouseSpeed := 15;
      Repeat;
        ClickTree;
      until(InvIsFull);
      DropLog;
    end.
    Last edited by hawkzz; 11-21-2016 at 06:49 PM.

  8. #8
    Join Date
    Mar 2014
    Posts
    195
    Mentioned
    4 Post(s)
    Quoted
    92 Post(s)

    Default

    Quote Originally Posted by hawkzz View Post
    I have changed those few things things that u showed, but now when i start the script it will press right click on logs in inventory but wont press Drop. It keeps pressing on the logs for few secs then script stops and says "Successfully executed.". Also i have downloaded your runique includes which i found very useful, but whenever i try to include them and compile the script i get this error: "Unknown compiler directives". Here is how the script looks now, tried some random stuff to fix the drop the logs thing, maybe I messed it up even more

    Code:
    Program WillowPowerChopper;
    {$i srl/srl.simba}
    {$i Runique/RuniqueInclude.simba}
    {$i Runique/eZForm.simba}
     var
     Drop:integer;
    
     Procedure LoadBMPs;
    begin
    Drop := BitmapFromString(107, 15, 'meJztlUsOwzAIRH207nyBbHOn3' +
              'jiNEgkRYPAPt2qUiAVG2JRnPM3Lmpd1Y18+IuH2em+7+REdRznj1W' +
              'PtRJdSmsfwbGEv4UR0HOWMV58EkPwH4CDA8Fo+QP1s7wHQ1EYkmL6' +
              'QUgvESjSVjs8HeC6FoPlLE6B5TmXc1NIiQOqOLzkrFEcAuVM5geTz' +
              'W0BwxLA1nePE6WsCyLcUMzMQgRqAg7452JWX0jH5TQCbMn8CUFgsQ' +
              'FKYviccAtDstKh7TQCpwRkAHX3IV/03FQ8li0wddxjynI6nJLbzu9' +
              'DV68/RY4wuXdhVI+XoOsliMvUJxb26EPL97aaPGvF/hgCO4AQaerZ' +
              '/auipzrMbAOR/EA/AEYa+1s2z71ec10V9Lx9hLgcI');
              end;
    
     procedure FreeBMP;
     begin
       FreeBitmap(Drop);
       end;
    
    function InvIsFull: Boolean;
    var
      x, y: Integer;
    begin
     if FindColorTolerance(x, y, 65536, 690, 480, 720, 490, 4) then
      result := true;
    end;
    
    function InvIsntFull: Boolean;
    begin
     if not InvIsFull then
      result := true;
    end;
    
    function IsntCutting: Boolean;
    
    var
        PBox: TBox;
    begin
        PBox := IntToBox(260, 180, 280, 235);
        if (AveragePixelShift(PBox, 250, 500) < 395) then
          result := true;
    end;
    
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 1650986, 13, 53, 513, 377, 10) then
      begin
        moveMouse(x, y);
        wait(250);
        ClickMouse(x, y, mouse_left);
        Repeat
         wait(500);
        Until(IsntCutting);
         wait(500);
      end;
    end;
    
    procedure DropLog;
    var
      X,Y,i: Integer; Drop:Integer;
      begin
      for i:= 1 to 28 do
    begin
      if FindColorTolerance(X, Y, 65536, 557, 256, 733, 490, 5) then
      begin
        MoveMouse(x, y);
        wait(500);
        ClickMouse(X, Y, mouse_right);
        wait(500);
          If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 510, 145) then
          begin
            Movemouse(x, y);
            wait(250);
            ClickMouse(X, Y, mouse_left);
            Wait(250);
            repeat;
            DropLog;
            until(InvIsntFull);
    
          end;
      end;
    end;
    end;
    
    
    
    
    
    Begin
      SetupSRL;
      LoadBMPs;
      AddOnTerminate('FreeBMP');
      MouseSpeed := 15;
      Repeat;
        ClickTree;
      until(InvIsFull);
      DropLog;
    end.
    to fix Unknown compiler directives error you have to change it to lape.


    Or its because you have this line of code
    Simba Code:
    {$i srl/srl.simba} //Dont need if you have the runique include

    hmm let try adjusting your drop bitmap, and lowering the tol or just lower the tolerance might work lol.
    Simba Code:
    If FindBitmapToleranceIn(Drop, X, Y, 520, 250, 742, 516, 30) then

    oh and if you do get the include working you just have to do
    Simba Code:
    ShiftDrop(1,28); //replace the droplog procedure with this line of code. Also dont forget to remove bitmaps as well.

    check out this guide for aio guide

    and this guide for creating/using bitmaps.

    as i didnt touch any of the code, but adding that loop lol

  9. #9
    Join Date
    Jun 2016
    Posts
    23
    Mentioned
    3 Post(s)
    Quoted
    15 Post(s)

    Default

    Thanks, i see there are lots of tutorials that i didn't check. Checked only the rsps ones lol.

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
  •