Page 2 of 6 FirstFirst 1234 ... LastLast
Results 26 to 50 of 132

Thread: Making your first woodcutting script.

  1. #26
    Join Date
    Mar 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow,thanks I made one basically copied yours except I read how it works.Thank you!

  2. #27
    Join Date
    Feb 2007
    Location
    England
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice tut, helped me alot,
    and yes time to find anti-randoms

  3. #28
    Join Date
    Sep 2007
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice job

  4. #29
    Join Date
    Sep 2007
    Posts
    14
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i did EXACTLY as you did and this happens:
    Failed when compiling
    Line 10: [Error] (14760:1): Unknown identifier 'SetupPlayers' in script


    but its still a good tutorial, i learned some things =)

  5. #30
    Join Date
    May 2006
    Posts
    1,230
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by runenoob View Post
    i did EXACTLY as you did and this happens:
    Failed when compiling
    Line 10: [Error] (14760:1): Unknown identifier 'SetupPlayers' in script


    but its still a good tutorial, i learned some things =)
    Yea, thats not in the new SRL i believe =S, Try HowManyPlayers(howmanyplayersyouhave) inplace of that.

  6. #31
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    NumberOfPlayers, not HowManyPlayers.
    Interested in C# and Electrical Engineering? This might interest you.

  7. #32
    Join Date
    May 2007
    Location
    California
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very nice!

  8. #33
    Join Date
    Jun 2007
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    I finally made a real script. Thanks.

  9. #34
    Join Date
    Sep 2007
    Location
    Right behind you!
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  10. #35
    Join Date
    Sep 2007
    Location
    Canada Eh
    Posts
    79
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice script, showed me how its done . ty

  11. #36
    Join Date
    Sep 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    NumberOfPlayers, not HowManyPlayers.
    I switched it to that and i get a new error,
    Line 10: [Error] (14691:16): Invalid number of parameters in script

    Great tutorial though, thanks

  12. #37
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    when i try to compile the script i says unknown identifier loadplayerarray

  13. #38
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nevermind i think i fixed it

  14. #39
    Join Date
    Aug 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    now it saying unknown identifier droptoposition

  15. #40
    Join Date
    Oct 2007
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by tehkow View Post
    I switched it to that and i get a new error,
    Line 10: [Error] (14691:16): Invalid number of parameters in script

    Great tutorial though, thanks
    hey dude i know what's the problem
    u have to change SetupPlayers;
    to NumberOfPLayers(2);
    CurrentPlayer := 0;
    and then u have to erase LoadPlayerArray;
    and compile and will be Successfully compiled

  16. #41
    Join Date
    Jul 2007
    Location
    So Cal
    Posts
    410
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    i added randoms put i get this error

    Line 10: [Error] (14691:1): Unknown identifier 'SetupPlayers' in script C:\Program Files\SCAR 3.12\Scripts\my first auto cutter with randoms still in testing!!!!.scar

    heres the script if you need it to solve the problem please help thank.

    program New;
    {.include SRL/SRL.scar}

    const
    LoadsPerPlayer = 10; //Amounts of loads per player before switching.
    TreeColor = 0; //Fill in the treecolor here.
    WaitPerTree = 5000; //the time to wait while we are chopping the tree in Miliseconds.
    procedure DeclarePlayers;
    begin
    SetupPlayers;

    Players[0].Name := '';// some what obvious put your name here.
    Players[0].Pass := '';//once again obivious put your characters pass here.
    Players[0].Nick := '';// put your nick name here.
    Players[0].Active := True; //if using or not

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

    LoadPlayerArray;
    end;

    procedure ChopTree;
    var
    x, y, MyMark : integer;
    begin
    if not Loggedin then Exit;
    MarkTime(MyMark);
    repeat
    if FindObj(x, y, 'hop', TreeColor, 30) then
    begin
    Mouse(x, y, 0, 0, False);
    if ChooseOption('hop') then
    begin
    //increase 1 to the total tree chop - if we had one
    Wait(WaitPerTree);
    Exit; //We clicked chop, now we can exit this procedure.
    end;
    end;
    if TimeFromMark(MyMark) > (2 * 60 * 100) then
    begin
    Logout;
    Exit;
    end;
    until false
    end;

    begin
    SetupSRL;
    DeclarePlayers;
    if LoggedIn then Logout;
    LoginPlayer;
    repeat
    ChopTree;
    if InvFull then
    begin
    DropToPosition(2, 28);
    Inc(Players[CurrentPlayer].Banked);
    if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
    begin
    NextPlayer(True);
    end;
    end;
    if not Loggedin then NextPlayer(False);
    until false
    end.
    Procedure Randoms;
    Begin
    Findnormalrandoms;
    End;
    Procedure Antibanactions;
    DBanMe:=Random(10)
    Case DBanME of
    0: RandomRClickEvery(2+Random(13));
    1: HoverSkill9'Mining',False);
    2: RandomChatEvery(10+Random(5));
    3: RotateEvery(20+Random(10));
    4: LeaveScreenEvery(5 + Random(5));
    5: HoverEvery(15 + Random(5), 'Attack');
    6: PickUpMouse;
    7: BoredEvery(9 + Random(24));
    8: DragItem(1, 1 + Random(18));
    9: GameTab(1 + Random(12));
    10: RotateEvery(7 + random(4));
    end;
    end;

  17. #42
    Join Date
    Oct 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you, this really helped ^_^
    I Am Angry

  18. #43
    Join Date
    Jul 2007
    Location
    So Cal
    Posts
    410
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    i get this now i added the number of players and nowe this is what i get.

    Line 10: [Error] (14691:16): Invalid number of parameters in script C:\Program Files\SCAR 3.12\Scripts\my first auto cutter with randoms still in testing!!!!.scar

  19. #44
    Join Date
    Sep 2007
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very nice tutorial! I am still pretty new to Scar, but this tutorial might just be the one that will finally allow me to make myself an autoer. Just one tiny thing I realized:
    SCAR Code:
    procedure ChopTree;
    var
      x, y, MyMark : integer;
    begin
      if not Loggedin then Exit;
      MarkTime(MyMark);
      repeat
        if FindObj(x, y, 'hop', TreeColor, 30) then
        begin
     
        end;  
        if TimeFromMark(MyMark) > (2 * 60 * 100) then
        begin
       
        end;
      until false
    end;
    ...And later you said...
    (2 * 60 * 1000)
    Now, this might just be my eyes being cheated, but I'm pretty sure there is a 0 added on (or better yet, a 0 substracted, because the one where a 0 was added is the correct statement, I blieve).

    But appart from that, this is awsome!!!!

  20. #45
    Join Date
    Mar 2007
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    good tutorial, makes me closer to scripting myself.

  21. #46
    Join Date
    Jul 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    a++++ job dude!

  22. #47
    Join Date
    Sep 2007
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    DUDE - THANK YOU

    I needed this very much

  23. #48
    Join Date
    Oct 2006
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    this is what i got, i even tried copying and pasting, same thing happens...

    Code:
    Line 21: [Error] (14702:1): Unknown identifier 'SetupPlayers' in script C:\Program Files\SCAR 3.12\Scripts\TestWC.scar

  24. #49
    Join Date
    May 2006
    Posts
    250
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This was my finished product and i was pretty pround until it failed yo compile producing the error(s):
    SCAR Code:
    Line 9: [Error] (15037:1): Semicolon (';') expected in script
    Failed when compiling

    SCAR Code:
    Line 9: [Error] (15037:1): Semicolon (';') expected in script

    SCAR Code:
    Line 10: [Error] (15038:1): Unknown identifier 'SetupPlayers' in scrip


    SCAR Code:
    program TrunkSmasher;

    {.include SRL/SRL.scar}

    /////////////////////////////////SETUP\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

    const
     LoadsToBlow = 100          //How Many Loads You Want Chopped Per Player Before Switching.
     TreeColor1 = 264199        //Color Of Tree Leaves.
     AxeEquipped = true          //Is Your Axe Equipped?
     WaitPerTree = 5500          //How Long To Spend Smashing A Tree.

    //////////////////////////////DON'T TOUCH\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    procedure SmashTrunk;
    var
     x, y, MyMark : interger;
    begin
      if not LoggedIn then Exit;
      repeat
       if FindObj(x, y, 'hop', TreeColor1, 25) then
       begin
         Mouse(x, y, 1, 1, False);
         if ChooseOption('hop') then
         begin
          Wait(WaitPerTree);
          Exit;
         end;
       end;
       if TimeFromnMark(MyMark) >(4 * 30 * 1000) then
       begin
        Logout;
        Exit;
       end;
      until false
     end;

    procedure DeclarePlayers;
     begin
      SetupPlayers;
     
       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;

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

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

       LoadPlayerArray;
     end;

    begin
      SetupSRL;
      DeclarePlayers;
      if LoggedIn then Logout;
      LoginPlayer;
      repeat
       SmashTrunk;
       if InvFull then
       begin
        DropToPosition(2, 28);
        if AxeEquipped then DropAll;
        Inc(Players[CurrentPlayer].Banked);
        if Players[CurrentPlayer].Banked mod LoadPerPlayer = 0 then
        begin
          NextPlayer(True);
        end;
       end;
       if not LoggedIn then NextPlayer(False);
      until false
       

    end.

  25. #50
    Join Date
    Oct 2006
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Ok, I found my problem out, if anyone need it.


    switch
    SCAR Code:
    LoadPlayerArray;
    with
    SCAR Code:
    CurrentPlayer := 0;

    and

    SCAR Code:
    SetupPlayers;
    with
    SCAR Code:
    NumberOfPlayers(Numbofplayershere);

Page 2 of 6 FirstFirst 1234 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. First woodcutting script help.
    By bondman in forum OSR Help
    Replies: 4
    Last Post: 11-15-2007, 03:27 AM
  2. Problems With My Woodcutting Script.
    By in_jeopardy in forum OSR Help
    Replies: 2
    Last Post: 10-29-2006, 10:58 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
  •