Results 1 to 9 of 9

Thread: InvMouse non-gaussian distribution

  1. #1
    Join Date
    Nov 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default InvMouse non-gaussian distribution

    I noticed that InvMouse tends to click on edge of inventory position
    so I run few test to find distribution of clicks

    MouseBox works very well producing Gaussian distribution of clicks



    Uploaded with ImageShack.us

    InvMouse is screwed and I am trying to find out what is wrong there



    Uploaded with ImageShack.us

    this needs fixing ASAP because it is highly detectable and everyone is using it

  2. #2
    Join Date
    Nov 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nvm, still trying to figure out

    InvBox works fine:

    1 box= 563 , 213 , 594 , 244
    2 box= 605 , 213 , 636 , 244
    3 box= 647 , 213 , 678 , 244
    4 box= 689 , 213 , 720 , 244
    5 box= 563 , 249 , 594 , 280
    6 box= 605 , 249 , 636 , 280
    7 box= 647 , 249 , 678 , 280
    8 box= 689 , 249 , 720 , 280
    9 box= 563 , 285 , 594 , 316
    10 box= 605 , 285 , 636 , 316
    11 box= 647 , 285 , 678 , 316
    12 box= 689 , 285 , 720 , 316
    13 box= 563 , 321 , 594 , 352
    14 box= 605 , 321 , 636 , 352
    15 box= 647 , 321 , 678 , 352
    16 box= 689 , 321 , 720 , 352
    17 box= 563 , 357 , 594 , 388
    18 box= 605 , 357 , 636 , 388
    19 box= 647 , 357 , 678 , 388
    20 box= 689 , 357 , 720 , 388
    21 box= 563 , 393 , 594 , 424
    22 box= 605 , 393 , 636 , 424
    23 box= 647 , 393 , 678 , 424
    24 box= 689 , 393 , 720 , 424
    25 box= 563 , 429 , 594 , 460
    26 box= 605 , 429 , 636 , 460
    27 box= 647 , 429 , 678 , 460
    28 box= 689 , 429 , 720 , 460
    Last edited by oligofren; 01-16-2012 at 05:51 AM.

  3. #3
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    A very interesting find! ^_^ I just had a look at InvMouse, and I believe that it is because it uses MouseBoxEx? This was probably for SRL4 because MouseBoxEx looks like it tries to aim for the centre...That would be the only change I'm guessing:
    Simba Code:
    function InvMouse(InvSlot, Action: Byte) : boolean;
    var
      TB: TBox;
      CurrPT : TPoint;
    begin
      result := false;
      if (not InRange(Action, 0, 3)) then
      begin
        srl_Warn('InvMouse', 'Action #' + IntToStr(Action) + ' is not a valid action', warn_AllVersions);
        Exit;
      end;
      if (not InRange(InvSlot, 1, 28)) then
      begin
        srl_Warn('InvMouse', 'Inventory slot #' + IntToStr(InvSlot) + ' is not a valid slot', warn_AllVersions);
        Exit;
      end;
      GameTab(tab_inv);
      Result := true;
      TB := InvBox(InvSlot);
      GetMousePos(CurrPT.x,CurrPT.y);
      if PointInBox(CurrPT,TB) then
        MouseBox(Max(CurrPT.x-random(2),TB.x1),Max(CurrPT.y-random(2),TB.y1),
                 Min(CurrPT.x+random(2),TB.x2),Min(CurrPT.y+random(2),TB.y2),Action) //LOL Pro-human much!
      else
        MouseBox(TB.X1, TB.Y1, TB.X2, TB.Y2, Action);
    end;

    EDIT: also as stated above ^, why are the second pair of co-ordinates to high!! O_o
    InvBox:
    Simba Code:
    Slot6 := IntToBox(605, 249, 31415, 92653);

    EDIT2: [offtopic]
    There is no difference between MouseItem and InvMouse? :S Shouldn't we remove one?
    Simba Code:
    procedure MouseItem(I: Integer; button: Integer);
    begin
      InvMouse(i, button);
    end;
    [/offtopic]
    Last edited by Press Play; 01-16-2012 at 05:40 AM.

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

  4. #4
    Join Date
    Nov 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    running script with your correction, got 400 clicks, now it looks much better



    Uploaded with ImageShack.us

    2000 clicks, distribution is smoother



    Uploaded with ImageShack.us
    Last edited by oligofren; 01-16-2012 at 07:09 AM.

  5. #5
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    I'm not really sure what the graphs mean (EDIT: ohh, I'm guess the axis of the graph are co-ordinates? Well at least the x-axis) , but if you say that it's all fixed, a dev should commit ! yay!
    Last edited by Press Play; 01-16-2012 at 11:42 AM.

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

  6. #6
    Join Date
    Feb 2009
    Location
    Hungary (GMT + 1)
    Posts
    1,774
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I remember EvilChicken added InvMouse(or the other, I can't remember), but to keep backward compatibility with scripts using the function that was there he leaved that too and that's how there is 2 function that does the same.

  7. #7
    Join Date
    Nov 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    there is 'Distr' parameter in MouseBoxEx and it is 14 when it called from InvMouse

    MouseBoxEx(TB.X1, TB.Y1, TB.X2, TB.Y2,14, Action);

    I ll try to vary this parameter and see how it would change the distribution of clicks

    I am running herb cleaning script or jewelry enchanting script and output click coordinates into debug window then I use Excel for sorting and plotting

    and axe X on graphs is X coordinate of the client, since we have 4 columns of inventory it forms 4 corresponding peaks, in case of jewelry enchanting script I had to discard 4th column because it also contained clicks from the spell activation

  8. #8
    Join Date
    Nov 2011
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I run herbs cleaning script which moves mouse by zigzag and clicks on herbs, I left everything unchanged and got distribution shown below


    then I changed Distr parameter from 14 to 8 and the distribution of clicks worsened

    InvMouse uses MouseBox if mouse already in target inventory position and it uses MouseBoxEx if mouse is outside, in turn MouseBoxEx has gravity toward direction from which mouse moves into target inventory slot, this explains why columns 2, 3 have double peaks and columns 1 and 4 have single peaks, anyway MouseBoxEx has unnatural clicking pattern and MUST be changed

    suggestion: replace it with MouseBox completely, which has Gaussian distribution of clicks aiming at center, Daazndagger already suggested this change, and imho it works better

  9. #9
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Done.

    And this:
    Slot6 := IntToBox(605, 249, 31415, 92653);

    They aren't even used, its probably from old formula.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

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
  •