///////////////////////////////////////////////////////////////////////// // // www.ultima.smoce.net // Name: Vybírání pytlíků (pro mapkáře) // ///////////////////////////////////////////////////////////////////////// using System; using System.Collections.Generic; using System.Text; using Phoenix; using Phoenix.WorldData; using System.Linq; using Phoenix.Communication; using Phoenix.Runtime; using Phoenix.Runtime.Reflection; namespace Scripts.DarkParadise { public class ultima_smoce_net_1779635034 { [Executable] public void vyberpytle() { UO.Print("Kde jsou pytliky?"); UOItem pytelhlavni=new UOItem(UIManager.TargetObject()); UO.Print("Kam hodit jejich obsah?"); UOItem pytelcil=new UOItem(UIManager.TargetObject()); pytelhlavni.Use(); while (!pytelhlavni.Opened){ UO.Wait(500); } ItemsCollection colhlavni=pytelhlavni.AllItems; IEnumerator enhlavni=colhlavni.GetEnumerator(); while (enhlavni.MoveNext()) { UOItem itemhlavni=enhlavni.Current; if (itemhlavni.Graphic.ToString().Equals("0x0E76")){ itemhlavni.Use(); while (!itemhlavni.Opened){ UO.Wait(500); } ItemsCollection col=itemhlavni.AllItems; IEnumerator en=col.GetEnumerator(); while (en.MoveNext()) { UOItem item=en.Current; UO.MoveItem(item.Serial, 0, pytelcil.Serial); } UO.MoveItem(itemhlavni.Serial, 0, UO.Backpack); UO.UseType(0x0E3F); itemhlavni.WaitTarget(); UO.Wait(500); } } } } }