Results 1 to 5 of 5

Thread: Trouble with Mouse Control?

  1. #1
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Trouble with Mouse Control?

    This program is designed to sell runes to the Tzhaar shop 50 at a time, by using that one-click option and left-clicking in approximately the same spot to sell it.

    Code:
    program RuneSell;
    {.include SRL/SRL.scar}
    
    const
    XRuneLeft= 563;
    XRuneRight= 598;
    YRuneTop= 456;
    YRuneBottom= 459;
    XSellLeft= 536;
    XSellRight= 579;
    YSellTop= 460;
    YSellBottom= 465;
    
    procedure SellRunes;
    begin
    Mouse(XRuneLeft, YRuneBottom, XRuneRight - XRuneLeft, YRuneTop - YRuneBottom, false);
    Wait(random(10));
    Mouse(XRuneLeft, YRuneBottom, XRuneRight - XRuneLeft, YRuneTop - YRuneBottom, true);
    Wait(30+random(40));
    Mouse(XSellLeft, YSellBottom, XSellRight - XSellLeft, YSellTop - YSellBottom, false);
    Wait(random(36));
    Mouse(XSellLeft, YSellBottom, XSellRight - XSellLeft, YSellTop - YSellBottom, true);
    Wait(15+random(23));
    end;
    
    begin
    SetupSRL;
    for i:=0 to 30 do
    begin
    SellRunes;
    end;
    end.

    This compiles fine and everything, but, when I run the program, the mouse moves down to the very bottom of the screen, or the very top. If it makes any difference, I'm running Linux, and running Firefox and SCAR 3.15 on a separate Wine desktop. Any ideas? Thanks...
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

    <=== Kool-Aid wins.

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Make a bitmap or DTM of the runes. Mouse(x,y,random,random, False);

    ChooseOption('uy 50');



    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Jan 2008
    Location
    Stanford, CA
    Posts
    329
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You Should Learn some new functions man, and use some DTMS or bitmaps or something to find your runes..not just mouse functions...and dont use consts to save x,y coordinates. use variables to save each appropriate mouse funcition by defining the variable as a boolean.

    also u havent defined any variables!

    Finally there is no need to put i:= blah.

  4. #4
    Join Date
    Oct 2007
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay so would this work better, something like this:

    Code:
    program RuneSell;
    {.include SRL/SRL.scar}
    var i, x,y, DTM := integer;
    
    procedure LoadDTM;
    begin
    DTM := DTMFromString(1120398120938 - dont know this yet 019823);
    end;
    
    procedure SellRunes;
    begin
      if FindDTM(DTM, x, y, 400,500, 700, 500) // dont know these for sure yet
        begin
        Mouse(x, y, 4, 4, false);
        ChooseOption('uy 50');
        Wait(200+random(50));
        end;
      Wait(234 + random(20));
    end;
    
    begin
    SetupSRL;
    LoadDTMs;
    for i:=0 to 30 do
    begin
    SellRunes;
    end;
    end.

    Would this work well? What would be the speed of this be like? because selling runes needs to be pretty fast to be efficient, and excessive lag or slow mouse moving would be problematic.

    And also, if the runes in my inventory wouldn't be switching spots, why not just use Mouse functions with randomness? It seems it would be faster because no searching for colors, and I can better control the randomness.
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

    <=== Kool-Aid wins.

  5. #5
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Don't worry about speed. Just searching for a DTM or color takes nearly no time at all.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trouble with mouse function...
    By 0wn 4 skill in forum OSR Help
    Replies: 16
    Last Post: 07-05-2008, 11:39 AM
  2. Pest Control.
    By cm3rt in forum RS3 Outdated / Broken Scripts
    Replies: 1
    Last Post: 07-22-2007, 08:28 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
  •