/// <summary> /// Burn rest of mana /// </summary> private void CastSecondSpell() { if (_loopCounter == 10) { KeyboardControl.PressKey(_secondSpellKey); _loopCounter = 0; } }
/// <summary> /// Drinking potions & burning mana loop /// </summary> private void MakeBurningLoop() { _loopCounter = 0; SendValue(Enums.Place.backpack, _potionsInBackpack); SendValue(Enums.Place.potionStack, _potionsOutside); while (_IsEnabled && PotionsCheck()) { if (_IsGameTopMost) { if (_selectedVocation == Enums.Vocation.Magical) { switch (_selectedPotion) { case Enums.PotionType.UMP: KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_firstSpellKey); _loopCounter += 5; CastSecondSpell(); Thread.Sleep(Randomization.GenerateWait()); break; case Enums.PotionType.GMP: KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_firstSpellKey); _loopCounter += 1; CastSecondSpell(); break; case Enums.PotionType.SMP: KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_firstSpellKey); break; } } else { KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_potionKey); _potionsInBackpack--; SendValue(Enums.Place.backpack, _potionsInBackpack); Thread.Sleep(Randomization.GenerateWait()); KeyboardControl.PressKey(_firstSpellKey); KeyboardControl.PressKey(_secondSpellKey); } } } }