Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



 961

[HEARTHSTONE] AFK XP/Gold Farming Bot (AHK)

by D3ViANCE - 17 March, 2021 - 09:43 PM
This post is by a banned member (D3ViANCE) - Unhide
D3ViANCE  
Registered
3
Posts
1
Threads
3 Years of service
#1
(This post was last modified: 17 March, 2021 - 09:46 PM by D3ViANCE.)
Hey everyone,

First time here! Just wanted to share this with anyone who might be interested in it.

The reason why there are almost no HS farming bots, is because it's really easy to do yourself, a simple auto-clicker is enough for the game not to kick you out..

The sole purpose of why I made this for myself is, to make it a bit(!) more believable that a real human is playing (to decrease the number of reports I'm getting) and to maximize the amount of gold I farm every day by making every game as long as I can

Features:
  • 250 gold / 8 hours
  • you win about 2 out of 10 games (extra gold)
I'm using a Druid deck with lots of taunt and a bit of healing to prolong the game as much as possible, which will decreases the time spent in menus (not giving XP)

Show ContentSpoiler:

What it can do:
  • Start a game automatically (from deck choosing menu)
  • Play cards in your hand (left to right)
  • Attack face with friendly minions
  • Target face with heropower (eg. Mage)
  • Attack face with own hero (eg. Druid heropower)
  • Target own face with cards (can use healing card to heal you)
  • Discover cards (to avoid getting stuck and not playing any cards that turn)
  • All delays are randomized (just a precaution)
  • Continue farming if an error occurs (player disconnects before a game)
  • Pause itself if HS is not focused

Only requirement is to run the game in 1080p. Otherwise you have to change all the coordinates, which you can get by pressing F1 while the script is running.

How to use it:
  1. Run HS
  2. Go to the deck choosing phase (can be ranked, casual, tavern, etc.)
  3. Run the script (it waits for 5 seconds after you run it)
  4. Leave the PC and enjoy the XP rewards and gold

You can either download AutoHotkey and save this code into an .ahk file and run it, or use the exe from Mega.

Exe was generated with the official Ahk2Exe app, and I didn't encrypt it in any way, so it should be easy to check for viruses and similar.

Link: https://mega.nz/file/CoAzHa7T#66aYgca3K2...CPPaYO6AdI
 
Code:
#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
SetDefaultMouseSpeed, 0

; COORDS

center = 964
error_button_Y = 670

play_button_X = 1405
play_button_Y = 891

card_Y = 1041
card_X_start = 620
card_X_end = 1230

board_deadzone = 698

self_hero_Y = 820
enemy_hero_Y = 206

board_X_start = 553
board_X_end = 1364
self_board_Y = 600
enemy_board_Y = 412

heropower_X = 1176
heropower_Y = 825


; MAIN LOOP

Sleep, 5000

If !WinActive("ahk_exe Hearthstone.exe")
    WinActivate, % "ahk_exe Hearthstone.exe"
;

Loop {
    checkHs()
    Click %center%, %error_button_Y%
    Sleep, 100
    Click %play_button_X%, %play_button_Y%
    Sleep, 100
    attack_face_hero()
    play_card()
    Random flip_state, 0, 1
    If flip_state
        Click %center%, %self_hero_Y%
    ;
    heropower_face()
    discover_card()
    attack_face()
    Random delay, 1000, 2000
    Sleep %delay%
}
Return


; FUNCTIONS

play_card() {
    global
    act(card_X_start, card_X_end, card_Y, center, self_hero_Y, 60, 50)
}

discover_card() {  ; discover automatically
    global
    act(board_X_start, board_X_end, self_board_Y, board_X_start, self_board_Y, 120, 20)
}

attack_face() {  ; attack face with board
    global
    act(board_X_start, board_X_end, self_board_Y, center, enemy_hero_Y, 80, 40)
}

heropower_face() {  ; hero power to enemy face
    global
    Click %heropower_X%, %heropower_Y%
        delay(50)
    Click %center%, %enemy_hero_Y%
}

attack_face_hero() {  ; attack face with hero
    global
    Click %center%, %self_hero_Y%
        delay(50)
    Click %center%, %enemy_hero_Y%
        delay(50)
}

act(start, end, source_Y, trg_X, trg_Y, incr, min_delay) {
    X := start
    checkHs()
    While X < end {
        Click %X%, %source_Y%
            delay(min_delay)
        MouseMove %trg_X%, %trg_Y%
        Sleep, 200
        Send {LButton}
            delay(min_delay)
        X += incr
    }
}

delay(min) {
    Random delay, %min%, % min + 50
    Sleep delay
}

checkHs() {
    If !WinActive("ahk_exe Hearthstone.exe") {
        Suspend
        Pause
    }
}


; UTILITY

F1::
    MouseGetPos, X, Y
    MsgBox % X . ", " . Y
Return


Home:: Reload

End::
    Suspend
    Pause, , 1
Return

Delete:: ExitApp

I'm might improve this thread with actual stats and data on why it's worth using this over and auto-clicker.
This post is by a banned member (whatupbois) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 2 Guest(s)