Results 1 to 25 of 25

Thread: Simple PowerCutter

  1. #1
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Simple PowerCutter

    Simple PowerCutter v0.2a

    This is my third script so far and I am still learning but I made this and worked quite well for me and hope it does for you. It will cut a full inventory of logs and drop them for how many loads you have set, you must set the tree color and name but remember so far this only cuts f2p trees as I am not a member.

    Instructions:
    • Setup lines : 37- 41.
    • Declare players in DeclarePlayers;.
    • Set RuneScape window.
    • Start anywhere near trees.
    Features:
    • Antiban.
    • SRL antirandoms.
    • If no tree is found the script will goto the nearest tree symbol. - Removed
    • Progress report. - Removed
    Known bugs:
    • The antirandoms and antiban are used too much and the script lags. - Fixed
    • Sometimes only does 5 loads. - Fixed
    • No multiplayer support. ( Will add once I know how. xD) - Nearly did, got riddled with Access Violation errors. -.-
    • The DropAllLogs dosen't work sometimes but is generally ok. - Fixed
    • The antiban is used too much.. - Fixed
    So yeah there it is, please post comments or progress reports this is only an earlier version and i am going to try to improve as much so it can work overnight easily. Long way yet...

    V0.12 Changelog:

    Removed all uneccisary things to make the script and bit tidier and faster and I have see the list above for the things removed. I removed the Option('Chop'); for the good ol' Mouse(x, y, 1, 1, True), works a hundred time better and as for the multiplayer support I tried but all the access errors stopped me so il get on doing that soon. This was working flawlessly for me earlier and the SRL axehead finding works great so you should have no problems.

    Enjoy.


    For those who can't be arsed to download:

    SCAR Code:
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
    {//                                                                   \\}
    {//                    Simple PowerCutter v0.3b                       \\}
    {//                                                                   \\}
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
    {//                                                                   \\}
    {//      # ScriptName  = Simple PowerCutter                           \\}
    {//      # Author      = NinjaTerrorist                               \\}
    {//      # Description = Simple powercutter for all f2p trees.        \\}
    {//      # Version     = v0.3b                                       \\}
    {//      # Date        = January 29, 2007                             \\}
    {//      # Comments    = Start where trees are.                       \\}
    {//      # Contact     = [email]NinjaTerrorist@Gmail.com[/email]                     \\}
    {//                                                                   \\}
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}
    {//   Script by NinjaTerrorist, like it and/or use it? Please leave   \\}
    {//   a comment on my thread.                                         \\}
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    program SimplePowerCutter;

    {.include SRL/SRL.scar}
    {.include SRL/SRL/SKILL/Woodcutting.scar}

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    var
      Choped, Tol, Responded : Integer;
      Loads, Loggs : Integer;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    const
      TreeColor = 3696736;          { - Ctrl+P to pick the color.        - }
      TreeName  = 'Tree';           { - e.g Willow must be a string.     - }
      UsingAxe  = False;            { - Is your axe equiped?             - }
      Load      = 100;              { - Loads todo. Each player.         - }
      LogOutT   = 5;                { - Minutes to stay logged out for.  - }
      PanicKey  = 12;               { - 1 = F1, 2 = F2 ect.              - }

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure DeclarePlayers;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

     begin
        HowManyPlayers := 2;
        CurrentPlayer:= 0;
        NumberOfPlayers(HowManyPlayers);

        Players[0].Name     := '';
        Players[0].Pass     := '';
        Players[0].Nick     := '';
        Players[0].Active   := True;

        Players[1].Name     := '';
        Players[1].Pass     := '';
        Players[1].Nick     := '';
        Players[1].Active   := True;

       {Players[2].Name     := '';
        Players[2].Pass     := '';
        Players[2].Nick     := '';
        Players[2].Active   := True;

        Players[3].Name     := '';
        Players[3].Pass     := '';
        Players[3].Nick     := '';
        Players[3].Active   := True;}

      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure Setup;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        if(not(LoggedIn))then
          begin
            LoginPlayer;
            Loggs := Logs+1;
            WriteLn('Logged player in.');
          end;
        if(LoggedIn)then
          begin
            SetupSRL;
            ActivateClient;
            MakeCompass('N');
            HighestAngle;
            FixChat;
            Status('Script started at: '+(TheTime));
            FindAxeHeadColor;
            Tol := 11;
          end;
      end;
     
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    function FindRetard : Boolean;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        if(InChatMulti('free stuff', 'noob', 'wanna be my gf?'))then
          begin
            Status('Found retard!');
            Result := True;
          end
        else
          Result := False;
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure AutoRespond;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    var
    TalkBack : array [1..5] of string;

     begin

      OldLine := TheLine;
      TheName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
      TheLine := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
      NewLine := TheLine;

      if(OldLine <> NewLine)then
       begin
        Exit;
       end
       
    if(pos('yo', TheName)<>0)or(pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
        begin
        end
       
       else
       
      begin
       repeat

        if(InChatMulti('lol', 'lmao', 'rofl'))then
         begin
          TalkBack[1] := 'lol';
          TalkBack[2] := 'lolz';
          TalkBack[3] := 'lmao';
          TalkBack[4] := 'rofl';
          TalkBack[5] := 'rofl!!';
          Status('Responding to chat message.');
          TypeSend(TalkBack[1+Random(5)]);
          Responded := Responded+1;
         end;

       if(InChatMulti('hi', 'hey', 'sup'))then
        begin
         TalkBack[1] := 'hi';
         TalkBack[2] := 'hey';
         TalkBack[3] := 'sup';
         TalkBack[4] := 'wassup?';
         TalkBack[5] := 'who are you?';
         Status('Responding to chat message.');
         TypeSend(TalkBack[1+Random(5)]);
         Responded := Responded+1;
        end;

       if(InChatMulti('wc lvl', 'wc lvl?', 'woodcutting lvls?'))then
        begin
         TalkBack[1] := IntToStr(GetSkillLevel('Woodcutting'));
         Status('Responding to chat message.');
         TypeSend(TalkBack[1]);
         Responded := Responded+1;
        end;

       if(FindRetard)then
        begin
          TalkBack[1] := 'please leave..';
          TalkBack[2] := 'no now go away';
          TalkBack[3] := 'why won''t you die?';
          TalkBack[4] := 'no thanks';
          TalkBack[5] := '....';
          Status('Responding to chat message.');
          TypeSend(TalkBack[1+Random(5)]);
          Responded := Responded+1;
        end;
         
       if(not(LoggedIn))then
        Break;
       until(false);
      end;
    end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure AntiStuff;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        FindNormalRandoms;
        FindHead;
        FindEnt(TreeColor);
        AntiBan;
        AutoRespond;
          if(FindFight)then
            begin
              RunAwayDirection('N');
              Wait(4000+Random(2000));
              RunBack;
            end;
       end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure DropTheLogs;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        if(UsingAxe)
          then
            begin
              DropAll;
            end
          else
            begin
              DropToPosition(2, 28);
            end;
       end;
     
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure ChopTree;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
     
        if(FindObj(x, y, TreeName, TreeColor, Tol))then
          begin
            MMouse(x,y,2,2);
            Wait(200+Random(300));
          end;                                            // The Scar Noob
        if(IsUpTextMulti('Cho', 'op dow', 'p down'))then  // helped me with
          begin                                           // UpTextMulti :)
            Mouse(x, y, 1, 1, True);
            AntiStuff;               // Madmoon helped me fix this.. :)
            Choped := Choped+1;
            Wait(2000+Random(2000));
          end;
         
        if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                AntiStuff;
                Wait(2000+Random(3000));
                Status('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end;

        if(Tol > 25)then
          begin
            Status('Maximum tolerance reached.. check your colors.');
            NextPlayer(False);
          end;
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure Report;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        ClearDebug;
        WriteLn(' --------------------------------');
        WriteLn('    Simple PowerChopper v0.12a   ');
        WriteLn(' --------------------------------');
        WriteLn('  Logged in: '+IntToStr(Loggs)+' times.');
        WriteLn('  Droped: '+IntToStr(Loads)+' loads.');
        WriteLn('  Choped: '+IntToStr(Choped)+' logs.');
        WriteLn('  Player: '+Players[CurrentPlayer].Name);
        WriteLn(' ---------------------------------');
        SRLRandomsReport;
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure MainLoop;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
        repeat
          ChopTree;
          if(not(LoggedIn))then
            begin
              Break;
            end;
        until(InvFull)
        DropTheLogs;
        Loads := Loads+1;
        Report;
        if(LoggedIn)
        and(Loads > Load)then
          begin
            LogOut;
            Wait(LogOutT*60000);
            NextPlayer(True);
          end;
        if(not(LoggedIn))
        or(FindDead)
        or(InBlack)then
          begin
           NextPlayer(False);
          end
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    begin
      DeclarePlayers;
      Setup;
        repeat
          MainLoop;
        until(IsFKeyDown(PanicKey))
      WriteLn('Panic key pressed ending script..');
      WriteLn('Script ended at: '+TheTime);
    end.

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

  2. #2
    Join Date
    Nov 2006
    Location
    Bel Air, Maryland, USA
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    suggestion for making ur antirandoms and antiban not lag u so much, use waits or sleeps inside of the function

    edit:: and for the drop all logs, id make a dtm for each type of log, and search inventory for all of the dtms it contains and drop them using right click, then left click option

  3. #3
    Join Date
    Mar 2006
    Location
    United States, -7:00 GMT
    Posts
    1,790
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    * The antirandoms and antiban are used too much and the script lags.
    * Sometimes only does 5 loads.
    * No multiplayer support. ( Will add once I know how. xD)
    * The DropAllLogs dosen't work sometimes but is generally ok.
    * The antiban is used too much..
    So lets see here.

    1. I don't see how it can lag too much, you don't have that many stuff...
    2. Wierd, maybe they set the Load thing wrong...
    3. Look at Wizzup?'s tutorial on it in the tutorial section. Its very simple once you know how
    4. Um..Try this
    SCAR Code:
    procedure DropMyLogs;
    begin
      if(UsingAxe)then DropToPosition(1, 28); //Drops from 1-28 slot
      if(not(UsingAxe))then DropToPosition(2, 28); //Drops from 2-28 slot
    end;
    Make sure you tell people to put the axe in the first inventory slot though.
    5. I still don't see this. I don't know how to do the responder, so I'm actually learning from your script


    All in all, there's lots of failsafes you need to do, but I don't want to tell you too much. Test it, and think of problems on how this could mess up. Awesome, peace.

    hakuna matata ;)

  4. #4
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    the only thing i can add is instead of using PopUp('Chop'); you can use IsUpText or IsUpTextMulti
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  5. #5
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I tried using IsUpText before and I couldn't get it to work for some reason id use something like this and it wouldn't click the option:


    SCAR Code:
    if(FindObj(x, y, TreeName, TreeColor, Tol))then
      begin
        Mouse(x, y, 1, 1, False);
        IsUpText('Chop');
      end;

    EDIT: I just released V.012 much better. ;]

  6. #6
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    im gonna use this and learn from it and hopefully make my own scripts based on it

  7. #7
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by john smith View Post
    im gonna use this and learn from it and hopefully make my own scripts based on it
    Thanks, hope you learn alot from this.

  8. #8
    Join Date
    Jan 2007
    Location
    In my evil lair!
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Trying it now Hope that the Ent wont get me.

  9. #9
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by smithspsbob View Post
    Trying it now Hope that the Ent wont get me.
    Thanks, tell me how you got on with it.

  10. #10
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NinjaTerrorist View Post
    I tried using IsUpText before and I couldn't get it to work for some reason id use something like this and it wouldn't click the option:


    SCAR Code:
    if(FindObj(x, y, TreeName, TreeColor, Tol))then
      begin
        Mouse(x, y, 1, 1, False);
        IsUpText('Chop');
      end;

    EDIT: I just released V.012 much better. ;]
    Well you don't command the script to actually click it...
    This is the chop procedure from my powercutter(learn from it, not just going to say it, let's find ou)

    procedure Chop;
    begin
    repeat
    if (FindColorSpiralTolerance(x,y,Treecolor1,MSX1,MSY1 ,MSX2,MSY2,10)) or
    (FindColorSpiralTolerance(x,y,Treecolor2,MSX1,MSY1 ,MSX2,MSY2,10)) or
    (FindColorSpiralTolerance(x,y,Treecolor3,MSX1,MSY1 ,MSX2,MSY2,10)) then
    MMouse(x,y,2,2)
    If(IsUpTextMulti('Cho','down','p do')) Then
    Mouse(x,y,5,5,True);
    wait(Timetowait*1000+random(1500));
    FindTheEnt;
    until(InvFull);
    end;
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  11. #11
    Join Date
    Jan 2007
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice script, and clean too... (I'm and indentation freak )

    I had a look and found 1 problem. The FindEnt function is supposed to be called, before you click the tree, but while your mouse is on the tree (when the uptext is 'Chop down').

    A simple fix for this, Change:

    SCAR Code:
    if(FindObj(x, y, TreeName, TreeColor, Tol))then
              begin
                Mouse(x, y, 1, 1, True);
                Choped := Choped+1;
                Wait(2000+Random(2000));
                AntiStuff;
              end;
    To:
    SCAR Code:
    if(FindObj(x, y, TreeName, TreeColor, Tol))then
              begin
                Mouse(x, y, 1, 1, True);
                AntiStuff;
                Choped := Choped+1;
                Wait(2000+Random(2000));
              end;

  12. #12
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks guys, i added your suggestions to my new chop procedure:

    SCAR Code:
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure ChopTree;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
     
        if(FindObj(x, y, TreeName, TreeColor, Tol))then
          begin
            MMouse(x,y,2,2);
            Wait(200+Random(300));
          end;                                            // The Scar Noob
        if(IsUpTextMulti('Cho', 'op dow', 'p down'))then  // helped me with
          begin                                           // UpTextMulti :)
            Mouse(x, y, 1, 1, True);
            AntiStuff;               // Madmoon helped me fix this.. :)
            Choped := Choped+1;
            Wait(2000+Random(2000));
          end;
         
        if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                AntiStuff;
                Wait(2000+Random(3000));
                Status('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end;

        if(Tol > 25)then
          begin
            Status('Maximum tolerance reached.. check your colors.');
            NextPlayer(False);
          end;
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\

  13. #13
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Well this is a lot of better now, and thanks for the credits
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  14. #14
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Np, just to make sure I know what IsUpText is, it searches for the text on the top left corner?

    EDIT:

    SCAR Code:
    if(FindObj(x, y, TreeName, TreeColor, Tol))then
              begin
                Mouse(x, y, 1, 1, True);
                AntiStuff;
                Choped := Choped+1;
                Wait(2000+Random(2000));
              end;

    Really lags the player after they chop the tree. :/

  15. #15
    Join Date
    Oct 2006
    Posts
    2,297
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    yes that's true
    also IsUpTextMulti, that searches for the tect at the left up corner 2 but then multi (3 strings)
    [QUOTE=Santa_Clause;277761]I love you too TSN :p[/QUOTE]
    [CENTER][URL="http://www.stats.srl-forums.com/sigs"][IMG]http://www.stats.srl-forums.com/sigs/1324.png[/IMG][/URL][/CENTER]

  16. #16
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    But i thought FindObj does that anyway?

  17. #17
    Join Date
    Jan 2007
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NinjaTerrorist View Post
    Thanks guys, i added your suggestions to my new chop procedure:

    SCAR Code:
    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

    procedure ChopTree;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\}

      begin
     
        if(FindObj(x, y, TreeName, TreeColor, Tol))then
          begin
            MMouse(x,y,2,2);
            Wait(200+Random(300));
          end;                                            // The Scar Noob
        if(IsUpTextMulti('Cho', 'op dow', 'p down'))then  // helped me with
          begin                                           // UpTextMulti :)
            Mouse(x, y, 1, 1, True);
            AntiStuff;               // Madmoon helped me fix this.. :)
            Choped := Choped+1;
            Wait(2000+Random(2000));
          end;
         
        if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                AntiStuff;
                Wait(2000+Random(3000));
                Status('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end;

        if(Tol > 25)then
          begin
            Status('Maximum tolerance reached.. check your colors.');
            NextPlayer(False);
          end;
      end;

    {//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\
    Ahh crap, sorry man, stupid mistake by me. Since find ent needs to be called before clicking, AntiStuff; should be before Mouse(x, y, 1, 1, True);.

    I will be testing this script this afternoon, it' looks alot more reliable now Good work.

  18. #18
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by madmoon View Post
    Ahh crap, sorry man, stupid mistake by me. Since find ent needs to be called before clicking, AntiStuff; should be before Mouse(x, y, 1, 1, True);.

    I will be testing this script this afternoon, it' looks alot more reliable now Good work.
    Thanks, tell me how you get on with it and also i find putting the Anti Randoms before clicking make the script lag's like hell but your right it should go there, any ideas how to reduce script lag?

  19. #19
    Join Date
    Jan 2007
    Location
    In my evil lair!
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It worked pretty good. But somtimes i found my self in Lummy or teled away...
    But i just think the trees were in the way.

    But, other wise it works great!



    P.S. i need to try the 3rd one.

  20. #20
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is v3 just a bit fixed up and better:

    SCAR Code:
    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
    {/                                                                   \}
    {/                    Simple PowerCutter v0.3b                       \}
    {/                                                                   \}
    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
    {/                                                                   \}
    {/      # ScriptName  = Simple PowerCutter                           \}
    {/      # Author      = NinjaTerrorist                               \}
    {/      # Description = Simple powercutter for all f2p trees.        \}
    {/      # Version     = v0.3b                                        \}
    {/      # Date        = January 29, 2007                             \}
    {/      # Comments    = Start where trees are.                       \}
    {/      # Contact     = [email]NinjaTerrorist@Gmail.com[/email]                     \}
    {/                                                                   \}
    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}
    {/   Script by NinjaTerrorist, like it and/or use it? Please leave   \}
    {/   a comment on my thread.                                         \}
    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    program SimplePowerCutter;

      {.include SRL/SRL.scar}
      {.include SRL/SRL/SKILL/Woodcutting.scar}

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    var
      Choped, Tol, Responded : Integer;
      Loads, Loggs : Integer;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    const
      TreeColor = 3553336;          { - Ctrl+P to pick the color.       - }
      TreeName  = 'Tree';           { - e.g Willow must be a string.    - }
      UsingAxe  = False;            { - Is your axe equiped?            - }
      Load      = 100;              { - Loads todo. Each player.        - }
      LogOutT   = 5;                { - Minutes to stay logged out for. - }
      PanicKey  = 12;               { - 1 = F1, 2 = F2 ect.             - }

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        CurrentPlayer:= 0;
        NumberOfPlayers(HowManyPlayers);

        Players[0].Name     := '';
        Players[0].Pass     := '';
        Players[0].Nick     := '';
        Players[0].Active   := True;

       {Players[1].Name     := '';
        Players[1].Pass     := '';
        Players[1].Nick     := '';
        Players[1].Active   := True;

        Players[2].Name     := '';       // Remove comments if you are
        Players[2].Pass     := '';       // using more than one player.
        Players[2].Nick     := '';
        Players[2].Active   := True;

        Players[3].Name     := '';
        Players[3].Pass     := '';
        Players[3].Nick     := '';
        Players[3].Active   := True;}

      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure CheckName;
      begin
        if(TreeName = '')then
          begin
            WriteLn('Invalid tree name..');
            TerminateScript;
          end;
        if(TreeColor = )then
          begin
            WriteLn('Invalid tree color..');
            TerminateScript;
          end;
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure Setup;
      begin
        if(not(LoggedIn))then
          begin
            LoginPlayer;
            Loggs := Loggs+1;
            WriteLn('Logged player in.');
          end;
        if(LoggedIn)then
          begin
            SetupSRL;
            ActivateClient;
            MakeCompass('N');
            HighestAngle;
            FixChat;
            WriteLn('Script started at: '+(TheTime));
            FindAxeHeadColor;
            Tol := 11;
            Loads := 0;
          end;
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure AutoRespond;

    var
    TalkBack : array [1..5] of string;

     begin

      OldLine := TheLine;
      TheName := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
      TheLine := Lowercase(Trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
      NewLine := TheLine;

      if(OldLine <> NewLine)then
       begin
        Exit;
       end

    if(pos('yo', TheName)<>0)or(pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
        begin
        end

       else

      begin
       repeat

        if(InChatMulti('lol', 'lmao', 'rofl'))then
         begin
          TalkBack[1] := 'lol';
          TalkBack[2] := 'lolz';
          TalkBack[3] := 'lmao';
          TalkBack[4] := 'rofl';
          TalkBack[5] := 'rofl!!';
          WriteLn('Responding to chat message.');
          TypeSend(TalkBack[1+Random(5)]);
          Responded := Responded+1;
         end;

       if(InChatMulti('hi', 'hey', 'sup'))then
        begin
         TalkBack[1] := 'hi';
         TalkBack[2] := 'hey';
         TalkBack[3] := 'sup';
         TalkBack[4] := 'wassup?';
         TalkBack[5] := 'who are you?';
         WriteLn('Responding to chat message.');
         TypeSend(TalkBack[1+Random(5)]);
         Responded := Responded+1;
        end;

       if(InChatMulti('wc lvl', 'wc lvl?', 'woodcutting lvls?'))then
        begin
         TalkBack[1] := IntToStr(GetSkillLevel('Woodcutting'));
         WriteLn('Responding to chat message.');
         TypeSend(TalkBack[1]);
         Responded := Responded+1;
        end;

       if(InChatMulti('****', '***', '**** you'))then
        begin
          TalkBack[1] := 'dont swear its naughty';
          TalkBack[2] := 'didnt you mother teach you manners?';
          WriteLn('Responding to chat message.');
          TypeSend(TalkBack[1+Random(3)]);
          Responded := Responded+1;
        end;

       if(not(LoggedIn))then
        Break;
       until(false);
      end;
    end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure AntiStuff;
      begin
        FindNormalRandoms;
        FindHead;
        FindEnt(TreeColor);
        AutoRespond;
          if(FindFight)then
            begin
              RunAwayDirection('N');
              Wait(4000+Random(2000));
              RunBack;
            end;
       end;
    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure DropTheLogs;
       begin
        if(UsingAxe)
          then
            begin
              DropAll;
            end
          else
            begin
              DropToPosition(2, 28);
            end;
       end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure RandomizeClick;
      begin
        case Random(2) of
          0 : PopUp2(x, y, 1, 1, 'Chop');
          1 : Mouse(x, y, 1, 1, True);
        end;
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure ChopTree;
      begin

        if(FindObj(x, y, TreeName, TreeColor, Tol))then
          begin
            MMouse(x, y, 2, 2);
            Wait(200+Random(300));
          end;
        if(IsUpTextMulti('Cho', 'op dow', 'p down'))then
          begin
            RandomizeClick;
            Choped := Choped+1;
            Wait(3000+Random(3000));
          end;

        if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                Wait(2000+Random(3000));
                WriteLn('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end;

        if(Tol > 25)then
          begin
            WriteLn('Maximum tolerance reached.. check your colors.');
            NextPlayer(False);
            Loggs := Logs+1;
          end;
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure Report;

      begin
        WriteLn('');
        WriteLn(' --------------------------------');
        WriteLn('    Simple PowerChopper v0.12a   ');
        WriteLn(' --------------------------------');
        WriteLn('  Logged in: '+IntToStr(Loggs)+' times.');
        WriteLn('  Droped: '+IntToStr(Loads)+' loads.');
        WriteLn('  Choped: '+IntToStr(Choped)+' logs.');
        WriteLn('  Player: '+Players[CurrentPlayer].Name);
        WriteLn(' ---------------------------------');
        WriteLn('');
        SRLRandomsReport;
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    procedure MainLoop;

      begin
        repeat
          AntiStuff;
          ChopTree;
          if(not(LoggedIn))then
            begin
              Break;
            end;
        until(InvFull)
        DropTheLogs;
        Loads := Loads+1;
        Report;
        if(LoggedIn)
        and(Loads > Load)then
          begin
            LogOut;
            Wait(LogOutT*60000);
            NextPlayer(True);
            Loggs := Logs+1;
          end;
        if(not(LoggedIn))
        or(FindDead)
        or(InBlack)then
          begin
           NextPlayer(False);
           Loggs := Logs+1;
          end
      end;

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

    begin
      DeclarePlayers;
      Setup;
        repeat
          MainLoop;
        until(IsFKeyDown(PanicKey))
      WriteLn('Panic key pressed ending script..');
      WriteLn('Script ended at: '+TheTime);
    end.

    {/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\}

  21. #21
    Join Date
    Jan 2007
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    One of the reasons of lag would be re-calling this,
    SCAR Code:
    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then

    Would it be easier and less lag if you did this:

    SCAR Code:
    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                Wait(2000+Random(3000));
                WriteLn('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end else
           begin
            MMouse(x, y, 2, 2);
            Wait(200+Random(300));
           end;

  22. #22
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by madmoon View Post
    One of the reasons of lag would be re-calling this,
    SCAR Code:
    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then

    Would it be easier and less lag if you did this:

    SCAR Code:
    if(not(FindObj(x, y, TreeName, TreeColor, Tol)))then
          begin
            repeat
              if(not(LoggedIn))then
                begin
                  Break;
                end;
                LowestAngle;
                Wait(2000+Random(3000));
                WriteLn('Tree not found, increasing tolerance.');
                Tol := Tol+2;
             until(FindObj(x, y, TreeName, TreeColor, Tol))or
                  (Tol > 25)
           end else
           begin
            MMouse(x, y, 2, 2);
            Wait(200+Random(300));
           end;
    Thanks I fixed the lag problem already but adding this might make the script more efficient , the problem with the lag I fixed by adding the AntiStuff; before ChopTree; in the mainloop:

    SCAR Code:
    procedure MainLoop;

      begin
        repeat
          [B]AntiStuff;[/B]
          ChopTree;
          if(not(LoggedIn))then
            begin
              Break;
            end;
        until(InvFull)
        DropTheLogs;
        Loads := Loads+1;
        Report;
        if(LoggedIn)
        and(Loads > Load)then
          begin
            LogOut;
            Wait(LogOutT*60000);
            NextPlayer(True);
            Loggs := Logs+1;
          end;
        if(not(LoggedIn))
        or(FindDead)
        or(InBlack)then
          begin
           NextPlayer(False);
           Loggs := Logs+1;
          end
      end;

  23. #23
    Join Date
    Oct 2006
    Posts
    189
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Just put Wait(10) between your antirandoms... easy...
    thanks the scar noob, for the avatar, it rocks!

    my sig owns

  24. #24
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by fourscape View Post
    Just put Wait(10) between your antirandoms... easy...
    That works too.

  25. #25
    Join Date
    Jan 2007
    Location
    In my evil lair!
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well... Version 3 didn't work that well for me. I came to the computer once and...well...it was like
    Imao, Lol, rofl, ect.
    for like forever, non-stop until it could shut it off.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. RM PowerCutter
    By Sir R. M8gic1an in forum RS3 Outdated / Broken Scripts
    Replies: 61
    Last Post: 05-31-2008, 10:27 AM
  2. PowerCutter
    By Miitchyy in forum RS3 Outdated / Broken Scripts
    Replies: 21
    Last Post: 07-09-2007, 06:36 AM
  3. Replies: 5
    Last Post: 03-26-2007, 07:57 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
  •