[Release] Free FFXIV Fishing bot. Works with 2.5.1

03/28/2015 12:41 LuckOnCooldown#46
So, about the hotbar parsing issue. Thanks to TomHanks, I can break it any time I want now. Entering an instance and then teleporting anywhere causes the 4th pointer in the chain that I'm using to break.

I could fix it right now by simply subtracting 0x19000 from the new pointer when I see it change, but that's not the right way to fix it. Clearly, even though I found a static pointer that leads to the hotbars, it's the wrong one. It might be a couple of days, but I'll need to find another static pointer to use.

Sorry about that, for now, you'll just have to log out and back in if you get this particular issue. I'll do my best to get it fixed ASAP.

Quote:
Originally Posted by jelio View Post
Wow, thanks for your great efforts so far. I'm happy you've used sig scanning and avoided writing to the game. Also, reading the hotbar data to get hotkeys is a nice touch.

1. Multi client support.

2. Add more verbose log messages.

3. Include tug type in the catch log.

4. Double check all addresses after returning to the character select screen and logging into a different character.

5. Play the error sound and stop the bot when receiving chat message type 0x0050.

6. Automatically start the bot when casting in-game.
1. I'll be happy to look at adding multi client support once what I have is stable for everyone.

2. If it encounters a missing state, it already notifies you in the status bar. The log message are as verbose as they need to be for the purposes of debugging. If you feel there is some information that I could put there that would be relevant to you, then by all means, let me know. :)

3. This is a good idea, and I'll implement it as soon as I stabalize the current code.

4. Already done

5. Yeah...chat log...I'm not going to be dealing with that any time soon. For now, you'll just have to watch and see if you get any tells from GMs :D

6. I don't think I can do that, at least not easily. Maybe that can be a version 2 feature as it would require some architectural changes.

UPDATE:
New verison 0.9.6 is up. This version *should* (cross your fingers) fix all the hotbar parsing issues that people are seeing. I got lucky and found a new pointer to use quickly. Let me know if it's still breaking for anyone!
03/28/2015 14:07 jelio#47
Thanks for the consideration and your work. I think once the catch log includes tug strength, the status log is okay like it is for usability. I suppose including the tug strength and reeling strength/quality in the status log is neat, but not really necessary. No worries about the auto-stop either - it was just an idea I thought of when I read your introduction regarding detection.
03/28/2015 14:17 LuckOnCooldown#48
In case it was missed in my previous post, version 0.9.6 is up, and *should* fix the hotbar parsing issues for everyone. Although, cross hotbars are still not supported. I want to make sure everything is stable before adding new features.

Thanks!
03/28/2015 15:09 tomhanks123#49
Quote:
Originally Posted by LuckOnCooldown View Post
In case it was missed in my previous post, version 0.9.6 is up, and *should* fix the hotbar parsing issues for everyone. Although, cross hotbars are still not supported. I want to make sure everything is stable before adding new features.

Thanks!
So far so good, I manage to run the program without closing ffxiv client at all :3 Good job! Let you know if I find anything. (hopefully I won't~)
03/28/2015 15:29 jelio#50
This situation happens with 0.9.6 for me:

Quote:
[9:36:27] Casting fishing line!
[9:36:40] You got a bite!
[9:36:49] You caught a Merlthor Goby HQ!
[9:36:50] Mooching to catch a bigger fish!
[9:36:52] Expected status 'Casting' or 'Fishing', but got: 'Fishing Stance'
[9:36:52] Bot stopped!
Mooch is checked. The buttons on hotbar 1 are:

1 Cast
2 Hook
3 Cast
4 Truth of Mountains
5 Mooch
C Cast Light
F Stealth
V Empty
G Fishing Log
0 Release
- Quit

Instead of 5 (Mooch), it hits 2 (Hook).


With the same hotbar layout and the timer set from 12am to 3am, if I press Start when it is 3:20AM for example, it will proceed as expected.

[10:01:08] Bot Started!
[10:01:08] Waiting for appropriate time...

However, if I press Stop, the button will display Start as expected of being in the Stopped state, but then it will press 3 (Cast) and report

[10:01:51] Casting fishing line!

If I then press the Start button again, it will crash with an Unhandled exception error.


With the same hotbar layout and the timer set from 12am to 9am, while fishing from 8:30am it will fish as normal. After 9am it will pause and report "Waiting for appropriate time..." as expected, but then it will press 2 (Hook) and leave the character in the idle fishing state. I believe the expected behavior is to press Quit in this circumstance.


I've noticed the delay after hooking can be a bit long sometimes (1-1.5 seconds). I wonder if that could be made quicker, like as soon or shortly after the button lights up again.


This might be ugly/unfriendly/complex, but I wonder if we could fine tune which tugs to ignore depending on what our last mooch was. I suppose the current setting would apply to non mooches, and then there could be checkboxes on each HQ Fish in the Catch Log to ignore different tugs. I believe some mooch chains could be improved a lot by this, such as with the Octomammoth.


When logging out of the game and logging into another character as I previously described, the "Unable to parse hotbars!" error still occurs in 0.9.6.


Regarding modifier keys. I also had a problem with modifier keys being sent correctly using AutoHotKey. When the program doesn't have focus it may be set to run at a low framerate (~5 fps = 83 ms draw interval). Using ControlSend and SetKeyDelay, I use a press period of 83 ms and a delay of 83 ms, with modifier downs and ups being sent before and after the normal keystroke. In AHK it looks like:

SetKeyDelay, 83, 83
ControlSend, , {Shift down}c{Shift up}, ahk_id %sending_id%

The effect ends up being: modifier down, 83ms pause, 83ms pause, keystroke down, 83ms pause, keystroke up, 83ms pause, modifier up. The double pause after the modifier down can probably be eliminated and this could probably be safely sped up a bit. As far as which Windows call AutoHotKey uses for ControlSend, I don't know, but perhaps you could look at adding some pauses.
03/28/2015 18:48 LuckOnCooldown#51
Quote:
Originally Posted by jelio View Post
This situation happens with 0.9.6 for me:



Mooch is checked. The buttons on hotbar 1 are:

1 Cast
2 Hook
3 Cast
4 Truth of Mountains
5 Mooch
C Cast Light
F Stealth
V Empty
G Fishing Log
0 Release
- Quit

Instead of 5 (Mooch), it hits 2 (Hook).


With the same hotbar layout and the timer set from 12am to 3am, if I press Start when it is 3:20AM for example, it will proceed as expected.

[10:01:08] Bot Started!
[10:01:08] Waiting for appropriate time...

However, if I press Stop, the button will display Start as expected of being in the Stopped state, but then it will press 3 (Cast) and report

[10:01:51] Casting fishing line!
Ok, I know why it does this, I'll fix it.

Quote:
If I then press the Start button again, it will crash with an Unhandled exception error.
And I know why it does this. I used to have code protecting against it, and it got lost during a refactor. I'll fix this as well.

Quote:
With the same hotbar layout and the timer set from 12am to 9am, while fishing from 8:30am it will fish as normal. After 9am it will pause and report "Waiting for appropriate time..." as expected, but then it will press 2 (Hook) and leave the character in the idle fishing state. I believe the expected behavior is to press Quit in this circumstance.
Yep, it was trying to press quit, and I believe the issue is because you have quit on your '-' key. That's another case I didn't account for. I'll have to add code supporting symbols as hotkeys.

Quote:
I've noticed the delay after hooking can be a bit long sometimes (1-1.5 seconds). I wonder if that could be made quicker, like as soon or shortly after the button lights up again.
It's random, on purpose. It looks more like an actual person fishing that way. I'll look into waiting until the button is enabled again, and then using a shorter random delay.

Quote:
This might be ugly/unfriendly/complex, but I wonder if we could fine tune which tugs to ignore depending on what our last mooch was. I suppose the current setting would apply to non mooches, and then there could be checkboxes on each HQ Fish in the Catch Log to ignore different tugs. I believe some mooch chains could be improved a lot by this, such as with the Octomammoth.
I'll put it on my requested feature list.

Quote:
When logging out of the game and logging into another character as I previously described, the "Unable to parse hotbars!" error still occurs in 0.9.6.


Regarding modifier keys. I also had a problem with modifier keys being sent correctly using AutoHotKey. When the program doesn't have focus it may be set to run at a low framerate (~5 fps = 83 ms draw interval). Using ControlSend and SetKeyDelay, I use a press period of 83 ms and a delay of 83 ms, with modifier downs and ups being sent before and after the normal keystroke. In AHK it looks like:

SetKeyDelay, 83, 83
ControlSend, , {Shift down}c{Shift up}, ahk_id %sending_id%

The effect ends up being: modifier down, 83ms pause, 83ms pause, keystroke down, 83ms pause, keystroke up, 83ms pause, modifier up. The double pause after the modifier down can probably be eliminated and this could probably be safely sped up a bit. As far as which Windows call AutoHotKey uses for ControlSend, I don't know, but perhaps you could look at adding some pauses.
Thank you so much for that. I'll give it a shot and see if that fixes the issue. It's been a HUGE problem for me.
03/28/2015 19:08 Bulletheart#52
Quote:
Originally Posted by LockOnCooldown
Are you using the english game client? No offense, but you don't sound like English is your first language, and it currently only works with the english client.
No, i´m from germany. Thanks for the info ;) I install now the english client.
03/29/2015 00:12 tomhanks123#53
Hmm, still encountering an error when fish gets away sometimes

12:10:57] You got a bite!
[12:10:59] Your fish got away!
[12:11:01] Something went wrong. Could not Mooch or Cast
[12:11:01] Bot stopped!

Hmm it actually didn't hook the fish, that's why it came up with the your fish got away error. happened persistently but was fixed when i reloaded the program.
03/29/2015 00:28 LuckOnCooldown#54
Quote:
Originally Posted by tomhanks123 View Post
Hmm, still encountering an error when fish gets away sometimes

12:10:57] You got a bite!
[12:10:59] Your fish got away!
[12:11:01] Something went wrong. Could not Mooch or Cast
[12:11:01] Bot stopped!

Hmm it actually didn't hook the fish, that's why it came up with the your fish got away error. happened persistently but was fixed when i reloaded the program.
Ok, I'll comment out the Hook command and see what it does. If it's broken, I'll fix it. Were you typing in chat at the time? There is code that prevents it from attempting to send a command if your cursor is in the chat window. It will wait for you to finish or press escape.

Edit: btw, the way, if it printed "You got a bite!" it *had* to send the hook command. There's no way it couldn't have:

Code:
PressKey("Hook");
messagebox.AddMessage("You got a bite!");
03/29/2015 01:25 tomhanks123#55
Quote:
Originally Posted by LuckOnCooldown View Post
Ok, I'll comment out the Hook command and see what it does. If it's broken, I'll fix it. Were you typing in chat at the time? There is code that prevents it from attempting to send a command if your cursor is in the chat window. It will wait for you to finish or press escape.

Edit: btw, the way, if it printed "You got a bite!" it *had* to send the hook command. There's no way it couldn't have:

Code:
PressKey("Hook");
messagebox.AddMessage("You got a bite!");
Actually yeah you're right, it actually did hook it, it happened 4 in a row so I thought for a moment it didn't hook but it did. But it seems the error happens when the fish gets away (sometimes). Also wasn't typing. Here is a lengthier log of a recent attempt:

[1:24:44] Casting fishing line!
[1:25:07] You got a bite!
[1:25:10] Your fish got away!
[1:25:12] Casting fishing line!
[1:25:37] You got a bite!
[1:25:39] Your fish got away!
[1:25:41] Something went wrong. Could not Mooch or Cast
[1:25:41] Bot stopped!
[1:25:46] Bot Started!
[1:25:46] Casting fishing line!
[1:26:10] You got a bite!
[1:26:13] Your fish got away!

Do you think it's because when the fish gets away, the reel animation is shortened so the cast happens too quickly? (if that makes any sense)
03/29/2015 03:00 LuckOnCooldown#56
Eh, it could be a delay thing, or some other small bug. I'll work on figuring it out later tonight, and I'll let you know :)

Edit: That's really strange, you can see the two second delay between "Your fish got away" and "Something went wrong..".

The thing is, the logic requires that you already be in fishing stance before it ever prints "Your fish got away", so the Cast button should be enabled 100 percent of the time at that point...odd...
03/29/2015 03:10 LuckOnCooldown#57
Try this build for me man, and see if you have the same problem, or if I completely broke it. It works for me! lol
03/29/2015 03:34 tomhanks123#58
Quote:
Originally Posted by LuckOnCooldown View Post
Try this build for me man, and see if you have the same problem, or if I completely broke it. It works for me! lol
So far so good :o
03/29/2015 07:47 jelio#59
Quote:
Originally Posted by jelio View Post
This situation happens with 0.9.6...
Just reporting in that these bugs appear to be fixed in 0.9.7, except for the Unable to parse hotbar error after logging into a different character (understandably).
03/29/2015 08:27 LuckOnCooldown#60
Quote:
Originally Posted by jelio View Post
Just reporting in that these bugs appear to be fixed in 0.9.7, except for the Unable to parse hotbar error after logging into a different character (understandably).
I'm having trouble reproducing that issue Jelio...