307
订阅者
-124 小时
-27 天
-2630 天
帖子存档
float moveY;
if (distanceY > 0)
{
if (currentVelocityY > 0)
moveY = -brakingStep;
else
moveY = brakingStep * 0.3f;
}
else
{
if (currentVelocityY < 0)
moveY = brakingStep;
else
moveY = -brakingStep * 0.3f;
}
moveY = Math.Clamp(moveY, -3f, 3f);
moveY += mouseMoveRemainder.Y;
int intMoveY = (int)Math.Round(moveY);
mouseMoveRemainder.Y = moveY - intMoveY;
if (intMoveY != 0)
MoveMouse(0, intMoveY);
}
private static void MoveMouse(int dx, int dy)
{
INPUT[] inputs = new INPUT[1];
inputs[0].type = INPUT_MOUSE;
inputs[0].mi.dx = dx;
inputs[0].mi.dy = dy;
inputs[0].mi.dwFlags = MOUSEEVENTF_MOVE;
inputs[0].mi.time = 0;
inputs[0].mi.dwExtraInfo = IntPtr.Zero;
SendInput(1, inputs, Marshal.SizeOf(typeof(INPUT)));
}
public static void SetTargetPosition(Vector2? position)
{
TargetPos = position;
}
public static Vector2? GetTargetPosition()
{
return TargetPos;
}
}
}
if (ShouldBrake(currentMousePos, targetPosition, isLeftButtonPressed))
{
UpdateVelocity(currentMousePos, deltaTime);
UpdateHoldTime(deltaTime);
ApplyMouseBraking(currentMousePos, targetPosition, deltaTime);
}
else
{
UpdateVelocity(currentMousePos, deltaTime);
}
lastDeltaTime = deltaTime;
Thread.Sleep(1);
}
}
private static void ResetState()
{
currentVelocityY = 0f;
mouseMoveRemainder = Vector2.Zero;
buttonHoldTime = 0f;
holdTimer.Reset();
if (GetCursorPos(out POINT resetPos))
{
lastMousePos = new Vector2(resetPos.X, resetPos.Y);
}
}
private static void UpdateHoldTime(float deltaTime)
{
if (holdTimer.IsRunning)
buttonHoldTime += deltaTime;
else
holdTimer.Start();
}
private static void UpdateVelocity(Vector2 currentPos, float deltaTime)
{
float rawVelocityY = (currentPos.Y - lastMousePos.Y) / deltaTime;
float smoothFactor = 0.3f;
currentVelocityY = (currentVelocityY * (1 - smoothFactor)) + (rawVelocityY * smoothFactor);
if (Math.Abs(currentVelocityY) < 5f)
currentVelocityY = 0f;
lastMousePos = currentPos;
}
private static bool ShouldBrake(Vector2 currentPos, Vector2 targetPos, bool isButtonPressed)
{
if (!Config.MouseBrakingEnabled) return false;
if (!isButtonPressed) return false;
float distanceToTarget = Math.Abs(targetPos.Y - currentPos.Y);
if (distanceToTarget > Config.BrakingZoneRadius) return false;
if (distanceToTarget < Config.BrakingDeadzone) return false;
bool isMovingTowardTarget = false;
if (currentVelocityY > 0 && currentPos.Y < targetPos.Y) isMovingTowardTarget = true;
if (currentVelocityY < 0 && currentPos.Y > targetPos.Y) isMovingTowardTarget = true;
return isMovingTowardTarget && Math.Abs(currentVelocityY) > 10f;
}
private static void ApplyMouseBraking(Vector2 currentPos, Vector2 targetPos, float deltaTime)
{
float distanceY = targetPos.Y - currentPos.Y;
float distance = Math.Abs(distanceY);
if (distance > Config.BrakingZoneRadius) return;
if (distance < Config.BrakingDeadzone) return;
float brakeFactor = 1f - (distance / Config.BrakingZoneRadius);
brakeFactor = Math.Clamp(brakeFactor, 0.1f, 0.95f);
bool isTapFire = buttonHoldTime < 0.15f;
bool isHoldFire = buttonHoldTime > 0.5f;
if (isTapFire)
brakeFactor *= Config.TapBrakingFactor;
else if (isHoldFire)
brakeFactor *= Config.HoldBrakingFactor;
float speedFactor = Math.Abs(currentVelocityY) / 2000f;
speedFactor = Math.Clamp(speedFactor, 0.3f, 1.5f);
brakeFactor *= speedFactor;
float targetDistanceFactor = 1f - (distance / Config.BrakingZoneRadius);
if (targetDistanceFactor > 0.7f)
brakeFactor *= 1.5f;
float brakingStep = (Math.Abs(currentVelocityY) / Config.BrakingSmoothness) * brakeFactor;
brakingStep = Math.Min(brakingStep, Math.Abs(currentVelocityY) * 0.25f);
brakingStep = Math.Clamp(brakingStep, 0.5f, 4f);
Code C# hỗ trợ ff:
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Threading;
using Aotform;
using AotForms;
using static AotForms.WinAPI;
namespace Client
{
public class MouseBraking
{
[DllImport("user32.dll")]
private static extern int SendInput(int cInputs, INPUT[] pInputs, int cbSize);
[DllImport("user32.dll")]
private static extern short GetAsyncKeyState(int vKey);
[DllImport("user32.dll")]
private static extern bool GetCursorPos(out POINT lpPoint);
private const int VK_LBUTTON = 0x01;
private const int INPUT_MOUSE = 0;
private const int MOUSEEVENTF_MOVE = 0x0001;
private static Vector2 mouseMoveRemainder = Vector2.Zero;
private static Vector2? TargetPos = null;
private static float currentVelocityY = 0f;
private static Vector2 lastMousePos = Vector2.Zero;
private static Stopwatch stopwatch = new Stopwatch();
private static float lastDeltaTime = 0.016f;
private static bool isInitialized = false;
private static float buttonHoldTime = 0f;
private static Stopwatch holdTimer = new Stopwatch();
[StructLayout(LayoutKind.Sequential)]
private struct POINT
{
public int X;
public int Y;
}
[StructLayout(LayoutKind.Sequential)]
private struct MOUSEINPUT
{
public int dx;
public int dy;
public uint mouseData;
public uint dwFlags;
public uint time;
public IntPtr dwExtraInfo;
}
[StructLayout(LayoutKind.Sequential)]
private struct INPUT
{
public int type;
public MOUSEINPUT mi;
}
public static void Work()
{
Thread brakingThread = new Thread(Loop)
{
IsBackground = true,
Name = "MouseBrakingThread"
};
brakingThread.Start();
}
private static void Loop()
{
while (true)
{
float deltaTime = (float)stopwatch.Elapsed.TotalSeconds;
if (deltaTime > 0.1f) deltaTime = 0.016f;
if (deltaTime < 0.001f) deltaTime = 0.016f;
if (!isInitialized)
{
stopwatch.Start();
holdTimer.Start();
GetCursorPos(out POINT initPos);
lastMousePos = new Vector2(initPos.X, initPos.Y);
isInitialized = true;
Thread.Sleep(1);
continue;
}
bool isLeftButtonPressed = (GetAsyncKeyState(VK_LBUTTON) & 0x8000) != 0;
if (!isLeftButtonPressed)
{
ResetState();
Thread.Sleep(1);
continue;
}
if (!Config.MouseBrakingEnabled)
{
Thread.Sleep(1);
continue;
}
if (!GetCursorPos(out POINT currentPos))
{
Thread.Sleep(1);
continue;
}
Vector2 currentMousePos = new Vector2(currentPos.X, currentPos.Y);
Vector2 targetPosition = TargetPos ?? new Vector2(Screen.PrimaryScreen.Bounds.Width / 2, Screen.PrimaryScreen.Bounds.Height / 2);
float distanceToTarget = Math.Abs(targetPosition.Y - currentMousePos.Y);
if (distanceToTarget > Config.BrakingZoneRadius)
{
UpdateVelocity(currentMousePos, deltaTime);
Thread.Sleep(1);
continue;
}
Repost from 𝙓𝙉𝙀𝙏 𝙈𝙊𝘿𝙨 ⚜️
Tình hình có con acc này ko chơi nữa bay nhanh 1m9 ko thương lượng mua ib @qh_mod
💎 GIAO DỊCH NẠP TIỀN 💎
👤 Tài khoản: thanh1508
💰 Số tiền: 40,000 VND
📝 Mã GD: VIP66F5C84
🆔 Mã đơn: #288
⚙️ Trạng thái: ✅ THÀNH CÔNG
🕒 Thời gian: 06:09:32 01/06/2026
🌐 Web: phanmemkiemtien.site
📢 Nhóm: @thongbaos1
👑 Admin: @ngphungggiahuyy
Repost from Thông Báo Tin Tức
+3
Feedback Tool Lc79 25K Up 300K
Web https://phanmemkiemtien.site
Nhóm Thông Báo @thongbaos1
Kênh Nhận Tool Free @sharedochoi
Admin @ngphungggiahuyy
Repost from Thông Báo Tin Tức
Feedback Tool Hitclub
Web https://phanmemkiemtien.site
Nhóm Thông Báo @thongbaos1
Kênh Nhận Tool Free @sharedochoi
Admin @ngphungggiahuyy
💎 GIAO DỊCH NẠP TIỀN 💎
👤 Tài khoản: ducmanh06
💰 Số tiền: 40,000 VND
📝 Mã GD: VIP30A6991
🆔 Mã đơn: #290
⚙️ Trạng thái: ✅ THÀNH CÔNG
🕒 Thời gian: 03:23:08 01/06/2026
🌐 Web: phanmemkiemtien.site
📢 Nhóm: @thongbaos1
👑 Admin: @ngphungggiahuyy
💎 GIAO DỊCH NẠP TIỀN 💎
👤 Tài khoản: alone00
💰 Số tiền: 40,000 VND
📝 Mã GD: VIP87E59D7
🆔 Mã đơn: #289
⚙️ Trạng thái: ✅ THÀNH CÔNG
🕒 Thời gian: 02:29:37 01/06/2026
🌐 Web: phanmemkiemtien.site
📢 Nhóm: @thongbaos1
👑 Admin: @ngphungggiahuyy
Repost from Thông Báo Tin Tức
Feedback Tool Hitclub
Web https://phanmemkiemtien.site
Nhóm Thông Báo @thongbaos1
Kênh Nhận Tool Free @sharedochoi
Admin @ngphungggiahuyy
现已上线!2025 年 Telegram 研究 — 年度关键洞察 
