Sooooo I've been working on a way to read current gold in-game. Still in progress but with some implementation and everything we'll be able to calculate how much golds the script have made since it's first run and also calculate an average of how many golds per hours, generate statistics, etc... You'll need new PNG (1920x1080) see attachment.
Code:
; Requires new PNG for digits, see forums
Func ReadGold() ; Experimental, right now won't work below 10k golds (if that's your case please shoot yourself). Requires 1920x1080
$Gold = 0
$Retval = 0
$gX = 0
$gY = 0
$Step = 0
$i = 0
$j = 0
For $j = 1 to 13
For $i = 1 to 10
$Retval = _ImageSearchArea($pngLoc & $i & ".png",0,Round((1464+$Step)*$x_ratio),Round(509*$y_ratio),Round((1464+$Step+9)*$x_radio),Round(525*$y_ratio),$gX,$gY,20)
if $Retval = 1 Then
;Msgbox("","Found something!","j=" & $j & " i=" & $i & " Pos=" & 1465+$Step & " - " & 1465+$Step+9) ; DEBUG
Switch $j
Case 1
$Gold += $i * 1000000000
Case 2 ; Comma
Case 3
$Gold += $i * 100000000
case 4
$Gold += $i * 10000000
case 5
$Gold += $i * 1000000
case 6 ; Comma
case 7
$Gold += $i * 100000
case 8
$Gold += $i * 10000
case 9
$Gold += $i * 1000
case 10 ; Comma (Above 10k golds)
case 11
$Gold += $i * 100
case 12
$Gold += $i * 10
case 13
$Gold += $i * 1
EndSwitch
ExitLoop
Endif
Next
if $j = 2 or $j = 6 or $j = 10 then
$Step += 5
Else
$Step += 9
endif
Next
;Msgbox("","Gold",$Gold) ; DEBUG
Return $Gold
EndFunc
digits.zip