private async void tmrUpdateInfo_Tick(object sender, EventArgs e) { /// /// This timer runs in a 350ms interval /// try { bool isAttacking = await Character.isAttacking; lblCavebotIndex.Text = Cavebot.Index.ToString(); lblPokeHP.Text = Pokemon.HP.ToString(); if (Pokemon.HasPokemonSet && Pokemon.AutoRevive && Pokemon.HP <= Pokemon.AutoReviveHP && Pokemon.AutoReviveHP < Pokemon.AutoReviveHP && Pokemon.Reviving == false && Character.HP > 0 && Pokemon.ReviveCooldown == false) { Pokemon.Revive(); if (Pokemon.isOutside() == false) { Pokemon.PutOut(); } } if (Pokemon.HasPokemonSet && Pokemon.AutoRevive && Pokemon.MaxHP > Pokemon.AutoReviveOutOfBattleHP && Pokemon.Reviving == false && isAttacking == false && Pokemon.HP < Pokemon.AutoReviveOutOfBattleHP) { Pokemon.Revive(true); if (Pokemon.isOutside() == false) { Pokemon.PutOut(); } } if (Pokemon.HP > 0 && Pokemon.HP > Pokemon.AutoReviveHP && (isAttacking || CavebotAttack.Enabled) && Pokemon.isOutside() == false) { Pokemon.PutOut(); } lblCharHP.Text = Character.HP.ToString(); lblPosX.Text = Character.X.ToString(); lblPosY.Text = Character.Y.ToString(); lblPosZ.Text = Character.Z.ToString(); lblDestinX.Text = Character.DestinX.ToString(); lblDestinY.Text = Character.DestinY.ToString(); bool isFishing = await Fishing.isFishing(); lblIsFishing.Text = isFishing.ToString(); lblIsAttacking.Text = isAttacking.ToString(); if (GUI.isPxgActive()) { if (chbHotkeys.Checked == true) { if (keyboardHook.IsStarted == false) { keyboardHook.Start(); } } } else { if (chbHotkeys.Checked == true) { if (keyboardHook.IsStarted == true) { keyboardHook.Stop(); } } } txtDebug.Text = Settings.DebugText; txtDebug.SelectionStart = txtDebug.Text.Length; txtDebug.ScrollToCaret(); } catch (Exception ex) { MessageBox.Show("Error: tmrUpdateInfo: " + ex.Message); } }