Beispiel #1
0
        private static void Drink()
        {
            Item item = !PositionCheck.InKhaldun && !PositionCheck.InFire && !PositionCheck.InWisp ?
                        World.Player.Backpack.FindItem(0x0F06, 0x000C) :
                        WorldEx.FindItemG(0x37B9, 0x098F, i => i.DistanceTo(World.Player) <= GetOrbDistance() + 1) ??
                        WorldEx.FindItemG(0x3728, 0x0A58, i => i.DistanceTo(World.Player) <= GetOrbDistance() + 1) ??
                        World.Player.Backpack.FindItem((ItemID)(World.Player.Poisoned ? 0x0F07 : 0x0F0C), 0x0000);

            if (item != null)
            {
                WorldEx.SendToServer(new DoubleClick(item.Serial));
            }
        }
Beispiel #2
0
        private static void Bank(string[] args)
        {
            Item item = World.Player.Backpack.FindItem(0x1F1C, 0x0489) ??
                        WorldEx.FindItemG(0x1F1C, 0x0489, i => i.DistanceTo(World.Player) < 5);

            if (item != null)
            {
                WorldEx.SendToServer(new DoubleClick(item.Serial));
            }
            else
            {
                WorldEx.SendMessage("No bank crystal found.");
            }
        }
Beispiel #3
0
            public override bool Perform()
            {
                Item barrel = WorldEx.FindItemG(0x0E77, 0x0847, i => i.DistanceTo(World.Player) < 3);

                if (barrel == null)
                {
                    WorldEx.SendMessage("Sud nenalezen.");
                    Parent.Stop();
                }
                foreach (Item item in World.Player.Backpack.FindItems(i => IsFish(i.ItemID)))
                {
                    if (!DragDropManager.HasDragFor(item.Serial))
                    {
                        DragDrop.Move(item, barrel);
                    }
                }
                return(true);
            }
Beispiel #4
0
        private static void Dress(ItemID itemID)
        {
            Item item = WorldEx.FindItem(i => i.ItemID == itemID && i.RootContainer == World.Player && (!i.IsInBank || Bank.Opened))
                        ?? WorldEx.FindItemG(i => i.ItemID == itemID && i.DistanceTo(World.Player) < 3);

            if (item == null)
            {
                foreach (Item cont in WorldEx.FindItemsG(i => i.IsContainer && i.DistanceTo(World.Player) < 3))
                {
                    if ((item = cont.FindItem(itemID)) != null)
                    {
                        break;
                    }
                }
            }
            if (item != null)
            {
                DressInternal(item.Serial);
            }
        }