public void Drink(int LP) { try { if (getStats.IsOnDrink() && getStats.CurrentLP() <= Convert.ToInt32(LP)) { _wB.Document.Window.Frames[1].Navigate("http://" + Settings._World + ".freewar.de/freewar/internal/main.php?arrive_eval=drinkwater"); _wB.Document.Window.Frames[6].Navigate("http://" + Settings._World + ".freewar.de/freewar/internal/item.php"); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Heal LP"); } } catch { } }
public void CheckStats() { try { Settings.LoggedIn = true; LoadCookie(); if (_wB.Document.Window.Frames[7].Document.Body.OuterText.Contains("Position X: Y: ")) { _wB.Navigate("http://" + Settings._World + ".freewar.de/freewar/"); Paths._Actual = new List <string>(); } actions.Drink(Settings._minLP); actions.DrinkBeer(Settings._minLP); getStats.Erfahrung(); getStats.MaxLP(); OpenInv(); LoadInventar(); // Sell(); CheckWaffeAnoderAblegen(); OpenBankEinzahlung(); useHealItems(); UseProtection(); GetAuftrag(); MakeAuftrag(); if (Settings._playerkiller) { actions.AttackPlayer(); } if (Settings._attack) { actions.Attack(); } if (Settings.NPCVerjagen) { actions.Verjagen(); } if (Settings._take) { actions.Take(); } if (Settings.Harvest) { actions.Harvest(); } if ((_wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("Wieviel Gold willst du für das Item")) & Settings._sell) { Sell(); } else if (Settings._sell && !(getStats.px() == 96 & getStats.py() == 101) && (_wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("main.php?arrive_eval=verkaufen") | _wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("Welches deiner Items möchtest du verkaufen?"))) { Sell(); } if ((getStats.px() == 96 & getStats.py() == 101) && (_wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("Item in der Markthalle kaufen")) && Settings._maha) { SellMaha(); } OpenBankLagerung(); if (_wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("Goldmünzen auf dein Konto eingezahlt.")) { _wB.Document.Window.Frames[1].Navigate("http://" + Settings._World + ".freewar.de/freewar/internal/main.php"); } if (WayBankinProgress == false && WayHealinProgress == false && SomethingToBank()) { Paths._Actual = pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(92, 105)); WayBankinProgress = true; } { WayBankinProgress = false; } if (getStats.CurrentLP() <= Settings._minLP && WayHealinProgress == false && WayBankinProgress == false) { if (getStats.CurrentLP() <= Settings._minLP & getStats.Geld() >= 30) { Paths._Actual = pathFinder.ShortestWayToHeal(new Point(getStats.px(), getStats.py())); } else if (getStats.CurrentLP() <= Settings._minLP & getStats.Geld() < 30) { Paths._Actual = pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(93, 101)); } Paths._Actual = new List <string>(); WayHealinProgress = true; } if (getStats.CurrentLP() > Settings._minLP & WayHealinProgress == true) { WayHealinProgress = false; } if ((getStats.px() == 92) & (getStats.py() == 89) & IsMoneyInBankHigher() & Settings._TranserMoney) { Ueberweisen(); WayUeberweisenProgress = false; } if (Settings._TranserMoney && IsMoneyInBankHigher()) { if (Paths._Actual.Count != 16) { WayUeberweisenProgress = true; } } if (_wB.Document.Window.Frames[1].Document.Body.OuterText.Contains("Du kannst nicht 0 Goldmünzen einzahlen.")) { _wB.Document.Window.Frames[1].Navigate("http://" + Settings._World + ".freewar.de/freewar/internal/main.php"); } TakeOilOrSumpfgas(); TakeFederation(); PfeileInBeutel(); GeisterfunkeninGeisterschild(); if ((Settings._RepairWeapons && _wB.Document.Window.Frames[1].Document.Body.OuterHtml.Contains("Waffen reparieren"))) { RepairWeapon(); } } catch { } }
private void timer3_Tick(object sender, EventArgs e) { try { if (Settings._Autowalk & Settings.IsBotRunning & isWorkerThread) { manager._moveManager.Move(); //gehört noch an die richtige position!!!! //if ((Paths._Actual == null || Paths._Actual.Count == 0) && Settings._Auftraege) //{ // Paths._Actual = pathFinder.Directions(new Point(getStats.px(), getStats.py()), Settings.AuftragsPunkt); //} if ((Paths._Actual == null || Paths._Actual.Count == 0) & !SomethingToDo()) { Paths._Actual = new List <string>(); MapWays actual = GetActualWayObject(Settings._huntingArea); if (manager.WayUeberweisenProgress) { Paths._Actual = pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(92, 89)); } else if (getStats.Geld() > Settings.MaxMoney | manager.SomethingToBank()) { if (!(getStats.px() == 92 & getStats.py() == 105)) { if (!manager._moveManager.UseGZK(Zauberkugel.Bank)) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(92, 105))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to bank"); } } } else if (!getStats.SpeedOk() && manager.SomethingToBankEinlagern()) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(92, 105))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to bank"); } else if (!getStats.SpeedOk() && manager.SomethingToMaha() & Settings._maha) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(96, 101))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to maha"); } else if (!getStats.SpeedOk() && manager.SomethingtoSell() & Settings._sell) { Paths._Actual.AddRange(pathFinder.ShortestWayToShop(new Point(getStats.px(), getStats.py()))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to shop"); } else if (getStats.CurrentLP() <= Settings._minLP && getStats.Geld() >= 30) { Paths._Actual.AddRange(pathFinder.ShortestWayToHeal(new Point(getStats.px(), getStats.py()))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to healpoint"); } else if (getStats.CurrentLP() <= Settings._minLP && getStats.Geld() < 30) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(93, 101))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to healpoint (Gasthaus)"); } else if (Settings.PickUpOil && (DateTime.Now - Settings.LastOilPickUp).Hours >= Settings.CollectOil) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(103, 117))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to oilpickup"); } else if (Settings.PickUpFederation && (DateTime.Now - Settings.LastFederationPickUp).Days >= 1) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(87, 112))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to federationpickup"); } else if (Settings.PickUpSumpfgas && (DateTime.Now - Settings.LastSumpfgasPickUp).Days >= 1) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(76, 104))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to gaspickup"); } else if (Settings._Auftraege && manager.AuftraginProgres) { manager.MakeAuftrag(); } else if (Settings._Auftraege)//gdgd { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(92, 99))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to Auftragshaus"); } else if (Settings._AutoArbeiter) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), Settings.CaptchaCrackerPlace)); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to captchacracking-point"); } else if (Settings._huntingArea == "Random") { if (Settings.usediebeshoehle) { Paths._Actual.AddRange(pathFinder.RandomWay(new Point(getStats.px(), getStats.py()))); } else { Paths._Actual.AddRange(pathFinder.RandomWayWithoutDiebeshöhle(new Point(getStats.px(), getStats.py()))); } Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to next randompoint"); } else if (actual.startPoint.X == getStats.px() & actual.startPoint.Y == getStats.py()) { Paths._Actual.AddRange(actual.Way); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move way @" + actual.Name); } else { if (actual.Name != "StandAndWait") { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), actual.startPoint)); } } } } if (Settings._Autowalk == false && isWorkerThread) { if ((Paths._Actual == null || Paths._Actual.Count == 0)) { if (Settings.PickUpOil & (DateTime.Now - Settings.LastOilPickUp).Days >= 1) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(103, 117))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to oilpickup"); } else if (Settings.PickUpFederation && (DateTime.Now - Settings.LastFederationPickUp).Days >= 1) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(87, 112))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to federationpickup"); } else if (Settings.PickUpSumpfgas && (DateTime.Now - Settings.LastSumpfgasPickUp).Days >= 1) { Paths._Actual.AddRange(pathFinder.Directions(new Point(getStats.px(), getStats.py()), new Point(76, 104))); Settings.Action.Add(DateTime.Now.ToShortTimeString() + " " + "Move to gaspickup"); } } } } catch (Exception r) { } }