Results 1 to 6 of 6

Thread: willow chop fletch n drop

  1. #1
    Join Date
    Dec 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default willow chop fletch n drop

    any1 got any idea on how to check if the tree is cut instead of just random waits?

    any suggestions/help on how to improve/complete the script would be appreciated

    Simba Code:
    program Firstwillow;

    {$DEFINE SMART}
    {$DEFINE SRL5}
    {$i srl/srl.simba}
    {$i SPS/sps.simba}



    const
     SERVER  = 0;     // Enter "0" to pick a random server.
     MEMBERS = True; // Set to True if using a RS-Members account. False if F2P.
     SRLStats_Username = ''; // Your SRL Stats Username
     SRLStats_Password = ''; // Your SRL Stats Password
     NumbOfPlayers= 1;     //How many players are you using
     StartPlayer=   0;     //Player to start auoting with! (0 means first char)
     LoadsPerLogin= 15;     //How Many Loads To Do Per Login!
     LoadsTotal=    9999;  //How Many Total Lods To Do Per Character!
     AntiBDrop=     True;  //False for faster dropping. True for antiban dropping.
     Sleepyweepy=   3;     //Minutes to wait before logging in again.0 = Disabled.
     YDebug=        True;  //Shows whats happening on the runescape screen in a
                           //debug window, so you dont have to open/close SMART.


    var
      TooLong:Integer;


     procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

      with Players[0] do
      begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Nick        := ''; //Player nickname - 3-4 letters of Player username.
        Active      := True;
      end;

    end;




    Procedure StatsGuise(wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;

    function ChangeCamera: boolean;
    var
      i, II, PosNeg:integer;
    begin
      Case random(2) of
        0: PosNeg := 1;
        1: PosNeg := -1;
      end;
      i := Round(rs_GetCompassAngleDegrees/45 - 1);
      if i < 0 then i := 0;
      if i > 7 then i := 7;
      For II := 0 to 4+Random(4) do
      begin
        if (Length(GetMMDotsOnMS('npc')) > 0) then
        begin
          Result := true;
          exit;
        end;
        i := i+PosNeg;
        if i > 7 then i := 0;
        if i < 0 then i := 7;
        MakeCompass(inttostr(i*(40+random(6))));
      end;
    end;

    Function CheckAndClick(uptext, option:string; x,y:integer; rclick:boolean) :boolean;
    Begin
      MMouse(x, y, 5, 5);
      if waitUptext (Uptext, 1500+ random (500)) then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick then
        Mouse(x, y, 0, 0,False);
        result:=WaitOption(Option, 2000);
        if result Then FFlag(0);
        end else
        Begin
         Mouse(x, y, 0, 0,true);
        Wait(100+Random(50));
        FFlag(0);
        End;
      End;


    Procedure Antiban;
    Begin
      Case Random(192) Of
        0: HoverSkill('woodcutting', True);
        1: Begin PickUpMouse; SleepAndMoveMouse(3000 + Random(500)); End;
        2: ExamineInv;
        3: RandomAngle(1);
        4: Begin GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab(Tab_Inv); End;
        5: HoverSkill('random', True);
      End;
    End;
       Procedure DebugShiftCount;
      var
        PBox: TBox;
      begin
        PBox := IntToBox(245, 130, 285, 195);
        Writeln(IntToStr(AveragePixelShift(PBox, 250, 500)));
      end;
    Procedure FailSafe(Reson:String);
    Begin
     RandomAngle(2)
     Players[CurrentPlayer].Loc:=Reson;
     Logout;
     Stats_Commit;
     Writeln(Reson);
     TerminateScript;
    End;
    function ivycolour: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.47, 0.32);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 2568755, MSX1, MSY1, MSX2, MSY2, 3);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;


    Function ChopDown:Boolean;

    Var

      Boo, Bee, PlusOne, TreeCounter, TooLong: Integer;

       Begin

        FindNormalRandoms;
        MarkTime(TooLong);
        PlusOne:= InvCount + 1;
        Boo:=MSCX
        Bee:=MSCY
        if findobjtpa( Boo, Bee, IvyColour, 8, 1, 30, 150, 500, ['llow']) Then
        writeln('got one');
        getmousepos(Boo, Bee);
        DebugShiftCount;

       Case Random(2) of

       0:Mouse(Boo, Bee, 5, 5, True);

       1: Begin

          mouse(Boo, Bee, 5,5, False);
          WaitOption('illow', 7000+Random(450));

        End;

       End;

        Flag;
        MarkTime(TreeCounter);
        if (TimeFromMark(TooLong) > 10000) then
        ChangeCamera;


       repeat

        if (TimeFromMark(TooLong) > 15000) then
        FindNormalRandoms;
        StatsGuise('AntiBan and Waiting');
        AntiBan;
        ChangeCamera;
        WaitOption('illow', 11000+Random(450));
        ChangeCamera;
        FailSafe ('could not find willow');
        If Invcount=PlusOne Then
        Writeln ('We Got One');

       Until (InvCount=PlusOne) Or (TimeFromMark(TreeCounter) > 14000)

    End;


      procedure makebow;

      var
       Boo, Bee, LogDTM, I:Integer;
       SlotBox:TBox;
       LogPattern:TIntegerArray;

      begin
       LogDTM := DTMFromString('mrAAAAHic42BgYHBhYmBwBGIvIA4CYlcgNgdiEyAOBOInQDW3gfgGEL8E4ndQDBJ/CsQmegJAkgkn5mLADxgJYBgAAPWmCfI=');
       LogPattern :=[1];
       For i:=0 to 0 do

       begin
        If FindDTM(LogDTM,Boo,Bee,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then
        MMouse (boo, bee, 5, 5);

       SlotBox:=InvBox(LogPattern[I]);
       MouseItem (LogPattern[I],mouse_Left);
       mmouse(292,429,20,20);
       wait (500 + random (150));
       holdmouse(292 + random(10),429 + random (10),mouse_left);
       releasemouse(292 + random(5),429 + random (5),mouse_left);
       wait (500 + random (150));
       mmouse(257,425,25,25);
       wait(1000 + random (250));
       holdmouse(257 + random (5),425 + random (5),mouse_left);
       releasemouse(257 + random (5),425 + random (5),mouse_left);
       wait(53000 + random (1000));

        end;

       end;



     Procedure DropLogs;

     Var

     Boo, Bee, LogDTM, I:Integer;
     SlotBox:TBox;
     LogPattern:TIntegerArray;

     Begin

      LogDTM := DTMFromString('mrAAAAHic42BgYHBhYmBwBGIvIA4CYlcgNgdiEyAOBOInQDW3gfgGEL8E4ndQDBJ/CsQmegJAkgkn5mLADxgJYBgAAPWmCfI=');
      LogPattern :=[1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
      For i:=0 to 27 do

      Begin

           StatsGuise('Dropping Log' + IntToStr(I));
          SlotBox:=InvBox(LogPattern[I]);
           If FindDTM(LogDTM,Boo,Bee,SlotBox.X1,SlotBox.Y1, SlotBox.X2,SlotBox.Y2) Then

           MMouse (boo, bee, 5, 5);
            Begin

             MouseItem (LogPattern[I],mouse_Right);
             ChooseOption ('rop' );
             wait (250 + random (50));

             FreeSRLBitmaps;
             MarkTime(TooLong);

           End;

      End;

    End;




       Begin

       SetupSRL;
       DeclarePlayers;

        Repeat

           ChopDown;
           DebugShiftCount;
           if invFull then
           makebow;
           if invFull then
           DropLogs;
           wait (7500 + random (150));

        Until(False);

    End.

  2. #2
    Join Date
    Jan 2009
    Location
    Turlock/LA, California
    Posts
    1,494
    Mentioned
    3 Post(s)
    Quoted
    66 Post(s)

    Default

    u can check the pixel shift of your character ( sorta like what i do with my pwer miner ) . since i havnt looked at the new trees, idk of this, but cant u create an ATPA of their stump?

  3. #3
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by ryno101 View Post
    Simba Code:
    function ivycolour: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.47, 0.32);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 2568755, MSX1, MSY1, MSX2, MSY2, 3);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    please credit this, "function ivycolour"

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

    Default

    did start out as ivy, but my mains botting defence atm so i couldent test it, kept the name moved to willows :P, credit goes to auto colour aid i supose :P

    im not sure what an ATPA is lol

  5. #5
    Join Date
    Nov 2011
    Location
    MA
    Posts
    545
    Mentioned
    3 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by ryno101 View Post
    did start out as ivy, but my mains botting defence atm so i couldent test it, kept the name moved to willows :P, credit goes to auto colour aid i supose :P

    im not sure what an ATPA is lol
    Here's a very helpful thread for understanding TPAs and ATPAs
    TPA & ATPA Tutorial

  6. #6
    Join Date
    Dec 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by tehq View Post
    Here's a very helpful thread for understanding TPAs and ATPAs
    TPA & ATPA Tutorial
    thanks, but a little too advanced for me atm i think

    i don't tent to know what they do till i see them in action or a video

    my memory from reading is quite short compared to visual

    are TPA/ATPA the boxes smart uses to recognise objects, like is narcles fast fighter?
    Last edited by ryno101; 02-11-2012 at 04:53 AM.

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
  •