Hello,
Some time back I coded a bot in C# and almost everything I did was 1/2 assed and poorly coded. I am starting up a new bot project in C++ but this time I am going to do it properly. The only problem I am running into is code management. I dont know how to call a function with out declaring a new one every time. Im not the best at explaining things, but ill try.
I have a function in my main exe that moves the character from point to point.
That function calls CTM from the dll. It really calls the function for a management class in the dll which then calls ctm. Its an initialization thing...
The problem is in ctm.cpp, how can I call memory.cpp? I would like to call it from the management class but that will just create a loop.. I think..
I would like to call WriteFloat from any place in the dll with out declaring it every time I use CTM
Anyway to make it global? I have seen some people do it in C#.Code:#pragma once #include "stdafx.h" #include "memory .h" namespace Yara { public ref class CTM { public : Memory wow; void Move(float x) { wow.WriteFloatB((DWORD)0x22,x,sizeof(x)); } private : }; }
I was looking over Shadow bot,
In one of his classes he calls the above code, but he never declares MyWoW in that class, that I can seeCode:MyWoW.Memory.ReadUInt(This + 0x8);
Can I do that in C++, if so how?
If I am just crazy please tell me the best way to do this? Or is my method ok? I really dont think so...
Thanks for your help and time!![]()
Rep to all that help (If your into that i guess)