Ejemplo n.º 1
0
        public static ActorCommonData GetTarget()
        {
            ActorCommonData acdTarget = null;

            var queryMonster = ActorCommonDataHelper.EnumerateMonsters().Where(x => x.x0D0_WorldPosX > 0 && x.x188_Hitpoints > 00001 && x.x190_TeamId == 10 && x.x184_ActorType == Enigma.D3.Enums.ActorType.Monster && !x.x004_Name.Contains("sandWasp"));

            var queryMonsterQuality = queryMonster
                                      .Where(x => x.x0B8_MonsterQuality > Enigma.D3.Enums.MonsterQuality.Normal)
                                      .OrderBy(x => x.x0B8_MonsterQuality);

            if (queryMonsterQuality.Any())
            {
                var acd = queryMonsterQuality.First();
                WindowHook.SetD3WindowText(string.Format("Target {0} x098_MonsterSnoId:{1}", acd.x004_Name, acd.x098_MonsterSnoId));
                return(acd);
            }


            var queryMonsterLeft = queryMonster
                                   .OrderBy(x => x.x188_Hitpoints);

            if (queryMonsterLeft.Any())
            {
                var acd = queryMonsterLeft.First();
                WindowHook.SetD3WindowText(string.Format("Target {0} x098_MonsterSnoId:{1}", acd.x004_Name, acd.x184_ActorType == Enigma.D3.Enums.ActorType.Monster));
                return(acd);
            }

            WindowHook.SetD3WindowText("Target NULL");
            return(acdTarget);
        }
Ejemplo n.º 2
0
        private void GHook_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
        {
            if (e.KeyCode == Keys.NumPad1)
            {
                IsBotRunning = true;
                WindowHook.SetD3WindowText("Dev Running");
                StartSimpleRun();
            }

            if (e.KeyCode == Keys.NumPad2)
            {
                IsBotRunning = false;
                WindowHook.SetD3WindowText("Dev Stopped");
            }
        }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();


            this.KeyboardHook();


            Engine.Create();

            WindowHook.SetD3WindowText("Dev Stopped");

            this.LoadLocalData();
            this.LoadBuffManager();
            this.LoadUIHandlers();
            this.LoadActors();

            //new System.Threading.Thread(() =>
            //{
            //    while (true)
            //    {
            //        this.RefreshDebugInfo();
            //        System.Threading.Thread.Sleep(10000000);
            //    }
            //}).Start();


            //new System.Threading.Thread(() =>
            //{
            //    while (true)
            //    {
            //        if (IsBotRunning)
            //            StartSimpleRun();
            //        System.Threading.Thread.Sleep(1000);
            //    }
            //}).Start();
        }