Results 1 to 11 of 11

Thread: Is there anyway to make this function faster?

  1. #1
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default Is there anyway to make this function faster?

    SCAR Code:
    function FindOre : Boolean;
    var
      OreTPA : TPointArray;
      OreATPA : T2DPointArray;
      CTS, I, FT : Integer;
    begin
      if InvFull or not (LoggedIn) then
        Exit;
      MarkTime(FT);
      PlayersOre;
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MMCY, OreTPA, OreColor, MSX1, MSY1, MSX2, MSY2, 5);
      if (Length(OreTPA) < 1) then Exit;
      OreATPA := SplitTPA(OreTPA, 15);
      for I := 0 To High(OreATPA) do
      If MiddleTPAEX(OreATPA[i], x, y) then
      begin
        MMouse(x, y, 0, 0);
        Wait(400 + Random(265));
        if IsUpText('ine') then
        begin
          GetMousePos(x, y);
          Result := True;
          Exit;
        end
        else
        begin
          Writeln('Player has failed to find the Ore.');
          MMouse(x-25, y, 5, 5);
          if IsUpText('ine') then
          begin
            Mouse(x-25, y, 5, 5, True);
            Exit;
          end
          else
          begin
            Exit;
          end;
        end;
      end;
     if ((TimeFromMark(FT)) >= (9000)) then
       LogOut;
    end;
    And you can guess what i did with GetMousePos. But just incase...

    SCAR Code:
    procedure PowerMine;
    var
      NextOre : Integer;
    begin
      if InvFull or not (LoggedIn) then Exit;
      repeat
        if FindOre then
        begin
          MarkTime(NextOre);
          Mouse(x, y, 5, 5, True);
          Wait(750);
          if CheckOre then
          begin
            GasFound := GasFound + 1;
            AvoidGas;
          end;
          repeat
            if CheckOre then
            begin
              GasFound := GasFound + 1;
              AvoidGas;
            end;
            Wait(625 + Random(395));
            FindRandoms;
            Wait(700 + Random(550));
            HumanMovements;
          until FindBlackChatMessage('You manage to mine') or ((TimeFromMark(NextOre)) >= (2500)) or ErrorMessage;
        end;
      until (InvFull);
    end;

    I want to make this faster because in some cases another player will come by. And i know that it's hard to beat a human with a bot, but i need it to be fast enough to at least get ores fast (It is sort of slow) + REP and thanks for help.

  2. #2
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    is the mouse moving slow, or just the finding...?

    if mouse
    than change the mousespeed lol

    let us know

  3. #3
    Join Date
    Jul 2007
    Location
    Ottawa, Canada
    Posts
    930
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm pro with TPAS (not wizzylike pro but what can i say... wizzy owns them) Is the cursor finding them on the first try? I can help you tweak the color functionality and add better finding on the first try.
    ~ Metagen

  4. #4
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    I'm pro with TPAS (not wizzylike pro but what can i say... wizzy owns them) Is the cursor finding them on the first try? I can help you tweak the color functionality and add better finding on the first try.
    rofl pro????? dont listen to him hes not a pro! j/k i wouldn't know just a IRC joke,i just had to post that sorry for the spam.

  5. #5
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by Metagen View Post
    I'm pro with TPAS (not wizzylike pro but what can i say... wizzy owns them) Is the cursor finding them on the first try? I can help you tweak the color functionality and add better finding on the first try.
    1: It is finding on first try,
    2: I used ACA to find ore color. (It finds the ore really nicely! )

    And if you want ill post my script to you. And wow! It is an honor to have the master of TPA's to help me pl0x lol

    @P1NKY - It justs that it takes a little while for the script t ofind the ore. (Like 5 seconds sad face...).

    @NiCBaZ - ITs k, your doing me a favor of bumping the thread lol , jokes.

  6. #6
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  7. #7
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    No, the problem is that it TAKES a while for the FindOre to find the rock. nd i need it to find it faster. And it is not a mouse problem. Becaue i already put SetUPSRL.

  8. #8
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  9. #9
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    I did, used ACA. But i still want it to find the ore faster Unless you cant go any faster than that

  10. #10
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    How many ms does it take now?

  11. #11
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    like atleast 2500-5000

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 12
    Last Post: 10-13-2008, 02:57 AM
  2. Make this function faster!
    By Timothegreat in forum OSR Help
    Replies: 4
    Last Post: 03-18-2008, 08:57 PM
  3. How could I make this faster?
    By Infantry001 in forum OSR Help
    Replies: 0
    Last Post: 11-23-2007, 02:35 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
  •