Ok here is a proof of concept that allows normal left mouse clicks through (to swing the tool) and then follows up with some movement forward based off of the variables saved in the script (you can set them to the speed of your character that is listed in-game and to how far you want each click to move you in blocks/meters)
if you have autohotkey installed you can just copy past it into notepad and save it as a .ahk fileā¦ or as a .txt file and then rename it to a .ahk
I also added a bunch of comments to help explain what is going onā¦ first time writing one out for someone else to use/tinker withā¦ so who knows if they will help =P
Edit: I made some additions and tweaks to the first version as i used it on my farmsā¦ it now starts suspended so you donāt loose mouse functionality the moment you start it. I moved the harvesting to the right button (since that is my pref) and added a hotkey to the left mouse button to take a short step back as needed since the script moves me a tad too far each action. all in all it made for a nice relaxing one-handed experience ^^
Mouse only-ish Harvesting
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
ListLines Off
; the bits above are mostly standard recommended stuff for any script - they are not 100% necessary
Suspend on ; starts the script suspended so you can still use the mouse buttons
; ////////////////
; Variables
; ////////////////
Distance:= 2.825 ; how far you want the character to travel each time
Speed:= 5.15 ; Speed of the character - This can be found under Character > Profile > Motion and action in game
; I set my speed a tad faster than listed in-game since the game displays rounded values
Time:= Distance / Speed * 1000 ; this tries to determine how long to hold the move key (in milliseconds) to travel the given distance
; ////////////////
; The action
; ////////////////
~RButton:: ; this sets the button that will trigger the action. LButton for left click if you prefer
; The " ~ " symble allows the normal function of the key fire
; this means that we only have to worry about sending the move key
{
KeyWait RButton ; this waits for the key to be released before moving on
; not exactly necessary but it can help prevent problems if you hold the button down
sleep, 200 ; tells the script to wait in ms. 1000ms = 1 second
; this gives the game time to swing the tool before moving the character
Send {w down} ; presses/sends the "w" key down
; Boundless seems to like seeing separate "downs" and "ups" for each key
sleep, %Time% ; waits for the amount of time set by the above formula & variables
Send {w up} ; sends the " w " key up / releases it
}
Return ; establishes an " end point " or stopping place for the above hotkey
; without this autohotkey would continue executing whatever is next
; setting up a new hotkey on left mouse button to take a short step back as needed
LButton:: ; this sets the button that will trigger the action. RButton for right click if you prefer
; since i left out the " ~ " normal LButton function will be blocked / unsent
{
KeyWait LButton ; this waits for the key to be released before moving on
; not exactly necessary but it can help prevent problems if you hold the button down
Send {s down} ; presses/sends the "w" key down
; Boundless seems to like seeing separate "downs" and "ups" for each key
sleep, 50 ; waits for the amount of time set by the above formula & variables
Send {s up} ; sends the " w " key up / releases it
}
Return
f2:: ; setting up a hotkey on " F2 " Since there is no " ~ " in front of it, the normal F2 function will be blocked / unsent
Suspend, Permit ; this allows the hotkey to work even if the scrip is suspended
{
Reload ; this reloads the script (and loads any new changes) - handy for testing if you are making frequent small changes
}
return
f3:: Suspend ; sets a hotkey to turn on and off the hotkeys if you need them to behave normally without closing the script
return
(first version) Click to Harvest autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
ListLines Off
; the bits above are mostly standard recommended stuff for any script - they are not 100% necessary
; ////////////////
; Variables
; ////////////////
Distance:= 2.7387 ; how far you want the character to travle each time
Speed:= 6.3 ; Speed of the character - This can be found under Character > Profile > Motion and action in game
Time:= Distance / Speed * 1000 ; this tries to determine how long to hold the move key to travel the given distance
; ////////////////
; The action
; ////////////////
~LButton:: ; this sets the button that will trigger the action. RButton for right click if you prefer
; The " ~ " symbol allows the normal function of the key fire
; this means that we only have to worry about sending the move key
{
KeyWait LButton ; this waits for the key to be released before moving on
; not exactly necessary but it can help prevent problems if you hold the button down
sleep, 200 ; tells the script to wait in ms. 1000ms = 1 second
; this gives the game time to swing the tool before moving the character
Send {w down} ; presses/sends the "w" key down
; Boundless seems to like seeing separate "downs" and "ups" for each key
sleep, %Time% ; waits for the amount of time set by the above formula & variables
Send {w up} ; sends the " w " key up / releases it
}
Return ; establishes an " end point " or stopping place for the above hotkey
; without this the autohotkey would continue executing whatever is next
f2:: ; setting up a hotkey on " F2 " Since there is no " ~ " in front of it, the normal F2 function will be blocked / unsent
Suspend, Permit ; this allows the hotkey to work even if the scrip is suspended
{
Reload ; this reloads the script (and loads any new changes) - handy for testing if you are making frequent small changes
}
return
f3:: Suspend ; sets a hotkey to turn on and off the hotkeys if you need them to behave normaly without closing the script
return
The equation solution is a bit better than using trial and error to find how long to hold the move key to travel x blocks/meters but itās still quite flawed. Since the game lists rounded values for speeds and the character seems to āslide to a stopā a bit after you let up the movement key, you will always travel a bit farther than the distance save in the script (unless you set your speed faster than displayed in-game). This sliding seems to get worse as you increase your speed, so fine tuning will still be necessary with each change in character speedā¦ not to mention itās hard to look perfectly strait aheadā¦ so drifting side to side will increase the distance needing to be traveled and therefore add variability in performanceā¦
In other words each movement wonāt be exactly 3 blocks and every so often you will need to take an extra step forward / back or readjust the camera angle etc
a work around would be to snoop the coordinates from the game and base movement off of thatā¦ which is possible, but much more complicated and each game patch would break the scrip until the script is updated tooā¦ fun times hehe
sorry if that got a bit too long windedā¦ i tend to get carried away O.o