//--------------------------------------------------------------------------------------------- protected SekInfo SekTree(StaticTarget tree) { SekInfo info = new SekInfo(); Journal.Clear(); JournalEventWaiter jew = new JournalEventWaiter(true, "akce skoncila"); Nastroj.Use(); UO.WaitTargetTile(tree.X, tree.Y, tree.Z, tree.Graphic); jew.Wait(10000 + LatencyMeasurement.CurrentLatency); info.Mined = Journal.Contains(true, "There are no logs left here to chop"); info.Wrong = Journal.Contains(true, "You can't think of a way to use that item", "That's too far away to chop", "Try chopping a tree"); info.Special = Journal.Contains(true, "You found something special"); return(info); }
//--------------------------------------------------------------------------------------------- public void Lumber() { int iteration = 0; World.Player.RequestStatus(1000); World.Player.Click(); Game.Wait(); bool doLumber = this.GoToNext(); while (doLumber) { UO.Print("doLumber" + iteration); iteration++; UO.Print("doLumber" + lastPositionIndex + " / " + this.Trees.Count); IUOPosition current = this.Trees[lastPositionIndex]; UOItem myDeadBody = this.MyDeadBody(); bool dead = UO.Dead; bool returnToLast = false; bool goToNext = false; bool trainForensic = this.MaxForensicSkill > 0 && !dead && myDeadBody != null && myDeadBody.Exist; this.LastPosition = new UOPosition(World.Player.X, World.Player.Y, 0); UO.DeleteJournal(); if (Game.CurrentGame.WorldSave()) { Game.Wait(30000); if (!dead) { Nastroj.Move(1, World.Player.Backpack); Game.Wait(500); Nastroj.Click(); } Game.Wait(); if (World.Player.Backpack.AllItems.FindType(0x0FF0).Exist) { World.Player.Backpack.AllItems.FindType(0x0FF0).Move(1, World.Player.Backpack);//Sychr test na zasek Game.Wait(); } if (myDeadBody != null && myDeadBody.Exist) { myDeadBody.Click(); } } if (this.EnableVisitorInfo) { VisitorInfo visitor; if (this.NavstevnikHandle(out visitor).Result == ActionResult.Continue) { continue; } if (visitor != null && UO.Dead && visitor.LastVisit != null) { visitor.LastVisit.ZabilMe = true; } } if (World.Player.Warmode) { World.Player.ChangeWarmode(WarmodeChange.Peace); } if (dead) { Game.Wait(60000); this.BezSeResnout(); this.BezLast(); this.VylotSiTelo(); continue; } if (World.Player.Backpack.AllItems.FindType(LogGraphic, 0x0979).Amount >= 3 || World.Player.Backpack.AllItems.FindType(LogGraphic, 0x06D3).Amount >= 2 || World.Player.Backpack.AllItems.FindType(LogGraphic, 0x0972).Amount >= 1 || World.Player.Backpack.AllItems.FindType(LogGraphic, 0x05A6).Amount >= 1 || World.Player.Backpack.AllItems.FindType(LogGraphic, 0x0522).Amount >= 1 ) { this.BezVylozit(); returnToLast = true; } if (this.WeightLimitReached) { this.BezVylozit(); returnToLast = true; } if (!dead && !Nastroj.Exist) { this.BezVylozit(); returnToLast = true; } if (returnToLast) { this.Robot.GoTo(this.LastPosition); } this.VylotSiTelo(); this.DropDeny(); if (trainForensic && SkillsHelper.GetSkillValue("ForensicEvaluation").Value < this.MaxForensicSkill) { Game.Wait(150); UO.Print("Train - ForensicEvaluation"); UO.WaitTargetObject(myDeadBody); UO.UseSkill(StandardSkill.ForensicEvaluation); Journal.WaitForText(true, 2500, "this is body of", "You can tell nothing about the corpse.");// Game.Wait(1500); Game.Wait(150); continue; } StaticTarget target = new StaticTarget(Serial.Invalid, current.X.GetValueOrDefault(), current.Y.GetValueOrDefault(), (sbyte)current.Z.GetValueOrDefault(), TreeGraphic[0]); SekInfo sek = this.SekTree(target); if (sek.Mined || sek.Wrong) { goToNext = true; } this.SeberLogy(); if (goToNext) { this.GoToNext(); } } }