Results 1 to 7 of 7

Thread: tpa attack repeat

  1. #1
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default tpa attack repeat

    This is the last time i need help, for now. Im using my tpa script and it works fine but it keeps choosing the option and repeating. I tried switching the procedures but that didnt work and using it inside the function but it still did not work.

    Script=
    Code:
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    //JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
    ///////////////////////////////////////////////////////////////////
    //                            JUNK's LRK
    //bitmap eating procedure           infight to keep fighting if not done
    //antirandoms                       cooked meat eater
    //failsafes                         small const, big result
    //////////////////////////////V2.00////////////////////////////////
    
    
    program LRK;
    {.include srl/srl.scar}
    {.include srl/srl/skill/fighting.scar}
    
    
    var
      x, y, foodbmp, kill : integer;
    
    /////////////////////fill this in/////////////////////////////////////////////
    
    const
      mousecolor= 11974058;// your mouse color
      eat= true; //Cooked meat can only be eaten thanks to jad(boolean)
             //cook raw beef from a cow and get Cook it to get cooked meat
      howmanykills= 10; //how many do you want to kill
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name    := '';
      Players[0].Pass    := '';
      Players[0].Nick    := 'arfl';
      Players[0].Active  := True;
    end;
    //////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////dont touch the rest
    procedure EatFood;    // thanks to marpis
    begin
      foodbmp := BitmapFromString(13, 12, 'beNpzMpoV7zEpyqU/0rnWV' +
         '2BAENBqZERdZbhUEmkaJagn3KkxwGZqjCseK7pCHer8rEs9zBal+A' +
         'AjAqvi9mB7oDkQZSsz/Zek+cIVQyIOiIDmAJW1BNlV+1hmAwB9+ZV' +
         'I');
      if(hppercent<20)then //thanks to marpis again
      begin
        if eat then
        begin
          Writeln('said yes to eat.');
          GameTab(tab_Inv);
          wait(100+random(20));
          if (FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20)) then
          begin
            Mouse(x, y, 2, 2, true);
            writeln('Ate food successfully!');
            wait(1500+random(200));
          end else
          if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
          begin
            writeln('Could not find food');
            exit;
          end;
        end else
        begin
          Writeln('Said no to eat');
          exit;
        end;
      end;
     end;
    
    Procedure Anti;           //Estebans tutorial
    begin
      case random(4) of
    
        0:Sleepandmovemouse(5000+random(1000));
    
        1:Boredhuman;
    
        2:begin
            HoverSkill('Random', false);
            wait(2500+Random(500));
          end;
    
        3:Pickupmouse;
    
        4:Begin
            Makecompass('w')
            wait(1000+random(500))
            makecompass('e')
          end;
      end;
    end;
    
    procedure waitinfight;
    begin
      while infight do anti;
    end;
    
    
    function findmouse : boolean;           //Awkardsaw's tutorial tree finder
    var
    tpa : tpointarray; I : integer;
    begin
      if findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20) then
        for i:= 0 to high(tpa) do
        begin
          mmouse(tpa[i].x, tpa[i].y, 0, 0);
          if isuptext('ttack') then
          begin
            result := true;
            mouse(tpa[i].x, tpa[i].y, 0, 0, false);
            chooseoption('ttack');
            Writeln('Mouse is found');
          end else
            if(not(findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20))) then
            begin
              Writeln('Mouse is not found, logging out.');
              logout;
              terminatescript;
            end;
        end;
    end;
    
    procedure proggy;
    begin
      writeln('Killed aprroximitely ' + inttostr(kill));
      writeln('ran for '+ (timerunning));
      writeln('Junkjs Lumbridge Rat Killer');
      writeln('end of the script');
    end;
    
    procedure death;
    begin
      if(finddead)then
      begin;
        logout;
        proggy;
        Writeln('you died')
        terminatescript;
      end;
    end;
    
    begin;
      setupsrl;
      DeclarePlayers;
      cleardebug;
      activateclient;
      if(not(loggedin))then
      Loginplayer;
      repeat
        Findnormalrandoms;
        findmouse;
        EatFood;
        FreeBitmap(foodbmp);
        finddead;
      until(kill >=howmanykills)
      if(kill >=howmanykills)then
      begin
        logout;
        proggy;
        terminatescript;
      end;
    end.
    Advice and help would be appreciated.

  2. #2
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    What's the point of saying "this is the last time" if it's going to be followed with "for now", because you could ask another question a millisecond later, as now is a very specific point in the time line of life?

  3. #3
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea your right.
    thanks for your useless post i won't consider any of it
    Last edited by Mr. Doctor; 08-18-2009 at 02:34 PM.

  4. #4
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Put that waitinfight procedure after you click the mouse .

  5. #5
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That part was right, but the reason it didn't wait is because i called it to quickly, i added a wait(3000) after chooseoption. So it will wait to see if it is in one.

  6. #6
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Are you really waiting an exact number? Use some common sense and add some randomness, unless you're TRYING to get banned.

  7. #7
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    Quote Originally Posted by Feroc1ty View Post
    Are you really waiting an exact number? Use some common sense and add some randomness, unless you're TRYING to get banned.
    he is right, but make it like

    SCAR Code:
    while not infight do wait(100 + random(100));

    or,

    SCAR Code:
    marktime(time);
    while not infight do
    begin
      wait(100 + random(100));
      if timefrommark(time) > 3000 + random(1000) then exit;
    end;
    to break out of the loop, if something somehow messes up
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

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
  •