Results 1 to 6 of 6

Thread: findObj3 / findObj looses the mouse

  1. #1
    Join Date
    May 2007
    Posts
    527
    Mentioned
    12 Post(s)
    Quoted
    109 Post(s)

    Default findObj3 / findObj looses the mouse

    Hi!

    I have a irritating problem with findObj3 and findObj. Every time I am using those functions it messes the mouse cursor. It goes bottom-right of the screen and stays there. Every time.

    Any thoughts? I've been trying to solve this problem for couple of days now. With no results.

    Many thanks in advance,
    bustinghard

  2. #2
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That proberly happens when you haven't set up the findobj function right. Maybe to much tolerance or another wrong parameter. Just trick a bit with the parameters and you'll find out. I found nothing wrong with it.

  3. #3
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    i used
    if(FindObj(x,y,'pen',2320262,5))then
    and it keeps goign to left top=right clicking 'cancel' then bottom right=right click, 'cancel'. and repeating
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  4. #4
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you post some of the script to? That way we can solve the problem faster.

  5. #5
    Join Date
    May 2007
    Posts
    527
    Mentioned
    12 Post(s)
    Quoted
    109 Post(s)

    Default

    Hi!

    Here's the procedure which causes this issue. It's been working fine, but since Runescape's latest update findObj3 makes mouse cursors move randomly in bottom-right corner.

    This is a powerminer which works fine, other than fineObj3 doesn't.

    SCAR Code:
    {**
     * mineFullLoad();
     *
     * Mines full load and then drops it.
     *
     * @return boolean Whether everything went fine or not.
     *}

    function mineFullLoad: boolean;
    var
        tmr, ax, ay, count, ooc: integer;
        done, loopDone: boolean;
    begin
        done   := false;
        result := true;

        markTime(tmr);

        repeat
            count    := 0;
            loopDone := false;
            ooc      := calculateOreCount;

            if not (findAnyRandoms) then begin
                updateReport;

                if (findObj3(ax, ay, 'Mine', rocks[players[currentPlayer].integer1].color,
                                             rocks[players[currentPlayer].integer1].tolerance)) then begin

                    // We should make sure that there is not gas around.
                    if not (checkGas(ax, ay)) then begin

                        // Every now and then, use right click instead of left.
                        if (random(5000) > 4800) then begin
                            mouse(ax, ay, 0, 0, false);

                            if not (clickOption('Mine', 1)) then begin
                                mouse(ax, ay, 0, 0, true);
                            end;
                        end else begin
                            mouse(ax, ay, 0, 0, true);
                        end;

                        mmouse(MSCX - 120 + random(240), MSCY - 120 + random(240), 4, 4);

                        flag;

                        while not (pos('swing', getChatMessage) <> 0) and (count < 5) do begin
                            count := count + 1;

                            wait(300);
                        end;

                        if (count > 4) then begin
                            _players[currentPlayer].totalRocksMissed := _players[currentPlayer].totalRocksMissed + 1;
                        end else begin
                            count := 0;

                            repeat
                                if (ooc <> calculateOreCount) then begin
                                    loopDone := true;
                                end else begin
                                    if (checkMovement(257, 175) < 3) then begin
                                        if (count > 3) then begin
                                            loopDone := true;
                                        end else begin
                                            count := count + 1;
                                        end;
                                    end else begin
                                        count := 0;

                                        if (waitWhileMining(257, 175)) then begin
                                            loopDone := true;
                                        end;

                                        wait(300 + random(50));
                                    end;
                                end;
                            until loopDone;

                            if (ooc <> calculateOreCount) then begin
                                _players[currentPlayer].totalRocksMined := _players[currentPlayer].totalRocksMined + 1;
                            end;
                        end;
                    end else begin
                        // Gas found.
                    end;
                end else begin
                    // No ore found, let's move on the map.

                    if not (findSymbol(ax, ay, 'Mining spot')) then begin
                        mouse(MMCX - 30 + random(60), MMCY - 5 + random(10), 1, 1, true);
                    end else begin
                        mouse(ax, ax, 4, 4, true);
                    end;

                    flag;
                end;

                if (invFull) then begin
                    done := true;
                end;
            end;
        until done;

        _players[currentPlayer].timePerLoad := _players[currentPlayer].timePerLoad + (timeFromMark(tmr) / 1000);
        _players[currentPlayer].totalLoads  := _players[currentPlayer].totalLoads + 1;

        loadsSoFar := loadsSoFar + 1;

        dropAll;
    end;

    Best reagards,
    bustinghard

  6. #6
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    358
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Would you be able to post your DeclarePlayers procedure too?
    I think that maybe this

    SCAR Code:
    if (findObj3(ax, ay, 'Mine', rocks[players[currentPlayer].integer1].color,
                                             rocks[players[currentPlayer].integer1].tolerance)) then begin

    and your DeclarePlayers; might not match up.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Unknown Identifier FindObj3.. Whats Wrong?
    By Wdf? in forum OSR Help
    Replies: 7
    Last Post: 08-30-2007, 10:51 PM
  2. FindObj help
    By daddyproboot in forum OSR Help
    Replies: 6
    Last Post: 08-17-2007, 03:48 PM
  3. FindObj help
    By Xirx in forum OSR Help
    Replies: 7
    Last Post: 06-12-2007, 09:38 PM

Posting Permissions

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