Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Reading battle list
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Reading battle list

  1. #1

    Reading battle list

    Hi, I got a real simple question
    First:

    Code:
    monsterID = baseAddress + 0x007B0B4;
    DWORD buffer;
    byte monsterID3[15];
    ReadProcessMemory(phandle,(void*)monsterID,&buffer, sizeof(&buffer),0);
    ReadProcessMemory(phandle,(void*)buffer+0x124,&buffer, sizeof(&buffer),0);
    (Now I have first, or second monster in battlelist)

    Then
    Code:
    ReadProcessMemory(phandle,(void*)monsterID, &monsterID3, 15,0);
    Gives only 4 characters (Cipf) and not Cipfried.
    Even though I tell readprocessmemory to take 15 characters. Why is this?

    Thanks.

    <edit> Now I managed to make it more than 4 char, but its in ASCII. I have no idea how to make it
    normal.

    its like:
    Code:
    					ReadProcessMemory(phandle,(void*)monsterID, &monsterID3[0],sizeof(monsterID3),0);
    					cout << monsterID3 << endl;
    Last edited by Xleniz; 06-30-2013 at 06:34 AM.

  2. #2
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Quote Originally Posted by Xleniz View Post
    Hi, I got a real simple question
    First:

    Code:
    monsterID = baseAddress + 0x007B0B4;
    DWORD buffer;
    byte monsterID3[15];
    ReadProcessMemory(phandle,(void*)monsterID,&buffer, sizeof(&buffer),0);
    ReadProcessMemory(phandle,(void*)buffer+0x124,&buffer, sizeof(&buffer),0);
    (Now I have first, or second monster in battlelist)

    Then
    Code:
    ReadProcessMemory(phandle,(void*)monsterID, &monsterID3, 15,0);
    Gives only 4 characters (Cipf) and not Cipfried.
    Even though I tell readprocessmemory to take 15 characters. Why is this?

    Thanks.

    <edit> Now I managed to make it more than 4 char, but its in ASCII. I have no idea how to make it
    normal.

    its like:
    Code:
    					ReadProcessMemory(phandle,(void*)monsterID, &monsterID3[0],sizeof(monsterID3),0);
    					cout << monsterID3 << endl;
    Did you override the ReadProcessMemory function?

  3. #3
    Override? No.

  4. #4
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    What data type is monsterID3?

  5. #5
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Quote Originally Posted by ottizy View Post
    What data type is monsterID3?
    As he's reading the battle list, presumably 32 bit integer.

  6. #6
    byte monsterID3[15];

  7. #7
    Senior Member
    Join Date
    Jan 2008
    Location
    Cambridge, England
    Posts
    725
    Quote Originally Posted by Xleniz View Post
    byte monsterID3[15];
    You're reading a 32 bit integer, right? The creature ID from battle list? If so, it's stored at offset 0 from the battle list entry (before the name), and is only 4 bytes. Why are you declaring a 15 byte array?

  8. #8
    no, im trying to get name.
    I dont know what variable type I need, I tried char[15] and char* with no good results.

  9. #9
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    Code:
    std::string ReadString(DWORD address) {
        char buffer;
        std::string res;
        while(1) {
            ReadProcessMemory(handle, (void*)address, &buffer, sizeof(buffer), 0);
            if (buffer == 0) break;
            res += buffer;
            address++;
        }
        return res;
    }
    This will work for reading names in battlelist.

  10. #10
    Dont want to complain, but still only showing ascii.
    (With: cout << ReadString(monsterID) << endl )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •