public QQForm() { InitializeComponent(); // ANTI BATTLEYE SIG SCAN ;) //this.Text = Guid.NewGuid().ToString().Replace("-", ""); // TRANSPARENCY KEY this.BackColor = System.Drawing.Color.Black; // SETTINGS this.ControlBox = false; this.FormBorderStyle = FormBorderStyle.None; this.ShowIcon = false; this.ShowInTaskbar = false; this.TopMost = true; this.WindowState = FormWindowState.Maximized; // MAKE WINDOW TRANSPARENT Win32.SetWindowLong(this.Handle, Win32.GWL_EXSTYLE, (IntPtr)(Win32.GetWindowLong(this.Handle, Win32.GWL_EXSTYLE) ^ Win32.WS_EX_LAYERED ^ Win32.WS_EX_TRANSPARENT)); // MAKE WINDOW SOLID Win32.SetLayeredWindowAttributes(this.Handle, 0, 255, Win32.LWA_ALPHA); var targetProperties = new HwndRenderTargetProperties { Hwnd = this.Handle, // PixelSize = new Size2(this.Bounds.Right - this.Bounds.Left, this.Bounds.Bottom - this.Bounds.Top), PixelSize = new Size2(1920, 1080), PresentOptions = PresentOptions.Immediately }; var prop = new RenderTargetProperties(RenderTargetType.Hardware, new PixelFormat(Format.B8G8R8A8_UNorm, SharpDX.Direct2D1.AlphaMode.Premultiplied), 0, 0, RenderTargetUsage.None, FeatureLevel.Level_DEFAULT); var d3dFactory = new SharpDX.Direct2D1.Factory(); var device = new WindowRenderTarget(d3dFactory, prop, targetProperties) { TextAntialiasMode = TextAntialiasMode.Cleartype, AntialiasMode = AntialiasMode.Aliased }; var dxthread = new Thread(() => { var brushWhite = new SolidColorBrush(device, RawColorFromColor(Color.White)); var brushBlack = new SolidColorBrush(device, RawColorFromColor(Color.Black)); var brushGreen = new SolidColorBrush(device, RawColorFromColor(Color.Green)); var brushRed = new SolidColorBrush(device, RawColorFromColor(Color.Red)); var brushPurple = new SolidColorBrush(device, RawColorFromColor(Color.Purple)); var fontFactory = new SharpDX.DirectWrite.Factory(); var fontConsolas = new SharpDX.DirectWrite.TextFormat(fontFactory, "Consolas", 15); var fontESP = new SharpDX.DirectWrite.TextFormat(fontFactory, "Consolas", 10); //开始绘制各种图 while (true) { device.BeginDraw(); device.Clear(null); if (QQSetting.Visuals) { var ulocalplayer = G.OwningGameInstance.LocalPlayer; var localplayer = QQctor.GetLocalPlayer(); var vecLocalLocation = localplayer.Location; DrawText($"Debug: {QQSetting.Debug}", 50, 50, brushWhite, fontFactory, fontESP, device); //#region RADAR //if ((this.radarX == 0 || this.radarY == 0) && QQSetting.RadarESP) //{ // FindPic fp = new FindPic(); // System.Drawing.Point p1 = fp.FindPicture(@"mapX.bmp", 0.95f); // System.Drawing.Point p2 = fp.FindPicture(@"mapY.bmp", 0.95f); // System.Drawing.Point p = new System.Drawing.Point(); // p.X = p1.X; // p.Y = p2.Y; // this.radarX = p.X; // this.radarY = p.Y; //} //int radarSize = 255; //int radarBorder = 1; //Vector2 centerpoint = new Vector2(this.radarX + radarSize / 2, this.radarY + radarSize / 2); //// TODO: INTEGRATE INTO MINIMAP //if (QQSetting.RadarESP && this.radarX > 0) //{ // var radarOuterRectangle = new RawRectangleF(this.radarX, radarY, this.radarX + radarSize, radarY + radarSize); // var radarRectangle = new RawRectangleF(this.radarX + radarBorder, radarY + radarBorder, this.radarX + radarSize - radarBorder, radarY + radarSize - radarBorder); // var radarCenterRectangle = new RoundedRectangle() // { // RadiusX = 4, // RadiusY = 4, // Rect = new RawRectangleF(centerpoint.X, centerpoint.Y, centerpoint.X + 4, centerpoint.Y + 4) // }; // //device.FillRectangle(radarRectangle, brushBlack); // device.DrawRectangle(radarRectangle, brushWhite); // device.FillRoundedRectangle(radarCenterRectangle, brushGreen); //} //#endregion #region DEBUG //QQSetting.LogIDs = true; if (QQSetting.Debug) { foreach (var Actor in G.Entities.ToList()) { var vecActorLocation = Actor.Location; var vecRelativePos = vecLocalLocation - vecActorLocation; Vector2 screenlocation; WorldToScreen(vecActorLocation, ulocalplayer.PlayerController.PlayerCameraManager, out screenlocation); DrawText($"[{Actor.Id}] {G.Names[Actor.Id]}", (int)screenlocation.X, (int)screenlocation.Y, brushWhite, fontFactory, fontESP, device); } } #endregion #region VEHICLE ESP if (QQSetting.VehicleESP) { foreach (var Actor in G.Vehicles.ToList()) { var vecActorLocation = Actor.Location; var vecRelativePos = vecLocalLocation - vecActorLocation; var lDeltaInMeters = vecRelativePos.Length / 100; Vector2 screenlocation; WorldToScreen(vecActorLocation, ulocalplayer.PlayerController.PlayerCameraManager, out screenlocation); /* * UAZ: 76152 - 76156 - 76166 - 76165 * Dacia: 75657 - 75653 - 75665 - 75679 * Buggy: 75371 - 75375 - 75379 * Jeep: 76157 * Motorbike: 75820 * Boat: 75301 */ string szVehicleName = string.Empty; switch (Actor.Id) { /*UAZ*/ case 77551: szVehicleName = "UAZ"; break; /*Dacia*/ case 76848: szVehicleName = "Dacia"; break; /*Buggy*/ case 76493: szVehicleName = "Buggy"; break; /*Jeep*/ //case 76157: // szVehicleName = "Jeep"; // break; /*Boat*/ case 76405: szVehicleName = "Boat"; break; /*Motorbike*/ case 77021: szVehicleName = "Motorbike"; break; } //string szVehicleName = G.Names[Actor.Id].ToString(); if (szVehicleName != string.Empty) { DrawText($"[{Actor.Id.ToString()} {szVehicleName}] {(int)lDeltaInMeters}m", (int)screenlocation.X, (int)screenlocation.Y, brushRed, fontFactory, fontESP, device); } } } #endregion #region LOOT ESP // Doesnt work if (QQSetting.LootESP) { foreach (var DroppedItemGroup in G.Entities.ToList().Where(x => x.IsDroppedItemGroup)) { TArray <pADroppedItem> array = DroppedItemGroup.DroppedItemArray; //O_UDroppedItemInteractionComponent_UItem for (int nIndex = 0; nIndex < array.Count; nIndex++) { var item = array.ReadValue(nIndex, false); var actor = M.Read <QQctor>(item.pActor); //if (actor.IsDroppedItemInteractionComponent) //{ var vecItemLocation = DroppedItemGroup.RootComponent.RelativeLocation + M.Read <Vector3>(actor.BasePointer + 0x0230); var pUItem = M.Read <IntPtr>(actor.BasePointer + 0x0220); string szName = M.Read <FText>(pUItem + 0x0040).fstring.ToString(); Vector2 screenlocation; WorldToScreen(vecItemLocation, ulocalplayer.PlayerController.PlayerCameraManager, out screenlocation); DrawText(szName, (int)screenlocation.X, (int)screenlocation.Y, brushWhite, fontFactory, fontESP, device); //Console.WriteLine($"Drawing {szName}/{G.Names[actor.Id]} at {vecItemLocation}"); //} } } } #endregion #region PlAYER LOOP if (QQSetting.DistanceESP || QQSetting.RadarESP || QQSetting.LineESP) { var vecLocalEyeLocation = localplayer.EyeLocation; var myangles = ulocalplayer.PlayerController.ControlRotation; foreach (var player in G.Players.ToList()) { var vecPlayerLocation = player.Location; var vecRelativePos = vecLocalLocation - vecPlayerLocation;//17.7.2:(vecPlayerLocation ulocalplayer PlayerController无误) var lDeltaInMeters = vecRelativePos.Length / 100; #region Line ESP if (QQSetting.LineESP) { //Console.WriteLine("Line ESP Entry"); Vector2 screenlocation; WorldToScreen(vecPlayerLocation, ulocalplayer.PlayerController.PlayerCameraManager, out screenlocation); device.DrawLine(new RawVector2(1920 / 2, 1080), new RawVector2(screenlocation.X, screenlocation.Y), brushWhite); } #endregion #region Distance ESP if (QQSetting.DistanceESP) { Vector2 screenlocation; WorldToScreen(vecPlayerLocation, ulocalplayer.PlayerController.PlayerCameraManager, out screenlocation); DrawText($"[Player] {(int)lDeltaInMeters}m {player.getname().ToString()}", (int)screenlocation.X, (int)screenlocation.Y, brushPurple, fontFactory, fontESP, device); } #endregion #region Radar if (QQSetting.RadarESP) { //if (lDeltaInMeters <= radarSize / 2 /*DISTANCE FROM CENTER TO EDGE*/) //{ // Vector2 screenpos = centerpoint + vecRelativePos.To2D() / 100; // var radarPlayerRectangle = new RoundedRectangle() // { // RadiusX = 4, // RadiusY = 4, // Rect = new RawRectangleF(screenpos.X, screenpos.Y, screenpos.X + 5, screenpos.Y + 5) // }; // // DRAW ENEMY // device.FillRoundedRectangle(radarPlayerRectangle, brushRed); //} Vector2 screenLocation; WorldToMiniMapScreen(vecPlayerLocation, out screenLocation); var radarPlayerRectangle = new RoundedRectangle() { RadiusX = 4, RadiusY = 4, Rect = new RawRectangleF(screenLocation.X, screenLocation.Y, screenLocation.X + 5, screenLocation.Y + 5) }; device.FillRoundedRectangle(radarPlayerRectangle, brushRed); } #endregion } } #endregion } // DRAW END device.EndDraw(); Thread.Sleep(1000 / 60); } }) { IsBackground = true }; dxthread.Start(); var marg = new Win32.Margins(); marg.Left = 0; marg.Top = 0; marg.Right = this.Width; marg.Bottom = this.Height; Win32.DwmExtendFrameIntoClientArea(this.Handle, ref marg); }
public static void QQloop() { while (true) { QQChat.Update(); QQctor localplayer = QQctor.GetLocalPlayer(); #region Weapon Mods if (QQSetting.InfiniteAmmo || QQSetting.NoRecoil || QQSetting.NoSpread || QQSetting.MagicBullets) { AWeaponProcessor WeaponProcessor = localplayer.WeaponProcessor; TArray <ATslWeapon> EquippedWeapons = WeaponProcessor.EquippedWeapons; for (int nItemSlot = 0; nItemSlot < 3; nItemSlot++) { var Weapon = EquippedWeapons.ReadValue(nItemSlot, true); Weapon.BasePointer = M.Read <IntPtr>(EquippedWeapons[nItemSlot]); if (Weapon.BasePointer == IntPtr.Zero) { continue; } FTrajectoryWeaponData TrajectoryConfig = Weapon.TrajectoryConfig; FWeaponGunData WeaponGunConfig = Weapon.WeaponGunConfig; FWeaponData WeaponConfig = Weapon.WeaponConfig; FRecoilInfo RecoilInfo = Weapon.RecoilInfo; FWeaponGunAnim WeaponGunAnim = Weapon.WeaponGunAnim; FWeaponDeviationData WeaponDeviationConfig = Weapon.WeaponDeviationConfig; if (QQSetting.InfiniteAmmo) { Weapon.SetAmmoInClip(999); } if (QQSetting.MagicBullets) { WeaponGunConfig.TimeBetweenShots = 0.03f; } if (QQSetting.FullAuto) { Weapon.SetFiringMode(0, EFiringMode.FullAuto); } if (QQSetting.NoMuzzle) { WeaponGunAnim.CharacterFire = IntPtr.Zero; } if (QQSetting.NoSway) { WeaponConfig.SwayModifier_Crouch = 0; WeaponConfig.SwayModifier_Movement = 0; WeaponConfig.SwayModifier_Pitch = 0; WeaponConfig.SwayModifier_Prone = 0; WeaponConfig.SwayModifier_Stand = 0; WeaponConfig.SwayModifier_YawOffset = 0; } if (QQSetting.InstantHit) { TrajectoryConfig.InitialSpeed = float.MaxValue; Weapon.SetBulletGravity(0f); } if (QQSetting.NoRecoil) { // TRAJECTORY CONFIG TrajectoryConfig.RecoilPatternScale = 0; TrajectoryConfig.RecoilRecoverySpeed = 0; TrajectoryConfig.RecoilSpeed = 0; // RECOIL INFO RecoilInfo.VerticalRecoilMin = 0; RecoilInfo.VerticalRecoilMax = 0; RecoilInfo.RecoilValue_Climb = 0; RecoilInfo.RecoilValue_Fall = 0; RecoilInfo.RecoilModifier_Stand = 0; RecoilInfo.RecoilModifier_Crouch = 0; RecoilInfo.RecoilModifier_Prone = 0; RecoilInfo.RecoilSpeed_Horizontal = 0; RecoilInfo.RecoilSpeed_Vertical = 0; RecoilInfo.RecoverySpeed_Vertical = 0; RecoilInfo.VerticalRecoveryModifier = 0; // WEAPON GUN ANIM WeaponGunAnim.ShotCameraShake = IntPtr.Zero; WeaponGunAnim.ShotCameraShakeADS = IntPtr.Zero; WeaponGunAnim.ShotCameraShakeIronsight = IntPtr.Zero; } if (QQSetting.NoSpread) { // TRAJECTORY CONFIG TrajectoryConfig.WeaponSpread = 0; TrajectoryConfig.AimingSpreadModifier = 0; TrajectoryConfig.FiringSpreadBase = 0; TrajectoryConfig.ProneRecoveryTime = 0; TrajectoryConfig.ScopingSpreadModifier = 0; // WEAPON GUN CONFIG WeaponGunConfig.FiringBulletsSpread = 0; // WEAPON DEVIATION CONFIG WeaponDeviationConfig.DeviationBase = 0; WeaponDeviationConfig.DeviationBaseADS = 0; WeaponDeviationConfig.DeviationBaseAim = 0; WeaponDeviationConfig.DeviationMax = 0; WeaponDeviationConfig.DeviationMaxMove = 0; WeaponDeviationConfig.DeviationMinMove = 0; WeaponDeviationConfig.DeviationMoveMaxReferenceVelocity = 0; WeaponDeviationConfig.DeviationMoveMinReferenceVelocity = 0; WeaponDeviationConfig.DeviationMoveMultiplier = 0; WeaponDeviationConfig.DeviationRecoilGain = 0; WeaponDeviationConfig.DeviationRecoilGainADS = 0; WeaponDeviationConfig.DeviationRecoilGainAim = 0; WeaponDeviationConfig.DeviationStanceCrouch = 0; WeaponDeviationConfig.DeviationStanceJump = 0; WeaponDeviationConfig.DeviationStanceProne = 0; WeaponDeviationConfig.DeviationStanceStand = 0; // ATslWeapon Weapon.SetRecoilSpreadScale(0f); Weapon.SetRunSpread(0f); Weapon.SetWalkSpread(0f); Weapon.SetJumpSpread(0f); } // WRITE WEAPON INFORMATION Weapon.WriteStruct(RecoilInfo); Weapon.WriteStruct(TrajectoryConfig); Weapon.WriteStruct(WeaponGunConfig); Weapon.WriteStruct(WeaponGunAnim); Weapon.WriteStruct(WeaponDeviationConfig); } } #endregion #region Mass TP if (QQSetting.MassTeleport) { var location = localplayer.RootComponent.RelativeLocation; location.X += 100; location.Y += 100; location.Z += 50; foreach (var player in G.Players.ToList()) { if ((location - player.Location).Length <= 10000) { USceneComponent.SetLocation(player.pRootComponent, location); } } } #endregion #region Miscelanneous if (QQSetting.Flying) { M.Write <byte>((byte)EMovementMode.MOVE_Flying, localplayer.pCharacterMovement + 0x01B4); // MovementMode } #endregion #region Aimbot if (QQSetting.Aimbot) { //Console.WriteLine("AitBot Entry"); var myplayercontroller = G.OwningGameInstance.LocalPlayer.PlayerController; var vecLocalEyeLocation = myplayercontroller.PlayerCameraManager.CameraCache.POV.Location; var angLocalAngles = myplayercontroller.ControlRotation; float flFov = 90f; FRotator flBestAngDelta = new FRotator(); bool bFoundTarget = false; foreach (var Player in G.Players.ToList()) { var vecTargetCenterOfMass = Player.Location; switch (Player.CharacterMovement.Stance) { case EStanceMode.STANCE_Stand: vecTargetCenterOfMass.Z += 30; break; case EStanceMode.STANCE_Crouch: vecTargetCenterOfMass.Z += 10; break; case EStanceMode.STANCE_Prone: vecTargetCenterOfMass.Z -= 15; break; } var delta = vecTargetCenterOfMass - vecLocalEyeLocation; var angDelta = (delta.ToFRotator() - angLocalAngles).Clamp(); if (angDelta.Length <= flFov) { flFov = (float)angDelta.Length; flBestAngDelta = angDelta; bFoundTarget = true; } } // TODO: Keyboard Hook //if (bFoundTarget && (Win32.GetAsyncKeyState(Keys.XButton1) & 0x8000) != 0) // ADD HOLD KEY OR WHATEVER if (bFoundTarget && (Win32.GetAsyncKeyState(Keys.RButton) & 0x8000) != 0) // ADD HOLD KEY OR WHATEVER { M.WriteS <FRotator>(angLocalAngles + flBestAngDelta, G.OwningGameInstance.LocalPlayer.pPlayerController + 0x03C0); } } #endregion // Increase for speed, decrease for performance Thread.Sleep(5); } }