julianperrott/FishingFun

Looting Error

Corepoint043 opened this issue · 12 comments

Today, after maintenance on 07/22/2020, looting has not been functioning. The cursor will move to the bobber but gets teleported just before it loots to the top left corner of the screen and then returns to the bobber. The program was working fine for me the day before and I hadn't changed any settings. Behavior is consistent even after a fresh download and full system restart.

Also having the same issue, just want to say that this Is an excellent program and appreciate you sharing with us.

I am also have the looting error. It clicks the bobber but nothing is actually looted.

It seems after some testing the mouse is moving to the correct spot but the right click is not being recognized and the lure is just being recast.

I seem to be having the same issue

Hi guys, I also had this problem, I've made some changes to my version to get the right click working again, but you'll need to build it yourself.

The changes I made are in the /Source/GuyGotBot/Platform/WowProcess.cs file, you can see my version of the file here https://pastebin.com/3SsBuiHN

Hope this helps.

Hi, sorry it it has been broken for a while. Funny, but it still works for me as I used it yesterday.

Anyway, I have changed the right clicking to use @liamcooper method. Please get the latest and let me know if it is fixed now.

Is there som way to delay the rightclick when it needs to click the bobber? Mine moves the screen abit when it wants to loot.
Rookie at coding, so excuse me if its a dumb question :)

I just can't find that juicy sweetspot. Still moving screen 1 in 20 loots.
I disabled all addons with fastloot, i do have autoloot without key modifier on & changed the sleep value after the loot to 3000ms to give it some time between casts. Tried messing around with the sleep value before the cast (from 1000-3000 in steps of 100), but just can't get it right. What am i doing wrong? Is there anyway to code a security to not change the camera view?

thanks in advance

The screen probably moves because the mouse position is moved when the mouse button is down.

public static void RightClickMouse_LiamCooper(ILog logger, System.Drawing.Point position)
        {
            var activeProcess = GetActiveProcess();
            var wowProcess = WowProcess.Get();
            if (wowProcess != null)
            {
                var oldPosition = System.Windows.Forms.Cursor.Position;
                System.Windows.Forms.Cursor.Position = position;
                mouse_event((int)MouseEventFlags.RightDown, position.X, position.Y, 0, 0);
                Thread.Sleep(30 + random.Next(0, 47));
                mouse_event((int)MouseEventFlags.RightUp, position.X, position.Y, 0, 0);
                RefocusOnOldScreen(logger, activeProcess, wowProcess, oldPosition);
            }
 }

I assume the method above is the right click you are using ?

Try adding a delay after System.Windows.Forms.Cursor.Position = position

Or perhaps move the mouse position to the position, using either:
SetCursorPos(position.X, position.Y);
or
for (int i = 20; i > 0; i--) { SetCursorPos(position.X + i, position.Y + i); Thread.Sleep(1); }

include a little Thread.Sleep after, then call the mouse_event((int)MouseEventFlags.RightDown, position.X, position.Y, 0, 0);

or perhaps the RefocusOnOldScreen is messing things up (probably not, but try commenting it out) ?

It is hard to fix when I don't see the issue. Good luck.

Mate, you're a hero!

    public static void RightClickMouse_LiamCooper(ILog logger, System.Drawing.Point position)
    {
        var activeProcess = GetActiveProcess();
        var wowProcess = WowProcess.Get();
        if (wowProcess != null)
        {
            var oldPosition = System.Windows.Forms.Cursor.Position;

            System.Windows.Forms.Cursor.Position = position;
            Thread.Sleep(1000);
            mouse_event((int)MouseEventFlags.RightDown, position.X, position.Y, 0, 0);
            Thread.Sleep(30 + random.Next(0, 47));
            mouse_event((int)MouseEventFlags.RightUp, position.X, position.Y, 0, 0);
            RefocusOnOldScreen(logger, activeProcess, wowProcess, oldPosition);
        }
    }

Adding a delay before the rightclick fixed my issue.
Thank you very much. <3

Added a delay to right click in the code.