ACoBot

07/12/2009 20:36 high7#1
Q: What is ACoBot?
A: ACoBot is my CO2 bot project :D. Going from scratch to hopefully a bot to match 5bot.

Q: What will it include?
A: Anything you want! I will be adding things as they are suggested by the community. But of course it will contain the basics (leveler, potter, etc).


07-11-09:
*CHook remake from CoFollower is done.
07-12-09:
*Fixed some bugs in CHook.
*Callbacks are doneish.
07-13-09
*ICallback is done.
*CHook and ICallback are fully functional.
07-14-09
*File structure was changed around.

Progress Comments:
CHook is much simpler to use now (If you have seen CoFollower's src).
Code:
class Test : public CHook
{
public:
	Test(int a)
		: CHook(a)
	{
		AsmEnd = new char[0x2];
		char t[0x2] = {0x61, 0xC3};
		memcpy(AsmEnd, t, 0x2);
	}
	int EAX;
	int ESP;
	int EDI;
	bool RawCallback(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int eax)
	{
		EAX = eax;
		ESP = esp;
		EDI = edi;
		return true;
	}
};
AsmEnd is for function blocking :D. You provide the assembly you want it to use if you return true (in this case POPAD then RET).
I know the parameters of RawCallback are a pain but this way it is multithreading compatible without a ton of work.



Please post Questions/Comments/Suggestions/Etc.
07/12/2009 22:37 ~*NewDuuDe*~#2
When will it be finished? =D

Edit: Add an function which makes the bot able to work between diffrent cordinates. Like that you enter an x,y cord to another. If you get what I mean. Point would be to be able to hit diffent types of mobs (In a small area, of course), though I don't know if that would work. Your the expert =P
07/12/2009 23:25 high7#3
"Finished" or "working"? Because I don't think it will ever be done. I will be constantly adding new functions while updating it for new patches. I will have a release soon which will have the basics and then I will have daily updates with new stuff.
07/13/2009 00:41 © Haydz#4
You realise 5bot is finished? Its been shutdown. Therefore you have nothing to match :D
07/13/2009 01:17 high7#5
I know it is gone. But I am saying I want to match what it was.

Anyways, working a bit on the callback system. I don't like what I had in CoFollower (extremely messy and a pain to use).
07/13/2009 01:17 high7#6
double post ftl?
07/13/2009 02:57 BoboDundo#7
Are you going to release the full source when done? If you need any help, let us know.

Progress Comments:
CHook is much simpler to use now (If you have seen CoFollower's src).
Code:
class Test : public CHook
{
public:
	Test(int a)
		: CHook(a)
	{
		AsmEnd = new char[0x2];
		char t[0x2] = {0x61, 0xC3};
		memcpy(AsmEnd, t, 0x2);
	}
	int EAX;
	int ESP;
	int EDI;
	bool RawCallback(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int eax)
	{
		EAX = eax;
		ESP = esp;
		EDI = edi;
		return true;
	}
};
AsmEnd is for function blocking :D. You provide the assembly you want it to use if you return true (in this case POPAD then RET).
I know the parameters of RawCallback are a pain but this way it is multithreading compatible without a ton of work.



Please post Questions/Comments/Suggestions/Etc.[/QUOTE]
07/13/2009 03:04 high7#8
No it wont be open source sadly. And yes I do plan on selling the bot. I of course will have a free version though.


Progress Comments:
Callbacks are doneish.
Code:
class CSelfText : public CHook
{
public:
	CSelfText()
		: CHook(0x00400000)
	{
		
	}
	bool RawCallback(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int eax)
	{
		void * args[2];
		args[0] = (void*)&eax;
		args[1] = (void*)&edi;
		InvokeCallbacks(args);
		return true;
	}
};

class CCoBot
{
public:
	CCoBot()
	{
		TextHook->Self->RegisterCallback(&TextCallback);
	}

	static bool TextCallback(void * args[])
	{
		std::string str = std::string(*(std::string*)args[0]);
	}
};
Not the way I wanted to do callbacks but it was really the only easy/neatish way to do them that I have seen.
07/13/2009 03:47 high7#9
Progress Comments:
Made the callbacks more oop. They now don't require a static function.
Code:
class CCoBot : public CHook::Callbackable
{
public:
	CCoBot()
	{
		TextHook->Self->RegisterCallback((Callbackable*)this, (Callbackable::DCallback)&CCoBot::TextCallback);
	}
	~CCoBot()
	{
		TextHook->Self->UnRegisterCallback((Callbackable*)this, (Callbackable::DCallback)&CCoBot::TextCallback);
	}
	bool TextCallback(void * args[])
	{
		std::string str = std::string(*(std::string*)args[0]);
	}
};
07/13/2009 07:18 high7#10
Progress Comments:
CHook/ICallbackable are fully functional now :D.
Code:
class CSelfText : public CHook
{
public:
	CSelfText() : CHook(0x004F7286)
	{
		char end[3] = {0xC2, 0x18, 0x00};
		SetAsmEnd(end, 3);
	}
	//char * To, char * Msg, int color, int type
	bool RawCallback(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int eax)
	{
		void * args[4];
		args[0] = (void*)(esp+0x4);
		args[1] = (void*)(esp+0x8);
		args[2] = (void*)(esp+0x10);
		args[3] = (void*)(esp+0x14);
		return InvokeCallbacks(args);
	}
};

class CCoBot : public CHook::ICallbackable
{
public:
	CCoBot()
	{
		TextHook->Self->RegisterCallback((ICallbackable*)this, (ICallbackable::DCallback)&CCoBot::TextCallback);
	}
	~CCoBot()
	{
		TextHook->Self->UnRegisterCallback((ICallbackable*)this, (ICallbackable::DCallback)&CCoBot::TextCallback);
	}
	bool TextCallback(void * args[])
	{
		char * to = (char*)*(int*)args[0];
		char * msg = (char*)*(int*)args[1];
		int color = *(int*)args[2];
		int type = *(int*)args[3];

		std::string str = std::string(msg);

		if (str == "lol")
		{
			return true;
		}
		return false;
	}
};
07/13/2009 09:50 ha.ho.a#11
Quote:
Originally Posted by high7 View Post
No it wont be open source sadly. And yes I do plan on selling the bot. I of course will have a free version though.


Progress Comments:
Callbacks are doneish.
Code:
class CSelfText : public CHook
{
public:
	CSelfText()
		: CHook(0x00400000)
	{
		
	}
	bool RawCallback(int edi, int esi, int ebp, int esp, int ebx, int edx, int ecx, int eax)
	{
		void * args[2];
		args[0] = (void*)&eax;
		args[1] = (void*)&edi;
		InvokeCallbacks(args);
		return true;
	}
};

class CCoBot
{
public:
	CCoBot()
	{
		TextHook->Self->RegisterCallback(&TextCallback);
	}

	static bool TextCallback(void * args[])
	{
		std::string str = std::string(*(std::string*)args[0]);
	}
};
Not the way I wanted to do callbacks but it was really the only easy/neatish way to do them that I have seen.
dam and i was getting hopes it was goin to be free ....:(
lol well hope this free versions will always be available for me hehe...btw if u need testers im here...
07/13/2009 09:52 ~*NewDuuDe*~#12
Well, I'll buy it.
07/13/2009 15:16 Kiyono#13
So why did you decide to make this all of a sudden lol
07/14/2009 13:16 high7#14
Quote:
Originally Posted by Kiyono View Post
So why did you decide to make this all of a sudden lol
Well I was already working on something (CoFollower) which I was going to turn into a bot at some point. Just with 5bot being shutdown I am now working more on it.
07/15/2009 20:20 ookamocka#15
Quote:
Originally Posted by high7 View Post
Well I was already working on something (CoFollower) which I was going to turn into a bot at some point. Just with 5bot being shutdown I am now working more on it.
i thought u quit this forum :rolleyes: just saying heh... but ne way, g'luck w/ ur bot :)