Results 1 to 12 of 12

Thread: My multi tree chopper.

  1. #1
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My multi tree chopper.

    This is my second script and i just need some feedback on it.

    SCAR Code:
    {          [             Draynor Tree Chopper            ]
               [---------------------------------------------]
               [     Writer: Skilld U                        ]
               [     Category: Woodcutting                   ]
               [     Version: 1.1                            ]
               [---------------------------------------------]

               Chops all different types of trees in draynor according
               to woodcut level :p        }


    Program DraynorWoodCutter;
    {.include SRL/SRL.scar}
    {.include srl/srl/misc/path.scar}
    {.include srl/srl/misc/Users.scar}
    {.include srl/srl/skill/woodcutting.scar}

    var
     TheLevel : integer;
     WillowTrees, OakTrees, Trees, Yews, Bankers, Log : integer;
     CloseToYews, TreesFromYews, RockByWillows : integer;
     x, y, i, fx, fy : integer;
     C1 : integer;
     time : integer;
     WillowTreeColor: array[0..3] of Integer;
     OakTreeColor: array[0..3] of Integer;
     TreeColor: array[0..3] of Integer;
     YewColor: array[0..3] of Integer;

    procedure PlayerSetup;
    begin
      SRLPlayerForm(True, ['Is Axe Equipped?'], ['Loads'], ['YourSRLId', 'YourSRLPassword'], []);
    end;

    procedure Bitmaps;
    begin
      WillowTrees := DTMFromString('78DA637CC6C4C0C0CFC8800CF40245C0344C9' +
           '4F12E50CD7F06FC6A5E02D5301330E735508D1C013557806A7E10' +
           'B0EB27500D37AA39A19E61286A00258B0B86');
           
      OakTrees := DTMFromString('78DA635CC2C0C0F0850105E8058A806946289' +
           'F711690F888AAC6D64F1C55CD5422CC9902249818F19B03B2EB21' +
           '7EBB00F6FC09D5');
           
      Trees := DTMFromString('78DA637CCFC8C0B08A0105D8FA89836946289' +
           'FF12790B502558D5EA008AA9A6740D602543572CE7CA86AAE0159' +
           '8B09987307C89A83AA26505F10450D0037370A89');
           
      Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C503' +
        'EA31090904455F3E70F13A61A41026A8481841C7E3500E04109A4' +
        '');
       
      Log := DTMFromString('78DA6314616060106340013E2E32609A11CA6' +
        '7540412520C688011550D480B2F0135FC40828F801A7620214C40' +
        '0D3311EE0199234F847B9408A891246C0E00D8F60238');
       
      CloseToYews := DTMFromString('78DA637CCEC8C0B0840105D8C5F2816946289' +
           'FF13E90359B809A7340D6025435FA09DCA86A3E0159F3F1AB0100' +
           'C46C0897');
           
      Yews := DTMFromString('78DA633CC5C8C0C00EC448202CC2174CC3441' +
           '90F03594C04D41C02B2B808A8390764FD61C0AFE62290F505BF1A' +
           '00BD460AEB');
           
      TreesFromYews := DTMFromString('78DA631467626078CF8002EC62F9C0342394C' +
           'FC80B54F39C801A76A09A4FA86AF413B851D5C801D5FC20608E04' +
           '50CD53FCE600002768084A');
           
      RockByWillows := DTMFromString('78DA637CCCC8C02001C448A038271B4CC3441' +
           '92F025952A86A7C4A3451D55C01B2F808A83909647111618E2601' +
           '3507812C46FC6A0040890B4A');
    end;

    procedure GetTheLevel;
    begin
      TheLevel := GetSkillInfo('woodcutting', false);
      Writeln('Your Wc Level is ' + IntToStr(TheLevel));
    end;

    function WhichTreeToChop: String;
    begin
      if(TheLevel >=1) then
      Result := 'Normal';
      if(TheLevel >=20) then
      Result := 'Oak';
      if(TheLevel >= 41) then
      Result := 'Willow';
      if(TheLevel >= 65) then
      Result := 'Yew';
      Writeln(Result);
    end;

    procedure ToTheWillows;
    begin
      if WhichTreeToChop = 'Willow' then
      begin
        MakeCompass('N');
        SetRun(True);
        if not RadialWalk(FindRockColor, 175, 171, 49, 5, 5) then
        begin
          if DTMRotated(WillowTrees, x, y, MMX1, MMY1, MMX2, MMY2) then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
          end;
          if DTMRotated(RockByWillows, x, y, MMX1, MMY1, MMX2, MMY2) then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
          end;
        end;
      end;
    end;

    procedure ToTheOaks;
    begin
      if WhichTreeToChop = 'Oak' then
      begin
        MakeCompass('N');
        SetRun(True);
        if not RadialWalk(2913660,81,91,42,5,5) then
        begin
          if DTMRotated(OakTrees, x, y, MMX1, MMY1, MMX2, MMY2) then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
          end;
        end;
      end;
    end;

    procedure ToTheTrees;
    begin
      if WhichTreeToChop = 'Normal' then
      begin
        MakeCompass('N');
        SetRun(True);
        RoadColor := FindRoadColor
        if not RadialWalk(RoadColor,304,321,54,5,5) then
        begin
          RoadColor := FindRoadColor;
          Path[0].Mainpoint.x:=647;
          Path[0].Mainpoint.y:=70;
          Path[0].Subpoints[0].x:=622;
          Path[0].Subpoints[0].y:=71;
          Path[0].Subpoints[1].x:=635;
          Path[0].Subpoints[1].y:=72;
          Path[0].Subpoints[2].x:=653;
          Path[0].Subpoints[2].y:=66;
          Path[0].Subpoints[3].x:=672;
          Path[0].Subpoints[3].y:=73;
          Writeln(BoolToStr(FindPath(0, True)));
        end;
        begin
          if DTMRotated(Trees, x, y, MMX1, MMY1, MMX2, MMY2) then
          begin
            Mouse(x, y, 3, 3, True);
            FFlag(0);
          end;
        end;
      end;
    end;

    procedure ToTheYews;
    begin
      if WhichTreeToChop = 'Yew' then
      begin
        RoadColor := FindRoadColor
        if not RadialWalk(RoadColor, 299, 312, 59, 5, 5) then
        begin
          RoadColor := FindRoadColor;
          Path[0].Mainpoint.x:=647;
          Path[0].Mainpoint.y:=70;
          Path[0].Subpoints[0].x:=622;
          Path[0].Subpoints[0].y:=71;
          Path[0].Subpoints[1].x:=635;
          Path[0].Subpoints[1].y:=72;
          Path[0].Subpoints[2].x:=653;
          Path[0].Subpoints[2].y:=66;
          Path[0].Subpoints[3].x:=672;
          Path[0].Subpoints[3].y:=73;
          Writeln(BoolToStr(FindPath(0, True)));
        end;
        if DTMRotated(CloseToYews, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 3, 3, True);
          FFlag(0);
        end;
        RoadColor := FindRoadColor
        if not RadialWalk(RoadColor, 320, 330, 59, 5, 5) then
        begin
          RoadColor := FindRoadColor;
          Path[0].Mainpoint.x:=582;
          Path[0].Mainpoint.y:=81;
          Path[0].Subpoints[0].x:=603;
          Path[0].Subpoints[0].y:=81;
          Path[0].Subpoints[1].x:=559;
          Path[0].Subpoints[1].y:=80;
          Path[0].Subpoints[2].x:=594;
          Path[0].Subpoints[2].y:=83;
          Path[0].Subpoints[3].x:=573;
          Path[0].Subpoints[3].y:=80;
          Writeln(BoolToStr(FindPath(0, True)));
        end;
        if DTMRotated(Yews, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 3, 3, True);
          FFlag(0);
        end;
        if FindSymbol(x, y, 'Tree') then
        begin
          Mouse(x, y, 3, 3, True);
          FFlag(0);
        end;
      end;
    end;

    procedure MyAntiBannage; forward;

    procedure ChopTheWillows;
    begin
      if WhichTreeToChop = 'Willow' then
      begin
        WillowTreeColor[0] := 3896169;
        WillowTreeColor[1] := 3238238;
        WillowTreeColor[2] := 3902333;
        WillowTreeColor[3] := 1387816;
        repeat
          if not Loggedin then Exit;
          for i := 0 to 3 do
          begin
            if(FindEnt(fx, fy, True))then exit;
            if (FindObjCustom(X, Y, ['ill', 'low', 'illo'], [WillowTreeColor[i]], 3)) then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
              GameTab(4);
              FindNormalRandoms;
              MyAntiBannage;
              Wait(5000);
              if InvFull then exit;
            end;
          end;
        until (invfull);
      end;
    end;

    procedure ChopTheOaks;
    begin
      if WhichTreeToChop = 'Oak' then
      begin
        OakTreeColor[0] := 6464409;
        OakTreeColor[1] := 2195310;
        OakTreeColor[2] := 1715244;
        OakTreeColor[3] := 11818;
        repeat
          if not Loggedin then Exit;
          for i := 0 to 3 do
          begin
            if(FindEnt(fx, fy, false))then break;
            if (FindObjCustom(X, Y, ['ak', 'Oak'], [OakTreeColor[i]], 3)) then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
              GameTab(4);
              FindNormalRandoms;
              MyAntiBannage;
              Wait(5000);
            end;
          end;
        until (invfull);
      end;
    end;

    procedure ChopTheTrees;
    begin
      if WhichTreeToChop = 'Normal' then
      begin
        TreeColor[0] := 2712154;
        TreeColor[1] := 4088157;
        TreeColor[2] := 1652782;
        TreeColor[3] := 2195054;
        repeat
          if not Loggedin then Exit;
          for i := 0 to 3 do
          begin
            if(FindEnt(fx, fy, false))then break;
            if (FindObjCustom(X, Y, ['ree', 'Tree'], [TreeColor[i]], 3)) then
            begin
              Mouse(x, y, 3, 3, True);
              GameTab(4);
              FFlag(0);
              FindNormalRandoms;
              MyAntiBannage;
              Wait(3000);
            end;
          end;
        until (invfull);
      end;
    end;

    procedure ChopTheYews;
    begin
      if WhichTreeToChop = 'Yew' then
      begin
        YewColor[0] := 3166791;
        YewColor[1] := 3039576;
        YewColor[2] := 4030322;
        YewColor[3] := 3107424;
        repeat
          if not Loggedin then Exit;
          for i := 0 to 3 do
          begin
            if(FindEnt(fx, fy, false))then break;
            if (FindObjCustom(X, Y, ['ew', 'Yew'], [YewColor[i]], 3)) then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
              FindNormalRandoms;
              MyAntiBannage;
              Wait(5000);
            end;
          end;
        until (invfull);
      end;
    end;

    procedure ToBankFromWillows;
    begin
      if WhichTreeToChop = 'Willow' then
      begin
        if not Loggedin then Exit;
        MakeCompass('N');
        SetRun(False);
        GameTab(4);
        if FindSymbol(x, y, 'bank') then
        begin
          Mouse(x, y, 3, 3, true);
          FFlag(0);
        end else
        if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 1, 1, True);
          FFlag(0);
        end else
        RadialWalk(5987171, 34, 39, 39, 5, 5);
      end;
    end;

    procedure ToBankFromOaks;
    begin
      if WhichTreeToChop = 'Oak' then
      begin
        if not Loggedin then Exit;
        MakeCompass('N');
        SetRun(False);
        GameTab(4);
        if FindSymbol(x, y, 'bank') then
        begin
          Mouse(x, y, 3, 3, true);
          FFlag(0);
        end else
        if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 1, 1, True);
          FFlag(0);
        end else
        RadialWalk(5987171, 34, 39, 39, 5, 5);
      end;
    end;

    procedure ToBankFromTrees;
    begin
      if WhichTreeToChop = 'Normal' then
      begin
        if not Loggedin then Exit;
        MakeCompass('N');
        SetRun(False);
        GameTab(4);
        RoadColor := FindRoadColor;
        RadialWalk(RoadColor, 178, 162, 58, 5, 5);
        RoadColor := FindRoadColor;
        RadialWalk(RoadColor, 131, 104, 24, 5,5);
        if FindSymbol(x, y, 'bank') then
        begin
          Mouse(x, y, 3, 3, true);
          FFlag(0);
        end else
        if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 1, 1, True);
          FFlag(0);
        end else
        RadialWalk(5987171, 34, 39, 39, 5, 5);
      end;
    end;

    procedure ToBankFromYews;
    begin
      if not Loggedin then Exit;
      MakeCompass('N');
      SetRun(False);
      GameTab(4);
      if WhichTreeToChop = 'Yew' then
      begin
        RoadColor := FindRoadColor;
        Path[0].Mainpoint.x:=667;
        Path[0].Mainpoint.y:=79;
        Path[0].Subpoints[0].x:=683;
        Path[0].Subpoints[0].y:=86;
        Path[0].Subpoints[1].x:=645;
        Path[0].Subpoints[1].y:=85;
        Path[0].Subpoints[2].x:=677;
        Path[0].Subpoints[2].y:=77;
        Writeln(BoolToStr(FindPath(0, True)));
      end;
      if DTMRotated(TreesFromYews, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 3, 3, True);
          FFlag(0);
        end;
        RoadColor := FindRoadColor;
        RadialWalk(RoadColor, 178, 155, 66, 5, 5);
        RoadColor := FindRoadColor;
        Path[0].Mainpoint.x:=672;
        Path[0].Mainpoint.y:=100;
        Path[0].Subpoints[0].x:=688;
        Path[0].Subpoints[0].y:=99;
        Path[0].Subpoints[1].x:=668;
        Path[0].Subpoints[1].y:=99;
        Writeln(BoolToStr(FindPath(0, True)));
        if FindSymbol(x, y, 'bank') then
        begin
          Mouse(x, y, 3, 3, true);
          FFlag(0);
        end else
        if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
        begin
          Mouse(x, y, 1, 1, True);
          FFlag(0);
        end else
      RadialWalk(5987171, 34, 39, 39, 5, 5);
    end;

    procedure Bank;
    begin
      MarkTime(time);
      repeat;
        if (not (Loggedin)) then break;
        OpenBankQuiet('db');
      until (BankScreen or (TimeFromMark(time) > 120000));
      if Players[CurrentPlayer].Booleans[0] then
      Deposit(1, 28, 2);
      if not Players[CurrentPlayer].Booleans[0] then
      Deposit(2, 28, 2);
      CloseBank;
      C1 := C1 + 1;
      ReportVars[0] := ReportVars[0] + 1;
      SRLRandomsReport;
    end;

    procedure MyAntiBannage;
    begin
      case Random(40) of
        0: RandomRClick;
        1: BoredHuman;
        2: RandomMovement;
        3: AlmostLogout;
        4: PickUpMouse;
        5: HoverSkill('Woodcutting', False);
      end;
    end;

    procedure Signature;
    begin
      Writeln('   ______    _ ____   __');
      Writeln('  / __/ /__ (_) / /__/ /');
      Writeln(' _\ \/  ^_// / / / _  / ');
      Writeln('/___/_/\_\/_/_/_/\_,_/  ');
      Writeln('Multi Tree Chopper and  ');
      Writeln('       Banker           ');
    end;

    procedure Proggy;
    begin
      Writeln('[------Skilld Multi Tree Chopper------]');
      Writeln('[-------------------------------------]');
      Writeln('[---Worked For ' + TimeRunning + '---]');
      Writeln('[----Banked ' + IntToStr(C1) + ' Times----]');
      Writeln('[------Remember To Post Proggies------]');
    end;

    begin
      SetupSRL;
      ClearDebug;
      Signature;
      Wait(1000);
      PlayerSetup;
      SRLID := Players[0].Strings[1];
      SRLPassword := Players[0].Strings[2];
      ScriptID := '655';
      ActivateClient;
      repeat
        if LoggedIn then Logout;
        LoginPlayer;
        Bitmaps;
        GetTheLevel;
        repeat
          WhichTreeToChop;
          ToTheWillows;
          ToTheOaks;
          ToTheTrees;
          ToTheYews;
          ChopTheWillows;
          ChopTheOaks;
          ChopTheTrees;
          ChopTheYews;
          if InvFull then
          begin
            ToBankFromWillows;
            ToBankFromOaks;
            ToBankFromTrees;
            ToBankFromYews;
            Bank;
            Proggy;
          end;
        until C1 = Players[CurrentPlayer].Integers[0];
        if not Loggedin then NextPlayer(False);
        NextPlayer(True);
      until (false);
      FreeDTM(TreesFromYews);
      FreeDTM(WillowTrees);
      FreeDTM(Trees);
      FreeDTM(Yews);
      FreeDTM(Bankers);
      FreeDTM(Log);
      FreeDTM(CloseToYews);
    end.

    thanks.

  2. #2
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks pretty good codewise. I made some modifications using Case statements and changed your NextPlayer thing. Overall pretty good (especially standards - I like reading scripts with good standards). Here's my updated version that has some comments on what I did.

    SCAR Code:
    {          [             Draynor Tree Chopper            ]
               [---------------------------------------------]
               [     Writer: Skilld U                        ]
               [     Category: Woodcutting                   ]
               [     Version: 1.1                            ]
               [---------------------------------------------]

               Chops all different types of trees in draynor according
               to woodcut level :p        }


    Program DraynorWoodCutter;
    {.include SRL/SRL.scar}
    {.include srl/srl/misc/path.scar}
    {.include srl/srl/misc/Users.scar}
    {.include srl/srl/skill/woodcutting.scar}

    var
     TheLevel : integer;
     WillowTrees, OakTrees, Trees, Yews, Bankers, Log : integer;
     CloseToYews, TreesFromYews, RockByWillows : integer;
     x, y, i, fx, fy : integer;
     C1 : integer;
     time : integer;
     TreeColors: array[0..3] of Integer;

    procedure PlayerSetup;
    begin
      SRLPlayerForm(True, ['Is Axe Equipped?'], ['Loads'], ['YourSRLId', 'YourSRLPassword'], []);
    end;

    procedure Bitmaps;
    begin
      WillowTrees := DTMFromString('78DA637CC6C4C0C0CFC8800CF40245C0344C9' +
           '4F12E50CD7F06FC6A5E02D5301330E735508D1C013557806A7E10' +
           'B0EB27500D37AA39A19E61286A00258B0B86');

      OakTrees := DTMFromString('78DA635CC2C0C0F0850105E8058A806946289' +
           'F711690F888AAC6D64F1C55CD5422CC9902249818F19B03B2EB21' +
           '7EBB00F6FC09D5');

      Trees := DTMFromString('78DA637CCFC8C0B08A0105D8FA89836946289' +
           'FF12790B502558D5EA008AA9A6740D602543572CE7CA86AAE0159' +
           '8B09987307C89A83AA26505F10450D0037370A89');

      Bankers := DTMFromString('78DA639461606010654001FFFFFF07D38C503' +
        'EA31090904455F3E70F13A61A41026A8481841C7E3500E04109A4' +
        '');

      Log := DTMFromString('78DA6314616060106340013E2E32609A11CA6' +
        '7540412520C688011550D480B2F0135FC40828F801A7620214C40' +
        '0D3311EE0199234F847B9408A891246C0E00D8F60238');

      CloseToYews := DTMFromString('78DA637CCEC8C0B0840105D8C5F2816946289' +
           'FF13E90359B809A7340D6025435FA09DCA86A3E0159F3F1AB0100' +
           'C46C0897');

      Yews := DTMFromString('78DA633CC5C8C0C00EC448202CC2174CC3441' +
           '90F03594C04D41C02B2B808A8390764FD61C0AFE62290F505BF1A' +
           '00BD460AEB');

      TreesFromYews := DTMFromString('78DA631467626078CF8002EC62F9C0342394C' +
           'FC80B54F39C801A76A09A4FA86AF413B851D5C801D5FC20608E04' +
           '50CD53FCE600002768084A');

      RockByWillows := DTMFromString('78DA637CCCC8C02001C448A038271B4CC3441' +
           '92F025952A86A7C4A3451D55C01B2F808A83909647111618E2601' +
           '3507812C46FC6A0040890B4A');
    end;

    procedure GetTheLevel;
    begin
      TheLevel := GetSkillInfo('woodcutting', false);
      Writeln('Your Wc Level is ' + IntToStr(TheLevel));
    end;

    function WhichTreeToChop: String;
    begin
      if(TheLevel >=1) then
      Result := 'Normal';
      if(TheLevel >=20) then
      Result := 'Oak';
      if(TheLevel >= 41) then
      Result := 'Willow';
      if(TheLevel >= 65) then
      Result := 'Yew';
      Writeln(Result);
    end;

    procedure BankToTrees; //Instead of putting every one of your walks in the main loop, I made them into a case so you just put one.
    begin
      Case WhichTreeToChop Of
        'Willow' :
          begin
            MakeCompass('N');
            SetRun(True);
            if not RadialWalk(FindRockColor, 175, 171, 49, 5, 5) then
            begin
              if DTMRotated(WillowTrees, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 3, 3, True);
                FFlag(0);
              end;
              if DTMRotated(RockByWillows, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 3, 3, True);
                FFlag(0);
              end;
            end;
          end;
        'Oak' :
          begin
            MakeCompass('N');
            SetRun(True);
            if not RadialWalk(2913660,81,91,42,5,5) then
            begin
              if DTMRotated(OakTrees, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 3, 3, True);
                FFlag(0);
              end;
            end;
          end;
        'Normal' :
          begin
            MakeCompass('N');
            SetRun(True);
            RoadColor := FindRoadColor
            if not RadialWalk(RoadColor,304,321,54,5,5) then
            begin
              RoadColor := FindRoadColor;
              Path[0].Mainpoint.x:=647;
              Path[0].Mainpoint.y:=70;
              Path[0].Subpoints[0].x:=622;
              Path[0].Subpoints[0].y:=71;
              Path[0].Subpoints[1].x:=635;
              Path[0].Subpoints[1].y:=72;
              Path[0].Subpoints[2].x:=653;
              Path[0].Subpoints[2].y:=66;
              Path[0].Subpoints[3].x:=672;
              Path[0].Subpoints[3].y:=73;
              Writeln(BoolToStr(FindPath(0, True)));
            end;
            begin
              if DTMRotated(Trees, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 3, 3, True);
                FFlag(0);
              end;
            end;
          end;
        'Yew' :
          begin
            RoadColor := FindRoadColor
            if not RadialWalk(RoadColor, 299, 312, 59, 5, 5) then
            begin
              RoadColor := FindRoadColor;
              Path[0].Mainpoint.x:=647;
              Path[0].Mainpoint.y:=70;
              Path[0].Subpoints[0].x:=622;
              Path[0].Subpoints[0].y:=71;
              Path[0].Subpoints[1].x:=635;
              Path[0].Subpoints[1].y:=72;
              Path[0].Subpoints[2].x:=653;
              Path[0].Subpoints[2].y:=66;
              Path[0].Subpoints[3].x:=672;
              Path[0].Subpoints[3].y:=73;
              Writeln(BoolToStr(FindPath(0, True)));
            end;
            if DTMRotated(CloseToYews, x, y, MMX1, MMY1, MMX2, MMY2) then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
            end;
            RoadColor := FindRoadColor
            if not RadialWalk(RoadColor, 320, 330, 59, 5, 5) then
            begin
              RoadColor := FindRoadColor;
              Path[0].Mainpoint.x:=582;
              Path[0].Mainpoint.y:=81;
              Path[0].Subpoints[0].x:=603;
              Path[0].Subpoints[0].y:=81;
              Path[0].Subpoints[1].x:=559;
              Path[0].Subpoints[1].y:=80;
              Path[0].Subpoints[2].x:=594;
              Path[0].Subpoints[2].y:=83;
              Path[0].Subpoints[3].x:=573;
              Path[0].Subpoints[3].y:=80;
              Writeln(BoolToStr(FindPath(0, True)));
            end;
            if DTMRotated(Yews, x, y, MMX1, MMY1, MMX2, MMY2) then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
            end;
            if FindSymbol(x, y, 'Tree') then
            begin
              Mouse(x, y, 3, 3, True);
              FFlag(0);
            end;
          end;
      end;
    end;

    procedure MyAntiBannage; forward;

    procedure LetsChopTrees; //Same thing as the walks
    begin
      Case WhichTreeToChop Of
        'Willow' :
          begin
            TreeColors[0] := 3896169; //Since you don't really need 4 arrays to store the tree colors I just made it into one.
            TreeColors[1] := 3238238;
            TreeColors[2] := 3902333;
            TreeColors[3] := 1387816;
            repeat
              if not Loggedin then Exit;
              for i := 0 to 3 do
              begin
                if(FindEnt(fx, fy, True))then exit;
                if (FindObjCustom(X, Y, ['ill', 'low', 'illo'], [TreeColors[i]], 3)) then
                begin
                  Mouse(x, y, 3, 3, True);
                  FFlag(0);
                  GameTab(4);
                  FindNormalRandoms;
                  MyAntiBannage;
                  Wait(5000);
                  if InvFull then exit;
                end;
              end;
            until (invfull);
          end;
        'Oak' :
          begin
            TreeColors[0] := 6464409;
            TreeColors[1] := 2195310;
            TreeColors[2] := 1715244;
            TreeColors[3] := 11818;
            repeat
              if not Loggedin then Exit;
              for i := 0 to 3 do
              begin
                if(FindEnt(fx, fy, false))then break;
                if (FindObjCustom(X, Y, ['ak', 'Oak'], [TreeColors[i]], 3)) then
                begin
                  Mouse(x, y, 3, 3, True);
                  FFlag(0);
                  GameTab(4);
                  FindNormalRandoms;
                  MyAntiBannage;
                  Wait(5000);
                end;
              end;
            until (invfull);
          end;
        'Normal' :
          begin
            TreeColors[0] := 2712154;
            TreeColors[1] := 4088157;
            TreeColors[2] := 1652782;
            TreeColors[3] := 2195054;
            repeat
              if not Loggedin then Exit;
              for i := 0 to 3 do
              begin
                if(FindEnt(fx, fy, false))then break;
                if (FindObjCustom(X, Y, ['ree', 'Tree'], [TreeColors[i]], 3)) then
                begin
                  Mouse(x, y, 3, 3, True);
                  GameTab(4);
                  FFlag(0);
                  FindNormalRandoms;
                  MyAntiBannage;
                  Wait(3000);
                end;
              end;
            until (invfull);
          end;
        'Yew' :
          begin
            TreeColors[0] := 3166791;
            TreeColors[1] := 3039576;
            TreeColors[2] := 4030322;
            TreeColors[3] := 3107424;
            repeat
              if not Loggedin then Exit;
              for i := 0 to 3 do
              begin
                if(FindEnt(fx, fy, false))then break;
                if (FindObjCustom(X, Y, ['ew', 'Yew'], [TreeColors[i]], 3)) then
                begin
                  Mouse(x, y, 3, 3, True);
                  FFlag(0);
                  FindNormalRandoms;
                  MyAntiBannage;
                  Wait(5000);
                end;
              end;
            until (invfull);
          end;
      end;
    end;

    procedure TreesToBank; //Same deal as the ToTrees and CutTrees
    begin
      Case WhichTreeToChop Of
        'Willow' :
          begin
            if not Loggedin then Exit;
            MakeCompass('N');
            SetRun(False);
            GameTab(4);
            if FindSymbol(x, y, 'bank') then
            begin
              Mouse(x, y, 3, 3, true);
              FFlag(0);
            end else
            if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
            begin
              Mouse(x, y, 1, 1, True);
              FFlag(0);
            end else
            RadialWalk(5987171, 34, 39, 39, 5, 5);
          end;
        'Yew' :
          begin
            if not Loggedin then Exit;
            MakeCompass('N');
            SetRun(False);
            GameTab(4);
            if WhichTreeToChop = 'Yew' then
            begin
              RoadColor := FindRoadColor;
              Path[0].Mainpoint.x:=667;
              Path[0].Mainpoint.y:=79;
              Path[0].Subpoints[0].x:=683;
              Path[0].Subpoints[0].y:=86;
              Path[0].Subpoints[1].x:=645;
              Path[0].Subpoints[1].y:=85;
              Path[0].Subpoints[2].x:=677;
              Path[0].Subpoints[2].y:=77;
              Writeln(BoolToStr(FindPath(0, True)));
            end;
            if DTMRotated(TreesFromYews, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 3, 3, True);
                FFlag(0);
              end;
              RoadColor := FindRoadColor;
              RadialWalk(RoadColor, 178, 155, 66, 5, 5);
              RoadColor := FindRoadColor;
              Path[0].Mainpoint.x:=672;
              Path[0].Mainpoint.y:=100;
              Path[0].Subpoints[0].x:=688;
              Path[0].Subpoints[0].y:=99;
              Path[0].Subpoints[1].x:=668;
              Path[0].Subpoints[1].y:=99;
              Writeln(BoolToStr(FindPath(0, True)));
              if FindSymbol(x, y, 'bank') then
              begin
                Mouse(x, y, 3, 3, true);
                FFlag(0);
              end else
              if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
              begin
                Mouse(x, y, 1, 1, True);
                FFlag(0);
              end else
            RadialWalk(5987171, 34, 39, 39, 5, 5);
          end;
        'Normal' :
          begin
            if not Loggedin then Exit;
            MakeCompass('N');
            SetRun(False);
            GameTab(4);
            RoadColor := FindRoadColor;
            RadialWalk(RoadColor, 178, 162, 58, 5, 5);
            RoadColor := FindRoadColor;
            RadialWalk(RoadColor, 131, 104, 24, 5,5);
            if FindSymbol(x, y, 'bank') then
            begin
              Mouse(x, y, 3, 3, true);
              FFlag(0);
            end else
            if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
            begin
              Mouse(x, y, 1, 1, True);
              FFlag(0);
            end else
            RadialWalk(5987171, 34, 39, 39, 5, 5);
          end;
        'Oak' :
          begin
            if not Loggedin then Exit;
            MakeCompass('N');
            SetRun(False);
            GameTab(4);
            if FindSymbol(x, y, 'bank') then
            begin
              Mouse(x, y, 3, 3, true);
              FFlag(0);
            end else
            if DTMRotated(Bankers, x, y, MMX1, MMY1, MMX2, MMY2) then
            begin
              Mouse(x, y, 1, 1, True);
              FFlag(0);
            end else
            RadialWalk(5987171, 34, 39, 39, 5, 5);
          end;
      end;
    end;

    procedure Bank;
    begin
      MarkTime(time);
      repeat;
        if (not (Loggedin)) then break;
        OpenBankQuiet('db');
      until (BankScreen or (TimeFromMark(time) > 120000));
      if Players[CurrentPlayer].Booleans[0] then Deposit(1, 28, 2) else Deposit(2, 28, 2); //deleted a few lines by using an if...then...else statement
      CloseBank;
      C1 := C1 + 1;
      ReportVars[0] := ReportVars[0] + 1;
      SRLRandomsReport;
    end;

    procedure MyAntiBannage;
    begin
      case Random(40) of
        0: RandomRClick;
        1: BoredHuman;
        2: RandomMovement;
        3: AlmostLogout;
        4: PickUpMouse;
        5: HoverSkill('Woodcutting', False);
      end;
    end;

    procedure Signature;
    begin
      Writeln('   ______    _ ____   __');
      Writeln('  / __/ /__ (_) / /__/ /');
      Writeln(' _\ \/  ^_// / / / _  / ');
      Writeln('/___/_/\_\/_/_/_/\_,_/  ');
      Writeln('Multi Tree Chopper and  ');
      Writeln('       Banker           ');
    end;

    procedure Proggy;
    begin
      Writeln('[------Skilld Multi Tree Chopper------]');
      Writeln('[-------------------------------------]');
      Writeln('[---Worked For ' + TimeRunning + '---]');
      Writeln('[----Banked ' + IntToStr(C1) + ' Times----]');
      Writeln('[------Remember To Post Proggies------]');
    end;

    begin
      SetupSRL;
      ClearDebug;
      Signature;
      Wait(1000);
      PlayerSetup;
      SRLID := Players[0].Strings[1];
      SRLPassword := Players[0].Strings[2];
      ScriptID := '655';
      ActivateClient;
      repeat
        if LoggedIn then Logout;
        LoginPlayer;
        Bitmaps;
        GetTheLevel;
        repeat
          WhichTreeToChop;
          BankToTrees;
          LetsChopTrees;
          if InvFull then
          begin
            TreesToBank;
            Bank;
            Proggy;
          end;
        until C1 = Players[CurrentPlayer].Integers[0];
        NextPlayer(LoggedIn); //LoggedIn returns a boolean... so we can do this. very sexy too :)
      until (false); //See my comments below the script please
      FreeDTM(TreesFromYews);
      FreeDTM(WillowTrees);
      FreeDTM(Trees);
      FreeDTM(Yews);
      FreeDTM(Bankers);
      FreeDTM(Log);
      FreeDTM(CloseToYews);
    end.

    The loop inside your main loop is endless. There are no breaks for it, so the FreeDTMs at the end are useless. You can fix this a few ways, but I would recommend only declaring the DTMs if they are necessary (since you wont use TreesFromYews or CloseToYews if you're cutting oaks) and freeing ones you can after they are used (saves memory).

    That being said, you should add something that breaks from that loop inside the main loop if you're out of players. NextPlayer just gets stuck in an endless loop if there aren't any players left.

    If you use my advice I'd recommend backing up your script as is because I just copied and pasted and might have bugs because of that.
    Temporarily inactive.

  3. #3
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you. Im trying to go through and put all the dtm's where they are needed.

    does NextPlayer(LoggedIn) do the same thing as NextPlayer(true)?

  4. #4
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NextPlayer(LoggedIn); will do NextPlayer(True) if you're logged in and NextPlayer(False) if you aren't.
    Temporarily inactive.

  5. #5
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok, thanks.

  6. #6
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You could add more failsafes. Also note that after reloading world this "RadialWalk(5987171, 34, 39, 39, 5, 5);" problably doesn't work. Colors change, try to make some autocolor functions or use SRL ones.

    Else, it's pretty nice, I think you're ready to apply soon.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  7. #7
    Join Date
    Jul 2007
    Posts
    1,055
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its prety good, try and make some universal DTMs (so you don't need to load that many DTMs). Also put a lot more things in your anit bannage, this will help randomness. With that I recommend taking out Hover skill cause it takes too long. Lastly you can try and add a little bit more Anti Randoms, it doesn't look like you got much.

  8. #8
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    @negaal, That radial walk is just a last resort, it shouldn't ever have to be used. but I'll look into autocoloring it. Do you really think that i could get in with this?

    @osmm, I'm trying to clean up all of the dtms right now.

  9. #9
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    @negaal, That radial walk is just a last resort, it shouldn't ever have to be used. but I'll look into autocoloring it. Do you really think that i could get in with this?
    Yes, problably you will, but you might want to add something harder and
    l33ter? TPointArrays?

    About DTMs, Scar will free them when you close scar.
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

  10. #10
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by skilld u View Post
    Do you really think that i could get in with this?
    It's close. You use a lot of the things necessary for getting into members in your script (rrw, path, randoms, multiplayer, autocolor). If you could autocolor that color that Negaal mentioned, it would be a huge plus, and as Negaal says above me TPAs are looked upon very favorably.

    Also I forgot to mention: you have FindEnt, but when it finds an ent it exits and goes to the WalkToBank procedure. It'd be suspicious if you bank after you find an ent every time, especially if you had 0 logs in your inventory.
    Temporarily inactive.

  11. #11
    Join Date
    Aug 2007
    Location
    Georgia, U.S.
    Posts
    890
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, i put all of the dtm's in the procedures that they are needed in and i am working on autocoloring.

    Im going to get some TPA's in there too. for the findent if i just have this: FindEnt(fx, fy, true); that won't exit it will just wait for it to go away, right?

  12. #12
    Join Date
    Feb 2007
    Location
    EST (US East Coast)
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That's correct.

    Btw your script scored a 106 using BobboHobbo's Member Application Tool. This does not guarantee acceptance, but it means you're on the right track.
    Temporarily inactive.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multi-Tree Chopper
    By Blumblebee in forum RS3 Outdated / Broken Scripts
    Replies: 22
    Last Post: 10-03-2008, 07:52 PM
  2. Magic tree chopper!
    By ConneX in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 02-25-2008, 01:02 AM
  3. Fr0zN_S0uL's Multi-Tree Chopper Banker~Dropper
    By FrÕzÑ_§ÕµL in forum RS3 Outdated / Broken Scripts
    Replies: 530
    Last Post: 12-26-2007, 09:51 PM

Posting Permissions

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