Results 1 to 7 of 7

Thread: help with script

  1. #1
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default help with script

    ok so im learning how to script and ive got most of the basics down. I am making a very simple powerchopper just to mess around with and get familiar with scripting.
    So heres the problem that im having....when it clicks the tree it keeps clicking even if its not on the tree and my guy is running around runescape freaking out lol. What am i doing wrong in the coding for it to do it cuz i have wait time and stuff...help plz

    SCAR Code:
    program Powerchopper;
    {.include SRL/SRL.scar}

    const
      TreeColor=665632;
     
    procedure Chop;
      begin
        repeat
      if (findcolor(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2))then
        MMouse(x,y,0,0);
        Wait(2000 + random(500));
        Mouse(x,y,0,0,True);
        until
        InvCount=(10);
      end;
    begin
      SetupSRL;
    repeat
      Chop;
    until(true);
    end.
    METAL HEAD FOR LIFE!!!

  2. #2
    Join Date
    Jun 2006
    Location
    New Zealand
    Posts
    285
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    if (findcolor(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2))then
    begin //Remember your begins and ends;
      MMouse(x,y,0,0);
      if(isuptext('ree')) then //From "tree"
        Mouse(x,y,0,0,True);
    end;

  3. #3
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    ahh new problem....ty for help it worked for a while but now it is going back to the rapid click bullshit lol...

    ive changed it so it right clicks but it still rapid right clicks now lol

    SCAR Code:
    program Powerchopper;
    {.include SRL/SRL.scar}

    var Loads: Integer;

    //SETUP HERE//
    const
      TreeColor=1529936;//set tree color here
     


    //ANTIRANDOMZ//
    procedure AntiRandomz;
      begin
        FindTalk;
        FindNormalRandoms;
          if(FindFight = True)then
            begin
            RunAwayDirection('S');
            Wait(10500 + random (1300));
            RunBack;
        end;
    end;
         
    //CHOPING PROCEDURE//
    procedure Chop;

    begin
         if(FindColor(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2))then
    begin
      repeat
      MMouse(x,y,2,1);
        if(IsUpText('illow'))then
          Wait(5000 + random(250));
          Mouse(x,y,3,3,False);
          ChooseOption(x,y,'hop');
           until(InvFull);
            end;
          end;
    //DROPPING PROCEDURE//
    procedure Drop;
      begin
        GameTab(4);
        if(InvFull)then
          begin
            DropTo(2,28)
            Loads:=Loads+1;
        end;
    end;
    //PROGRESS REPORT//
    procedure Proggy;
      begin
      ClearDebug;
        Writeln('*************************************');
        Writeln('=========== PROGRESS REPORT =========');
        Writeln('did' + IntToStr(Loads) + 'Loads' + ' ');
        Writeln('*************************************');
    end;
    //MAIN LOOP//
    begin
      SetupSRL;
    repeat
      AntiRandomz;
        Chop;
          Drop;
            Proggy;
    until(False);
    end.
    METAL HEAD FOR LIFE!!!

  4. #4
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Just add a wait for how long it takes the tree to fall or one before runescape times out and logs u out. Id say about 1000

  5. #5
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    ty =p

    lol i fixed it by moving the wait time after the mouse click lol............

    ok i have a newer problem now (oh joy)

    ive made some antiban stuff for my script and it keeps causing the script to stop after cutting one load of logs....where should i be putting the AntiBan procedure at? like in the main loop and anywhere else in the script? any is help appreciated.

    SCAR Code:
    program Powerchopper;
    {.include SRL/SRL.scar}
    var Loads: Integer;

    //SETUP HERE//
    const

      TreeColor=2121808;//set tree color here
     


    //ANTIRANDOMZ//

    Function FindFastRandoms: Boolean;    // By WT-Fakawi.

    Var
      i: Integer;

    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;

           2:  If FindMod Then
                 Result := True;

           3:  If FindMime Then
                 Result := True;

           4:  If FindMaze Then
                 Result := True;

           5:  If FindQuiz Then
                 Result := True;

           6:  If FindDemon Then
                 Result := True;

           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;

           8 : If RC Then
                 Result := True;

           9 : If FindFight Then
                  Begin
                    Result := True;
                    RunTo('S', True);
                  End;

           10: If FindTalk Then
                 Result := True;

           11: If FindTrade Then
                 Result := True;
        End;
        Wait(1);
      End;
    End;

    //ANTIBAN//
    procedure DontGetBanned;
      begin
         RotateEvery(5 + random(2));
         PickUpMouseEvery(6 + random(2));
         HoverEvery(10 + random(2),'random');
         RandomRClickEvery(2 + random(1));
         LeaveScreenEvery(15 + random(3));
         BoredEvery(10 + random(4));
         Wait(3000 + random(1779));
    end;

    //CHOPING PROCEDURE//
    procedure Chop;

    begin
      SetRun(True);
      GameTab(4);
      Wait(500 + random(250));
         if(FindColorTolerance(x,y,TreeColor,MSX1,MSY1,MSX2,MSY2,3))then
    begin
      repeat
      MMouse(x,y,2,1);
        if IsUpText('illow') then
          Mouse(x,y,3,3,False);
          ChooseOption(x,y,'hop');
          Wait(5000 + random(1200));
          FindFastRandoms;
          until(InvFull);
      end;
    end;
    //DROPPING PROCEDURE//
    procedure Drop;
      begin
        GameTab(4);
        if(InvFull)then
          begin
            DropTo(2,28)
            Loads:=Loads+1;
            TimeRunning;
       end;
    end;
    //PROGRESS REPORT//
    procedure Proggy;
      begin
      ClearDebug;
        Writeln('*************************************');
        Writeln('=========== PROGRESS REPORT =========');
        Writeln('did:  ' + IntToStr(Loads) + '   Loads');
        Writeln('running for:  ' + TimeRunning + '  minutes');
        Writeln('*************************************');
    end;
    //MAIN LOOP//
    begin
      SetupSRL;
      FindFastRandoms;
    repeat
         Chop;
            Drop;
              Proggy;
                DontGetBanned;
    until(False);
    end.
    METAL HEAD FOR LIFE!!!

  6. #6
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    The antiban should be a case statemement and only choose one of those options

  7. #7
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    thanks......read tut on cases and helped alot.

    ok now im trying to use MarkTime in my chopping procedure to use antirandoms and antiban all in one but I am getting "variable expected error". Can anyone explain how to set up marktime in terms of constants/variables and what numbers (if needed) to use?

    Ive read a few tuts on this but i need a lil bit more detail to figure this out cuz im a noob lol...

    ty
    METAL HEAD FOR LIFE!!!

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
  •