Results 1 to 6 of 6

Thread: trying to learn

  1. #1
    Join Date
    Jun 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default trying to learn

    ive been wanting to learn how to script for awhile now, and i decided to give it a shot. i want to start out by doing something as simple as cutting down a tree, ive been looking at (Surajd's willow smasher banker) to base my 1st script off of.. but im having problems, i cant seem to get the mouse to move over a tree, instead all it does is click every few seconds without moving the mouse.

    eventualy i want to edit and build on this to turn it into a log cutter and burner.

    Code:
    program CutAndBurn;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Woodcutting.scar}
    
    var
       Loads: Integer;
       
    const
         Times = 2;
         WaitTime = 5000;
         TreeColor = 622696;
         
    procedure SetupScript;
    begin
         SetChat('Hide', 1);
         SetChat('Off', 2);
         SetChat('Off', 3);
         SetRun(true);
         GameTab(4);
    end;
         
    procedure CutTrees;
    begin
         if (FindMainColor(x, y, TreeColor, 3, true)) then
         begin
              repeat
              wait(1023 + random(323 * 5 / 2));
              if (IsUpText('Chop down')) then
                 MMouse(x, y, 1, 2);
              GetMousePos(x, y);
              Mouse(x, y, 1, 2, true);
              wait(WaitTime + Random(427 * 8 / 2 + 3 - 1));
              until (InvFull);
              Loads := Loads +1
         end;
    end;
    
    procedure MainLoop;
    begin
         repeat
               SetupScript;
               CutTrees;
         until (Times = Loads);
         Logout;
         Writeln('CutAndBurn Complete!');
    end;
    
    begin
         Loads := 0
         Writeln('CutAndBurn Scrapys TEST script');
         SetupSRL;
         DisguiseScar('Notepad');
         MainLoop;
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Myrtle Beach, SC USA!
    Posts
    841
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    try this

    PHP Code:
    program CutAndBurn;
    {.include 
    SRL/SRL.scar}
    {.include 
    SRL/SRL/Skill/Woodcutting.scar}

    var
       
    LoadsInteger;

    const
         
    Times 2;
         
    WaitTime 5000;
         
    TreeColor 622696;

    procedure SetupScript;
    begin
         SetChat
    ('Hide'1);
         
    SetChat('Off'2);
         
    SetChat('Off'3);
         
    SetRun(true);
         
    GameTab(4);
    end;

    procedure CutTrees;
    begin
      
    if ( not LoggedIn )) then Exit;
      if (
    FindMainColor(xyTreeColor3true)) then
      begin
        MMouse
    (xy12);
        if (
    IsUpText('Chop down')) then
        begin
         Mouse
    (xy12true);
         
    wait(WaitTime Random(427 ));
        
    end;
      
    end;
    end;

    begin
      Loads 
    := 0
      Writeln
    ('CutAndBurn Scrapys TEST script');
      
    SetupSRL;
      
    SetUpScript;
      
    DisguiseScar('Notepad');
      
    repeat

        repeat
          CutAllLogs
    ;
          if ( 
    not LoggedIn )) then Break;
          
    DropAllLogs;
        
    until Loads Times );
      
    LogOut;
      
    until false );
    end
    Retired SRL Leader - Web Developer by Trade, Free Lancer

    http://s-vizion.com
    http://blog.s-vizion.com

  3. #3
    Join Date
    Jun 2006
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thankyou so much

  4. #4
    Join Date
    Jun 2007
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    can i test it?

  5. #5
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Another year old gravedig! you rule...
    The truth finally came out...


  6. #6
    Join Date
    Oct 2006
    Location
    MI USA
    Posts
    3,166
    Mentioned
    6 Post(s)
    Quoted
    11 Post(s)

    Default

    Locked and Infracted x 3 in other posts.


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. need to learn c++
    By sherlockmeister in forum C/C++ Help and Tutorials
    Replies: 1
    Last Post: 03-02-2008, 03:19 PM
  2. I would like to learn Java
    By papenco in forum Java Help and Tutorials
    Replies: 6
    Last Post: 01-22-2008, 05:14 AM
  3. i would like to learn
    By gameness in forum News and General
    Replies: 2
    Last Post: 08-12-2007, 05:47 AM
  4. Where Do I Learn Scripting?
    By Zodia in forum News and General
    Replies: 2
    Last Post: 05-29-2007, 06:13 AM

Posting Permissions

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