Пример #1
0
        private void onBotRefresh(object sender, EventArgs e)
        {
            m_client = new AL_CLIENT_INJECT(Process.GetProcessesByName("Altaron")[listBox1.SelectedIndex]);
            hp       = m_memoryReader.GetHealth(m_client.cHandle, (Int32)m_client.baseAddress);
            mp       = m_memoryReader.GetMana(m_client.cHandle, (Int32)m_client.baseAddress);
            hp_max   = m_memoryReader.GetMaxHealth(m_client.cHandle, (Int32)m_client.baseAddress);
            mp_max   = m_memoryReader.GetMaxMana(m_client.cHandle, (Int32)m_client.baseAddress);

            label_HP.Text = "HP: " + hp.ToString() + "/" + hp_max.ToString();
            label_MP.Text = "mP: " + mp.ToString() + "/" + mp_max.ToString();

            if (hpCheckerBool && lastHpTick > hp)
            {
                int dmg = lastHpTick - hp;
                checkBoxOtrzymanieObrazen.Checked = false;
                hpCheckerBool = false;
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "ATAK";
                popup.ContentText = "Zostałeś zaatakowany!!!!";
                AL_DEBUG.Log("Otrzymano obrażenia: " + dmg);
                popup.Popup();
                lastHpTick = hp;
            }
            hpPercent = (float)Convert.ToDouble(textBoxHpWarning.Text);
            float percentHp = ((float)hp / (float)hp_max) * 100f;

            if (hpWarningBool && percentHp <= hpPercent)
            {
                checkBoxHpWarning.Checked = false;
                hpWarningBool             = false;
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "Low Hp";
                popup.ContentText = "Masz mało HP!!!!";
                AL_DEBUG.Log("Twoje HP spadło poniżej: " + hp + " : " + percentHp);
                popup.Popup();
            }

            /*AL_DEBUG.Log(hp.ToString());
             * AL_DEBUG.Log(mp.ToString());
             * AL_DEBUG.Log(hp_max.ToString());
             * AL_DEBUG.Log(mp_max.ToString());*/
        }
Пример #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex < 0 && listBox1.SelectedIndex >= Process.GetProcessesByName("Altaron").Length)
            {
                return;
            }

            m_client       = new AL_CLIENT_INJECT(Process.GetProcessesByName("Altaron")[listBox1.SelectedIndex]);
            timer1.Enabled = true;
            timer1.Start();
            timer1.Tick += new EventHandler(onBotRefresh);
            timer1.Tick += new EventHandler(checkBoxPelnaMana_CheckedChanged);
            startReading = true;

            timer2.Enabled = true;
            timer2.Start();
            lastManaTick = mp;
            timer2.Tick += new EventHandler(ManaChecker);
            checkBoxOtrzymanieObrazen.Enabled = true;
            checkBoxPelnaMana.Enabled         = true;
            checkBoxHpWarning.Enabled         = true;
        }