Пример #1
0
            public SpellDataStruct GetSpellData(spellSlot splSlot)
            {
                var ptr = Memory.ReadPointer(processHandle, (IntPtr)(this.baseOffs + 0x26E8 + 0x478 + (uint)splSlot * 4), isWow64Process);

                return(SDKUtil.ReadStructure <SpellDataStruct>(processHandle, ptr));
            }
Пример #2
0
        private static void OnRenderer(int fps, EventArgs args)
        {
            if (!gameProcessExists)
            {
                return;                     //process is dead, don't bother drawing
            }
            if ((!isGameOnTop) && (!isOverlayOnTop))
            {
                return;                                      //if game and overlay are not on top, don't draw
            }
            if (!Components.MainAssemblyToggle.Enabled)
            {
                return;                                         //main menu boolean to toggle the cheat on or off
            }
            if (oRenderer != IntPtr.Zero)
            {
                var rendBase = Memory.ReadPointer(processHandle, oRenderer, isWow64Process);
                if (rendBase != IntPtr.Zero)
                {
                    var matStruct   = SDKUtil.ReadStructure <RendererStruct>(processHandle, rendBase);
                    var finalMatrix = matStruct.oView * matStruct.oProjection;
                    var localPlayer = Memory.ReadPointer(processHandle, oLocalPlayer, isWow64Process);
                    if (localPlayer != IntPtr.Zero)
                    {
                        gameTime = Memory.ReadFloat(processHandle, oGameTime);
                        var lPdata      = SDKUtil.ReadStructureEx <GameObjectStruct>(processHandle, localPlayer, isWow64Process);
                        var heroManager = Memory.ReadPointer(processHandle, oHeroManager, isWow64Process);
                        if (heroManager != IntPtr.Zero)
                        {
                            for (uint i = 0; i <= 12; i++)
                            {
                                var heroPtr = Memory.ReadPointer(processHandle, (IntPtr)(heroManager.ToInt64() + i * 4), isWow64Process);
                                if (heroPtr != IntPtr.Zero)
                                {
                                    var heroData = SDKUtil.ReadStructureEx <GameObjectStruct>(processHandle, heroPtr, isWow64Process);

                                    if ((heroData.oObjVisibility == 1) /* && (heroData.oObjTeam == 100 || heroData.oObjTeam == 200)*/ && (heroData.oObjHealth > 0.1) && (heroData.oObjHealth < 10000) && (heroData.oObjMaxHealth > 99) && (heroData.oObjArmor > 0) && (heroData.oObjArmor < 1000) && (heroData.oObjPos.Y != 0.0f) && (heroData.oObjPos.X != 0.0f) && (heroData.oObjPos.Z != 0.0f)) //ghetto validity check
                                    {
                                        var QData = heroData.GetSpellData(spellSlot._Q);
                                        var WData = heroData.GetSpellData(spellSlot._W);
                                        var EData = heroData.GetSpellData(spellSlot._E);
                                        var RData = heroData.GetSpellData(spellSlot._R);
                                        var DData = heroData.GetSpellData(spellSlot.SUMMONER_1);
                                        var FData = heroData.GetSpellData(spellSlot.SUMMONER_2);

                                        Console.WriteLine("Check #1");

                                        Vector2 pos2D;
                                        if (Renderer.WorldToScreen(heroData.oObjPos, out pos2D, finalMatrix, wndMargins, wndSize, W2SType.TypeOGL))
                                        {
                                            Console.WriteLine("Check #2");
                                            if (Components.VisualsComponent.DrawSpellTracker.Enabled)
                                            {
                                                Console.WriteLine("Check #3");
                                                Renderer.DrawFilledRect(pos2D.X - XposX - 5 - 1, pos2D.Y + YposY + 3 + 12 - 1, 118 + 2, 12 + 2, new Color(00, 00, 00, 0x7A)); //whole bar
                                                Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * 0, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));          //spell bars

                                                Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * 1, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));
                                                Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * 2, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));
                                                Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * 3, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));

                                                Renderer.DrawFilledRect(pos2D.X - XposX - 5 + 121 - 1, pos2D.Y + YposY + 3 + 12 - 1, 60 + 2, 12 + 2, new Color(00, 00, 0x5A, 0x7A)); //whole bar

                                                Renderer.DrawFilledRect(pos2D.X - XposX + 121, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));                        //spell bars D
                                                Renderer.DrawFilledRect(pos2D.X - XposX + 121 + 4 + 23, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 00, 00, 0xAA));               //spell bars F

                                                if (QData.level > 0)
                                                {
                                                    for (uint j = 1; j <= QData.level; j++)
                                                    {
                                                        Renderer.DrawRect(pos2D.X - XposX + 27 * (uint)spellSlot._Q + j * 5 - 1, pos2D.Y + YposY + 3 + 21, 1, 2, new Color(0xFF, 0xFF, 00, 0xFF));
                                                    }
                                                    if (QData.ammoCurrentCd > 0)
                                                    {
                                                        if (QData.ammo > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._Q, pos2D.Y + YposY + 3 + 16, 23 - ((QData.ammoCurrentCd / QData.ammoCd) * 23), 4, new Color(0xFF, 0x7F, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._Q, pos2D.Y + YposY + 3 + 16, 23 - ((QData.ammoCurrentCd / QData.ammoCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (QData.currentCd > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._Q, pos2D.Y + YposY + 3 + 16, 23 - ((QData.currentCd / QData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._Q, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                        }
                                                    }
                                                }



                                                if (WData.level > 0)
                                                {
                                                    for (uint j = 1; j <= WData.level; j++)
                                                    {
                                                        Renderer.DrawRect(pos2D.X - XposX + 27 * (uint)spellSlot._W + j * 5 - 1, pos2D.Y + YposY + 3 + 21, 1, 2, new Color(0xFF, 0xFF, 00, 0xFF));
                                                    }
                                                    if (WData.ammoCurrentCd > 0)
                                                    {
                                                        if (WData.ammo > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._W, pos2D.Y + YposY + 3 + 16, 23 - ((WData.ammoCurrentCd / WData.ammoCd) * 23), 4, new Color(0xFF, 0x7F, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._W, pos2D.Y + YposY + 3 + 16, 23 - ((WData.ammoCurrentCd / WData.ammoCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (WData.currentCd > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._W, pos2D.Y + YposY + 3 + 16, 23 - ((WData.currentCd / WData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._W, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                        }
                                                    }
                                                }



                                                if (EData.level > 0)
                                                {
                                                    for (uint j = 1; j <= EData.level; j++)
                                                    {
                                                        Renderer.DrawRect(pos2D.X - XposX + 27 * (uint)spellSlot._E + j * 5 - 1, pos2D.Y + YposY + 3 + 21, 1, 2, new Color(0xFF, 0xFF, 00, 0xFF));
                                                    }
                                                    if (EData.ammoCurrentCd > 0)
                                                    {
                                                        if (EData.ammo > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._E, pos2D.Y + YposY + 3 + 16, 23 - ((EData.ammoCurrentCd / EData.ammoCd) * 23), 4, new Color(0xFF, 0x7F, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._E, pos2D.Y + YposY + 3 + 16, 23 - ((EData.ammoCurrentCd / EData.ammoCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (EData.currentCd > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._E, pos2D.Y + YposY + 3 + 16, 23 - ((EData.currentCd / EData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._E, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                        }
                                                    }
                                                }


                                                if (RData.level > 0)
                                                {
                                                    for (uint j = 1; j <= RData.level; j++)
                                                    {
                                                        Renderer.DrawRect(pos2D.X - XposX + 27 * (uint)spellSlot._R + j * 5 - 1, pos2D.Y + YposY + 3 + 21, 1, 2, new Color(0xFF, 0xFF, 00, 0xFF));
                                                    }
                                                    if (RData.ammoCurrentCd > 0)
                                                    {
                                                        if (RData.ammo > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._R, pos2D.Y + YposY + 3 + 16, 23 - ((RData.ammoCurrentCd / RData.ammoCd) * 23), 4, new Color(0xFF, 0x7F, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._R, pos2D.Y + YposY + 3 + 16, 23 - ((RData.ammoCurrentCd / RData.ammoCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                    }
                                                    else
                                                    {
                                                        if (RData.currentCd > 0)
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._R, pos2D.Y + YposY + 3 + 16, 23 - ((RData.currentCd / RData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                        }
                                                        else
                                                        {
                                                            Renderer.DrawFilledRect(pos2D.X - XposX + 3 + 27 * (uint)spellSlot._R, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                        }
                                                    }
                                                }

                                                if (DData.currentCd > 0)
                                                {
                                                    Renderer.DrawFilledRect(pos2D.X - XposX + 121, pos2D.Y + YposY + 3 + 16, 23 - ((DData.currentCd / DData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                }
                                                else
                                                {
                                                    Renderer.DrawFilledRect(pos2D.X - XposX + 121, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                }


                                                if (FData.currentCd > 0)
                                                {
                                                    Renderer.DrawFilledRect(pos2D.X - XposX + 121 + 4 + 23, pos2D.Y + YposY + 3 + 16, 23 - ((FData.currentCd / FData.spellCd) * 23), 4, new Color(0xFF, 00, 00, 0xFF));
                                                }
                                                else
                                                {
                                                    Renderer.DrawFilledRect(pos2D.X - XposX + 121 + 4 + 23, pos2D.Y + YposY + 3 + 16, 23, 4, new Color(00, 0xFF, 00, 0xFF));
                                                }
                                            }

                                            if (heroData.oObjTeam != lPdata.oObjTeam)
                                            {
                                                if (Components.VisualsComponent.DrawInformationAlly.Enabled)
                                                {
                                                    Renderer.DrawText("Vida: " + (int)heroData.oObjHealth + " / " + (int)heroData.oObjMaxHealth, pos2D.X, pos2D.Y - 40, new Color(0xFF, 00, 00, 0xff));
                                                    Renderer.DrawText("Mana: " + (int)heroData.oObjMana + " / " + (int)heroData.oObjMaxMana, pos2D.X, pos2D.Y - 20, new Color(0, 255, 255, 0xff));
                                                }
                                                if (Components.VisualsComponent.DrawRangeCircleEmy.Enabled)
                                                {
                                                    CircleRendering.Render(finalMatrix, Components.VisualsComponent.RangeCircleColorNmy.Color, heroData.oObjAtkRange + 55.0f, heroData.oObjPos);
                                                }
                                            }
                                            if (heroData.oObjTeam == lPdata.oObjTeam)
                                            {
                                                if (Components.VisualsComponent.DrawInformationAlly.Enabled)
                                                {
                                                    Renderer.DrawText("Vida: " + (int)heroData.oObjHealth + " / " + (int)heroData.oObjMaxHealth, pos2D.X, pos2D.Y - 40, new Color(0xFF, 00, 00, 0xff));
                                                    Renderer.DrawText("Mana: " + (int)heroData.oObjMana + " / " + (int)heroData.oObjMaxMana, pos2D.X, pos2D.Y - 20, new Color(0, 255, 255, 0xff));
                                                }
                                                if (Components.VisualsComponent.DrawRangeCircleAlly.Enabled)
                                                {
                                                    CircleRendering.Render(finalMatrix, Components.VisualsComponent.RangeCircleColorAlly.Color, heroData.oObjAtkRange + 55.0f, heroData.oObjPos);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Пример #3
0
        private static void OnRenderer(int fps, EventArgs args) //good sig for punch >> 0F 85 ? ? ? ? 53 53 C7 05
        {
            if (!gameProcessExists)
            {
                return;                     //process is dead, don't bother drawing
            }
            if ((!isGameOnTop) && (!isOverlayOnTop))
            {
                return;                                      //if game and overlay are not on top, don't draw
            }
            if (!Components.MainAssemblyToggle.Enabled)
            {
                return;                                         //main menu boolean to toggle the cheat on or off
            }
            double fClosestPos = 999999;

            AimTarg2D = new Vector2(0, 0);
            AimTarg3D = new Vector3(0, 0, 0);

            if (dwViewMatrix_Offs != IntPtr.Zero)
            {
                var matrix = Memory.ReadMatrix(processHandle, (IntPtr)(dwViewMatrix_Offs.ToInt64() + 0x0));
                if (cl_entity_pointer != IntPtr.Zero)
                {
                    var myPunchAng     = Memory.ReadVector3(processHandle, (IntPtr)(myPungAng_Offs.ToInt64() + 0xA0));
                    var myEyePos       = Memory.ReadVector3(processHandle, (IntPtr)(myEyePos_Offs.ToInt64() + 0x0));
                    var myViewAng      = Memory.ReadVector3(processHandle, (IntPtr)(myAimAng_Offs.ToInt64() + 0x4)); //+0x34 for writing
                    var cl_entity_data = Memory.ReadPointer(processHandle, cl_entity_pointer, isWow64Process);
                    if (cl_entity_data != IntPtr.Zero)
                    {
                        if (hud_player_info_pointer != IntPtr.Zero)
                        {
                            for (uint i = 1; i <= 32; i++)
                            {
                                var entityData = SDKUtil.ReadStructure <GameEntityStruct>(processHandle, (IntPtr)(cl_entity_data.ToInt64() + i * 0x0BB8));
                                if (entityData.messagenum > highest_messagenum)
                                {
                                    highest_messagenum = entityData.messagenum;
                                }
                                if (entityData.messagenum + 10 > highest_messagenum)
                                {
                                    if ((myEyePos.X + 15.0f > entityData.Origin.X) && (myEyePos.X - 15.0f < entityData.Origin.X) && (myEyePos.Y + 15.0f > entityData.Origin.Y) && (myEyePos.Y - 15.0f < entityData.Origin.Y))
                                    {
                                        myIndex = (int)i;
                                        //Console.WriteLine(myIndex);
                                    }
                                    var playerNamePtr  = Memory.ReadPointer(processHandle, (IntPtr)(hud_player_info_pointer.ToInt64() + (i - 1) * (isNoSteam ? 0x014 : 0x020)), isWow64Process);
                                    var playerModelPtr = Memory.ReadPointer(processHandle, (IntPtr)(hud_player_info_pointer.ToInt64() + ((i - 1) * (isNoSteam ? 0x014 : 0x020)) + 0xC), isWow64Process);
                                    if (playerModelPtr != IntPtr.Zero)
                                    {
                                        var playerName  = Memory.ReadString(processHandle, playerNamePtr, false);
                                        var playerModel = Memory.ReadString(processHandle, playerModelPtr, false);
                                        if ((int)i == myIndex)
                                        {
                                            myTeam = isTerror(playerModel);
                                            continue;
                                        }
                                        var     m_iTeamNum   = isTerror(playerModel);
                                        var     isenemybool  = (myTeam != m_iTeamNum);
                                        Vector2 vScreen_head = new Vector2(0, 0);
                                        Vector2 vScreen_feet = new Vector2(0, 0);
                                        if (Renderer.WorldToScreen(new Vector3(entityData.Origin.X, entityData.Origin.Y, entityData.Origin.Z + 26), out vScreen_head, matrix, wndMargins, wndSize, W2SType.TypeOGL))
                                        {
                                            Renderer.WorldToScreen(new Vector3(entityData.Origin.X, entityData.Origin.Y, entityData.Origin.Z - 22), out vScreen_feet, matrix, wndMargins, wndSize, W2SType.TypeOGL);
                                            //Renderer.DrawFPSBox(vScreen_head, vScreen_feet, Color.White, (entityData.isDucking == 1) ? BoxStance.crouching : BoxStance.standing, 1.0f, true, true, 0, 0, 0, 0, 12, playerName, playerModel, "", "", "");
                                            string dist_str = "";
                                            if (Components.VisualsComponent.DrawTextDist.Enabled)
                                            {
                                                double playerDist = GetDistance3D(myEyePos, entityData.Origin) / 22.0f;
                                                dist_str = $"[{playerDist.ToString("0.0")}]"; //only 1 demical number after the dot
                                            }
                                            if (Components.VisualsComponent.DrawTheVisuals.Enabled)
                                            {
                                                if ((!Components.VisualsComponent.DrawAlliesEsp.Enabled) && (!isenemybool))
                                                {
                                                    continue;                                                                         //skil allies
                                                }
                                                Renderer.DrawFPSBox(vScreen_head, vScreen_feet, (m_iTeamNum == 2) ? Components.VisualsComponent.CTColor.Color : Components.VisualsComponent.TRColor.Color, (entityData.isDucking == 1) ? BoxStance.crouching : BoxStance.standing, Components.VisualsComponent.DrawBoxThic.Value, Components.VisualsComponent.DrawBoxBorder.Enabled, Components.VisualsComponent.DrawBox.Enabled, 0, 0, 0, 0, Components.VisualsComponent.DrawTextSize.Enabled ? Components.VisualsComponent.DrawTextSize.Value : 0, dist_str, Components.VisualsComponent.DrawPlayerNames.Enabled ? playerName : string.Empty, string.Empty, string.Empty, string.Empty);
                                            }
                                        }
                                        if (Components.AimbotComponent.AimGlobalBool.Enabled)
                                        {
                                            if (!Components.AimbotComponent.AimAtEveryone.Enabled)
                                            {
                                                if (!isenemybool)
                                                {
                                                    continue;               //skip allies
                                                }
                                            }
                                            Vector3 targetVec = new Vector3(0, 0, 0);
                                            switch (Components.AimbotComponent.AimSpot.Value)
                                            {
                                            case 0:     //head
                                            {
                                                targetVec = new Vector3(entityData.Origin.X, entityData.Origin.Y, entityData.Origin.Z + 18.0f);
                                            }
                                            break;

                                            case 1:     //body
                                            {
                                                targetVec = entityData.Origin;
                                            }
                                            break;

                                            default:     //ignore default case, should never occur
                                                break;
                                            }
                                            Vector2 vScreen_aim = new Vector2(0, 0);
                                            if (Renderer.WorldToScreen(targetVec, out vScreen_aim, matrix, wndMargins, wndSize, W2SType.TypeOGL)) //our aimpoint is on screen
                                            {
                                                if (Components.AimbotComponent.DrawAimSpot.Enabled)
                                                {
                                                    Renderer.DrawFilledRect(vScreen_aim.X - 1, vScreen_aim.Y - 1, 2, 2, new Color(255, 255, 255)); //lazy to implement aimspotcolor
                                                }
                                                var AimDist2D = GetDistance2D(vScreen_aim, GameCenterPos);
                                                if (Components.AimbotComponent.AimFov.Value < AimDist2D)
                                                {
                                                    continue;                                                      //ignore anything outside our fov
                                                }
                                                if (AimDist2D < fClosestPos)
                                                {
                                                    fClosestPos = AimDist2D;
                                                    AimTarg2D   = vScreen_aim;
                                                    AimTarg3D   = targetVec;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                            if (Components.AimbotComponent.AimGlobalBool.Enabled)
                            {
                                if (Components.AimbotComponent.DrawAimFov.Enabled) //draw fov circle
                                {
                                    Renderer.DrawCircle(GameCenterPos, Components.AimbotComponent.AimFov.Value, Components.AimbotComponent.AimFovColor.Color);
                                }

                                var dx = (GameCenterPos.X * 1.8f) / 90;
                                var dy = (GameCenterPos.Y * 1.8f) / 90;

                                var rx = GameCenterPos.X - (dx * ((myPunchAng.Y)));
                                var ry = GameCenterPos.Y + (dy * ((myPunchAng.X)));
                                if (Components.AimbotComponent.DrawRecoil.Enabled)
                                {
                                    Renderer.DrawFilledRect(rx - 1, ry - 1, 2, 2, Components.AimbotComponent.RecoilColor.Color);
                                }

                                if ((AimTarg2D.X != 0) && (AimTarg2D.Y != 0))             //check just in case if we have aimtarg
                                {
                                    if (Components.AimbotComponent.DrawAimTarget.Enabled) //draw aim target
                                    {
                                        Renderer.DrawRect(AimTarg2D.X - 3, AimTarg2D.Y - 3, 6, 6, Components.AimbotComponent.AimTargetColor.Color);
                                    }
                                    if (Components.AimbotComponent.AimKey.Enabled)
                                    {
                                        switch (Components.AimbotComponent.AimType.Value)
                                        {
                                        case 0:     //engine viewangles
                                        {
                                            if (myAimAng_Offs != IntPtr.Zero)
                                            {
                                                var   myAngles      = Memory.ReadVector3(processHandle, (IntPtr)(myAimAng_Offs.ToInt64() + 0x4));
                                                float recoilCompens = Components.AimbotComponent.AIMRC.Enabled ? (Components.AimbotComponent.AIMRCSPD.Value * 0.1f) : 0.0f;
                                                var   newAng        = CalcAngle(myEyePos, AimTarg3D, myPunchAng, myAngles, recoilCompens, recoilCompens);
                                                if (Components.AimbotComponent.AimSpeed.Value < 100)         //smoothing only below 100%
                                                {
                                                    float aimsmooth_ = Components.AimbotComponent.AimSpeed.Value * 0.01f;
                                                    var   diff       = newAng - myAngles;
                                                    diff = NormalizeAngle(diff);
                                                    diff = ClampAngle(diff);
                                                    if (diff.X > aimsmooth_)
                                                    {
                                                        newAng.X = myAngles.X + aimsmooth_;
                                                    }
                                                    if (diff.X < -aimsmooth_)
                                                    {
                                                        newAng.X = myAngles.X - aimsmooth_;
                                                    }
                                                    if (diff.Y > aimsmooth_)
                                                    {
                                                        newAng.Y = myAngles.Y + aimsmooth_;
                                                    }
                                                    if (diff.Y < -aimsmooth_)
                                                    {
                                                        newAng.Y = myAngles.Y - aimsmooth_;
                                                    }
                                                    newAng = ClampAngle(newAng);         //just in case?
                                                }
                                                Memory.WriteVector3(processHandle, (IntPtr)(myAimAng_Offs.ToInt64() + 0x34), newAng);
                                            }
                                        }
                                        break;

                                        case 1:     //mouse event
                                        {
                                            double DistX = 0;
                                            double DistY = 0;
                                            if (Components.AimbotComponent.AIMRC.Enabled)
                                            {
                                                DistX = (AimTarg2D.X) - rx;
                                                DistY = (AimTarg2D.Y) - ry;
                                            }
                                            else
                                            {
                                                DistX = (AimTarg2D.X) - GameCenterPos.X;
                                                DistY = (AimTarg2D.Y) - GameCenterPos.Y;
                                            }
                                            double slowDistX = DistX / (1.0f + (Math.Abs(DistX) / (1.0f + Components.AimbotComponent.AimSpeed.Value)));
                                            double slowDistY = DistY / (1.0f + (Math.Abs(DistY) / (1.0f + Components.AimbotComponent.AimSpeed.Value)));
                                            Input.mouse_eventWS(MouseEventFlags.MOVE, (int)slowDistX, (int)slowDistY, MouseEventDataXButtons.NONE, IntPtr.Zero);
                                        }
                                        break;

                                        default:     //ignore default case, should never occur
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        highest_messagenum = 0;
                        myIndex            = -1;
                        myTeam             = 0;
                    }
                }
            }
        }