So here is what i have done... I've made a program that will monitor values inside co, and play a sound effect whenever the value changes... To use it you log in ur mentor (containing only one apprentice, your apprentice hunter), run my program, enter the memory address for +1 stone contribution (obtained from cheatengine), and then log in ur apprentice, and then that its, hunt w/ ur apprentice... whenever ur apprentice kills a monster that drops a plus +1, my program will make a ding sound (using windows low-battery notification sound effect) and u will know there is a +1 on the ground somewhere (start looting).
The whole program is very short, i list the code so u know its not a key-logger.. u can compile it and run it yourself.
Code:
#include <iostream>
#include <stdlib.h>
#include <gtk/gtk.h>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
HANDLE conquer_online_get_process_handle()
{
HANDLE hProcess;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(PROCESSENTRY32);
if (!Process32First(hSnapshot, &pe32)) { return NULL; }
do {
if (strcmp("Conquer.exe", pe32.szExeFile) == 0) {
hProcess = OpenProcess(PROCESS_VM_READ, 0, pe32.th32ProcessID);
CloseHandle(hSnapshot);
return hProcess;
}
} while (Process32Next(hSnapshot, &pe32));
CloseHandle(hSnapshot);
return NULL;
}
static unsigned long lastValue;
static HANDLE hConquer;
static void* conquerPlusOneAddress = 0;
unsigned long get_plus_one_value()
{
unsigned long val;
ReadProcessMemory(hConquer, (void*)0x005DAE38, &val, sizeof(val), NULL);
return val;
}
gint check_for_plus_one(gpointer)
{
unsigned long value = get_plus_one_value();
if (value != lastValue) {
lastValue = value;
PlaySound(TEXT("Windows XP Battery Low.wav"), NULL, SND_FILENAME);
//MessageBox(NULL, "There is +1 on ground.", "Info", MB_OK);
}
return TRUE;
}
unsigned long num_from_hex(char const* hex)
{
unsigned long num = 0;
while (*hex != 0) {
num <<= 4;
if (*hex >= '0' && *hex <= '9') {
num += *hex - '0';
} else if ((*hex >= 'A' && *hex <= 'F') || (*hex >= 'a' && *hex <= 'f')) {
num += *hex - 'A' + 10;
} else {
return 0;
}
++hex;
}
return num;
}
void on_address_changed(GtkEntry* entry, gpointer)
{
conquerPlusOneAddress = (void*)num_from_hex(gtk_entry_get_text(entry));
}
int main (int argc, char *argv[])
{
GtkWidget *button = NULL;
GtkWidget *entry = NULL;
GtkWidget *win = NULL;
GtkWidget *vbox = NULL;
PlaySound(TEXT("Windows XP Battery Low.wav"), NULL, SND_FILENAME);
/* grab the conquer online process. */
hConquer = conquer_online_get_process_handle();
if (!hConquer) {
MessageBox(NULL, "Could not find running instance of Conquer Online, please run it first.", NULL, MB_OK);
return -1;
}
/* Initialize GTK+ */
g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, (GLogFunc) gtk_false, NULL);
gtk_init (&argc, &argv);
g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING, g_log_default_handler, NULL);
/* Create the main window */
win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (win), 8);
gtk_window_set_title (GTK_WINDOW (win), "co +1 notifier");
gtk_window_set_position (GTK_WINDOW (win), GTK_WIN_POS_CENTER);
gtk_widget_realize (win);
g_signal_connect (win, "destroy", gtk_main_quit, NULL);
/* Create a vertical box with buttons */
vbox = gtk_vbox_new (TRUE, 6);
gtk_container_add (GTK_CONTAINER (win), vbox);
entry = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(entry), "005DAE38");
g_signal_connect(entry, "changed", GTK_SIGNAL_FUNC(on_address_changed), NULL);
gtk_box_pack_start(GTK_BOX(vbox), entry, TRUE, TRUE, 0);
on_address_changed(GTK_ENTRY(entry), NULL);
button = gtk_button_new_from_stock (GTK_STOCK_CLOSE);
g_signal_connect (button, "clicked", gtk_main_quit, NULL);
gtk_box_pack_start (GTK_BOX (vbox), button, TRUE, TRUE, 0);
/* Add our +1 checker code */
lastValue = get_plus_one_value();
gtk_timeout_add(1000, check_for_plus_one, NULL);
/* Enter the main loop */
gtk_widget_show_all (win);
gtk_main ();
CloseHandle(hConquer);
return 0;
}
I hoping that someone here could use cheatengine and help me find the address for +1 stone progress in mentor reward, its gonna be hard to find as it will require a fair bit of hunting. But I'm pretty sure finding this address will be worth the effort, bcuz we will finally be able to detect +1's on the ground.
hope this will be helpful, and hope someone can help me w/ that +1 stone progress value address.
cheers
Edit:
Sorry guys i didn't realize this post actually worked, I had slow internet that night and didn't see this post show up. So I ended up posting this under "CO Programming", i thought it would be more accurate, search the title there if u wanna see it and an up to date source.
Unfortunately _fobos_ is right, +1 stone contribution is not updated frequently. I found the client-side address for +1 stone contribution, and it is only updated when the user opens the Mentor Rewards window (and does not keep up to date if u leave that window open).Quote:
_fobos_: Well not to discourage you but i tried a similar thing some months ago, problem is that often its just really inaccurate the reward isnt instantly updated but dont let me discourage you ![]()
For anyone interested, the address for +1 stone contribution is stored at 005DBAA8 within the address space of the conquer process. I've attached a fully working, runnable version that needs no DLLs "console co +1 notifier" that can be used for testing purposes.
What i realize now is that i need to hook on the mentor rewards button, and send a mouse click event to it every 1 second or so via the event queue. That way i can have the +1 stone progress continuously updated client side. (i have not yet worked out how to do that)






