Exemplo n.º 1
0
 private void UseScrollWisdom(SharpDX.Vector2 scrollPos)
 {
     MouseTools.MoveCursor(MouseTools.GetMousePosition(), new Vector2(scrollPos.X, scrollPos.Y), 22);
     Thread.Sleep(Settings.Speed);
     MouseTools.MouseRightClickEvent();
     Thread.Sleep(Settings.Speed);
     KeyTools.KeyEvent(WinApiMouse.KeyEventFlags.KeyEventShiftVirtual, WinApiMouse.KeyEventFlags.KeyEventKeyDown);
 }
Exemplo n.º 2
0
        private void Indentity()
        {
            if (!_run)
            {
                return;
            }

            var scroll = _inventory.VisibleInventoryItems.FirstOrDefault(element => CheckNameItem(element, "Scroll of Wisdom"));

            if (scroll == null)
            {
                return;
            }
            var scrollPos = scroll.GetClientRect().Center;

            scrollPos.X += GameController.Window.GetWindowRectangle().X;
            scrollPos.Y += GameController.Window.GetWindowRectangle().Y;
            UseScrollWisdom(scrollPos);

            var items = _inventory.VisibleInventoryItems;

            foreach (var child in items)
            {
                if (!_run)
                {
                    KeyTools.KeyEvent(WinApiMouse.KeyEventFlags.KeyEventShiftVirtual, WinApiMouse.KeyEventFlags.KeyEventKeyUp);
                    return;
                }

                var item = child.AsObject <NormalInventoryItem>().Item;
                if (string.IsNullOrEmpty(item?.Path))
                {
                    continue;
                }

                var st = item.Path?.Split('/');

                var modsComponent = item?.GetComponent <Mods>();
                if (modsComponent == null || modsComponent.ItemRarity != ItemRarity.Rare || modsComponent.Identified || string.IsNullOrEmpty(item.Path) ||
                    st[2] == "Maps")
                {
                    continue;
                }

                var position = child.GetClientRect().Center;
                position.X += GameController.Window.GetWindowRectangle().X;
                position.Y += GameController.Window.GetWindowRectangle().Y;
                MouseTools.MoveCursor(MouseTools.GetMousePosition(), new Vector2(position.X, position.Y), 22);
                Thread.Sleep(Settings.Speed);
                MouseTools.MouseLeftClickEvent();
                Thread.Sleep(Settings.Speed);
            }

            Thread.Sleep(Settings.Speed);
            KeyTools.KeyEvent(WinApiMouse.KeyEventFlags.KeyEventShiftVirtual, WinApiMouse.KeyEventFlags.KeyEventKeyUp);
        }
Exemplo n.º 3
0
 private void MouseClickCtrl(SharpDX.Vector2 position)
 {
     MouseTools.MoveCursor(MouseTools.GetMousePosition(), new Vector2(position.X, position.Y), 22);
     Thread.Sleep(Settings.Speed);
     KeyTools.KeyEvent(WinApiMouse.KeyEventFlags.KeyLControlVirtual, WinApiMouse.KeyEventFlags.KeyEventKeyDown);
     Thread.Sleep(Settings.Speed);
     MouseTools.MouseLeftClickEvent();
     Thread.Sleep(Settings.Speed);
     KeyTools.KeyEvent(WinApiMouse.KeyEventFlags.KeyLControlVirtual, WinApiMouse.KeyEventFlags.KeyEventKeyUp);
 }