The Bytecode Club - Reverse Engineering Forum
Developing Bot - Printable Version

+- The Bytecode Club - Reverse Engineering Forum (https://the.bytecode.club)
+-- Forum: Lobby (https://the.bytecode.club/forumdisplay.php?fid=1)
+--- Forum: Game Cheating, Botting & Reverse Engineering (https://the.bytecode.club/forumdisplay.php?fid=97)
+--- Thread: Developing Bot (/showthread.php?tid=155)



RE: Developing Bot - HAX4DAYS - 12-10-2014

(12-10-2014, 08:46 AM)Antidote Wrote:  Since it's quite troublesome to set up everything right, I decided to move everything into one folder to make things easier.
Inside this folder is Tesseract-OCR portable with traineddata included, edited Tesseract.au3 file and Test.au3 script I made to check Tesseract's accuracy.
I personally tested with all 3 resolutions and it works fine. You don't have to install anything. Just open Bluestacks, stay at your main village and open the script. It will begin searching opponents and display gold & elixir on screen. Feel free to tweak the screen region in the script for optimal reading (I'm still experimenting myself) and let me know how it works for you guy Smile
[Image: qJckRZL.png]
https://mega.co.nz/#!Y0NBWbjK!l0m74jAce38PiLUyT4hWUYHtr_397oa4CkSQRzjC_OQ
script only: http://pastebin.com/2gNxVSK1



I click on Test.exe and it does what i said form other post


RE: Developing Bot - Antidote - 12-10-2014

Can you compile and run this script from the same folder? It just display raw output
Code:
#include "Tesseract.au3"
#include <TrayConstants.au3>

$Title = "BlueStacks App Player"
$Full = WinGetTitle ($Title)
$HWnD = WinGetHandle ($Full)
WinActivate ($HWnD)

Global $Left = 45
Global $Top = 70
Global $Right = 660
Global $Bottom = 490
Global $BSsize = WinGetClientSize($hWnd)
Global $x_ratio = $BSsize[0]/800, $y_ratio = $BSsize[1]/600

$Read = _TesseractWinCapture($HWnD,"",0,"",1,2,$Left*$x_ratio,$Top*$y_ratio,$Right*$x_ratio,$Bottom*$y_ratio,0)
MsgBox(0,"Read",$Read)



RE: Developing Bot - HAX4DAYS - 12-10-2014

How do i add it?


RE: Developing Bot - Antidote - 12-10-2014

You need autoit, it's what we've been coding on. Download from here: https://www.autoitscript.com/site/autoit/downloads/
Or download the one I compile for you here: https://www.dropbox.com/s/tc85380ldfvjcl9/Test%20Read.exe?dl=0


RE: Developing Bot - HAX4DAYS - 12-10-2014

I have Autoit. Im going to download the file from dropbox and i will let you know how it went!


RE: Developing Bot - HAX4DAYS - 12-11-2014

It did not recognize the file Im not sure what else to do


RE: Developing Bot - odySSeys - 12-11-2014




RE: Developing Bot - HAX4DAYS - 12-11-2014

How did you get it to work? What did you click on?


RE: Developing Bot - odySSeys - 12-11-2014

(12-11-2014, 05:25 AM)HAX4DAYS Wrote:  How did you get it to work? What did you click on?
I'm guessing the different between you and me is the Tesseract installer (https://code.google.com/p/tesseract-ocr/)
I have tried:
1. Installed Tesseract installer.
2. Placed the Tesseract.au3 into autoit3/include folder
3. Run test.exe (from the packaged file)
4. It work with minor error.

1. Uninstalled Tesseract installer.
2. Placed the Tesseract.au3 into autoit3/include folder
3. Run test.exe (from the packaged file)
4. It just pause at the attack screen.

Give a try, not sure if is able to help you.


RE: Developing Bot - HAX4DAYS - 12-11-2014

I will try when I get home! Thank you so much:-)