Code:
void gadaj()
{
/*
This i have defined in external file
#define SELF_EXPERIENCE 0x635F04
#define SELFID (SELF_EXPERIENCE + 12)
*/
int playerCID = SELFID;
int myCreatureIndex = 0;
for (int i = 0; i < MaxCreatures; i++)
{
int currentCID = ReadMemoryInt(FindWindow("ARKAMECZEK ", NULL),(BattlelistBegin + BattlelistStep * i),sizeof(int32_t));
if (currentCID == playerCID)
{
myCreatureIndex = i;
break;
}
}
char value[32];
ReadMemoryChars(FindWindow("ARKAMECZEK ", NULL),(BattlelistBegin + BattlelistStep * myCreatureIndex + 0x4),value,32);
string str = string(value);
Say(0x01, const_cast<char*>(str.c_str()));
}
+ reading functions:
Code:
inline int ReadMemoryInt(HWND h, int address, int size)
{
int ret = 0;
ReadProcessMemory(h, (LPVOID)address, &ret, size, 0);
return ret;
}
inline void ReadMemoryChars(HWND h, int address, char* ret, int size)
{
ReadProcessMemory(h, (LPVOID)address, &ret, size, 0);
}
resolut of this code is randomly:
Code:
21:45 Arkam: í
21:47 Arkam:
21:47 Arkam:
/\ Arkam is name ingame, i testing it on ContextMenu then resolut is empty []