protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius) { Vector2 least = Vector2.Zero; int index = -1; float leastDist = float.MaxValue, dist = 0f; Vector3 currentAngles = csgo.ViewAngles; Vector3 aimAngles = Vector3.Zero; for (int i = 0; i < csgo.Players.Length; i++) { if (csgo.Players[i] == null) continue; if (!csgo.LocalPlayer.SeenBy(csgo.Players[i]) && !csgo.Players[i].SeenBy(csgo.LocalPlayer)) continue; aimAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[i].Skeleton.GetBone(bone)); aimAngles -= currentAngles; dist = aimAngles.Length(); if(dist < leastDist) { leastDist = dist; index = csgo.Players[i].Index; } } return new AimMethodResult(index, least); }
protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius) { Vector2 least = Vector2.Zero; Player playerTmp = null; float leastDist = float.MaxValue; try { foreach (Player player in csgo.Players) { if (!PlayerValid(csgo.LocalPlayer, player, target)) continue; if (csgo.GetValue<YesNo>("aimSpottedOnly") == YesNo.Yes && !player.SeenBy(csgo.LocalPlayer)) continue; float multiplicator = this.GetFloatMultiplicator(); Vector2 head = AimAt(csgo, bone, player); if (!Geometry.PointInCircle(head, screenM, radius)) continue; float playerDist = Geometry.GetDistanceToPoint(player.Vector3, csgo.LocalPlayer.Vector3); if (playerDist < leastDist) { least = head; leastDist = playerDist; playerTmp = player; } } } catch { } return new AimMethodResult(playerTmp != null ? playerTmp.Index : 0, least); }
protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius) { Vector2 least = Vector2.Zero; int index = -1; float leastDist = float.MaxValue, dist = 0f; Vector3 currentAngles = csgo.ViewAngles; Vector3 aimAngles = Vector3.Zero; for (int i = 0; i < csgo.Players.Length; i++) { if (csgo.Players[i] == null) { continue; } if (!csgo.LocalPlayer.SeenBy(csgo.Players[i]) && !csgo.Players[i].SeenBy(csgo.LocalPlayer)) { continue; } aimAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[i].Skeleton.GetBone(bone)); aimAngles -= currentAngles; dist = aimAngles.Length(); if (dist < leastDist) { leastDist = dist; index = csgo.Players[i].Index; } } return(new AimMethodResult(index, least)); }
protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius) { Vector2 least = Vector2.Zero; int index = -1; float leastDist = float.MaxValue; try { for (int i = 0; i < csgo.Players.Length; i++) { if (!PlayerValid(csgo.LocalPlayer, csgo.Players[i], target)) continue; if (csgo.GetValue<YesNo>("aimSpottedOnly") == YesNo.Yes && !csgo.Players[i].SeenBy(csgo.LocalPlayer)) continue; Vector2 head = AimAt(csgo, bone, csgo.Players[i]); if (csgo.GetValue<OnOff>("aimbotRagemode") == OnOff.Off) if (!Geometry.PointInCircle(head, screenMid, radius)) continue; float dist = (float)Math.Abs((head - screenMid).Length()); //Debug.WriteLine("Dist {0}: {1}", csgo.Players[i].Name, Math.Round(dist, 4)); if (dist < leastDist) { least = head; leastDist = dist; index = csgo.Players[i].Index; } } } catch { } return new AimMethodResult(index, least); }
public void CheckYaw() { CSGOImplementation csgo = (CSGOImplementation)Program.GameImplementation; if (csgo.LocalPlayer == null) { return; } if (this.Index == csgo.LocalPlayer.Index) { return; } if (this.WeaponIndex >= 0 && this.WeaponIndex < csgo.Entities.Length) { if (csgo.Entities[this.WeaponIndex] != null) { if (WeaponData.WeaponHandler.Instance.GetWeaponType(csgo.Entities[this.WeaponIndex].ClassIDInt) != WeaponData.WeaponType.Melee) { this.yaw = Geometry.DegreeBetweenVectors( new Vector2(this.Skeleton.Weapon1.X, this.Skeleton.Weapon1.Y), new Vector2(this.Skeleton.Weapon2.X, this.Skeleton.Weapon2.Y)) - 90f; return; } } } this.yaw = -1f; }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) { return; } if (csgo.Players == null) { return; } this.UpdateBoundaries(); int idx = 0, numPlayers = PlayersNum(); this.Width = (numPlayers + 1) * elementWidth; //Base FillRectangle(device, Theme.BackColor * 0.5f, this.X, this.Y, this.Width, this.Height); DrawRectangle(device, Theme.BorderColor, this.X, this.Y, this.Width, this.Height); DrawText(device, Theme.ForeColor, this.X, this.Y + this.Height / 2f, 100f, 20f, this.Text, this.Font); //Min/Max DrawText( device, Theme.ForeColor, this.X + 2f, this.Y + 2f, 20f, 20f, this.MaxValue.ToString(), this.Font); DrawText( device, Theme.ForeColor, this.X + 2f, this.Y + this.Height - 20f, 20f, 20f, this.MinValue.ToString(), this.Font); try { foreach (Player player in csgo.Players) { if (player != null) { DrawPlayer(device, player, idx++, numPlayers); } } } catch { } }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { if (once) { System.Drawing.Bitmap bmp = (System.Drawing.Bitmap)Resources.ResourceManager.GetObject("ranks"); try { this.ranksBmp = SDXBitmapFromSysBitmap(device, bmp); once = false; } catch { } } csgo = (CSGOImplementation)Program.GameImplementation; Player currentPlayer = csgo.GetCurrentPlayer(); if (csgo.SignOnState < SignOnState.SIGNONSTATE_PRESPAWN || csgo.SignOnState > SignOnState.SIGNONSTATE_FULL) { return; } if (csgo.Players == null) { return; } if (csgo.Players.Length == 0) { return; } if (currentPlayer == null) { return; } if (csgo.GetValue <YesNo>("espEnabled") == YesNo.No) { return; } try { DrawWorld(device, csgo); } catch { } try { foreach (Player player in csgo.Players) { DrawPlayer(device, currentPlayer, player); } foreach (Entity entity in csgo.Entities) { DrawEntity(device, currentPlayer, entity); } for (int i = csgo.Damages.Count - 1; i >= 0; i--) { DrawDamage(device, currentPlayer, csgo.Damages[i]); } } catch { } //DrawPunchAngles(device, csgo); }
public Vector2 AimAt(CSGOImplementation csgo, AimBone bone, Player player) { if (player == null) return Vector2.Zero; //float multiplicator = GetFloatMultiplicator(); return Geometry.WorldToScreen( csgo.ViewMatrix, csgo.ScreenSize, player.Skeleton.GetBone(bone)// + ((player.Velocity + player.BaseVelocity) - (csgo.LocalPlayer.Velocity + csgo.LocalPlayer.BaseVelocity)) * GetFloatMultiplicator() ); }
public AimMethodResult GetAimTarget(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius) { if (!CSGOImplementationValid(csgo)) return null; this.CheckTickLength(); AimMethodResult least = OnGetAimPoint(csgo, target, bone, screenM, radius); this.UpdateTick(); return least; }
public Vector2 AimAt(CSGOImplementation csgo, AimBone bone, Player player) { if (player == null) { return(Vector2.Zero); } //float multiplicator = GetFloatMultiplicator(); return(Geometry.WorldToScreen( csgo.ViewMatrix, csgo.ScreenSize, player.Skeleton.GetBone(bone)// + ((player.Velocity + player.BaseVelocity) - (csgo.LocalPlayer.Velocity + csgo.LocalPlayer.BaseVelocity)) * GetFloatMultiplicator() )); }
protected bool CSGOImplementationValid(CSGOImplementation csgo) { if (csgo == null) return false; if (csgo.LocalPlayer == null) return false; if (!csgo.LocalPlayer.IsValid()) return false; if (csgo.Players == null) return false; if (csgo.Players.Length < 2) return false; return true; }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) return; if (csgo.Players == null) return; this.UpdateBoundaries(); int idx = 0, numPlayers = PlayersNum(); this.Width = (numPlayers + 1) * elementWidth; //Base FillRectangle(device, Theme.BackColor * 0.5f, this.X, this.Y, this.Width, this.Height); DrawRectangle(device, Theme.BorderColor, this.X, this.Y, this.Width, this.Height); DrawText(device, Theme.ForeColor, this.X, this.Y + this.Height / 2f, 100f, 20f, this.Text, this.Font); //Min/Max DrawText( device, Theme.ForeColor, this.X + 2f, this.Y + 2f, 20f, 20f, this.MaxValue.ToString(), this.Font); DrawText( device, Theme.ForeColor, this.X + 2f, this.Y + this.Height - 20f, 20f, 20f, this.MinValue.ToString(), this.Font); try { foreach (Player player in csgo.Players) if (player != null) DrawPlayer(device, player, idx++, numPlayers); } catch { } }
public AimMethodResult GetAimTarget(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius) { if (!CSGOImplementationValid(csgo)) { return(null); } this.CheckTickLength(); AimMethodResult least = OnGetAimPoint(csgo, target, bone, screenM, radius); this.UpdateTick(); return(least); }
private Player PlayerExists(int address) { CSGOImplementation csgo = ((CSGOImplementation)Program.GameImplementation); foreach (Player plr in csgo.Players) { if (plr != null) { if (plr.Address == address) { return(plr); } } } return(null); }
public int GetGlowObjectByAddress(int address) { CSGOImplementation csgo = ((CSGOImplementation)Program.GameImplementation); if (csgo.GlowObjects == null) { return(-1); } for (int i = 0; i < csgo.GlowObjects.Length; i++) { if (csgo.GlowObjects[i].pEntity == address) { return(i); } } return(-1); }
protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenMid, float radius) { Vector2 least = Vector2.Zero; int index = -1; float leastDist = float.MaxValue; try { for (int i = 0; i < csgo.Players.Length; i++) { if (!PlayerValid(csgo.LocalPlayer, csgo.Players[i], target)) { continue; } if (csgo.GetValue <YesNo>("aimSpottedOnly") == YesNo.Yes && !csgo.Players[i].SeenBy(csgo.LocalPlayer)) { continue; } Vector2 head = AimAt(csgo, bone, csgo.Players[i]); if (csgo.GetValue <OnOff>("aimbotRagemode") == OnOff.Off) { if (!Geometry.PointInCircle(head, screenMid, radius)) { continue; } } float dist = (float)Math.Abs((head - screenMid).Length()); //Debug.WriteLine("Dist {0}: {1}", csgo.Players[i].Name, Math.Round(dist, 4)); if (dist < leastDist) { least = head; leastDist = dist; index = csgo.Players[i].Index; } } } catch { } return(new AimMethodResult(index, least)); }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) return; if (Program.GameController == null) return; if (!Program.GameController.IsGameRunning) return; csgo = (CSGOImplementation)Program.GameImplementation; CSGOGameController controller = (CSGOGameController)Program.GameController; if (csgo == null) return; if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) return; if (csgo.Players == null) return; if (csgo.LocalPlayer == null) return; if (csgo.LocalPlayer.Health <= 0) return; DoOtherStuff(); if (csgo.GetValue<YesNo>("rcsEnabled") == YesNo.No) return; float force = csgo.GetValue<float>("rcsForce"); if (lastPunch == csgo.LocalPlayer.PunchVector) return; if (csgo.LocalPlayer.PunchVector == Vector3.Zero) return; currentPunch = csgo.LocalPlayer.PunchVector - lastPunch; if (IsActive && currentPunch != Vector3.Zero) { Vector3 newViewAngles = csgo.ViewAngles - currentPunch * force; newViewAngles = Geometry.ClampAngle(newViewAngles); newViewAngles.Z = 0f; controller.MemoryUpdater.WriteViewAngles(newViewAngles); } lastPunch = csgo.LocalPlayer.PunchVector; }
protected override AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius) { Vector2 least = Vector2.Zero; Player playerTmp = null; float leastDist = float.MaxValue; try { foreach (Player player in csgo.Players) { if (!PlayerValid(csgo.LocalPlayer, player, target)) { continue; } if (csgo.GetValue <YesNo>("aimSpottedOnly") == YesNo.Yes && !player.SeenBy(csgo.LocalPlayer)) { continue; } float multiplicator = this.GetFloatMultiplicator(); Vector2 head = AimAt(csgo, bone, player); if (!Geometry.PointInCircle(head, screenM, radius)) { continue; } float playerDist = Geometry.GetDistanceToPoint(player.Vector3, csgo.LocalPlayer.Vector3); if (playerDist < leastDist) { least = head; leastDist = playerDist; playerTmp = player; } } } catch { } return(new AimMethodResult(playerTmp != null ? playerTmp.Index : 0, least)); }
protected bool PlayerValid(Player localPlayer, Player enemy, Target target) { if (enemy == null) { return(false); } if (enemy.Address == localPlayer.Address) { return(false); } if (enemy.Index == localPlayer.Index) { return(false); } if (!enemy.IsValid()) { return(false); } if (target == Target.Allies && enemy.InTeam != localPlayer.InTeam) { return(false); } if (target == Target.Enemies && enemy.InTeam == localPlayer.InTeam) { return(false); } //if (!Geometry.PointSeesPoint(localPlayer.Vector2, enemy.Vector2, Player.FOV_DEGREE, localPlayer.Yaw)) // return false; //if (!enemy.IsVisible()) // return false; CSGOImplementation csgo = (CSGOImplementation)Program.GameImplementation; //if (!csgo.CurrentMap.IsVisible(localPlayer.Vector3 + Vector3.UnitZ * (enemy.Skeleton.Head.Z - enemy.Skeleton.LeftFoot.Z), enemy.Skeleton.Head)) // return false; //if(!enemy.IsSpotted) // return false; return(true); }
protected bool CSGOImplementationValid(CSGOImplementation csgo) { if (csgo == null) { return(false); } if (csgo.LocalPlayer == null) { return(false); } if (!csgo.LocalPlayer.IsValid()) { return(false); } if (csgo.Players == null) { return(false); } if (csgo.Players.Length < 2) { return(false); } return(true); }
protected abstract AimMethodResult OnGetAimPoint(CSGOImplementation csgo, Target target, AimBone bone, Vector2 screenM, float radius);
private void Draw2DCircle(WindowRenderTarget device, Vector3 origin, float radius, int segments, Color color, float thickness, CSGOImplementation csgo) { Vector3[] circPoints = Geometry.Create3DFlatCircle( origin, radius, segments); Vector2[] scrCircPoints = Geometry.WorldToScreen(csgo.ViewMatrix, csgo.ScreenSize, circPoints); DrawLines(device, color, thickness, scrCircPoints); }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; //Draw background FillRectangle(device, CSGOTheme.BackColor, X, Y, Width, Height); if (csgo.SignOnState < SignOnState.SIGNONSTATE_NEW || csgo.SignOnState > SignOnState.SIGNONSTATE_FULL) { DrawText(device, this.Theme.ForeColor * (0.75f + 0.25f * GetColorMultiplier()), this.X + this.Width / 2f - 50f, this.Y + this.Height / 2f + 8f, 200, 20, "Not connected", this.Font); return; } Player currentPlayer = csgo.GetCurrentPlayer(); if (csgo.Players == null) { return; } //Check validity if (csgo.Players == null) { return; } if (csgo.Players.Length == 0) { return; } if (currentPlayer == null) { return; } if (csgo.GetValue <YesNo>("radarEnabled") == YesNo.No) { return; } resolution = csgo.GetValue <float>("radarZoom"); Vector2 screenMid = new Vector2(X + Width / 2f, Y + Height / 2f); float scale = 2f / resolution; #region SoundESP if (csgo.GetValue <YesNo>("soundEspEnabled") == YesNo.Yes) { //float maxSpan = csgo.GetValue<float>("soundEspInterval"); float maxRange = csgo.GetValue <float>("soundEspRange"); maxRange /= 0.01905f; if ((maxRange * scale * 2f) <= this.Width) { DrawEllipse(device, CSGOTheme.Line, screenMid.X, screenMid.Y, maxRange * scale * 2f, maxRange * scale * 2f, true, 1f); } SoundESP sEsp = ((CSGOGameController)Program.GameController).SoundESP; if (((maxRange * scale * 2f) / 100f * sEsp.LastPercent) <= this.Width) { DrawEllipse(device, CSGOTheme.Line, screenMid.X, screenMid.Y, (maxRange * scale * 2f) / 100f * sEsp.LastPercent, (maxRange * scale * 2f) / 100f * sEsp.LastPercent, true, 1f); } } #endregion //Draw other players try { foreach (Player player in csgo.Players) { if (player != null) { DrawPlayer(device, currentPlayer, player, screenMid, scale); } } } catch { } //foreach (Entity entity in csgo.Entities) //{ // DrawEntity(device, currentPlayer, entity, screenMid, scale); //} //Draw "view" DrawText(device, CSGOTheme.ForeColor, X + 4, Y + 4, 100, 20, "Zoom: x" + Math.Round(1 / resolution, 2), FactoryManager.GetFont("smallSegoe")); FillPolygon(device, CSGOTheme.ViewColor, screenMid.X, screenMid.Y, screenMid.X - viewX * scale, screenMid.Y - viewY * scale, screenMid.X + viewX * scale, screenMid.Y - viewY * scale); DrawPolygon(device, CSGOTheme.ViewColorOutline, screenMid.X, screenMid.Y, screenMid.X - viewX * scale, screenMid.Y - viewY * scale, screenMid.X + viewX * scale, screenMid.Y - viewY * scale); //Draw player FillEllipse(device, currentPlayer.InTeam == Team.CounterTerrorists ? CSGOTheme.TeamCT : CSGOTheme.TeamT, screenMid.X, screenMid.Y, dotSize * scale, dotSize * scale, true); }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; FillRectangle(device, Theme.BackColor, this.X, this.Y, this.Width, this.Height); lblDataRead.Text = string.Format("Data read: {0}", GetSize(WinAPI.BytesRead)); lblDataWritten.Text = string.Format("Data written: {0}", GetSize(WinAPI.BytesWritten)); //Update performance-bars /* ((CSGOGameController)Program.GameController).MemoryUpdater.GetFrameRate().ToString(), ((CSGOGameController)Program.GameController).InputUpdater.GetFrameRate().ToString(), ((CSGOGameController)Program.GameController).TriggerBot.GetFrameRate().ToString(), ((CSGOGameController)Program.GameController).AimBot.GetFrameRate().ToString()*/ barMem.Value = ((CSGOGameController)Program.GameController).MemoryUpdater.GetFrameRate(); barMem.Text = String.Format("MEM {0}", barMem.Value); barInp.Value = ((CSGOGameController)Program.GameController).InputUpdater.GetFrameRate(); barInp.Text = String.Format("INP {0}", barInp.Value); barAim.Value = ((CSGOGameController)Program.GameController).AimBot.GetFrameRate(); barAim.Text = String.Format("AIM {0}", barAim.Value); barTrg.Value = ((CSGOGameController)Program.GameController).TriggerBot.GetFrameRate(); barTrg.Text = String.Format("TRG {0}", barTrg.Value); barDrw.Value = ((CSGOGameController)Program.GameController).Form.DrawUpdater.GetFrameRate(); barDrw.Text = String.Format("DRW {0}", barDrw.Value); barTick.Value = ((CSGOGameController)Program.GameController).Form.TickUpdater.GetFrameRate(); barTick.Text = String.Format("TCK {0}", barTick.Value); barRcs.Value = ((CSGOGameController)Program.GameController).RecoilControl.GetFrameRate(); barRcs.Text = String.Format("RCS {0}", barRcs.Value); barCPU.Value = ((CSGOGameController)Program.GameController).PerformanceUpdater.CurrentValue; barCPU.Text = String.Format("CPU {0}", barCPU.Value); //Update playerinfo //if (currentPlayer == null) // return; Player currentPlayer = csgo.GetCurrentPlayer(); bool valid = currentPlayer != null; lblState.Text = String.Format("State: {0}", GetSignOnState(csgo.SignOnState)); lblServerData.Text = String.Format("Server: {0}", csgo.ServerName); lblServerIP.Text = String.Format("IP: {0}", csgo.ServerIP); lblMapName.Text = String.Format("Current map: {0}", csgo.ServerMap); if (valid) valid = csgo.SignOnState == SignOnState.SIGNONSTATE_FULL; barSpeed.Enabled = valid; barRecoil.Enabled = valid; barSpread.Enabled = valid; barKD.Enabled = valid; if (valid) { //Velocity Vector2 velXY = new Vector2(currentPlayer.Velocity.X, currentPlayer.Velocity.Y); float length = velXY.Length(); float speedPercent = 100f / 450f * (length % 450f); float speedMeters = length * 0.01905f; float speedKiloMetersPerHour = speedMeters * 60f * 60f / 1000f; barSpeed.Value = (int)speedPercent; barSpeed.Text = String.Format("{0} km/h", Math.Round(speedKiloMetersPerHour, 2)); //Gun info if (Environment.TickCount - spinTick > 300) { spinnerCnt++; spinnerCnt %= spinners.Length; spinTick = Environment.TickCount; } lblWeaponInfo.Text = String.Format( "{0} [{1}] [{2}/{3}] {5}{4}", csgo.WeaponName, csgo.WeaponType, csgo.WeaponClip1 > 0 && csgo.WeaponClip1 <= 200 && !csgo.IsReloading ? csgo.WeaponClip1.ToString() : (csgo.IsReloading ? "RELOADING" + spinners[spinnerCnt].ToString() : "-"), csgo.WeaponClip2 > 0 && csgo.WeaponClip2 <= 500 ? csgo.WeaponClip2.ToString() : "-", (csgo.IsShooting ? "[x]" : ""), (csgo.WeaponShotsFired > 0 ? string.Format("[{0}] ", csgo.WeaponShotsFired.ToString()) : "") ); //lblShotsFired.Text = String.Format("Shots fired: {0}", csgo.ShotsFired); //Gun punch float percentage = 100f / 9f * currentPlayer.PunchVector.Length(); barRecoil.Value = percentage; barRecoil.Text = String.Format("Recoil: {0}%", Math.Round(percentage, 0)); //Gun spread percentage = 100f / 0.16f * csgo.AccuracyPenality; percentage = (float)Math.Min(percentage, 100f); barSpread.Value = percentage; barSpread.Text = String.Format("Spread: {0}%", Math.Round(percentage, 0)); //KD if (currentPlayer.Deaths > 0) { float kd = (float)currentPlayer.Kills / (float)Math.Max(1, currentPlayer.Deaths); barKD.Value = kd; barKD.Text = String.Format("k/d ratio: {0}", Math.Round(kd, 2)); } else { barKD.Value = 0; barKD.Text = "k/d ratio: ∞"; } } else { barSpeed.Value = 0f; barRecoil.Value = 0f; barSpread.Value = 0f; barKD.Value = 0f; barSpeed.Text = ""; barRecoil.Text = ""; barSpread.Text = ""; barKD.Text = ""; lblWeaponInfo.Text = ""; lblServerData.Text = ""; lblMapName.Text = ""; } }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) { return; } if (Program.GameController == null) { return; } if (!Program.GameController.IsGameRunning) { return; } csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) { return; } if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) { return; } if (csgo.Players == null) { return; } if (csgo.GetValue <YesNo>("triggerbotEnabled") == YesNo.No) { return; } if (csgo.LocalPlayer == null) { return; } if (csgo.LocalPlayer.Health <= 0) { return; } if (csgo.WeaponClip1 == 0) { return; } if (csgo.IsReloading) { return; } if (csgo.IsShooting) { return; } if ((csgo.TargetPlayer == null && csgo.TargetIndex <= 64)) { targetSeen = false; return; } if (Program.GameImplementation.GetValue <YesNo>("spectatorDisableTrigger") == YesNo.Yes && csgo.FirstPersonSpectator) { return; } if (Program.GameImplementation.GetValue <YesNo>("triggerbotSnipersOnly") == YesNo.Yes && csgo.WeaponType != WeaponType.Sniper) { return; } Target target = csgo.GetValue <Target>("triggerbotTarget"); if (csgo.TargetIndex > 0 && csgo.TargetIndex <= 64 && csgo.TargetPlayer != null) { if (target == Target.Allies && csgo.TargetPlayer.InTeam != csgo.LocalPlayer.InTeam) { return; } if (target == Target.Enemies && csgo.TargetPlayer.InTeam == csgo.LocalPlayer.InTeam) { return; } } else { int idx = csgo.TargetIndex - 1 - csgo.Players.Length; if (idx < 0 || idx >= csgo.Entities.Length) { return; } if (csgo.Entities[idx] == null) { return; } if (csgo.Entities[idx].ClassID != Data.Enums.ClassID.CSPlayer && csgo.Entities[idx].ClassID != Data.Enums.ClassID.Chicken) { return; } } if (!targetSeen) { lastSeen = DateTime.Now.Ticks; targetSeen = true; } if (csgo.GetValue <float>("triggerbotSpeedThreshold") < csgo.GetPlayerKMH()) { return; } TimeSpan spanSeen = new TimeSpan(DateTime.Now.Ticks - lastSeen); if ( targetSeen && spanSeen.TotalMilliseconds >= csgo.GetValue <float>("triggerbotDelay") && (csgo.WeaponType == WeaponType.Sniper || 100f / 9f * csgo.LocalPlayer.PunchVector.Length() < csgo.GetValue <float>("triggerbotRecoilThreshold")) ) { if (csgo.WeaponType != WeaponType.Grenade && csgo.WeaponType != WeaponType.Melee && csgo.WeaponType != WeaponType.Special) { lastShot = DateTime.Now.Ticks; Shoot(); } else if (csgo.WeaponType == WeaponType.Melee) { if (csgo.Players != null && csgo.TargetPlayer != null) { float yaw1 = csgo.LocalPlayer.Yaw, yaw2 = csgo.TargetPlayer.Yaw; //while (yaw1 < 0f) // yaw1 += 360f; //while (yaw2 < 0f) // yaw2 += 360f; if (csgo.LocalPlayer.DistanceToOtherEntityInMetres(csgo.TargetPlayer) <= 1) { RightKnife(); } } } } }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; //Draw background FillRectangle(device, CSGOTheme.BackColor, X, Y, Width, Height); if (csgo.SignOnState < SignOnState.SIGNONSTATE_NEW || csgo.SignOnState > SignOnState.SIGNONSTATE_FULL) { DrawText(device, this.Theme.ForeColor * (0.75f + 0.25f * GetColorMultiplier()), this.X + this.Width / 2f - 50f, this.Y + this.Height / 2f + 8f, 200, 20, "Not connected", this.Font); return; } Player currentPlayer = csgo.GetCurrentPlayer(); if (csgo.Players == null) return; //Check validity if (csgo.Players == null) return; if (csgo.Players.Length == 0) return; if (currentPlayer == null) return; if (csgo.GetValue<YesNo>("radarEnabled") == YesNo.No) return; resolution = csgo.GetValue<float>("radarZoom"); Vector2 screenMid = new Vector2(X + Width / 2f, Y + Height / 2f); float scale = 2f / resolution; #region SoundESP if (csgo.GetValue<YesNo>("soundEspEnabled") == YesNo.Yes) { //float maxSpan = csgo.GetValue<float>("soundEspInterval"); float maxRange = csgo.GetValue<float>("soundEspRange"); maxRange /= 0.01905f; if ((maxRange * scale * 2f) <= this.Width) DrawEllipse(device, CSGOTheme.Line, screenMid.X, screenMid.Y, maxRange * scale * 2f, maxRange * scale * 2f, true, 1f); SoundESP sEsp = ((CSGOGameController)Program.GameController).SoundESP; if (((maxRange * scale * 2f) / 100f * sEsp.LastPercent) <= this.Width) DrawEllipse(device, CSGOTheme.Line, screenMid.X, screenMid.Y, (maxRange * scale * 2f) / 100f * sEsp.LastPercent, (maxRange * scale * 2f) / 100f * sEsp.LastPercent, true, 1f); } #endregion //Draw other players try { foreach (Player player in csgo.Players) { if (player != null) DrawPlayer(device, currentPlayer, player, screenMid, scale); } } catch { } //foreach (Entity entity in csgo.Entities) //{ // DrawEntity(device, currentPlayer, entity, screenMid, scale); //} //Draw "view" DrawText(device, CSGOTheme.ForeColor, X + 4, Y + 4, 100, 20, "Zoom: x" + Math.Round(1 / resolution, 2), FactoryManager.GetFont("smallSegoe")); FillPolygon(device, CSGOTheme.ViewColor, screenMid.X, screenMid.Y, screenMid.X - viewX * scale, screenMid.Y - viewY * scale, screenMid.X + viewX * scale, screenMid.Y - viewY * scale); DrawPolygon(device, CSGOTheme.ViewColorOutline, screenMid.X, screenMid.Y, screenMid.X - viewX * scale, screenMid.Y - viewY * scale, screenMid.X + viewX * scale, screenMid.Y - viewY * scale); //Draw player FillEllipse(device, currentPlayer.InTeam == Team.CounterTerrorists ? CSGOTheme.TeamCT : CSGOTheme.TeamT, screenMid.X, screenMid.Y, dotSize * scale, dotSize * scale, true); }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) { return; } if (Program.GameController == null) { return; } if (!Program.GameController.IsGameRunning) { return; } if (!Program.GameController.IsInGame) { return; } CSGOImplementation csgo = ((CSGOImplementation)Program.GameImplementation); IntPtr handle = Program.GameImplementation.GameController.Process.Handle; //Get addresses if (!updatedOffsets) { FindOffsets(); } entityListAddress = dllClientAddress + GameOffsets.CL_ENTITY_LIST; localAddress = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_LOCAL_BASE_ENTITY); radarAddress = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_RADAR_BASE); radarAddress = WinAPI.ReadInt32(handle, radarAddress + GameOffsets.CL_RADAR_OFFSET); //B658BEC scoreBoardAddress = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_SCRBRD_BASE); enginePointer = WinAPI.ReadInt32(handle, dllEngineAddress + GameOffsets.EN_ENGINE_POINTER); csgo.SignOnState = (SignOnState)WinAPI.ReadInt32(handle, enginePointer + GameOffsets.EN_SIGNONSTATE); if (csgo.SignOnState < SignOnState.SIGNONSTATE_PRESPAWN || csgo.SignOnState > SignOnState.SIGNONSTATE_FULL) { return; } //General csgo.ScreenSize = new SharpDX.Size2(Program.GameController.WindowArea.Width, Program.GameController.WindowArea.Height); int targetIndex = WinAPI.ReadInt32(handle, localAddress + GameOffsets.CL_LOCAL_CROSSHAIR_TARGET); Matrix4x4 viewMatrix = Matrix4x4.ReadMatrix(handle, dllClientAddress + GameOffsets.CL_LOCAL_VIEWMATRIX); bool c4Planted = false; //Refresh players if (Environment.TickCount - newPlayers >= 1000) { newPlayers = Environment.TickCount; csgo.Players = null; csgo.Entities = null; } //Read scrbrd-data byte[] scrbrdData = WinAPI.ReadMemory(handle, scoreBoardAddress, 0x1C38); if (csgo.ScrBrdArmor == null) { csgo.ScrBrdArmor = new int[MAX_PLAYERS]; } if (csgo.ScrBrdAssists == null) { csgo.ScrBrdAssists = new int[MAX_PLAYERS]; } if (csgo.ScrBrdDeaths == null) { csgo.ScrBrdDeaths = new int[MAX_PLAYERS]; } if (csgo.ScrBrdHealth == null) { csgo.ScrBrdHealth = new int[MAX_PLAYERS]; } if (csgo.ScrBrdKills == null) { csgo.ScrBrdKills = new int[MAX_PLAYERS]; } if (csgo.ScrBrdScore == null) { csgo.ScrBrdScore = new int[MAX_PLAYERS]; } if (csgo.ScrBrdRanks == null) { csgo.ScrBrdRanks = new int[MAX_PLAYERS]; } if (csgo.ScrBrdWins == null) { csgo.ScrBrdWins = new int[MAX_PLAYERS]; } for (int i = 0; i < MAX_PLAYERS; i++) { csgo.ScrBrdArmor[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_ARMOR + 4 * i); csgo.ScrBrdAssists[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_ASSISTS + 4 * i); csgo.ScrBrdDeaths[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_DEATHS + 4 * i); csgo.ScrBrdHealth[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_HEALTH + 4 * i); csgo.ScrBrdKills[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_KILLS + 4 * i); csgo.ScrBrdScore[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_SCORE + 4 * i); csgo.ScrBrdRanks[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_RANKING + 4 * i); csgo.ScrBrdWins[i] = BitConverter.ToInt32(scrbrdData, GameOffsets.CL_SCRBRD_WINS + 4 * i); } //Read players & entities if (csgo.Players == null) { csgo.Players = new Player[MAX_PLAYERS]; } if (csgo.Entities == null) { csgo.Entities = new Entity[MAX_ENTITIES - MAX_PLAYERS]; } int maxIndex = 2048;// = WinAPI.ReadInt32(handle, entityListAddress + 0x4); //maxIndex -= entityListAddress; //maxIndex /= GameOffsets.CL_ENTITY_SIZE; byte[] entityList = WinAPI.ReadMemory(handle, entityListAddress, maxIndex * GameOffsets.CL_ENTITY_SIZE); for (int i = 0; i < maxIndex; i++) { try { int address = BitConverter.ToInt32(entityList, GameOffsets.CL_ENTITY_SIZE * i); if (address != 0) { if (i < 64) { if (csgo.Players[i] == null) { csgo.Players[i] = new Player(address, radarAddress + GameOffsets.CL_RADAR_SIZE * i, i + 1); } else { csgo.Players[i].Update(address, radarAddress + GameOffsets.CL_RADAR_SIZE * i, i + 1); } } else { if (csgo.Entities[i - csgo.Players.Length] == null) { csgo.Entities[i - csgo.Players.Length] = new Entity(address, radarAddress, i); } else { csgo.Entities[i - csgo.Players.Length].Update(address, radarAddress, i); } //if (!entityClasses.ContainsKey(csgo.Entities[i - csgo.Players.Length].ClassIDInt)) // entityClasses.Add(csgo.Entities[i - csgo.Players.Length].ClassIDInt, csgo.Entities[i - csgo.Players.Length].Name); if (!csgo.Entities[i - csgo.Players.Length].IsValid()) { csgo.Entities[i - csgo.Players.Length] = null; } else if (csgo.Entities[i - csgo.Players.Length].ClassID == ClassID.PlantedC4) { c4Planted = true; } } } } catch { } } //Get weaponID long weaponHandle = WinAPI.ReadInt32(handle, localAddress + GameOffsets.CL_LOCAL_ACTIVE_WEAPON); long weaponIDFirst = weaponHandle & 0xFFF; long weaponBase = WinAPI.ReadInt32(handle, entityListAddress + ((weaponIDFirst - 1) * 0x10)); int weaponID = WinAPI.ReadInt32(handle, weaponBase + GameOffsets.CL_LOCAL_WEAPON_ID); float accuracyPenality = WinAPI.ReadFloat(handle, weaponBase + GameOffsets.CL_LOCAL_WEAPON_ACCURACYPENALITY); //int weaponShotsFired = WinAPI.ReadInt32(handle, localPlayer + GameOffsets.CL_LOCAL_WEAPON_SHOTS_FIRED); //Debug.WriteLine(accuracyPenality); ZoomLevel zoom = (ZoomLevel)WinAPI.ReadMemory(handle, weaponBase + GameOffsets.CL_LOCAL_WEAPON_ZOOM, 1)[0]; bool isReloading = WinAPI.ReadMemory(handle, weaponBase + GameOffsets.CL_LOCAL_WEAPON_RELOAD, 1)[0] == 1; //Get clips long clip1 = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_RADAR_BASE); long clip2 = WinAPI.ReadInt32(handle, clip1 + GameOffsets.CL_WEAPON_OFFSET); int weaponClip1 = WinAPI.ReadInt32(handle, clip2 + GameOffsets.CL_WEAPON_AMMO_PRIM); int weaponClip2 = WinAPI.ReadInt32(handle, clip2 + GameOffsets.CL_WEAPON_AMMO_SEC); //Angles csgo.ViewAngles = ReadAngle(handle, enginePointer + GameOffsets.EN_VIEWANGLE_X); csgo.ViewOffset = ReadAngle(handle, localAddress + GameOffsets.CL_LOCAL_VIEWOFFSET); //overwrite data csgo.LocalPlayer = FindLocalPlayer(csgo.Players, localAddress); if (targetIndex > 0 && targetIndex <= 64) { csgo.TargetPlayer = csgo.Players[targetIndex - 1]; } else { csgo.TargetPlayer = null; } csgo.TargetIndex = targetIndex; if (csgo.C4Planted != c4Planted) { csgo.C4Planted = c4Planted; csgo.C4PlantTime = Environment.TickCount; } csgo.AccuracyPenality = accuracyPenality; csgo.C4Timer = WinAPI.ReadFloat(handle, dllClientAddress + GameOffsets.CL_NETVAR_MPC4TIMER); csgo.ServerMap = WinAPI.ReadString(handle, dllClientAddress + GameOffsets.CL_SRV_BASE + GameOffsets.CL_SRV_MAP, 32, Encoding.ASCII); csgo.ServerIP = WinAPI.ReadString(handle, dllClientAddress + GameOffsets.CL_SRV_BASE + GameOffsets.CL_SRV_IP, 32, Encoding.ASCII); csgo.ServerName = WinAPI.ReadString(handle, dllClientAddress + GameOffsets.CL_SRV_BASE + GameOffsets.CL_SRV_Name, 32, Encoding.ASCII); csgo.IsReloading = isReloading; csgo.IsShooting = WinAPI.ReadMemory(handle, dllClientAddress + GameOffsets.CL_LOCAL_BUTTONS_ATTACK, 1)[0] == 5; csgo.ViewMatrix = viewMatrix; csgo.WeaponClip1 = weaponClip1; csgo.WeaponClip2 = weaponClip2; csgo.WeaponFireRate = WeaponHandler.Instance.GetWeaponFireRate(weaponID); csgo.WeaponName = WeaponHandler.Instance.GetWeaponName(weaponID); csgo.WeaponType = WeaponHandler.Instance.GetWeaponType(weaponID); csgo.FlashMaxAlpha = WinAPI.ReadFloat(handle, localAddress + GameOffsets.CL_LOCAL_FLASH_MAX_ALPHA); csgo.FlashMaxDuration = WinAPI.ReadFloat(handle, localAddress + GameOffsets.CL_LOCAL_FLASH_MAX_DURATION); //csgo.WeaponShotsFired = weaponShotsFired; csgo.ZoomLevel = zoom; csgo.FirstPersonSpectator = false; csgo.Spectators.Clear(); if (csgo.LocalPlayer != null) { foreach (Player player in csgo.Players) { if (player == null) { continue; } if (player.SpectatorTarget == csgo.LocalPlayer.Index) { csgo.Spectators.Add(player); if (player.SpectatorView == Data.Enums.SpectatorView.Ego) { csgo.FirstPersonSpectator = true; } } } } if (csgo.LocalPlayer == null) { return; } if (csgo.GetValue <YesNo>("miscBunnyHopEnabled") == YesNo.Yes) { if (WinAPI.GetKeyDown(System.Windows.Forms.Keys.Space)) { int addrJmp = dllClientAddress + GameOffsets.CL_LOCAL_BUTTONS_JUMP; //Test stuff if (csgo.LocalPlayer.State == PlayerState.Jump)// && WinAPI.GetKeyDown(System.Windows.Forms.Keys.Up)) { byte[] buffer = BitConverter.GetBytes(4); WinAPI.WriteMemory(handle, addrJmp, buffer, buffer.Length); } else if (csgo.LocalPlayer.State == PlayerState.Stand) { byte[] buffer2 = BitConverter.GetBytes(5); WinAPI.WriteMemory(handle, addrJmp, buffer2, buffer2.Length); } } } if (csgo.GetValue <YesNo>("miscAutoPistolEnabled") == YesNo.Yes) { if (WinAPI.GetKeyDown(System.Windows.Forms.Keys.LButton) && csgo.WeaponType == WeaponType.Pistol) { IntPtr bytesWritten = IntPtr.Zero; int addrJmp = dllClientAddress + GameOffsets.CL_LOCAL_BUTTONS_ATTACK; int val = WinAPI.ReadInt32(handle, addrJmp); if (val == 0) { WinAPI.WriteMemory(handle, addrJmp, BitConverter.GetBytes(1), 4); } else { WinAPI.WriteMemory(handle, addrJmp, BitConverter.GetBytes(0), 4); } } } //Glow-stuff int glowAddr = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_GLOWMANAGER); int objectCount = WinAPI.ReadInt32(handle, dllClientAddress + GameOffsets.CL_GLOWMANAGER + 4); GlowObjectDefinition[] glowObjects = new GlowObjectDefinition[objectCount]; byte[] glowObjectData = WinAPI.ReadMemory(handle, glowAddr, GlowObjectDefinition.GetSize() * objectCount); for (int i = 0; i < glowObjects.Length; i++) { byte[] subData = new byte[GlowObjectDefinition.GetSize()]; Array.Copy(glowObjectData, GlowObjectDefinition.GetSize() * i, subData, 0, GlowObjectDefinition.GetSize()); glowObjects[i] = WinAPI.GetStructure <GlowObjectDefinition>(subData); } csgo.GlowObjects = glowObjects; tick++; }
private void DrawWorld(WindowRenderTarget device, CSGOImplementation csgo) { if (csgo.CurrentMap == null) return; if (csgo.GetValue<YesNo>("wireframeEnabled") == YesNo.No) return; BSP map = csgo.CurrentMap; Color color = new Color((int)csgo.GetValue<float>("wireframeColorR"), (int)csgo.GetValue<float>("wireframeColorG"), (int)csgo.GetValue<float>("wireframeColorB"), (int)csgo.GetValue<float>("wireframeColorA")); float distanceMeters = csgo.GetValue<float>("wireframeDistance"); float scale = 1f; bool drawOnlyMe = (csgo.GetValue<YesNo>("wireframeDrawAroundMe") == YesNo.Yes); Target drawTarget = csgo.GetValue<Target>("wireframeDrawTarget"); for (int f = 0; f < map.OriginalFaces.Length; f++) { Face face = map.OriginalFaces[f]; if (map.TextureInfo.Length > face.texinfo) { if ((map.TextureInfo[face.texinfo] & SurfFlag.SURF_NODRAW) == SurfFlag.SURF_NODRAW) continue; } for (int e = 0; e < face.numEdges; e++) { float dist = 1f; int surfedge = map.Surfedges[face.firstEdge + e]; ushort[] edge = map.Edges[Math.Abs(surfedge)]; Vector3 line3d1, line3d2; if (surfedge > 0) { line3d1 = map.Vertices[edge[0]]; line3d2 = map.Vertices[edge[1]]; } else { line3d1 = map.Vertices[edge[1]]; line3d2 = map.Vertices[edge[0]]; } bool valid = false; dist = Geometry.GetDistanceToPoint(line3d1, csgo.LocalPlayer.Vector3) * UNIT_TO_METERS; //valid = true; //if (dist > distanceMeters) // break; if (!drawOnlyMe) { foreach (Player player in csgo.Players) { if (player == null) continue; if (!player.IsValid()) continue; if (drawTarget != Target.Everyone) { if (drawTarget == Target.Allies && (player.InTeam != csgo.LocalPlayer.InTeam)) continue; if (drawTarget == Target.Enemies && (player.InTeam == csgo.LocalPlayer.InTeam)) continue; } float tmpDist = Geometry.GetDistanceToPoint(line3d1, player.Vector3) * UNIT_TO_METERS; if ( tmpDist < distanceMeters/* || Geometry.GetDistanceToPoint(line3d2, player.Vector3) * UNIT_TO_METERS < distanceMeters*/ ) { valid = true; if (tmpDist < dist) dist = tmpDist; } } if (!valid) { break; } } else { if (dist > distanceMeters) { break; } } Vector2[] line = Geometry.WorldToScreen(csgo.ViewMatrix, csgo.ScreenSize, line3d1, line3d2); if (line[0] == Vector2.Zero || line[1] == Vector2.Zero) continue; Color col = color; if (csgo.GetValue<OnOff>("wireframeFading") == OnOff.On) { scale = 1f - 1f / distanceMeters * dist; col = color; col.A = (byte)(((float)col.A) * scale); } DrawLine(device, col, line[0].X, line[0].Y, line[1].X, line[1].Y, 1f); } } }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) { return; } CSGOGameController csController = (CSGOGameController)Program.GameController; Player currentPlayer = csgo.GetCurrentPlayer(); if (currentPlayer == null) { return; } float screenW = csgo.ScreenSize.Width / 2f, screenH = csgo.ScreenSize.Height / 2f;//, width = 64; float multiplier = GetColorMultiplier(); #region aimbot radius if (Program.GameImplementation.GetValue <YesNo>("aimbotEnabled") == YesNo.Yes) { float aimRadius = Program.GameImplementation.GetValue <float>("aimbotRadius"); FillEllipse(device, aimBackColor, screenW, screenH, aimRadius * 2, aimRadius * 2, true ); DrawEllipse(device, backColor, screenW, screenH, aimRadius * 2, aimRadius * 2, true ); } #endregion #region soundesp if (Program.GameImplementation.GetValue <YesNo>("crosshairDrawSoundESP") == YesNo.Yes) { if (csController.SoundESP.LastPercent != 0f) { float size = 250f * csController.SoundESP.LastPercent / 100f; DrawEllipse(device, aimBackColor, screenW, screenH, size, size, true, 2f); } } #endregion #region recoil if (Program.GameImplementation.GetValue <YesNo>("crosshairDrawRecoil") == YesNo.Yes) { if (csgo.LocalPlayer.PunchVector.Length() != 0f) { float x = Program.GameController.Form.Width / 2f; float y = Program.GameController.Form.Height / 2f; float dy = Program.GameController.Form.Height / 90f; float dx = Program.GameController.Form.Width / 90f; x -= (dx * (csgo.LocalPlayer.PunchVector.Y)); y += (dy * (csgo.LocalPlayer.PunchVector.X)); //float pixelPerDeg = 1680f / 90f; //float distX = csgo.LocalPlayer.PunchVector.Y * 2; //float distY = csgo.LocalPlayer.PunchVector.X * 2 * -1f; //float x = csgo.ScreenSize.Width / 2f - distX * pixelPerDeg; //float y = csgo.ScreenSize.Height / 2f - distY * pixelPerDeg; DrawLine(device, colorT * 0.5f, x - 16f, y, x + 16f, y, 4f); DrawLine(device, colorT * 0.5f, x, y - 16f, x, y + 16f, 4f); } } #endregion #region spectator if (Program.GameImplementation.GetValue <YesNo>("spectatorDrawWarning") == YesNo.Yes) { float height = 22f + 20f * csgo.Spectators.Count; float specx = screenW - specPanelWidth / 2f, specy = csgo.ScreenSize.Height - 4 - height; if (csgo.Spectators.Count > 0) { FillRectangle(device, aimBackColor, specx, specy, specPanelWidth, height ); FillRectangle(device, aimBackColor, specx, specy, specPanelWidth, height ); DrawText(device, colorT, backColor, specx + specPanelMarginNames, specy + 2, 100, 20, 1, 1, "Spectators:", FactoryManager.GetFont("largeSegoe")); } for (int i = 0; i < csgo.Spectators.Count; i++) { try { DrawText(device, csgo.Spectators[i].SpectatorView == Data.Enums.SpectatorView.Ego ? colorT * (0.75f + 0.25f * multiplier) : colorT, backColor, specx + specPanelMarginNames, specy + 2f + (i + 1) * 20f, 256, 20, 1, 1, String.Format("{0} ({1})", csgo.Spectators[i].Name, csgo.Spectators[i].SpectatorView), FactoryManager.GetFont("smallSegoe")); if (csgo.Spectators[i].SpectatorView == Data.Enums.SpectatorView.Ego) { DrawText(device, colorT * (0.75f + 0.25f * multiplier), backColor, specx - specPanelExclMrk, specy + 2f + (i + 1) * 20f, 24f, 20, 1, 1, "!", FactoryManager.GetFont("smallSegoe")); } } catch { } } } #endregion #region crosshair if (Program.GameImplementation.GetValue <YesNo>("crosshairEnabled") == YesNo.Yes) { float inaccuracy = 0f; Color drawColor = backColor; if (csgo.TargetPlayer != null) { Entity targetPlayer = (Entity)csgo.TargetPlayer.Clone(); drawColor = targetPlayer.InTeam == Data.Team.CounterTerrorists ? colorCT : colorT; DrawText(device, foreColor, backColor, screenW + 2f, screenH + 2f, 100f, 20f, 1f, 1f, targetPlayer.Name, FactoryManager.GetFont("smallSegoe")); DrawText(device, foreColor, backColor, screenW + 2f, screenH - 20f, 100f, 20f, 1f, 1f, targetPlayer.Health.ToString() + "HP", FactoryManager.GetFont("smallSegoe")); } if (csgo.AccuracyPenality > 0.0f) { inaccuracy = csgo.AccuracyPenality / 0.002f; DrawEllipse(device, drawColor * 0.25f, screenW, screenH, 4f * inaccuracy, 4f * inaccuracy, true ); } //Left DrawLine(device, drawColor, screenW - xhairWidth / 2f, screenH, screenW + xhairWidth / 2f, screenH, 1f); //Top DrawLine(device, drawColor, screenW, screenH - xhairWidth / 2f, screenW, screenH + xhairWidth / 2f, 1f); if (inaccuracy > 0f) { float bar = xhairWidth / 16f * inaccuracy * 0.50f; if (bar > xhairWidth / 2f) { bar = xhairWidth / 2f; } //Left DrawLine(device, drawColor, screenW - 2f * inaccuracy, screenH - bar / 2f, screenW - 2f * inaccuracy, screenH + bar / 2f, 2f); //Right DrawLine(device, drawColor, screenW + 2f * inaccuracy, screenH - bar / 2f, screenW + 2f * inaccuracy, screenH + bar / 2f, 2f); //Up DrawLine(device, drawColor, screenW - bar / 2f, screenH - 2f * inaccuracy, screenW + bar / 2f, screenH - 2f * inaccuracy, 2f); //Down DrawLine(device, drawColor, screenW - bar / 2f, screenH + 2f * inaccuracy, screenW + bar / 2f, screenH + 2f * inaccuracy, 2f); } } #endregion #region spotted if (currentPlayer != null) { if (currentPlayer.IsSpotted) { DrawEllipse(device, colorT * (0.5f + 0.5f * multiplier), screenW, screenH, xhairWidth, xhairWidth, true, 3f); } } #endregion }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) return; CSGOGameController csController = (CSGOGameController)Program.GameController; Player currentPlayer = csgo.GetCurrentPlayer(); if (currentPlayer == null) return; float screenW = csgo.ScreenSize.Width / 2f, screenH = csgo.ScreenSize.Height / 2f;//, width = 64; float multiplier = GetColorMultiplier(); #region aimbot radius if (Program.GameImplementation.GetValue<YesNo>("aimbotEnabled") == YesNo.Yes) { float aimRadius = Program.GameImplementation.GetValue<float>("aimbotRadius"); FillEllipse(device, aimBackColor, screenW, screenH, aimRadius * 2, aimRadius * 2, true ); DrawEllipse(device, backColor, screenW, screenH, aimRadius * 2, aimRadius * 2, true ); } #endregion #region soundesp if (Program.GameImplementation.GetValue<YesNo>("crosshairDrawSoundESP") == YesNo.Yes) { if (csController.SoundESP.LastPercent != 0f) { float size = 250f * csController.SoundESP.LastPercent / 100f; DrawEllipse(device, aimBackColor, screenW, screenH, size, size, true, 2f); } } #endregion #region recoil if (Program.GameImplementation.GetValue<YesNo>("crosshairDrawRecoil") == YesNo.Yes) { if (csgo.LocalPlayer.PunchVector.Length() != 0f) { float x = Program.GameController.Form.Width / 2f; float y = Program.GameController.Form.Height / 2f; float dy = Program.GameController.Form.Height / 90f; float dx = Program.GameController.Form.Width / 90f; x -= (dx * (csgo.LocalPlayer.PunchVector.Y)); y += (dy * (csgo.LocalPlayer.PunchVector.X)); //float pixelPerDeg = 1680f / 90f; //float distX = csgo.LocalPlayer.PunchVector.Y * 2; //float distY = csgo.LocalPlayer.PunchVector.X * 2 * -1f; //float x = csgo.ScreenSize.Width / 2f - distX * pixelPerDeg; //float y = csgo.ScreenSize.Height / 2f - distY * pixelPerDeg; DrawLine(device, colorT * 0.5f, x - 16f, y, x + 16f, y, 4f); DrawLine(device, colorT * 0.5f, x, y - 16f, x, y + 16f, 4f); } } #endregion #region spectator if (Program.GameImplementation.GetValue<YesNo>("spectatorDrawWarning") == YesNo.Yes) { float height = 22f + 20f * csgo.Spectators.Count; float specx = screenW - specPanelWidth / 2f, specy = csgo.ScreenSize.Height - 4 - height; if (csgo.Spectators.Count > 0) { FillRectangle(device, aimBackColor, specx, specy, specPanelWidth, height ); FillRectangle(device, aimBackColor, specx, specy, specPanelWidth, height ); DrawText(device, colorT, backColor, specx + specPanelMarginNames, specy + 2, 100, 20, 1, 1, "Spectators:", FactoryManager.GetFont("largeSegoe")); } for (int i = 0; i < csgo.Spectators.Count; i++) { try { DrawText(device, csgo.Spectators[i].SpectatorView == Data.Enums.SpectatorView.Ego ? colorT * (0.75f + 0.25f * multiplier) : colorT, backColor, specx + specPanelMarginNames, specy + 2f + (i + 1) * 20f, 256, 20, 1, 1, String.Format("{0} ({1})", csgo.Spectators[i].Name, csgo.Spectators[i].SpectatorView), FactoryManager.GetFont("smallSegoe")); if (csgo.Spectators[i].SpectatorView == Data.Enums.SpectatorView.Ego) { DrawText(device, colorT * (0.75f + 0.25f * multiplier), backColor, specx - specPanelExclMrk, specy + 2f + (i + 1) * 20f, 24f, 20, 1, 1, "!", FactoryManager.GetFont("smallSegoe")); } } catch { } } } #endregion #region crosshair if (Program.GameImplementation.GetValue<YesNo>("crosshairEnabled") == YesNo.Yes) { float inaccuracy = 0f; Color drawColor = backColor; if (csgo.TargetPlayer != null) { Entity targetPlayer = (Entity)csgo.TargetPlayer.Clone(); drawColor = targetPlayer.InTeam == Data.Team.CounterTerrorists ? colorCT : colorT; DrawText(device, foreColor, backColor, screenW + 2f, screenH + 2f, 100f, 20f, 1f, 1f, targetPlayer.Name, FactoryManager.GetFont("smallSegoe")); DrawText(device, foreColor, backColor, screenW + 2f, screenH - 20f, 100f, 20f, 1f, 1f, targetPlayer.Health.ToString() + "HP", FactoryManager.GetFont("smallSegoe")); } if (csgo.AccuracyPenality > 0.0f) { inaccuracy = csgo.AccuracyPenality / 0.002f; DrawEllipse(device, drawColor * 0.25f, screenW, screenH, 4f * inaccuracy, 4f * inaccuracy, true ); } //Left DrawLine(device, drawColor, screenW - xhairWidth / 2f, screenH, screenW + xhairWidth / 2f, screenH, 1f); //Top DrawLine(device, drawColor, screenW, screenH - xhairWidth / 2f, screenW, screenH + xhairWidth / 2f, 1f); if (inaccuracy > 0f) { float bar = xhairWidth / 16f * inaccuracy * 0.50f; if (bar > xhairWidth / 2f) bar = xhairWidth / 2f; //Left DrawLine(device, drawColor, screenW - 2f * inaccuracy, screenH - bar / 2f, screenW - 2f * inaccuracy, screenH + bar / 2f, 2f); //Right DrawLine(device, drawColor, screenW + 2f * inaccuracy, screenH - bar / 2f, screenW + 2f * inaccuracy, screenH + bar / 2f, 2f); //Up DrawLine(device, drawColor, screenW - bar / 2f, screenH - 2f * inaccuracy, screenW + bar / 2f, screenH - 2f * inaccuracy, 2f); //Down DrawLine(device, drawColor, screenW - bar / 2f, screenH + 2f * inaccuracy, screenW + bar / 2f, screenH + 2f * inaccuracy, 2f); } } #endregion #region spotted if (currentPlayer != null) { if (currentPlayer.IsSpotted) { DrawEllipse(device, colorT * (0.5f + 0.5f * multiplier), screenW, screenH, xhairWidth, xhairWidth, true, 3f); } } #endregion }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) { return; } if (Program.GameController == null) { return; } if (!Program.GameController.IsGameRunning) { return; } csgo = (CSGOImplementation)Program.GameImplementation; CSGOGameController controller = (CSGOGameController)Program.GameController; if (csgo == null) { return; } if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) { return; } if (csgo.Players == null) { return; } if (csgo.LocalPlayer == null) { return; } if (csgo.LocalPlayer.Health <= 0) { return; } DoOtherStuff(); if (csgo.GetValue <YesNo>("rcsEnabled") == YesNo.No) { return; } float force = csgo.GetValue <float>("rcsForce"); if (lastPunch == csgo.LocalPlayer.PunchVector) { return; } if (csgo.LocalPlayer.PunchVector == Vector3.Zero) { return; } currentPunch = csgo.LocalPlayer.PunchVector - lastPunch; if (IsActive && currentPunch != Vector3.Zero) { Vector3 newViewAngles = csgo.ViewAngles - currentPunch * force; newViewAngles = Geometry.ClampAngle(newViewAngles); newViewAngles.Z = 0f; controller.MemoryUpdater.WriteViewAngles(newViewAngles); } lastPunch = csgo.LocalPlayer.PunchVector; }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { csgo = (CSGOImplementation)Program.GameImplementation; FillRectangle(device, Theme.BackColor, this.X, this.Y, this.Width, this.Height); lblDataRead.Text = string.Format("Data read: {0}", GetSize(WinAPI.BytesRead)); lblDataWritten.Text = string.Format("Data written: {0}", GetSize(WinAPI.BytesWritten)); //Update performance-bars /* ((CSGOGameController)Program.GameController).MemoryUpdater.GetFrameRate().ToString(), * ((CSGOGameController)Program.GameController).InputUpdater.GetFrameRate().ToString(), * ((CSGOGameController)Program.GameController).TriggerBot.GetFrameRate().ToString(), * ((CSGOGameController)Program.GameController).AimBot.GetFrameRate().ToString()*/ barMem.Value = ((CSGOGameController)Program.GameController).MemoryUpdater.GetFrameRate(); barMem.Text = String.Format("MEM {0}", barMem.Value); barInp.Value = ((CSGOGameController)Program.GameController).InputUpdater.GetFrameRate(); barInp.Text = String.Format("INP {0}", barInp.Value); barAim.Value = ((CSGOGameController)Program.GameController).AimBot.GetFrameRate(); barAim.Text = String.Format("AIM {0}", barAim.Value); barTrg.Value = ((CSGOGameController)Program.GameController).TriggerBot.GetFrameRate(); barTrg.Text = String.Format("TRG {0}", barTrg.Value); barDrw.Value = ((CSGOGameController)Program.GameController).Form.DrawUpdater.GetFrameRate(); barDrw.Text = String.Format("DRW {0}", barDrw.Value); barTick.Value = ((CSGOGameController)Program.GameController).Form.TickUpdater.GetFrameRate(); barTick.Text = String.Format("TCK {0}", barTick.Value); barRcs.Value = ((CSGOGameController)Program.GameController).RecoilControl.GetFrameRate(); barRcs.Text = String.Format("RCS {0}", barRcs.Value); barCPU.Value = ((CSGOGameController)Program.GameController).PerformanceUpdater.CurrentValue; barCPU.Text = String.Format("CPU {0}", barCPU.Value); //Update playerinfo //if (currentPlayer == null) // return; Player currentPlayer = csgo.GetCurrentPlayer(); bool valid = currentPlayer != null; lblState.Text = String.Format("State: {0}", GetSignOnState(csgo.SignOnState)); lblServerData.Text = String.Format("Server: {0}", csgo.ServerName); lblServerIP.Text = String.Format("IP: {0}", csgo.ServerIP); lblMapName.Text = String.Format("Current map: {0}", csgo.ServerMap); if (valid) { valid = csgo.SignOnState == SignOnState.SIGNONSTATE_FULL; } barSpeed.Enabled = valid; barRecoil.Enabled = valid; barSpread.Enabled = valid; barKD.Enabled = valid; if (valid) { //Velocity Vector2 velXY = new Vector2(currentPlayer.Velocity.X, currentPlayer.Velocity.Y); float length = velXY.Length(); float speedPercent = 100f / 450f * (length % 450f); float speedMeters = length * 0.01905f; float speedKiloMetersPerHour = speedMeters * 60f * 60f / 1000f; barSpeed.Value = (int)speedPercent; barSpeed.Text = String.Format("{0} km/h", Math.Round(speedKiloMetersPerHour, 2)); //Gun info if (Environment.TickCount - spinTick > 300) { spinnerCnt++; spinnerCnt %= spinners.Length; spinTick = Environment.TickCount; } lblWeaponInfo.Text = String.Format( "{0} [{1}] [{2}/{3}] {5}{4}", csgo.WeaponName, csgo.WeaponType, csgo.WeaponClip1 > 0 && csgo.WeaponClip1 <= 200 && !csgo.IsReloading ? csgo.WeaponClip1.ToString() : (csgo.IsReloading ? "RELOADING" + spinners[spinnerCnt].ToString() : "-"), csgo.WeaponClip2 > 0 && csgo.WeaponClip2 <= 500 ? csgo.WeaponClip2.ToString() : "-", (csgo.IsShooting ? "[x]" : ""), (csgo.WeaponShotsFired > 0 ? string.Format("[{0}] ", csgo.WeaponShotsFired.ToString()) : "") ); //lblShotsFired.Text = String.Format("Shots fired: {0}", csgo.ShotsFired); //Gun punch float percentage = 100f / 9f * currentPlayer.PunchVector.Length(); barRecoil.Value = percentage; barRecoil.Text = String.Format("Recoil: {0}%", Math.Round(percentage, 0)); //Gun spread percentage = 100f / 0.16f * csgo.AccuracyPenality; percentage = (float)Math.Min(percentage, 100f); barSpread.Value = percentage; barSpread.Text = String.Format("Spread: {0}%", Math.Round(percentage, 0)); //KD if (currentPlayer.Deaths > 0) { float kd = (float)currentPlayer.Kills / (float)Math.Max(1, currentPlayer.Deaths); barKD.Value = kd; barKD.Text = String.Format("k/d ratio: {0}", Math.Round(kd, 2)); } else { barKD.Value = 0; barKD.Text = "k/d ratio: ∞"; } } else { barSpeed.Value = 0f; barRecoil.Value = 0f; barSpread.Value = 0f; barKD.Value = 0f; barSpeed.Text = ""; barRecoil.Text = ""; barSpread.Text = ""; barKD.Text = ""; lblWeaponInfo.Text = ""; lblServerData.Text = ""; lblMapName.Text = ""; } }
private void DrawPunchAngles(WindowRenderTarget device, CSGOImplementation csgo) { DrawAngle(device, 700f, 300f, csgo.LocalPlayer.PunchVector.X, "Pitch"); //Y DrawAngle(device, 800f, 300f, csgo.LocalPlayer.PunchVector.Y, "Yaw"); //X DrawAngle(device, 900f, 300f, csgo.LocalPlayer.PunchVector.Z, "Roll"); }
private void DrawWorld(WindowRenderTarget device, CSGOImplementation csgo) { if (csgo.CurrentMap == null) { return; } if (csgo.GetValue <YesNo>("wireframeEnabled") == YesNo.No) { return; } BSP map = csgo.CurrentMap; Color color = new Color((int)csgo.GetValue <float>("wireframeColorR"), (int)csgo.GetValue <float>("wireframeColorG"), (int)csgo.GetValue <float>("wireframeColorB"), (int)csgo.GetValue <float>("wireframeColorA")); float distanceMeters = csgo.GetValue <float>("wireframeDistance"); float scale = 1f; bool drawOnlyMe = (csgo.GetValue <YesNo>("wireframeDrawAroundMe") == YesNo.Yes); Target drawTarget = csgo.GetValue <Target>("wireframeDrawTarget"); for (int f = 0; f < map.OriginalFaces.Length; f++) { Face face = map.OriginalFaces[f]; if (map.TextureInfo.Length > face.texinfo) { if ((map.TextureInfo[face.texinfo] & SurfFlag.SURF_NODRAW) == SurfFlag.SURF_NODRAW) { continue; } } for (int e = 0; e < face.numEdges; e++) { float dist = 1f; int surfedge = map.Surfedges[face.firstEdge + e]; ushort[] edge = map.Edges[Math.Abs(surfedge)]; Vector3 line3d1, line3d2; if (surfedge > 0) { line3d1 = map.Vertices[edge[0]]; line3d2 = map.Vertices[edge[1]]; } else { line3d1 = map.Vertices[edge[1]]; line3d2 = map.Vertices[edge[0]]; } bool valid = false; dist = Geometry.GetDistanceToPoint(line3d1, csgo.LocalPlayer.Vector3) * UNIT_TO_METERS; //valid = true; //if (dist > distanceMeters) // break; if (!drawOnlyMe) { foreach (Player player in csgo.Players) { if (player == null) { continue; } if (!player.IsValid()) { continue; } if (drawTarget != Target.Everyone) { if (drawTarget == Target.Allies && (player.InTeam != csgo.LocalPlayer.InTeam)) { continue; } if (drawTarget == Target.Enemies && (player.InTeam == csgo.LocalPlayer.InTeam)) { continue; } } float tmpDist = Geometry.GetDistanceToPoint(line3d1, player.Vector3) * UNIT_TO_METERS; if ( tmpDist < distanceMeters/* || * Geometry.GetDistanceToPoint(line3d2, player.Vector3) * UNIT_TO_METERS < distanceMeters*/ ) { valid = true; if (tmpDist < dist) { dist = tmpDist; } } } if (!valid) { break; } } else { if (dist > distanceMeters) { break; } } Vector2[] line = Geometry.WorldToScreen(csgo.ViewMatrix, csgo.ScreenSize, line3d1, line3d2); if (line[0] == Vector2.Zero || line[1] == Vector2.Zero) { continue; } Color col = color; if (csgo.GetValue <OnOff>("wireframeFading") == OnOff.On) { scale = 1f - 1f / distanceMeters * dist; col = color; col.A = (byte)(((float)col.A) * scale); } DrawLine(device, col, line[0].X, line[0].Y, line[1].X, line[1].Y, 1f); } } }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) { return; } if (Program.GameController == null) { return; } if (!Program.GameController.IsGameRunning) { return; } csgo = (CSGOImplementation)Program.GameImplementation; CSGOGameController csgoController = (CSGOGameController)Program.GameController; if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) { return; } if (csgoController.MemoryUpdater.Tick == lastTick) { return; } lastTick = csgoController.MemoryUpdater.Tick; if (csgo.LocalPlayer == null) { return; } if (csgo.LocalPlayer.Health <= 0) { return; } if ((csgo.WeaponType == WeaponType.Grenade || csgo.WeaponType == WeaponType.Melee || csgo.WeaponType == WeaponType.Special)) { return; } if (csgo.WeaponClip1 <= 0) { return; } if (csgo.IsReloading) { return; } bool rcsCompensateOn = csgo.GetValue <OnOff>("aimbotCompensateRecoil") == OnOff.On; CSGOGameController controller = (CSGOGameController)Program.GameController; Vector3 rcsCompensation = Vector3.Zero; controller.RecoilControl.IsActive = lastTarget == null; if (csgo.GetValue <YesNo>("aimbotEnabled") == YesNo.No) { return; } if (csgo.GetValue <YesNo>("spectatorDisableAim") == YesNo.Yes && csgo.FirstPersonSpectator) { return; } //Aimkey not down //-> Reset target if (!Program.GameController.InputUpdater.KeyIsDown(Program.GameImplementation.GetValue <Keys>("aimbotKey"))) { lastTarget = null; lastAimBone = (AimBone)(((int)lastAimBone + 1) % 9); return; } //Aimkey down but dead target //-> Release key to reset target if (lastTarget != null) { if (!lastTarget.IsValid()) { if (csgo.GetValue <YesNo>("aimAllowAimJump") == YesNo.No) { return; } } } Vector2 screenM = new Vector2(csgo.ScreenSize.Width / 2f, csgo.ScreenSize.Height / 2f); AimBone bone = csgo.GetValue <AimBone>("aimbotBone"); if (bone != lastAimBone) { lastAimBone = bone; if (IsRandomAimBone(lastAimBone)) { randomAimBone = GetRandomBone(bone); } ; } if (IsRandomAimBone(bone)) { bone = randomAimBone; } //Aimkey down but no target //-> Get new target if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()) || csgo.GetValue <YesNo>("aimAllowAimJump") == YesNo.Yes) { Target target = csgo.GetValue <Target>("aimbotTarget"); AimMethod method = csgo.GetValue <AimMethod>("aimbotMethod"); float radius = csgo.GetValue <float>("aimbotRadius"); if (csgo.GetValue <OnOff>("aimbotRagemode") == OnOff.On) { currentImplementation = rageMode; } else { switch (method) { case AimMethod.LowestHP: currentImplementation = lowestHP; break; case AimMethod.NearestToCrosshair: currentImplementation = nearestToCrosshair; break; case AimMethod.NearestToPlayer: currentImplementation = nearestToPlayer; break; } } lastTarget = currentImplementation.GetAimTarget(csgo, target, bone, screenM, radius); } //No target found? //-> Break. if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid())) { return; } //Vector2 aimPos = currentImplementation.AimAt(csgo, bone, csgo.GetPlayerByIndex(lastTarget.PlayerIndex)); //if (aimPos != lastPoint && aimPos != Vector2.Zero) //{ if (csgo.ViewAngles == Vector3.Zero) { return; } Vector3 viewAngles = csgo.ViewAngles; viewAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[lastTarget.PlayerIndex - 1].Skeleton.GetBone(bone)); if (rcsCompensateOn) { viewAngles = viewAngles - csgo.LocalPlayer.PunchVector * 2; } if (csgo.GetValue <OnOff>("aimbotSmooth") == OnOff.On) { Vector3 smoothed = viewAngles - csgo.ViewAngles; smoothed *= csgo.GetValue <float>("aimbotSpeed") / 100f; if (Math.Abs(smoothed.Y) < 45) { viewAngles = csgo.ViewAngles + smoothed; } } viewAngles.Z = 0f; viewAngles = Geometry.ClampAngle(viewAngles); ((CSGOGameController)Program.GameController).MemoryUpdater.WriteViewAngles(viewAngles); //} }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) return; if (Program.GameController == null) return; if (!Program.GameController.IsGameRunning) return; csgo = (CSGOImplementation)Program.GameImplementation; if (csgo == null) return; if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) return; if (csgo.Players == null) return; if (csgo.GetValue<YesNo>("triggerbotEnabled") == YesNo.No) return; if (csgo.LocalPlayer == null) return; if (csgo.LocalPlayer.Health <= 0) return; if (csgo.WeaponClip1 == 0) return; if (csgo.IsReloading) return; if (csgo.IsShooting) return; if ((csgo.TargetPlayer == null && csgo.TargetIndex <= 64)) { targetSeen = false; return; } if (Program.GameImplementation.GetValue<YesNo>("spectatorDisableTrigger") == YesNo.Yes && csgo.FirstPersonSpectator) return; if (Program.GameImplementation.GetValue<YesNo>("triggerbotSnipersOnly") == YesNo.Yes && csgo.WeaponType != WeaponType.Sniper) return; Target target = csgo.GetValue<Target>("triggerbotTarget"); if (csgo.TargetIndex > 0 && csgo.TargetIndex <= 64 && csgo.TargetPlayer != null) { if (target == Target.Allies && csgo.TargetPlayer.InTeam != csgo.LocalPlayer.InTeam) return; if (target == Target.Enemies && csgo.TargetPlayer.InTeam == csgo.LocalPlayer.InTeam) return; } else { int idx = csgo.TargetIndex - 1 - csgo.Players.Length; if (idx < 0 || idx >= csgo.Entities.Length) return; if (csgo.Entities[idx] == null) return; if (csgo.Entities[idx].ClassID != Data.Enums.ClassID.CSPlayer && csgo.Entities[idx].ClassID != Data.Enums.ClassID.Chicken) return; } if (!targetSeen) { lastSeen = DateTime.Now.Ticks; targetSeen = true; } if (csgo.GetValue<float>("triggerbotSpeedThreshold") < csgo.GetPlayerKMH()) return; TimeSpan spanSeen = new TimeSpan(DateTime.Now.Ticks - lastSeen); if ( targetSeen && spanSeen.TotalMilliseconds >= csgo.GetValue<float>("triggerbotDelay") && (csgo.WeaponType == WeaponType.Sniper || 100f / 9f * csgo.LocalPlayer.PunchVector.Length() < csgo.GetValue<float>("triggerbotRecoilThreshold")) ) { if (csgo.WeaponType != WeaponType.Grenade && csgo.WeaponType != WeaponType.Melee && csgo.WeaponType != WeaponType.Special) { lastShot = DateTime.Now.Ticks; Shoot(); } else if (csgo.WeaponType == WeaponType.Melee) { if (csgo.Players != null && csgo.TargetPlayer != null) { float yaw1 = csgo.LocalPlayer.Yaw, yaw2 = csgo.TargetPlayer.Yaw; //while (yaw1 < 0f) // yaw1 += 360f; //while (yaw2 < 0f) // yaw2 += 360f; if (csgo.LocalPlayer.DistanceToOtherEntityInMetres(csgo.TargetPlayer) <= 1) RightKnife(); } } } }
protected override void OnDraw(SharpDX.Direct2D1.WindowRenderTarget device) { if (once) { System.Drawing.Bitmap bmp = (System.Drawing.Bitmap)Resources.ResourceManager.GetObject("ranks"); try { this.ranksBmp = SDXBitmapFromSysBitmap(device, bmp); once = false; } catch { } } csgo = (CSGOImplementation)Program.GameImplementation; Player currentPlayer = csgo.GetCurrentPlayer(); if (csgo.SignOnState < SignOnState.SIGNONSTATE_PRESPAWN || csgo.SignOnState > SignOnState.SIGNONSTATE_FULL) return; if (csgo.Players == null) return; if (csgo.Players.Length == 0) return; if (currentPlayer == null) return; if (csgo.GetValue<YesNo>("espEnabled") == YesNo.No) return; try { DrawWorld(device, csgo); } catch { } try { foreach (Player player in csgo.Players) DrawPlayer(device, currentPlayer, player); foreach (Entity entity in csgo.Entities) DrawEntity(device, currentPlayer, entity); for (int i = csgo.Damages.Count - 1; i >= 0; i--) DrawDamage(device, currentPlayer, csgo.Damages[i]); } catch { } //DrawPunchAngles(device, csgo); }
public override void OnUpdaterTick() { CSGOImplementation csgo = (CSGOImplementation)Program.GameImplementation; Player localPlayer; if (csgo == null) { return; } localPlayer = csgo.LocalPlayer; if (csgo.LocalPlayer == null) { return; } if (csgo.Players == null) { return; } if (csgo.GetValue <YesNo>("soundEspEnabled") != YesNo.Yes) { return; } float maxSpan = csgo.GetValue <float>("soundEspInterval"); float maxRange = csgo.GetValue <float>("soundEspRange"); Program.SoundManager.SetVolume(csgo.GetValue <float>("soundEspVolume") / 100f); TimeSpan span = new TimeSpan(DateTime.Now.Ticks - lastBeep); if (span.TotalMilliseconds > maxSpan) { lastBeep = DateTime.Now.Ticks; return; } float minRange = maxRange / maxSpan * (float)span.TotalMilliseconds; LastPercent = 100f / maxSpan * (float)span.TotalMilliseconds; float leastDist = float.MaxValue; foreach (Player player in csgo.Players) { if (player == null) { continue; } if (player.Health == 0) { continue; } if (player.InTeam == localPlayer.InTeam) { continue; } float dist = localPlayer.DistanceToOtherEntityInMetres(player); if (dist <= minRange) { leastDist = dist; break; } } if (leastDist != float.MaxValue) { Program.SoundManager.Play((int)csgo.GetValue <float>("soundEspSound") - 1); Thread.Sleep(50); lastBeep = DateTime.Now.Ticks; } }
public override void OnUpdaterTick() { if (Program.GameImplementation == null) return; if (Program.GameController == null) return; if (!Program.GameController.IsGameRunning) return; csgo = (CSGOImplementation)Program.GameImplementation; CSGOGameController csgoController = (CSGOGameController)Program.GameController; if (csgo.SignOnState != SignOnState.SIGNONSTATE_FULL) return; if (csgoController.MemoryUpdater.Tick == lastTick) return; lastTick = csgoController.MemoryUpdater.Tick; if (csgo.LocalPlayer == null) return; if (csgo.LocalPlayer.Health <= 0) return; if ((csgo.WeaponType == WeaponType.Grenade || csgo.WeaponType == WeaponType.Melee || csgo.WeaponType == WeaponType.Special)) return; if (csgo.WeaponClip1 <= 0) return; if (csgo.IsReloading) return; bool rcsCompensateOn = csgo.GetValue<OnOff>("aimbotCompensateRecoil") == OnOff.On; CSGOGameController controller = (CSGOGameController)Program.GameController; Vector3 rcsCompensation = Vector3.Zero; controller.RecoilControl.IsActive = lastTarget == null; if (csgo.GetValue<YesNo>("aimbotEnabled") == YesNo.No) return; if (csgo.GetValue<YesNo>("spectatorDisableAim") == YesNo.Yes && csgo.FirstPersonSpectator) return; //Aimkey not down //-> Reset target if (!Program.GameController.InputUpdater.KeyIsDown(Program.GameImplementation.GetValue<Keys>("aimbotKey"))) { lastTarget = null; lastAimBone = (AimBone)(((int)lastAimBone + 1) % 9); return; } //Aimkey down but dead target //-> Release key to reset target if (lastTarget != null) if (!lastTarget.IsValid()) if (csgo.GetValue<YesNo>("aimAllowAimJump") == YesNo.No) return; Vector2 screenM = new Vector2(csgo.ScreenSize.Width / 2f, csgo.ScreenSize.Height / 2f); AimBone bone = csgo.GetValue<AimBone>("aimbotBone"); if (bone != lastAimBone) { lastAimBone = bone; if (IsRandomAimBone(lastAimBone)) { randomAimBone = GetRandomBone(bone); }; } if (IsRandomAimBone(bone)) bone = randomAimBone; //Aimkey down but no target //-> Get new target if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid()) || csgo.GetValue<YesNo>("aimAllowAimJump") == YesNo.Yes) { Target target = csgo.GetValue<Target>("aimbotTarget"); AimMethod method = csgo.GetValue<AimMethod>("aimbotMethod"); float radius = csgo.GetValue<float>("aimbotRadius"); if (csgo.GetValue<OnOff>("aimbotRagemode") == OnOff.On) { currentImplementation = rageMode; } else { switch (method) { case AimMethod.LowestHP: currentImplementation = lowestHP; break; case AimMethod.NearestToCrosshair: currentImplementation = nearestToCrosshair; break; case AimMethod.NearestToPlayer: currentImplementation = nearestToPlayer; break; } } lastTarget = currentImplementation.GetAimTarget(csgo, target, bone, screenM, radius); } //No target found? //-> Break. if (lastTarget == null || (lastTarget != null && !lastTarget.IsValid())) return; //Vector2 aimPos = currentImplementation.AimAt(csgo, bone, csgo.GetPlayerByIndex(lastTarget.PlayerIndex)); //if (aimPos != lastPoint && aimPos != Vector2.Zero) //{ if (csgo.ViewAngles == Vector3.Zero) return; Vector3 viewAngles = csgo.ViewAngles; viewAngles = Geometry.CalcAngle(csgo.LocalPlayer.Vector3 + csgo.ViewOffset, csgo.Players[lastTarget.PlayerIndex - 1].Skeleton.GetBone(bone)); if (rcsCompensateOn) viewAngles = viewAngles - csgo.LocalPlayer.PunchVector * 2; if (csgo.GetValue<OnOff>("aimbotSmooth") == OnOff.On) { Vector3 smoothed = viewAngles - csgo.ViewAngles; smoothed *= csgo.GetValue<float>("aimbotSpeed") / 100f; if (Math.Abs(smoothed.Y) < 45) viewAngles = csgo.ViewAngles + smoothed; } viewAngles.Z = 0f; viewAngles = Geometry.ClampAngle(viewAngles); ((CSGOGameController)Program.GameController).MemoryUpdater.WriteViewAngles(viewAngles); //} }