public void FairyEnchancementThead() { IsRun = true; ItemFairy FFE = SelectFairyForEnchance(); if (FFE.id == 0) { return; } Thread.Sleep(1000); ItemFairy F1 = GetEquiped(); while (LevelUpForSpirit()) { Thread.Sleep(2200); ItemFairy F2 = GetEquiped(); if (F2.P1 > F1.P1) { RAS.Add(F2.P1 - F1.P1); break; } } Thread.Sleep(2000); ItemFairy FF = GetEquiped(); if (!FF.IsGood() && FF.lvl < 100) { Detach(); } FairyEnchancementThead(); THH.SelfStop("FET:" + CHR.Name); IsRun = false; }
public static void StartNewThread(ThreadStart P, string TName, Action CallBack = null) { if (THL.Keys.Contains(TName)) { return; } P += () => { THH.SelfStop(TName); CallBack?.Invoke(); }; Thread CT = new Thread(P) { Name = TName }; THL.Add(TName, CT); CT.Start(); }
public void Run() { IsRun = true; /*CHR.EnterHome(); * CHR.WND.WaitForWindow("Win_Chat", 20, false); * Utils.RandomDelay();*/ LoadMine(); Utils.RandomDelay(); if (GamesRemain < 1 || Points > PointLimit) { return; } OpenBattle(); Utils.RandomDelay(); int EC = GetRandomEnemyCommander(); SelectEnemy(EC); Utils.RandomDelay(); LoadEnemy(); Utils.RandomDelay(); Beast[] BB = AnalizeEnemy(); Utils.RandomDelay(); StartBattle(BB, EC); Utils.RandomDelay(); if (SkipBattles) { if (CHR.GetClass <GUI>().WaitForCurrentWindow("Win_HomePetPrepare", 10)) { CHR.GetClass <GUI>().Click("Win_HomePetPrepare", "Btn_Skip"); } } if (CHR.GetClass <GUI>().WaitForCurrentWindow("Win_HomePetFirstAward", SkipBattles ? 10 : 60)) { GetPrizeBag(); CHR.GetClass <GUI>().Click("Win_HomePetFirstAward", "Btn_Close"); } Run(); THH.SelfStop("BeastBattle:" + CHR.Name); IsRun = false; }
private void RunHandler() { Run(); THH.SelfStop("RUN CLIENT: " + ACC_DESC); }