Boom Beach C++ Bot using daiBot.dll
Boom Beach is a mobile app similiar to Clash of Clans.
A lot of people think that Boom Beach is better than Clash of Clans.
We want to write an advanced bot for Boom Beach (on BlueStacks)
BlueStacks is an android emulator which lets you run Boom Beach on your PC.
I really don't now how this game works..
I'm just doing it right now to demonstrate how easy my new C++ library is.
You need the library daiBot.dll
get it here :
You can also create an autoit bot with the library.
The autoit functions are the same as the c++ ones, so you should be able to create one.
Prepare your project and link the library
- Install Visual Studio 2015 Community (it's free..)
- Create a new Win32 Console Application
- Setup Directories:
- Solution -> Properties -> Debugging -> Environment : Set the field to PATH=C:\daiBot\ or whereever your daiBot.dll/daiBot.lib are located.
- Solution -> Properties -> VC++ Directories -> Include Directories : Add the path to interface.h
- Solution -> Properties -> Debugging -> Environment : Set the field to PATH=C:\daiBot\ or whereever your daiBot.dll/daiBot.lib are located.
- include interface.h in BoomBeach.cpp
- link the library (daiBot.dll)
Code:
#include "stdafx.h" #include "interface.h" #pragma comment(lib,"daiBot") int main(){return 0;}
Create the game object
Code:
daiBotInterface * BoomBeach = GetDB();
Now we have to tell the bot our target.. so we are getting the HWND of BlueStacks(BS) and pass it to BoomBeach.
We also want to save an image of the current BS window (just to test if it is working...)
Code:
int main() { daiBotInterface * BoomBeach = GetDB(); HWND handle = BoomBeach->getHandle(L"BlueStacks App Player"); BYTE * pixels = BoomBeach->init(handle); BoomBeach->saveBitmap("BoomBeach.bmp"); return 0; }
important functions
BoomBeach->loadBitmap(); //call this if you want to get a new image of BS to work with.
BoomBeach->getPixel(x,y);
BoomBeach->click(x,y);
BoomBeach->drag(xFrom, yFrom, xTo, yTo, speed)
BoomBeach->pDrag(x[], y[], speed)
BoomBeach->move(xFrom, yFrom, xTo, yTo, speed = 10) //moves the mouse, no clicking at all
speed is always optional and defaults to 10
the higher the speed the faster the moves
If you liked it, thank me
tbc.. have to play and understand the game mechanics now .. xD
I currently can not continue this tutorial . I'd really like to but time doesn't like me ..
Please ask questions in the other thread.