Quick Buy AHK script

General Discussion is for anything related to Blackstone not covered in the other forums.
Post Reply
Drow Arrow
Baron
Baron
Posts: 56
Joined: Sat Jun 12, 2021 9:19 am

Quick Buy AHK script

Post by Drow Arrow »

Hey Folks,

I recently remembered that there was an AHK script on here from a while back to make buying stuff from an store easier but AHK has since deprecated V1 and refined their language with V2 which is now their focus and I decided I'd write a similar script to the one provided by Catopillar, although mine will work slightly differently.

to use this you will need to have AHK V2 installed. For now I'll just be providing the script which you can save into a text document and replace it's extension with .ahk

Code: Select all

#Requires AutoHotkey v2.0-rc.2
#Hotif WinActive("AHK_exe nwmain.exe")

Global DragDistance := 300

; Use Ctrl + F to quickly buy 10 of the item you are hovering the cursor over.
^f:: {
    MouseGetPos &StartX, &StartY
    Loop(10) { ; change the loop count to however many times you want it to make the purchase before stopping
        Click "Down Right"
        Sleep 220
        MouseMove StartX + DragDistance, StartY
        Click "Up Right"
        Sleep 220
        MouseMove StartX, StartY
        }
}
Came up with a second version of the script which also works and is slightly simpler in design:

Code: Select all

#Requires AutoHotkey v2.0-rc.2
#Hotif WinActive("AHK_exe nwmain.exe")

Global DragDistance := 300

; Use Ctrl + F to quickly buy 10 of the item you are hovering the cursor over.
^f:: {
    MouseGetPos &StartX, &StartY
    Loop(10) { ; change the loop count to however many times you want it to make the purchase before stopping
        MouseClickDrag "right", StartX, StartY, StartX + DragDistance, StartY
		sleep 400 ;Adjust the sleep timer to speed up or slow down the buy process
        }
    MouseMove StartX, StartY
}
#Hotif
there are some comments inside the script in case you wish to modify it to your liking, but right now it is setup to buy 10 of whatever you activate it on (the idea being 10 is the stack limit for things like potions and scrolls)

Basic use is as follows:
  1. Put your cursor on the item you want to buy multiple of.
  2. Hold Ctrl and press the F key (Ctrl + F)
Active Characters:
Ragos Meadsmith
Efiel Meadsmith
Ezekial Meadsmith
Parnos Meadsmith
Post Reply