+1 item detection ;)

04/15/2009 13:21 clintonselke#1
Ok, in the mentor rewards there is +1 stone contribution from the mentor's apprentices, and whenever an apprentice kills a monster and it drops a +1, this value for +1 stone contribution increases by 0.01.

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;
}
notice that it uses this address atm (005DAE38)... that is not actually the address of +1 stone progress (i am still yet to find the address of that), it is the address of the Y-map coordinate, so atm when u move it will make a ding sound.

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.

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 :p
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).

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)
04/16/2009 19:20 robban68#2
FIANLY!!
someone have come up with a good idea for detecting +1īs on the ground
WOW!!!!
BTW: hope it works lol!!!!
04/16/2009 19:34 padekite#3
:D some :D
04/16/2009 20:21 Alexios#4
Is it coded in C or C++?
04/16/2009 20:29 _fobos_#5
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 :p
04/17/2009 01:57 nnqq1#6
im pretty sure it does random scans of any history of a +1 item being picked up, only until the item is picked up will u know its +1. i dont think the code for a normal item and a +1 item is different until you pick it up.
04/17/2009 02:22 madclown7373#7
scan pls :)
04/17/2009 02:41 wafai#8
Thanks
04/17/2009 03:01 jm_athayde#9
where you place this file ?
04/17/2009 03:01 high6#10
Quote:
Originally Posted by madclown7373 View Post
scan pls :)
a-squared - Trojan-Proxy.Win32.Horst!IK
AhnLab-V3 -
AntiVir - TR/Proxy.Horst.aae.12
Antiy-AVL - Trojan/Win32.Horst
Authentium -
Avast -
AVG - BackDoor.Generic10.ALWT
BitDefender -
CAT-QuickHeal - Trojan.Agent.IRC
ClamAV - Trojan.Bifrose-5368
Comodo - ApplicUnsaf.Win32.HackTool.Keygen.~AAC
DrWeb -
eSafe - Suspicious File
eTrust-Vet -
F-Prot -
F-Secure -
Fortinet - W32/Horst.AAE!tr
GData -
Ikarus - Trojan-Proxy.Win32.Horst
K7AntiVirus - Backdoor.Win32.Rbot
Kaspersky -
McAfee - Generic.dx
McAfee+Artemis - Generic.dx
McAfee-GW-Edition - Trojan.Proxy.Horst.aae.12
Microsoft -
NOD32 -
Norman -
nProtect - Trojan-Proxy/W32.Agent.53760
Panda -
PCTools - Trojan.Horst!sd6
Prevx1 - High Risk Cloaked Malware
Rising -
Sophos - Mal/PWS-Fam
Sunbelt - Trojan-Proxy.Horst.aae.12
Symantec - Trojan.Horst
TheHacker -
TrendMicro - PAK_Generic.001
VBA32 -
ViRobot -
VirusBuster -
04/17/2009 03:42 madclown7373#11
full virus.. dont DL
04/17/2009 09:27 darkbluekira47#12
thats odd i scan it on Virustotal and Viruschief but its clean i don't wanna post it but scan it for your self
04/17/2009 10:49 JeniaZor#13
Im sorry for the noobish question but..what do i do with this Main file?
04/17/2009 19:16 3dik90#14
ATTENTION!!!!!!!
04/17/2009 20:54 heather940#15
is this dirty? or clean?.....like...hmmmmm whats going on in this post?...if dirty this needs 2 be #Closed ASP and someone to be BAN