I really appreciate it. Though I'm going to code in C# this still helped me getting a little familiair with all terms :-)
I really appreciate it. Though I'm going to code in C# this still helped me getting a little familiair with all terms :-)
How do you Coded a Premade bot like Lazybot evo and Change its Wow version like go from 4.3.2 to 4.3.3 because i have some knowledge on VB and C# and alittle C++ just enough to get by. this is my first time in actually wanting to learn how to do this. now would this be the wow base or memory reading. or would i have to recreate everyting
Hey i am new to bot programming, but not to programming (4yrs knowledge)
i have a problem to the following code. It's for getting the client connection, but i dont know if it is right the way i did it, neither what i probably did wrong.
here is my code in c++
Code:#include <windows.h> #include <tlhelp32.h> #include <iostream> #include <string> using namespace std; const DWORD ClientConnection = 0x625190;//0x9BC9F8 const DWORD CurMgrOffset = 0x463C; const DWORD FirstObjectOffset = 0xC0; const DWORD NextObjectOffset = 0x3C; const DWORD PlayerGUID = 0xC8; const DWORD GameObjTypeOffset = 0x10; DWORD GetPidFromProcessName(string szProcessName) { HANDLE hSnap; HANDLE hTemp; PROCESSENTRY32 pe; hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); pe.dwSize = sizeof(PROCESSENTRY32); if (Process32First(hSnap, &pe)) { while (Process32Next(hSnap, &pe)) { hTemp = OpenProcess(PROCESS_ALL_ACCESS, 0, pe.th32ProcessID); if (hTemp) { if (strcmp(pe.szExeFile, szProcessName.c_str()) == 0) { return pe.th32ProcessID; } } CloseHandle(hTemp); } } CloseHandle(hSnap); return 0; } DWORD GetWowBaseAddress(DWORD pid) { HANDLE hSnap; HANDLE hTemp; MODULEENTRY32 me; DWORD baseAddress = 0; hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid); me.dwSize = sizeof(MODULEENTRY32); if (Module32First(hSnap, &me)) { baseAddress = (DWORD) me.modBaseAddr; } CloseHandle(hSnap); return baseAddress; } int main(int argc, char *argv[]) { DWORD wowPid; DWORD baseAddr; wowPid = GetPidFromProcessName("Wow.exe"); if (wowPid != 0) { HANDLE wowProcess; DWORD clientConn; cout << "wow found: [" << wowPid << "]\n"; baseAddr = GetWowBaseAddress(wowPid); cout << "base address: " << baseAddr << "\n"; wowProcess = OpenProcess(PROCESS_ALL_ACCESS, 0, wowPid); ReadProcessMemory(wowProcess, (LPCVOID) (baseAddr + ClientConnection), (void*) clientConn, sizeof(DWORD), 0); cout << "client conn: " << clientConn << "\n"; } else { cout << "wow NOT found!\n"; } system("PAUSE"); return EXIT_SUCCESS; }
The best way to learn code if you have never even typed a single line out by yourself and manipulated an object, is to start with excel formulas. It is mostly math, but it quickly teaches you "If...Then" statements and other nifty stuff. You can learn a sufficent amount of excel in a single day. After learning a little excel, the next best way to learn how something works is to read a small portion of a beginner's book that is respective to the language you would like to learn. For example: Visual Basic 2005 edition's beginner book start out with how to make an object interact with you via a button control. ("Hello, World!"). After you get through about 6 chapters in the beginners book, you should then understand quite a bit about the basics. Find code online made from others (code that only runs small programs in a GUI and try to recreate their program by copying and pasting the code into a project. Then look through the code and figure out which objects you need to make the program work and rename the objects so that the code controls them. This is will get you accustomed to reading code and picking stuff out of it. After you can do this, try making a few programs that do small things...such as a calculator (which isn't that advanced if you make a basic calculator).
In my opinion Visual Basic is by far the easiest language to use and learn. There are far less symbols used (!@#$%^&*`[]. Symbols are very intimidating to beginners.
If you can manipulate excel formulas by using your system's current time, it is probably time to move on from excel to a real language.
Lastly, all beginners should be highly aware of viruses such as keyloggers. This is the coding world afterall; you're basically bringing your computer into a world of germs.
The client connection is: 0x9BC9F8
The gameobjTypeOffset is: 0x14
The PlayerGUID is a 64 bit int so make sure to put it into the proper size.
So you'd want to go from:
wow's base address + the client connection into a variable.
That variable + the local player's guid offset into another variable.
That new variable + first objects offset ... so on and so on.
Last edited by harrycarry; 04-12-2012 at 02:15 PM. Reason: goofed!
Hi I have been programming for over 5 years, but I am currently new to bot programming.
I tried to remake the method in the AutoIT example and for some reason I cannot get the memory location by GUID to work... it keeps returning 0 here is my function
Any sugguestions?Code:public uint getMeMLocByGUID(UInt64 guid) { IntPtr baseWoW = wow.MainModule.BaseAddress;//Gets Base Address uint currMgr_pre = wow.ReadUInt((uint)baseWoW + (uint)Offsets.ObjectManagerOffsets.ClientConnection); uint currMgr = wow.ReadUInt(currMgr_pre + (uint)Offsets.ObjectManagerOffsets.CurrentManager); UInt64 pGUID = wow.ReadUInt(currMgr + (uint)Offsets.Player.MyGUID); uint nextObj = wow.ReadUInt(currMgr + (uint)Offsets.ObjectManagerOffsets.FirstObject); uint objType = wow.ReadUInt(nextObj + (uint)Offsets.ObjectManagerOffsets.ObjectType); while ((objType <= 7) && (objType > 0)) // problems in this loop { if (wow.ReadUInt64((uint)nextObj + (uint)Offsets.ObjectManagerOffsets.objGUIDOffset) == guid)// <- this line does ever evaluate to true { return nextObj; } nextObj = wow.ReadUInt((uint)nextObj + (uint)Offsets.ObjectManagerOffsets.NextObject); objType = wow.ReadUInt((uint)nextObj + (uint)Offsets.ObjectManagerOffsets.ObjectType); } return 0; }