I am currently making a DO bot and wanna ask how to make a pixel bot run in the background in C#? any information that will be of help to me before i start coding the pixel bot will be very much appreciated as i am learning as i am going. Thank you all!
Well a box collector/event box collector using image search(pixel bot) that runs in the background. I have made a fully intractable custom form with my own images and everything. I plan on adding a bunch of settings, anti ban features, pet support, travel to map, reconnect, respawn, flee, buy cloak, use cloak cpu and if i become good at this i will have my go at an auto bidder bot and much more as i learn C#. Why make just another bot you may ask well not every bot is updated regularly and therefore most of them have bugs and by making this bot i will increase my C# knowledge. I will make the bot free at start at least until i get a good grasp of C# or i might keep it for free if i get good responses from the community. Learning programming languages for me is a hobby and its also a great set of skills which can be useful in the future. Plus i got a lot of time, if i am not at work am siting on my computer pretty much.
I am currently just researching some stuff before i start the actual coding i don't know how exactly i should start thats why i asked how to make a bot work in background
it's good to see new developers trying to do something for this community.
and regarding your bot, I suggest doing it firstly non-background (normal) and testing all the functions/botting logic. while your testers are testing the bot, you can focus on learning how to make your bot work in background. it's only an opinion, but i hope it's helpful.
I wish you best of luck and I'm glad you're passionate about programming
Your post caught my attention as I tried doing the same thing a few months ago in order to try to understand the language better, like yourself. I was however stopped in my tracks as my university course started .
I'm not sure how to go about making a bot which works in the background but I have attempted something that works in the foreground (in chrome like palavia).
The biggest problem that I faced- something so simple, was to grab a screenshot and search the screenshot for a couple of pixels in that order. Most methods were far too slow, sometimes they took a second or longer! After a few hours of researching I came across this project that somebody made which allowed me to search a screenshot for a bitmap in about ~50ms. (I can't find where I got the code from, but I still had it on my computer so I will attach it!)
I took some of the code, modified it so that it would work on my project, and tested it. After some trial and error I managed to make a bot which would fly around 1-7 take screenshots every second looking for a snippet of a bk. As soon as it was found it would autolock it, circle it, and shoot it.
However a few problems- I had no idea when the bk actually died, and also I struggled trying to find a way how I could check my health. More problems, this method worked, but as soon as I relogged/ jumped the port I would have to retake the snippet or it wouldn't find it.
So my bottleneck was still to take a darn screenshot and look for a darn snippet. Still have not been able to do this reliably. Bots like FsBot Lion run so smoothly, eventhough the boxes are sort of moving around. I don't get it, but well played to those developers.
If there are any good C# developers who are feeling a bit like right now please PM me or add onto this thread, I would love to know if there is something stupid I missed.
Goodluck- it is a lot harder than it looks!
Attached is a zip file containing the project. Unless you have a good plan for the screenshot/search I suggest you take a look. Code:
using System;
using System.Threading;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace BitmapDetector
{
public partial class BitmapDetectorForm : Form
{
public BitmapDetectorForm()
{
InitializeComponent();
}
Bitmap bitmap1 = new Bitmap(bitmap1TextBox.Text);
Bitmap bitmap2 = new Bitmap(bitmap2TextBox.Text);
if (bitmap1.Width > bitmap2.Width || bitmap1.Height > bitmap2.Height)
{
Bitmap aux = bitmap2;
bitmap2 = bitmap1;
bitmap1 = aux;
}
if (bitmap1.Height > bitmap2.Height)
{
MessageBox.Show("None of the Bitmaps can contain the other.", "Data error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
private string validateData()
{
if (bitmap1TextBox.Text == "")
return "You must choose a bitmap for Bitmap 1.";
if (bitmap2TextBox.Text == "")
return "You must choose a bitmap for Bitmap 2.";
return "";
}
int smallOffset = smallStride - smallBmp.Width * 3;
int bigOffset = bigStride - bigBmp.Width * 3;
bool matchFound = true;
for (int y = 0; y < bigHeight; y++)
{
for (int x = 0; x < bigWidth; x++)
{
byte* pBigBackup = pBig;
byte* pSmallBackup = pSmall;
//Look for the small picture.
for (int i = 0; i < smallHeight; i++)
{
int j = 0;
matchFound = true;
for (j = 0; j < smallWidth; j++)
{
//With tolerance: pSmall value should be between margins.
int inf = pBig[0] - margin;
int sup = pBig[0] + margin;
if (sup < pSmall[0] || inf > pSmall[0])
{
matchFound = false;
break;
}
pBig++;
pSmall++;
}
if (!matchFound) break;
//We restore the pointers.
pSmall = pSmallBackup;
pBig = pBigBackup;
//Next rows of the small and big pictures.
pSmall += smallStride * (1 + i);
pBig += bigStride * (1 + i);
}
//If match found, we return.
if (matchFound)
{
location.X = x;
location.Y = y;
location.Width = smallBmp.Width;
location.Height = smallBmp.Height;
break;
}
//If no match found, we restore the pointers and continue.
else
{
pBig = pBigBackup;
pSmall = pSmallBackup;
pBig += 3;
}
}
Your post caught my attention as I tried doing the same thing a few months ago in order to try to understand the language better, like yourself. I was however stopped in my tracks as my university course started .
I'm not sure how to go about making a bot which works in the background but I have attempted something that works in the foreground (in chrome like palavia).
The biggest problem that I faced- something so simple, was to grab a screenshot and search the screenshot for a couple of pixels in that order. Most methods were far too slow, sometimes they took a second or longer! After a few hours of researching I came across this project that somebody made which allowed me to search a screenshot for a bitmap in about ~50ms. (I can't find where I got the code from, but I still had it on my computer so I will attach it!)
I took some of the code, modified it so that it would work on my project, and tested it. After some trial and error I managed to make a bot which would fly around 1-7 take screenshots every second looking for a snippet of a bk. As soon as it was found it would autolock it, circle it, and shoot it.
However a few problems- I had no idea when the bk actually died, and also I struggled trying to find a way how I could check my health. More problems, this method worked, but as soon as I relogged/ jumped the port I would have to retake the snippet or it wouldn't find it.
So my bottleneck was still to take a darn screenshot and look for a darn snippet. Still have not been able to do this reliably. Bots like FsBot Lion run so smoothly, eventhough the boxes are sort of moving around. I don't get it, but well played to those developers.
If there are any good C# developers who are feeling a bit like right now please PM me or add onto this thread, I would love to know if there is something stupid I missed.
Goodluck- it is a lot harder than it looks!
Attached is a zip file containing the project. Unless you have a good plan for the screenshot/search I suggest you take a look. Code:
using System;
using System.Threading;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace BitmapDetector
{
public partial class BitmapDetectorForm : Form
{
public BitmapDetectorForm()
{
InitializeComponent();
}
Bitmap bitmap1 = new Bitmap(bitmap1TextBox.Text);
Bitmap bitmap2 = new Bitmap(bitmap2TextBox.Text);
if (bitmap1.Width > bitmap2.Width || bitmap1.Height > bitmap2.Height)
{
Bitmap aux = bitmap2;
bitmap2 = bitmap1;
bitmap1 = aux;
}
if (bitmap1.Height > bitmap2.Height)
{
MessageBox.Show("None of the Bitmaps can contain the other.", "Data error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
private string validateData()
{
if (bitmap1TextBox.Text == "")
return "You must choose a bitmap for Bitmap 1.";
if (bitmap2TextBox.Text == "")
return "You must choose a bitmap for Bitmap 2.";
return "";
}
int smallOffset = smallStride - smallBmp.Width * 3;
int bigOffset = bigStride - bigBmp.Width * 3;
bool matchFound = true;
for (int y = 0; y < bigHeight; y++)
{
for (int x = 0; x < bigWidth; x++)
{
byte* pBigBackup = pBig;
byte* pSmallBackup = pSmall;
//Look for the small picture.
for (int i = 0; i < smallHeight; i++)
{
int j = 0;
matchFound = true;
for (j = 0; j < smallWidth; j++)
{
//With tolerance: pSmall value should be between margins.
int inf = pBig[0] - margin;
int sup = pBig[0] + margin;
if (sup < pSmall[0] || inf > pSmall[0])
{
matchFound = false;
break;
}
pBig++;
pSmall++;
}
if (!matchFound) break;
//We restore the pointers.
pSmall = pSmallBackup;
pBig = pBigBackup;
//Next rows of the small and big pictures.
pSmall += smallStride * (1 + i);
pBig += bigStride * (1 + i);
}
//If match found, we return.
if (matchFound)
{
location.X = x;
location.Y = y;
location.Width = smallBmp.Width;
location.Height = smallBmp.Height;
break;
}
//If no match found, we restore the pointers and continue.
else
{
pBig = pBigBackup;
pSmall = pSmallBackup;
pBig += 3;
}
}
Ty man will have a look at it its gonna be of great help
Quote:
Originally Posted by jolaxbeat
good luck !
Thanks
Quote:
Originally Posted by [becky]
it's good to see new developers trying to do something for this community.
and regarding your bot, I suggest doing it firstly non-background (normal) and testing all the functions/botting logic. while your testers are testing the bot, you can focus on learning how to make your bot work in background. it's only an opinion, but i hope it's helpful.
I wish you best of luck and I'm glad you're passionate about programming
Thanks I understand what you mean but when i see a foreground bot that uses your mouse i just get aids x)
PBDO BOT - Pixel BOT Background 02/14/2017 - DarkOrbit - 17 Replies Startpage :: DarkOrbit PBDO-BOT 2016
Is resort and this is a nice bot with a big problem... I test this and he work and dont work, Guys where is they opinion?
Sorry for my bad english
[Info] SF Background Pixel Bot - API 03/12/2014 - Seafight - 40 Replies I developed an API which makes it possible to run Pixel Bots in the background.
You even can do multiaccounting with it and its a lot faster than normal Imagesearch solutions.
Since it is not worth anymore to program packet bots for SF, Pixel Bots will be more popular.
Codename: TrapDoor
Download and Documentation: http://ux.vci.si/TrapDoor (Backlink exists)
If you think you are a good programmer, who whishes to use this API, you can write me a message.
Your programming skills should...
pixel bot in background? 04/04/2013 - DarkOrbit - 14 Replies Is there anyway to run a pixel bot in the background so bot and the game dont have to stay on the top?
Can it work in sandboxie etc?
Thanks.
Tao Pixel Stig - Minimized/Background 10/28/2008 - CO2 Exploits, Hacks & Tools - 79 Replies Nestea requested this in Tailer-made tools thread.
Minimized stiger with auto refill MP
Instructions:
1. Open CO tao account
2. Set F1,F2 for Med & Sit
3. Run program
4. log on ur main character, if u need stig, press F11 with ur mouse cursor on top of the shadow of tao (in ur main character screen)
Video Example: