Results 1 to 10 of 10

Thread: Need little bit help.

  1. #1
    Join Date
    Nov 2010
    Posts
    305
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default Need little bit help.

    Recently I started making "Scripts" (Can't really say that but its a start) so yes it's basic only thing what messes up is, when I run it (It's for a Runescape Private Server Though) works fine and all. But then comes a server restart and it wont login cause I don't know how to. So to make a big story little...

    When I FindColor(xxxx rest of code) it clicks on a tree, i'm a beginner and just have one big messy loop, so if I add to click on login, it clicks ingame. How can I get 2 seperate lines if it finds LogOut color it will login then wait for the tree?

    My Code

    Code:
    program DeltaScapeAutoCutterFletcherAndDropper;
    
    var
         x, y: Integer;
    
    
    
    
    begin
    repeat
    if FindColor (x, y, 9615544, 145, 181, 294, 300)then
    MoveMouseSmooth(x, y);
    Wait(200+random(300));
    ClickMouse(x, y, True);
    Wait(100);
    ClickMouse(x, y, True);
    Wait(300);
    ClickMouse(x, y, True);
    Wait(38000+random(2000));
    // Clicked Tree waiting till inventory is full.
    
    MoveMouseSmooth(584, 228);
    Wait(130+random(120));
    ClickMouse(584, 228, True);
    Wait(150+random(100));
    MoveMouseSmooth(670+random(10), 227+random(10));
    Wait(150+random(120));
    ClickMouse(670+random(10), 227+random(10), True);
    Wait(160+random(333));
    
    MoveMouseSmooth(584, 228);
    Wait(130+random(120));
    ClickMouse(584, 228, True);
    Wait(150+random(100));
    MoveMouseSmooth(670+random(10), 227+random(10));
    Wait(150+random(120));
    ClickMouse(670+random(10), 227+random(10), True);
    Wait(160+random(333));
    
    //Replace with Shortbows
    MoveMouseSmooth(358+random(10), 418+random(8));
    Wait(90+random(100));
    ClickMouse(358+random(5), 418+random(5), False);
    Wait(90+random(100));
    MoveMouseSmooth(358+13, 418+33);
    Wait(120+random(130));
    MoveMouseSmooth(363, 452);
    Wait(120+random(80));
    ClickMouse(363, 452, True);
    MoveMouseSmooth(358+random(10), 418+random(8));
    Wait(90+random(100));
    ClickMouse(358+random(5), 418+random(5), False);
    Wait(90+random(100));
    MoveMouseSmooth(358+13, 418+33);
    Wait(120+random(130));
    MoveMouseSmooth(363, 452);
    Wait(120+random(80));
    ClickMouse(363, 452, True);
    Wait(50000+random(1000));
    //Used Knife on Logs picked "LongBow"
    
    
    MoveMouseSmooth(669, 227);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(669, 227, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(669, 227+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(669, 227+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(669, 227);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(669, 227, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(669, 227+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(669, 227+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    
    MoveMouseSmooth(710, 228);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(710, 228, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(710, 228+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(710, 228+41, True);   //Clicking Drop
    Wait(60+random(30));          //DONE
    
    MoveMouseSmooth(584, 264);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(584, 264, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(584, 264+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(584, 264+41, True);   //Clicking Drop
    Wait(60+random(30));       //DONE
    
    MoveMouseSmooth(628, 263);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(628, 263, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(628, 263+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(628, 263+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(669, 263);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(669, 263, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(669, 263+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(669, 263+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(713, 264);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(713, 264, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(713, 264+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(713, 264+41, True);   //Clicking Drop
    Wait(60+random(30));            //DONE
    
    MoveMouseSmooth(586, 302);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(586, 302, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(586, 302+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(586, 302+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(628, 304);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(628, 304, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(628, 304+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(628, 304+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(669, 301);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(669, 301, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(669, 301+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(669, 301+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(710, 299);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(710, 299, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(710, 299+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(710, 299+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(584, 335);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(584, 335, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(584, 335+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(584, 335+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(627, 336);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(627, 336, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(627, 336+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(627, 336+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(669, 338);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(669, 338, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(669, 338+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(669, 338+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(710, 337);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(710, 337, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(710, 337+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(710, 337+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(585, 374);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(585, 374, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(585, 374+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(585, 374+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(626, 374);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(626, 374, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(626, 374+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(626, 374+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(667, 370);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(667, 370, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(667, 370+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(667, 370+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(710, 372);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(710, 372, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(710, 372+41);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(710, 372+41, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(584, 409);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(584, 409, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(584, 409+12);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(584, 409+12, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(625, 408);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(625, 408, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(625, 408+12);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(625, 408+12, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(668, 409);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(668, 409, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(668, 409+12);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(668, 409+12, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(710, 408);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(710, 408, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(710, 408+12);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(710, 408+12, True);   //Clicking Drop
    Wait(60+random(30));
    
    
    //    Not sure if work!
    
    
    
    
    MoveMouseSmooth(583, 446);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(583, 446, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(583, 446-15);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(583, 446-15, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(627, 443);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(627, 443, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(627, 443-15);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(627, 443-15, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(667, 445);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(667, 445, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(667, 445-15);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(667, 445-15, True);   //Clicking Drop
    Wait(60+random(30));
    
    MoveMouseSmooth(709, 446);   //Moving to Bow
    Wait(110+random(40));
    ClickMouse(709, 446, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(709, 446-15);  //Moving to Drop
    Wait(120+random(40));
    ClickMouse(709, 446-15, True);   //Clicking Drop
    Wait(60+random(30));
    MoveMouseSmooth(647, 186);
    Wait(100+random(30));
    ClickMouse(647, 186, True);
    Wait(200);
    
    
    
    
    
    
    
    
    Until false;
    
    end.
    Yes I tried to help myself with // Pretty much messy also I gotta clean my Script soon lol.
    Also why do people use like this
    MoveMouseSmooth(667, 445); //Moving to Bow
    Wait(110+random(40));
    ClickMouse(667, 445, False); //Right Click Bow prepare for "Drop"
    Wait(110+random(40));
    MoveMouseSmooth(667, 445-15); //Moving to Drop
    Wait(120+random(40));
    ClickMouse(667, 445-15, True); //Clicking Drop

    With the spaces thank you for helping!

  2. #2
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    I guess it's a start. Also, you only need 1 block of your loop instead of many over and over. At the end of every loop, check if it's logged in. If not, then log back in. I'm not sure how you could do this on this specific private server, but in the normale RuneScape client there's a function in SRL (LoggedIn). So if it were normal RS, it would be
    Simba Code:
    if not(LoggedIn) then
      Login; //Standards ;)

  3. #3
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you mean like this("X" will be the space):
    ClickMouse(666,X666,XFalse);

    It just makes the code look neater. It's also easier to read. As for the log in trouble:

    Code:
    If FindColor(the logged out color, w/e, w/e) Then
    Begin
      Mouse(666, 666, 0, 0, True);//Rights clicks the box where your username goes.
      TypeSend('jbeifbuweyhf');//Or w/e other typing function.
      Click the pass text box
      TypeSend('jbifbyef');
      Repeat
        Wait(25+Random(25));
      Until(FindColor(tree color, the X of the color, the Y of the color,blablabla);
    Then you continue with the chopping and fletching. Hope that helps.


    @Tom: I'm pretty sure that won't work for a private server. They are totally different. But the advice will lead him into real rs scripting.

    @Failure: You should learn to make procedures and functions. Seeing if your logged in can be easily made into a function. The tree chopping and fletching could be two separate procedures. If you want an example for help, just ask.
    Last edited by Runescape Pro; 11-19-2010 at 06:56 AM. Reason: Extra st00f

  4. #4
    Join Date
    Nov 2010
    Posts
    305
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Runescape Pro View Post
    If you mean like this("X" will be the space):
    ClickMouse(666,X666,XFalse);

    It just makes the code look neater. It's also easier to read. As for the log in trouble:

    Code:
    If FindColor(the logged out color, w/e, w/e) Then
    Begin
      Mouse(666, 666, 0, 0, True);//Rights clicks the box where your username goes.
      TypeSend('jbeifbuweyhf');//Or w/e other typing function.
      Click the pass text box
      TypeSend('jbifbyef');
      Repeat
        Wait(25+Random(25));
      Until(FindColor(tree color, the X of the color, the Y of the color,blablabla);
    Then you continue with the chopping and fletching. Hope that helps.


    @Tom: I'm pretty sure that won't work for a private server. They are totally different. But the advice will lead him into real rs scripting.

    @Failure: You should learn to make procedures and functions. Seeing if your logged in can be easily made into a function. The tree chopping and fletching could be two separate procedures. If you want an example for help, just ask.
    Hahah I know, but we all started with this crap instead of that didn't we? I'll try it out if I can figure it out in the messy Script !
    Also little question, everytime I log out and then run the Script it goes to left corner due Color how do I fix that so I can bot continuesly.


    Quess I messed up...

    Code:
    begin
    
    
    repeat
    
    
    If FindColor(x, y, 3879730, 393, 274, 533, 311) Then
    Begin
      MoveMouseSmooth(453, 294);
      Wait(100);
      ClickMouse(452, 294, True);
      Wait(1000);
      MoveMouseSmooth(302, 324);
      Wait(1000);
      ClickMouse(302, 324, True);
      Wait(8000);
    
    
      Repeat
        Wait(25+Random(25));
      Until(FindColor(x, y, 8894648, 191, 165, 260, 215));
    
    MoveMouseSmooth(x, y);
    Wait(200+random(300));
    ClickMouse(x, y, True);
    Wait(100);
    ClickMouse(x, y, True);
    Wait(300);
    ClickMouse(x, y, True);
    Wait(38000+random(2000));
    // Clicked Tree waiting till inventory is full.
    Error : Line 340: [Error] (340:1): Identifier expected in script C:\Program Files\SCAR 3.22\Scripts\Deltascape Woodcutter+Fletcher+Dropper.scar

    Line 340 Until false;
    Last edited by Failure; 11-19-2010 at 07:21 AM.

  5. #5
    Join Date
    Jun 2007
    Location
    Greenville, SC
    Posts
    1,149
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You most likely did not put an end for the "If FindColor(x, y, 3879730, 393, 274, 533, 311) Then
    Begin"

  6. #6
    Join Date
    Nov 2010
    Posts
    305
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Ahh SCAR must give the exact errors lol this is driving me nuts...

    Code:
    If FindColor(x, y, 3879730, 393, 274, 533, 311) Then
    Begin
      MoveMouseSmooth(453, 294);
      Wait(100);
      ClickMouse(452, 294, True);
      Wait(1000);
      MoveMouseSmooth(302, 324);
      Wait(1000);
      ClickMouse(302, 324, True);
      Wait(8000);
    
      repeat
      Wait(25+Random(25));
      Until (FindColor(x, y, 8894648, 191, 165, 260, 211) then
    Might you can fix it?

    Error ; Line 25: [Error] (25:53): Closing parenthesis expected in script C:\Program Files\SCAR 3.22\Scripts\Deltascape Woodcutter+Fletcher+Dropper.scar

  7. #7
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Code:
    If FindColor(x, y, 3879730, 393, 274, 533, 311) Then
    begin
      MoveMouseSmooth(453, 294);
      Wait(100);
      ClickMouse(452, 294, True);
      Wait(1000);
      MoveMouseSmooth(302, 324);
      Wait(1000);
      ClickMouse(302, 324, True);
      Wait(8000);
    end;
    
      repeat
      Wait(25+Random(25));
      Until (FindColor(x, y, 8894648, 191, 165, 260, 211) then

  8. #8
    Join Date
    Nov 2010
    Posts
    305
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    That worked Tom, but then I felt on a other error I think if someone would fix it would be nice might take some time. But I'm gonna take a break might just re-write my shitty Script. Before that I gotta learn about Procedures and Functions.

  9. #9
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Quote Originally Posted by Failure View Post
    That worked Tom, but then I felt on a other error I think if someone would fix it would be nice might take some time. But I'm gonna take a break might just re-write my shitty Script. Before that I gotta learn about Procedures and Functions.
    they're quite simple.

    procedures can be used in other parts of the script. They're used to prevent two things: clutter and repetitiveness. let's say you have this procedure (totally made up):

    Simba Code:
    procedure SampleProcedure;
    var
      x, y, i: integer;
      TPA: TPointArray;
    begin
      TPA := FindColorsSpiralTolerance(TPA, x, y, 798223, MSX1, MSY1, MSX2, MSY2);
      for i := 0 to length(TPA) do
      begin
        //stuff
      end;
    end;

    it can be called on in the future in a single line.

    functions return a result, such as a string, integer, or boolean.

    Simba Code:
    function SampleFunction: string; // the : type; portion tells what type the function returns
    begin
      case Random(2) of
        0: Result := 'we rolled a 1';
        1: Result := 'we rolled a 1';
        2: Result := 'we rolled a 1';
      end;
    end;

    begin
      Writeln(SampleFunction);
    end.

    see?

  10. #10
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    "Until (FindColor(x, y, 8894648, 191, 165, 260, 211) then"

    you need another ) before then.

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
  •