예제 #1
0
 public void GrabItem(InteractableItem s)
 {
     Toolkit.SendMessageTip("Picking up: " + s.asset.itemName, true);
     s.use();
     LastPickup = Time.realtimeSinceStartup + 0.7f;
 }
예제 #2
0
        //Called every tick
        public void Update()
        {
            if (Global.AllOff || !Global.AimSettings.RageBot || !Global.AimEnabled)
            {
                return;
            }

            if (!Provider.isConnected)
            {
                return;
            }

            if (Provider.clients.Count < 1)
            {
                return;
            }

            //Is holding gun
            if (!(Player.player?.equipment?.asset is ItemGunAsset))
            {
                return;
            }

            SteamPlayer targ = null;
            Vector3     position = Camera.main.transform.position, forward = Camera.main.transform.forward;
            float       maxDist = ((ItemGunAsset)Player.player.equipment.asset).range, bestFov = 300, trgDst = 0f;

            foreach (SteamPlayer i in Global.AimSettings.RageAll ? Provider.clients : mTargets)
            {
                if (i.player == Player.player)
                {
                    continue;
                }
                if (i.player.life.isDead)
                {
                    continue;
                }
                if (!Friend.isTarget(i))
                {
                    continue;
                }

                float distance = Vector3.Distance(i.player.transform.position, position);

                if (!(distance < maxDist))
                {
                    continue;
                }

                Vector3 wtsp = Drawing.Drawing_Hk.WorldToScreen(i.player.transform.position);

                if (wtsp.z > -8)
                {
                    float fov = Mathf.Abs(Vector2.Distance(new Vector2(wtsp.x, Screen.height - wtsp.y), new Vector2((Screen.width / 2), (Screen.height / 2))));

                    if (fov < bestFov)
                    {
                        bestFov = fov;
                        targ    = i;
                        trgDst  = distance;
                    }
                }
            }

            if (targ == null)
            {
                if (FocusTarget != null)
                {
                    FocusTarget = null;
                    Toolkit.SendMessageTip("Lost Lock");
                }
                return;
            }

            FocusTarget = targ;
            Toolkit.SendMessageTip("Aimbot Lock: " + targ.playerID.characterName);

            if (!Global.AimSettings.RBypassOne)
            {
                Vector3 PosTo = Vector3.Lerp(Camera.main.transform.position, FocusTarget.player.look.aim.position, 0.99f);
                Player.player.look.aim.position = PosTo;
                Ray         ray         = new Ray(Player.player.look.aim.position, Player.player.look.aim.forward);
                RaycastInfo raycastInfo = DamageTool.raycast(ray, 2f, RayMasks.DAMAGE_CLIENT);
                if ((UnityEngine.Object)raycastInfo.player != (UnityEngine.Object)null)
                {
                    Player.player.input.sendRaycast(raycastInfo, ERaycastInfoUsage.Gun);
                }
            }
        }
예제 #3
0
        public static void MainThread()
        {
            Console.WriteLine("UBYPASSKEEPALIVE::" + AppDomain.GetCurrentThreadId());

            GameObject GlobalObj = new GameObject();

            //Menu
            GlobalObj.AddComponent <Menu>();

            //Aimbot
            GlobalObj.AddComponent <Aimbot>();

            //Ragebot
            GlobalObj.AddComponent <RageBot>();

            //Misc
            GlobalObj.AddComponent <Miscellaneous>();

            //Vehicles
            GlobalObj.AddComponent <Vehicles>();

            //Items
            GlobalObj.AddComponent <Items>();

            //Visuals
            GlobalObj.AddComponent <Drawing.Drawing_Hk>();

            GameObject.DontDestroyOnLoad(GlobalObj);

            //Run hooks
            _Hook.HookFunctions();

            //Fix the credit menu
            Toolkit.PatchCreditMenu();

            //Unlock achievements
            Toolkit.UnlockAchievements();

            //Launch SteamFriend thread
            Friend.friendWatch.Start();

            Toolkit.GetFields();

            while (true)
            {
                Thread.Sleep(500);

                if (Provider.isConnected)
                {
                    if (Player.player == null)
                    {
                        continue;
                    }

                    try
                    {
                        Drawing.DoGlow();
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                }

                Steamworks.SteamInventory.SendItemDropHeartbeat();
            }
        }