Results 1 to 8 of 8

Thread: THOs paranoid mouseBox

  1. #1
    Join Date
    Dec 2014
    Posts
    383
    Mentioned
    2 Post(s)
    Quoted
    206 Post(s)

    Default THOs paranoid mouseBox

    Here is one of my favorite little snips that i've made to help calm my paranoia about mouseBox and getting banned
    has helped a bit in preventing IMO, but don't quote me on that!


    also doubles as a test to see if i've indented / spaced things correctly if anyone has time and bothers reading this :P

    EXAMPLE :
    Following will right click either box1 or box2 and then wait 2000ms
    Simba Code:
    thoBox(intToBox(123,123,145,145),intToBox(234,455,123,123),gaussRangeInt(2000,3000),mouse_right);


    Simba Code:
    procedure thoBox(Box: TBox; Box1: TBox; waitTime: Integer = 0; mouseAction: Integer = MOUSE_LEFT);
    begin
      mouseSpeed:=gaussRangeInt(55,77);
      if random(0,10) >= 6 then
      begin
        mouseBox(box,mouseAction);
        if random(0,20) = 5 then
        begin
          mouseSpeed:=gaussRangeInt(55,77);
          if random(0,10) >= 5 then
            smallRandomMouse(10 + random(10))
          else
            smallRandomMouse(15 + random(15);
          if waitTime >= 1 then
            wait(waitTime)
          else
            wait(gaussRangent(666,999));
        end;
      end else
      begin
        mouseBox(box1,mouseAction);
        if random(0,20)= 5 then
        begin
          mouseSpeed:=gaussRangeInt(55,77);
          if random(0,10) >= 5 then
            smallRandomMouse(10 + Random(10))
          else
            smallRandomMouse(15 + Random(15));
          if waitTime >= 1 then
            wait(waitTime)
          else
            wait(gaussRangeInt(666,999);
        end;
      end;
    end;

    THOs paranoid blind walker:

    Simba Code:
    procedure thoBlindWalk(map: TSPSArea; PT: TPoint; PT1: TPoint);
    begin
      if random(0,10)>=6 then
      begin
        mouseSpeed:=GaussRangeInt(55,77);
        map.blindWalk(PT);
        wait(gaussRangeInt(333,444));
      end else
      begin
        mouseSpeed:=GaussRangeInt(55,77);
        map.blindWalk(PT1);
        wait(gaussRangeInt(333,444));
      end;
    end;

  2. #2
    Join Date
    Feb 2015
    Posts
    422
    Mentioned
    41 Post(s)
    Quoted
    226 Post(s)

    Default

    overall pretty good ideas, couple of comments tho.

    we dont need to repeat everything twice for the first procedure. we only need to figure out the box, then everything else is the same, so no need to repeat it.

    Simba Code:
    procedure thoBox(Box: TBox; Box1: TBox; waitTime: Integer = 0; mouseAction: Integer = MOUSE_LEFT);
    begin
      mouseSpeed:=gaussRangeInt(55,77);
      if random(0,10) >= 6 then
        mouseBox(box,mouseAction)
      else  
        mouseBox(box1,mouseAction);

      if random(0,20)= 5 then
      begin
        mouseSpeed:=gaussRangeInt(55,77);
        if random(0,10) >= 5 then
          smallRandomMouse(10 + Random(10))
        else
          smallRandomMouse(15 + Random(15));
        if waitTime >= 1 then
          wait(waitTime)
        else
          wait(gaussRangeInt(666,999);
      end;
    end;

    as for the second procedure, it looks good. However, I would do it differently and add the option of more than just 2 points.

    Simba Code:
    function TSPSArea.thoBlindWalk(PTs: TPointArray): Boolean;  
    //that way we can do more than just 2 points and we can also ignore the map input because we made the
    //function part of the TSPSArea Type. also boolean function so we know if the walking was succesful
    var
      i: integer;
    begin
      if length(PTs)< 1 then      //make sure that everything is good with the points before we procede
        exit;
     
      i := random(length(PTs));               //Picks out a random TPoint. also you don't actually need this separate line, you can merge
      mouseSpeed:=GaussRangeInt(55,77);
      if self.blindWalk(PTs[i]) then        //it with this line to be if self.blindWalk(PTs(random(length(PTs)))) then
        result := true;                     //if walking is successful then the function returns a true result
      wait(gaussRangeInt(333,444));
    end;

    the array part can be done with the first procedure as well.

    let me know if you have any questions

  3. #3
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    One of the first things I would do when addressing any paranoia regarding the bot-like behaviour of MouseBox() is to ensure the clicks are not uniformly distributed within the box in question. When you decide on a point to click within the box, consider choosing that point using a gaussian/normal distribution.

  4. #4
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    One of the first things I would do when addressing any paranoia regarding the bot-like behaviour of MouseBox() is to ensure the clicks are not uniformly distributed within the box in question. When you decide on a point to click within the box, consider choosing that point using a gaussian/normal distribution.
    MouseBox does generate a point in the box based on a normal distribution.

    This snippet here basically creates a random chance of clicking in one of two boxes; it doesn't avoid any problems associated with mouseBox itself (if there are any). I also don't think mouseSpeed will get that high.

  5. #5
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Laquisha View Post
    MouseBox does generate a point in the box based on a normal distribution.
    My post was suggesting that he should probably first address the issues with MouseBox before creating a function that essentially just tosses a coin.

    Starter for 6: https://github.com/SRL/SRL/blob/mast...d/random.simba

  6. #6
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    My post was suggesting that he should probably first address the issues with MouseBox before creating a function that essentially just tosses a coin.

    Starter for 6: https://github.com/SRL/SRL/blob/mast...d/random.simba
    But you said "When you decide on a point to click within the box, consider choosing that point using a gaussian/normal distribution."

    And I said mouseBox already does that; it calls this

    E: Turp did a nice demo: https://villavu.com/forum/showthread...92#post1218692

  7. #7
    Join Date
    Dec 2007
    Posts
    289
    Mentioned
    4 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by Laquisha View Post
    And I said mouseBox already does that; it calls this
    Apologies! :P I was using AeroLib as a reference on this one and completely glossed over the overloaded function! https://github.com/J-Flight/AeroLib/...ler.simba#L684

  8. #8
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by honeyhoney View Post
    Apologies! :P I was using AeroLib as a reference on this one and completely glossed over the overloaded function! https://github.com/J-Flight/AeroLib/...ler.simba#L684
    Just another drawback of the multiple include drama I guess

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
  •