Feeding Your Inner Developer

How to Create a Cabal Bot

Okay so today I am going to show you guys how to create a pixel bot for Cabal Online. In fact you can pretty much use this technique for any game out there but hey, let’s just go with cabal for now. First let me explain why a pixel bot. We are using a pixel bot because:

  1. Its Easy
  2. Its Impossible for Game-guard to Detect
  3. This Method will ALWAYS work and does not require a bypass
  4. Its EASY!!
Before we start I should probably mention that this entire process is going to take about 15 minutes or so and is very resource intensive on your brain (well.. assuming you have no programming experience). So take a bath, have a snack and make sure you are completely relaxed.

STEP 1 – Download AutoIT

While there are many other programs to do this but I have found AutoIT to just make this particular task (and in fact many other windows automation tasks) easy and hey, it’s free. To download first go here. You will see multiple files but the only thing you need is the ‘AutoIt Full Installation” so download that, Install and let’s get going!
After you download and install, in your programs menu you should see this list of programs:

 if not please ensure you downloaded the right file.

STEP 2 – Setting up

We start now by opening the ‘SciTE Script Editor’ and a notepad like window should open up. Put that on one side of your screen. (If you have multiple screens fill one screen with it.) As I have windows 7 I will simply auto align it to the left half of my screen.
Open up Cabal Online/Cabal NA, whichever cabal you have and place on the right side of your screen. When you are done, your setup should look something like this

How you setup your screen now is how the bot will work, if you move anything by a millimeter, there are no guarantees it will work properly.
I suggest that you therefore either use cabal maximized or if you have windows 7 or 8 (ONLY IF you have windows 7 or 8), drag to the left until it shows the clear, ‘usehalfofscreen’ outline and release. Remember if you have a custom theme like mine, make sure it is always enabled when you are using your bot. For best results use a windows default theme (like the windows 7 basic theme) when creating and using your bot.

STEP 3 – Starting to code – finding your boundaries

Login to your cabal account, select the character you want to bot with, and go to the area in which you wish to bot. In this example I will do something a bit intense and create a Pontus Ferrum Grinding bot. I will use my FS but any character should work. Ps. you do not need a lot of defense as we will auto hp and other cool stuff.
So here I am in Pontus ferrum, first thing we do is select 4 points on the screen where we would like our program to search for mobs. To do this, open up AutoIT Window Info.  Scroll to the left until you see ‘mouse’ click on that tab.
Yes I know everything is blank, and that is because the program is in a ‘frozen’ state, to unfreeze you press Ctrl + Alt + F or Options > Freeze. Click back on your cabal screen and voila, numbers!

Now hover over the top leftmost area on your cabal screen where you would like to start creating your virtual box for finding mobs and press Ctrl + Alt + F to Freeze the program again. You should see something like
This gives you your X Y co-ordinates of your mouse on the screen. With the two numbers to the right of ‘Position’ you enter into your program like this
$xTop = firstnumber
$yTop = secondnumber
Ensure you replace the placeholders with your own numbers like I did in the image below.
Do the same with another point at the bottom left to create your virtual square but call the positions:

$xBot = bottomfirstnumber
$yBot = bottomsecondnumber

Now we have our virtual square let’s go to the mobs we shall be hunting, printscreen a sample one and paste that printscreen into paint. While in paint, open up AutoIt Window Info again and after unfreezing, hover over the name of the mob (In my case it is yellow).

 Note this time the value to the right of ‘ color’ and add this to your program in the following fashion

$mobcolor = “0xD1DB0A” {remember to put in YOUR value, with the quotes}
You now only need to find two more sets of values, the first is for when your hp drops too low, and the second is to know when your monster is dead.
What you do is  (assuming you have full hp). Use AutoIt Window Info again and hover to the area just a little right of the numbers on your hp bar and freeze autoIt there (you will need magnify to get a good spot) Try to get an area near what I have in the pic below:

With your given values at Position and Color, enter them into your code in this fashion:
$xMyHp = 849
$yMyHp = 45
$myHpColor = “0xFF1C13”
You do the same thing with the monster Hp Bar but this time to take it to the EXTREME left as in the pic below, insert into your program in the fashion
$xMobHp = 905
$yMobHp = 50
$MobHpColor = “0xE19D00”
Your code should now look like this. (with different values of course)
$xTop = 496
$yTop = 110
$xBot = 1271
$yBot = 579
$mobcolor = “0xD1DB0A”
$xMyHp = 849
$yMyHp = 45
$myHpColor = “0xFF1C13”
$xMobHp = 905
$yMobHp = 50
$MobHpColor = “0xE19D00”
Congratulations! you are now done with the initialization.

STEP 4 – The Main Loop

We are now going to begin the main loop of the program, this you can just copy and paste under your previous code. For the more curious/adventurous individuals, I will add another post explaining each step a bit later.

while 1
                $coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$mobcolor,5)
                $n = @error
                If NOT @error Then
                                while $n = 0
                                                $x = $coord[0]
                                                $y = $coord[1] + 60
                                                MouseClick(“left”, $x, $y, 1)
                                                $alive = PixelGetColor ( $xMobHp, $yMobHp);

                If $alive = $MobHpColor Then

;               $coord = PixelSearch($xTop,$yTop,$xBot,$yBot,$yellowmob,5)
;    $n = @error
                If $alive = $MobHpColor then
                                while $alive = $MobHpColor
                                                $getHp = PixelGetColor ( $xMyHp, $yMyHp);
                                                if $getHp $myHpColor then
                                $alive = PixelGetColor ( $xMobHp, $yMobHp);

                                $buff = Random(7, 9, 1)

Unless you plan on editing the code to suit you the default settings are as follows

  1. Ensure AutoAttack is On
  2. Put normal attacks on slots 1 through 6
  3. Put buffs on slots 7, 8 and 9
  4. Put Hp Pots on ‘=’
There is a 5 second delay between starting the bot and it activating so plan for that
To pause, click on the icon at bottom left area of taskbar, to exit.. rightclick on icon and press exit.

Step 5 – Compile and Enjoy!

Save your hard work on your desktop then you can either, rightclick and select Run Script. Or rightlick and select ‘Compile Script’ which will create an exe file you can run without AutoIT installed.
Hope you enjoyed this tutorial. If you have any questions, leave me a message in the comment box and i’ll try my best to reply asap.
Ps. If you love the work put in this tutorial, nothing says thank you more than helping me buy a coffee. Also, I would prefer if you linked to this page here instead of copying and pasting this work to other websites. Thank you!
« »

© 2020 DEVGET.NET. Theme by Anders Norén.

%d bloggers like this: