Esempio n. 1
0
        public static void UsePassive()
        {
            if (!Menu.Item("UsePassive").GetValue <bool>())
            {
                return;
            }

            var turret =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(
                    h =>
                    h.IsValid && h.Name == "TowerClicker" && h.Health < 1 &&
                    Player.Distance(h.ServerPosition) < 800)
                .OrderByDescending(h => Player.Distance(h.ServerPosition))
                .FirstOrDefault();

            if (turret == null || !turret.IsValid)
            {
                return;
            }

            var p = new PKT_InteractReq {
                NetworkId = Player.NetworkId, TargetNetworkId = turret.NetworkId
            };

            p.Encode().SendAsPacket();
        }
        private static void InteractObject(GameObject obj)
        {
            var p = new PKT_InteractReq
            {
                NetworkId       = _player.NetworkId,
                TargetNetworkId = obj.NetworkId
            };

            Game.SendPacket(p.Encode(), PacketChannel.C2S, PacketProtocolFlags.Reliable);
        }