Advertisement
WarPie90

Usernamed salted mouse-factors

Jun 21st, 2018
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 2.23 KB | None | 0 0
  1. program new;
  2. {$I SRL/OSR.simba}
  3.  
  4. type
  5.   TMouseAB = record
  6.     Antiban: TAntiban;
  7.     IsSetup: Boolean;
  8.     PPI, MouseArea, MouseOff: Double;
  9.     MaxSpeed, MinSpeed: Int32;
  10.   end;
  11.  
  12. var
  13.   MouseAB: TMouseAB;
  14.  
  15. procedure TMouseAB.Init();
  16. var
  17.   unique: Double;
  18. begin
  19.   Self.Antiban.SetupBiometrics();
  20.   unique := Self.Antiban.BioHash;
  21.  
  22.   Self.PPI       := (60 + 200*unique);
  23.   Self.MouseArea := (03 + 5*cos(unique)) * Self.PPI;
  24.   Self.MouseOff  := Random(0.0, Self.MouseArea);
  25.   Self.MaxSpeed  := Trunc(21 * (0.75 + 0.5 * Self.Antiban.Patience));
  26.   Self.MinSpeed  := Trunc(08 * (0.50 + 0.5 * Self.Antiban.Endurance));
  27.  
  28.   Self.IsSetup := True;
  29. end;
  30.  
  31. procedure TMouse.Move(P: TPoint); override;
  32. var
  33.   dist: Double;
  34.   q: TPoint;
  35.   maxSpeed := Trunc(srl.SkewedRand(MouseAB.MaxSpeed, 8, MouseAB.MaxSpeed));
  36.   minSpeed := Trunc(srl.SkewedRand(MouseAB.MinSpeed, MouseAB.MinSpeed, 15));
  37. begin
  38.   q := Self.GetPosition;
  39.   dist := Hypot(q.x-p.x, q.y-p.y);
  40.   self.Speed := Trunc(minSpeed + (maxSpeed-minSpeed) * Power(dist / 1024, 1/2));
  41.   inherited;
  42. end;
  43.  
  44. procedure TMouse.Move(P: TPoint); override;
  45. var
  46.   Here,P2: TPoint;
  47.   t,v: Double;
  48. begin
  49.   if (Random() < 0.15) or (MouseAB.MouseOff > MouseAB.MouseArea) then
  50.     MouseAB.MouseOff := Random() * MouseAB.PPI;
  51.  
  52.   Here := Mouse.GetPosition();
  53.   if (Random() < 0.8) and (Here.DistanceTo(P) > MouseAB.MouseArea - MouseAB.MouseOff) then
  54.   begin
  55.     v := Here.DistanceTo(P);
  56.     t := (MouseAB.MouseArea - MouseAB.MouseOff) / Here.DistanceTo(P);
  57.     t := srl.SkewedRand(Random(Min(0.8,t),0.90), Min(0.4,t), 1.15);
  58.     P2.x := Trunc((1-t)*Here.x + t*P.x);
  59.     P2.y := Trunc((1-t)*Here.y + t*P.y);
  60.  
  61.     inherited(P2.Random(-Trunc(Power(v,0.66)), Trunc(Power(v,0.66)), True));
  62.     Wait(Trunc(srl.SkewedRand(35, 0, 700)));
  63.     MouseAB.MouseOff := Random() * MouseAB.PPI * 2;
  64.   end;
  65.  
  66.   v := Mouse.GetPosition().DistanceTo(P);
  67.   inherited(P);
  68.   MouseAB.MouseOff += Random(v, v*1.5);
  69. end;
  70.  
  71.  
  72. var
  73.   p: TPoint;
  74. begin
  75.   Players.New()^.LoginName := 'bitch';
  76.  
  77.   Mouse.Hold(mouse_left);
  78.  
  79.   MouseAB.Init();
  80.   p := Mouse.GetPosition();
  81.   for 0 to 6 do
  82.   begin
  83.     Mouse.Move(Point(80,280));
  84.     Wait(300);
  85.     Mouse.Move(p);
  86.     Wait(1000);
  87.   end;
  88.  
  89.   Mouse.Release(mouse_left);
  90. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement