//--------------------------------------------------------------------------------------------- public static void TrainTinkering(UOColor color, Graphic product, params string[] menus) { UO.Print("Vyber container z ingoty:"); UOItem containerFrom = new UOItem(UIManager.TargetObject()); if (containerFrom.Exist) { UO.Print("containerFrom.Exist:"); UOItem ingotSource = new UOItem(Serial.Invalid); UOItem ingot = new UOItem(Serial.Invalid); if (!(ingot = Mining2.FindIngot(UO.Backpack.Items, (int)Mining2.OreColor.Iron)).Exist || ingot.Amount < 20) { ingot = Mining2.FindIngot(containerFrom.Items, (int)Mining2.OreColor.Iron); ingot.Move(20, UO.Backpack.Serial); Game.Wait(); } UO.Print("while.Exist:" + color); while ((ingotSource = Mining2.FindIngot(containerFrom.Items, color)).Exist) { UO.Print("while.Exist:"); ingotSource.Move(100, UO.Backpack.Serial); Game.Wait(); while ((ingot = Mining2.FindIngot(UO.Backpack.Items, color)).Exist) { UO.Print("while2.Exist:"); JournalEventWaiter jew = new JournalEventWaiter(true, "You put the", "Tinkering failed"); UO.WaitMenu(menus); UOItem tools = UO.Backpack.Items.FindType(TinkersTools); if (tools.Exist) { tools.Use(); jew.Wait(7500); if (Journal.Contains(true, "You can't make anything with what you have")) { Journal.Clear(); break; } } else { UO.Print("Nejsou toolsy."); break; } } UOItem hinge = UO.Backpack.Items.FindType(product); if (hinge.Exist) { hinge.Move(1000, containerFrom.Serial); Game.Wait(); } } } UO.Print("Konec"); }
public static void CraftPickAxes() { while (Mining2.FindIngot(UO.Backpack.AllItems).Exist&& UO.Backpack.AllItems.FindType(0x1BDD).Exist)//log { JournalEventWaiter jew = new JournalEventWaiter(true, "You put the", "You have failed"); UO.WaitMenu("Blacksmithing", "Tools", "Tools", "Pick axe"); Mining2.FindIngot(UO.Backpack.AllItems).Use(); jew.Wait(6000); } }