public static void MoveitemTypeToMatBox(ushort amount, int totalItems) { UO.Print("Vyber typ >"); UOItem type = new UOItem(UIManager.TargetObject()); UOItem containerFrom = new UOItem(type.Container); UO.Print("Material Box do >"); UOItem containerTo = new UOItem(UIManager.TargetObject()); Graphic typeG = type.Graphic; UOColor typeC = type.Color; int sychr = 0; int count = 0; while (containerFrom.Items.FindType(typeG, typeC).Exist) { sychr++; UOItem item = containerFrom.Items.FindType(typeG, typeC); UO.DeleteJournal(); item.Move(amount, World.Player.Backpack); item.WaitTarget(); containerTo.Use(); Game.Wait(600); if (Journal.Contains(false, "V boxu muze byt maximalne 15 000 kusu!")) { UO.Print("Naplnena kapacita boxu!"); break; } count += amount; if (totalItems > 0 && count >= totalItems) { break; } UO.Print("Total: " + count); } UO.Print("Konec prenosu."); }
public void pois() { if (PoisonColor == default(ushort)) { UO.PrintError("Nemas nastaveny poison"); return; } UOItem zbran = World.Player.Layers[Layer.RightHand]; UOItem pois = World.Player.Backpack.AllItems.FindType(0x0F0E, PoisonColor); if (pois == null) { UO.PrintError("Nemas nastaveny typ poisonu"); return; } UO.Warmode(false); zbran.WaitTarget(); pois.Use(); }
public void recharge(int pocet) { UO.Print("Vyber krystal"); UOItem krystal = new UOItem(UIManager.TargetObject()); Graphic g = krystal.Graphic; UOColor c = krystal.Color; UO.Print("Vyber co nabijet"); UOItem cil = new UOItem(UIManager.TargetObject()); for (int i = 1; i <= pocet; i++) { UO.DeleteJournal(); UO.UseType(g, c); cil.WaitTarget(); UO.Wait(500); while (!UO.InJournal("Item has been recharged")) { UO.Wait(500); } } UO.Print("Hotovo."); }
private void Unload() { Recall(0); UOItem dltmp = new UOItem(DoorLeft); UOItem drtmp = new UOItem(DoorRight); if (dltmp.Graphic == DoorLeftClosedGraphic) { dltmp.Use(); } if (drtmp.Graphic == DoorRightClosedGraphic) { drtmp.Use(); } UO.Wait(200); MoveTo(HomeLocation); openBank(14); UO.Wait(500); UOItem box = new UOItem(LogsBox); box.Use(); UO.Wait(500); UOItem resourceBox = new UOItem(ResourceBox); resourceBox.Use(); UO.Wait(500); new UOItem(World.Player.Layers.First(x => x.Graphic == Log)).WaitTarget(); UO.Say(".movetype"); box.WaitTarget(); UO.Wait(500); foreach (var it in World.Player.Backpack.Items.Where(x => x.Graphic == Log)) { it.Move(ushort.MaxValue, box); UO.Wait(200); } UO.Wait(100); int tmpCnt = World.Player.Layers.Count(x => x.Graphic == 0x0F47 || x.Graphic == 0x0F48); if (tmpCnt == 0) { tmpCnt = resourceBox.AllItems.Count(x => x.Graphic == 0x0F47 || x.Graphic == 0x0F48); if (tmpCnt == 0) { UO.PrintError("Nemas battle axe"); UO.TerminateAll(); } else { new UOItem(resourceBox.AllItems.First(x => x.Graphic == 0x0F47 || x.Graphic == 0x0F48)).Move(1, World.Player.Backpack); } } tmpCnt = World.Player.Layers.Count(x => x.Graphic == 0x1407 || x.Graphic == 0x1406); if (tmpCnt == 0) { tmpCnt = resourceBox.AllItems.Count(x => x.Graphic == 0x1407 || x.Graphic == 0x1406); if (tmpCnt == 0) { UO.PrintError("Nemas war mace"); UO.TerminateAll(); } else { new UOItem(resourceBox.AllItems.First(x => x.Graphic == 0x1407 || x.Graphic == 0x1406)).Move(1, World.Player.Backpack); } } SelfFeed(); resourceBox.Use(); if (World.Player.Backpack.AllItems.FindType(0x1F4C).Amount < 8) { resourceBox.AllItems.FindType(0x1F4C).Move(9, World.Player.Backpack); } // GH if (World.Player.Backpack.AllItems.FindType(0x0F0E, 0x0160).Amount < 1) { resourceBox.AllItems.FindType(0x0F0E, 0x0160).Move(2, World.Player.Backpack); } // Invisky if (World.Player.Backpack.AllItems.FindType(0x0F0E, 0x0447).Amount < 1) { resourceBox.AllItems.FindType(0x0F0E, 0x0447).Move(2, World.Player.Backpack); } UO.Wait(200); Recall(1); }