12-08-2014, 03:46 PM
(12-07-2014, 03:24 AM)Captain Planet Wrote: If i were to make a bot for myself.. u guys have any samples for me to learn?
Or is it impossible for someone like me with no experience to do a bot?
haha don't worry, I have zero experience in botting myself, just some basic programming background.
here's the function I wrote for reading gold and elixir (bluestacks resolution 800x600)
Code:
Func ReadValue()
$Read = _TesseractWinCapture("BlueStacks App Player,"",0,"",1,2,42,70,660,490,0) ;Capture screen region with gold and elixir
$Read = StringSplit(StringStripWS($Read, 1+2+4), @CRLF) ;Strip whitespaces & blank lines and split into array
$Gold = Number(StringStripWS($Read[2], 8)) ;Convert gold to number
$Elixir = Number(StringStripWS($Read[3], 8)) ;Convert exlir to number
;$Dark = Number(StringStripWS($Read[4], 8)) ;Convert dark to number
;MsgBox(0,"Result", "Gold: " & $Gold & @CR & "Elixir: " & $Elixir & @CR & "Dark: " & $Dark)
EndFunc