Results 1 to 2 of 2
  1. #1
    gna81nbk276's Avatar
    Join Date
    May 2017
    Gender
    female
    Posts
    1
    Reputation
    10
    Thanks
    0

    Question C++ Get data from game / ReadProcessMemory always shows the same value

    Hello.

    I'm trying to make a simple FishingPlanet (Unity engine) bot, that [reads some basic data] -> [performs certain actions - mostly mouse clicks, based on that data] UNTIL -> [An ingame window opens containing info about catched fish]

    (I'm an absolute beginner, just saying)

    So, i managed to implement the second part (performing the actions) but atm i need to input the data (eg. behavior of the fishing rod model) manually in the code.
    The problem is to find some way to get the data from the game. I tried to use Cheat Engine, to find a value which has different values based on if the rod is casted or not, or if the fish is catched, but couldn't find one any method. I tried searching for values/strings that are displayed ONLY when fish is catched, with no success (Either 0 values found or 200+ that doesn't seem to have anything in common with the window that is being displayed.

    Do anyone have an idea how to get an address that could help me get this data from the game? Maybe i'm doing something wrong in the Cheat Engine / or i should use a different method? I also wanna add, that getting visual/image data is the last thing i wanna do, unless there is a really efficient way to do it.

    //EDIT
    I found an adress, now i need to read it, but when i read it using this code:
    Code:
    ReadProcessMemory(handle, (LPVOID*)0x23FB9971C64, &isCasted, sizeof(isCasted), 0);
    it always returns "-858993460" value, when in cheat engine it stays at 0. The value is the same for every of like 10 addresses i tried.

    Code:
    int isCasted;
    			DWORD address = 0x23F938277C5;
    
    			HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
    			if (procID = NULL) {
    				cout << " Cannot obtain the process." << endl;
    				Sleep(3000);
    				goto start;
    			}
    			else {
    				cout << "";
    				read:
    				//WriteProcessMemory(handle, (LPVOID)0xAEEA6C, &newValue, sizeof(newValue), 0);
    				ReadProcessMemory(handle, (LPCVOID)address, &isCasted, sizeof(isCasted), NULL);
    				cout << GetLastError() << endl;
    				cout << "address value: " + isCasted <<endl;
    				goto read;
    				Sleep(1000);
    			}
    //EDIT
    RPM works now.
    Now, i realised that the address is dynamic, so everytime game is restarted the address changes. Any way arround it?
    Last edited by gna81nbk276; 03-07-2019 at 06:14 PM.

  2. #2
    Icesycthe7's Avatar
    Join Date
    Aug 2018
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    My Mood
    Bored
    find a pointer to the address? use a sigscan? many methods available to you

Similar Threads

  1. Failed to get data from server? (I may have some points)
    By Enternalxdeath in forum Pokemon Go Tips, Tricks, & Tutorials
    Replies: 23
    Last Post: 08-14-2016, 10:27 PM
  2. Getting kicked from games -_________-
    By BlackBerets in forum CrossFire Discussions
    Replies: 19
    Last Post: 11-23-2013, 09:44 AM
  3. [Help Request] Getting values from game after injection
    By univex in forum C# Programming
    Replies: 9
    Last Post: 10-07-2013, 03:12 PM
  4. [Info] GET BOOT FROM GAME
    By GM_Aae in forum Blackshot Hacks & Cheats
    Replies: 21
    Last Post: 12-05-2012, 11:04 PM
  5. [Request] dose any one know if you mod get kicked from games
    By travyiscool1 in forum CrossFire Mods & Rez Modding
    Replies: 0
    Last Post: 07-25-2010, 07:39 AM