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());*/ }
private void checkBoxPelnaMana_CheckedChanged(object sender, EventArgs e) { if (startReading && checkBoxPelnaMana.Checked) { if (mp == mp_max && pop == false) { AL_DEBUG.Log("Pelna Mana"); //label1.Text = "Pełna mana"; PopupNotifier popup = new PopupNotifier(); popup.TitleText = "MANA!!"; popup.ContentText = "Masz full many"; popup.Popup(); pop = true; } else if (mp != mp_max && pop) { pop = false; } } }