The Bytecode Club
Log inJoin the club
Video Game Reverse Engineering

Developing Bot

Started by Antidote · Dec 5, 2014

1,033 replies21,297,466 viewsLocked
Dec 25, 2014#431

Gkevinod, may i know how to set the value for resolution of 800x600 using your getgold function?

I believe there was a registry edit file somewhere earlier in the forum, which will automatically do it for you. Also, I thought this bot was using 860x720 as the resolution? Or you can do:

Run > type "regedit" and press enter HKEY_LOCAL_MACHINE > SOFTWARE > Bluestacks > Guests > Android > Frame Buffer > 0

Then in the right pane, change Guest Height and Window Height to 720 and Guest Width and Window Width to 860. (or 800x600 if that's what you want)

Close the registry, and do a FULL RESTART, aka restart your computer. I've had trouble with not doing a full restart, so I recommend it.

Dec 25, 2014#432

Squrl wrote:

gelengx3 wrote:

Gkevinod, may i know how to set the value for resolution of 800x600 using your getgold function?

I believe there was a registry edit file somewhere earlier in the forum, which will automatically do it for you. Also, I thought this bot was using 860x720 as the resolution? Or you can do:

Run > type "regedit" and press enter HKEY_LOCAL_MACHINE > SOFTWARE > Bluestacks > Guests > Android > Frame Buffer > 0

Then in the right pane, change Guest Height and Window Height to 720 and Guest Width and Window Width to 860. (or 800x600 if that's what you want)

Close the registry, and do a FULL RESTART, aka restart your computer. I've had trouble with not doing a full restart, so I recommend it.

Thank you for the answer but what i want is that i need the getgold function in autoit to function in a 800x600 resolution on bluestack.

Dec 25, 2014#433

@gelengx3 In order for us to use 800x600 resolution on bluestacks we would need to change all of the 0x000000 Hex value to the three distinct pixels of each number from 0-9. It requires meticulous work but it can be done.

The hex values, which are the colors, must also be distinct throughout each resource as they differ in color.

Local $c1 = Hex(0x989579, 6), $c2 = Hex(0x39382E, 6), $c3 = Hex(0x272720, 6)

In the getGold function, you would find this code and it contains the hex values. To use this in 800x600 you would also need to change the coordinates of each distinct pixel found within the digits.

Local $pixel1[3] = [$x+6, $y+4, $c1], $pixel2[3] = [$x+7, $y+7, $c2], $pixel3[3] = [$x+10, $y+13, $c3]

$x and $y are set to the first pixel of the first digit and +# are the numbers where the distinct pixel can be found. I would recommend just switching over to 860x720 as you'd have to change over 100 hex values and over 600 coordinates.

Dec 25, 2014#434

I will be remaking the GUI to add more features and with that I will also begin to rewrite the codes that Antidote has made to make it more efficient and work for long periods of time. Antidote has done a great job in coding the bot and its all thanks to him that all the features we have now are available.

In the new GUI, I will include instructions and info about the bot so that when anyone has problems we can specifically target the source.

Dec 25, 2014#435

<bug> needs a longer press when selecting barracks to train ..if there is a bit of lag it will fail to open a barracs abd rapidly press the spot on village that would be behind the troop that it was ganna train
<bug2> when i hit stop on bot it still do this (copy /pasted from log)
Bot Stopped
Waiting for Full Army...
Waiting for Full Army...
Waiting for Full Army...
Waiting for Full Army...
Waiting for Full Army...
Waiting for Full Army...
thanks for all your time ..i suxxor at autoit so just trying to do my part bug finding
<bug3> some times when collecting it will try to boost all in barracs if you have gems <edit> this only happins if i stop bot and restart it with stop/start button..if i close bot and the run it fresh it dont seem to do it

Dec 25, 2014#436

yeah the current version with collecting ressources is boosting sometimes. i've already sent my method with imagesearch to collect ressources to antidote. i think it might be implemented soon and is only clicking if ressources are available.

your first bug: try out implementing some sleeps 😉

Dec 25, 2014#437

@kojometa and @some(rnd)guy Thanks for the feedbacks, I've noticed that it does boost the collectors or the barracks sometimes. I've just tested the bot for the night and made around 3 million gold and 3 million elixir. I used 200k on each G+E with around 1500 trophies.

Now about I've also noticed that when you stop, it keeps waiting for full army. I have not looked at the Stop method that Antidote uses, but it will be easy to fix.

For the boosting of the collectors or barracks, sorry if it boosted the barracks or collectors (hopefully it did not waste your too much gems). If we use imagesearch, we will have to implement a DLL file and other image files aswell. Right now, I used pixelsearch to determine if it needs to be collected and I only used one pixel to check so it was a high possibility that it might click something else. I will try to check more pixels at the same time and work on trying to getting that to work.

If I do manage to get it to work, I can probably implement that method of checking if the collectors need to be collected automatically finding the barracks so that may come soon as well.

Dec 25, 2014#438

Merry Christmas to everyone specially to Antidote, GKevinOD and to other people trying to help develop this bot. I'm having a hard time keeping up with you guys. And everytime I test the old version, another version would come up and most issues are already fixed .. so fast.. I hope everyone is doing good! keep it up guys!

Dec 25, 2014#439

i added 2 RadioButtons G+D & G or D based on your code. if you're interested write in this thread and i'll up it.
for me its usefull cause im only in need for gold and dark. elixir is full 24/7 😉

Dec 25, 2014#440
Global $TPaused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("!{q}", "Terminate") ; PRESS Alt Q to terminate.


Func TogglePause()
    $TPaused = NOT $TPaused
    While $TPaused
        sleep(100)
        ToolTip('BOT PAUSE',0,0)
     WEnd
     ToolTip("")
EndFunc

Func Terminate()
     Exit 0
EndFunc

These hotkeys are surely helpful incase of malfunction like gem buying etc.

This discussion is closed.