|
You last visited: Today at 01:14
Advertisement
Link cheatengine to a macro?
Discussion on Link cheatengine to a macro? within the CO2 Programming forum part of the Conquer Online 2 category.
12/26/2008, 03:50
|
#1
|
elite*gold: 0
Join Date: Mar 2006
Posts: 379
Received Thanks: 50
|
Link cheatengine to a macro?
I dont know much about gamehacking, all i want to do is to make a simple macro that react to what a npc say.
I already found a text adress from the client (with cheat engine).
What i would like to do is, link the adress value to an action.
Ex:
If adress 019DBDBA = aaa Then move mouse to ***-yyy and click.
If adress 019DBDBA = bbb Then move mouse to ***-yyy and click.
Any idea on how i could do that, or programs i could use?
|
|
|
12/26/2008, 04:54
|
#2
|
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
|
Depends.
If your macro has support for Write/ReadProcess memory, you can just use those functions.
If you're writing it in a programming language, most of them can import the .dll and just use that, but I'm unsure about languages like AutoIt or AHK.
|
|
|
12/26/2008, 05:09
|
#3
|
elite*gold: 0
Join Date: Mar 2006
Posts: 379
Received Thanks: 50
|
Quote:
Originally Posted by tao4229
Depends.
If your macro has support for Write/ReadProcess memory, you can just use those functions.
If you're writing it in a programming language, most of them can import the .dll and just use that, but I'm unsure about languages like AutoIt or AHK.
|
do you know a macro that can do that? because i dont know any programming language. But im willing to learn
|
|
|
12/26/2008, 07:45
|
#4
|
elite*gold: 0
Join Date: Apr 2006
Posts: 23
Received Thanks: 29
|
@bobbyaube, i would be happy to help you implement a C# program that will work similar to what i think you want. I dont know how to get it to move to specific Conquer coords but i would be able to get it to move to a screen location and then click. Do you have any experience with programing languages at all? If you know the basics then feel free to add me on msn and ill help ya.
|
|
|
12/26/2008, 08:03
|
#5
|
elite*gold: 0
Join Date: Mar 2006
Posts: 379
Received Thanks: 50
|
no i never tried any programming language. There is no need to make the character move.
All i want is the bot to react to what the npc says.
Its about Coach Lin quest (in phoenix castle).
First you click on the npc
Then you start the bot, it check what the npc said, then click at (***,yyy).
Then the npc gives one of the 4 possible question, the bot read the question (with the memory adress), and click on one of the four possible places.
and start over untill the npc say you dont have the item needed.
|
|
|
12/26/2008, 08:10
|
#6
|
elite*gold: 0
Join Date: Apr 2006
Posts: 23
Received Thanks: 29
|
its probably best you learn to use a learner programing language first then, like kpl(phrogram) , that will teach you the basic syntax and get you used to a programing language. just feeding you code probably wouldnt help you much, especially if you dont yet understand the easy things.
|
|
|
12/26/2008, 16:54
|
#7
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
You could use AutoIt to make your macro. You can use this code for inspiration:
Code:
[B]#include <NomadMemory.au3>[/B]
While $paused3 = 0
$pos2 = MouseGetPos()
$sleep = 350
$Mem_Answer1 = 0x01E0EFCC ;the memory address for the first answer
$Mem_Answer2 = 0x01E0F104
$Mem_Answer3 = 0x01E0F23C
$Mem_Answer4 = 0x01E0F374
$Process1 = WinGetProcess("[Conquer2.0]")
MouseClick ("left", $pos2[0], $pos2[1], 1, 1)
sleep ($sleep)
$Mem_Open = _MemoryOpen($Process1)
$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]")
If $Mem_Read1 = "Of course." Then
TogglePause()
Else
sleep($sleep)
MouseClick ("left", 443, 222, 1, 5)
Sleep($sleep)
$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read2 = _MemoryRead($Mem_Answer2, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read3 = _MemoryRead($Mem_Answer3, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read4 = _MemoryRead($Mem_Answer4, $Mem_Open, "char[16]")
sleep(5)
If $Mem_Read1 = "Level 40" Or $Mem_Read1 = "20" Or $Mem_Read1 = "Boxer" Then
MouseClick ("left", 407, 226, 1, 10)
ElseIf $Mem_Read2 = "Level 40" Or $Mem_Read2 = "20" Or $Mem_Read2 = "Boxer" Then
MouseClick ("left", 667, 223, 1, 10)
ElseIf $Mem_Read3 = "Level 40" Or $Mem_Read3 = "20" Then
MouseClick ("left", 410, 246, 1, 10)
ElseIf $Mem_Read4 = "Level 40" Or $Mem_Read4 = "20" Or $Mem_Read4 = "Boxer" Then
MouseClick ("left", 674, 243, 1, 10)
EndIf
EndIf
sleep($sleep)
MouseClick ("left", 422, 222, 1, 10)
MouseMove ($pos2[0], $pos2[1], 10)
_MemoryClose($Mem_Open)
WEnd
The memory addresses wont work on your client, of course, you'll have to find them yourself, and the MouseClick coordinates probably wont work on your pc either.
What this code does is:
It clicks where your mouse is (you have to place it on the NPC guy in Phoenix Castle yourself), then it clicks on the "Let's go" answer (or whatever it is, I kinda forgot) and then it check the values of the choices you get and clicks the correct one.
|
|
|
12/26/2008, 18:35
|
#8
|
elite*gold: 0
Join Date: Mar 2006
Posts: 379
Received Thanks: 50
|
Quote:
Originally Posted by IAmHawtness
You could use AutoIt to make your macro. You can use this code for inspiration:
Code:
[B]#include <NomadMemory.au3>[/B]
While $paused3 = 0
$pos2 = MouseGetPos()
$sleep = 350
$Mem_Answer1 = 0x01E0EFCC ;the memory address for the first answer
$Mem_Answer2 = 0x01E0F104
$Mem_Answer3 = 0x01E0F23C
$Mem_Answer4 = 0x01E0F374
$Process1 = WinGetProcess("[Conquer2.0]")
MouseClick ("left", $pos2[0], $pos2[1], 1, 1)
sleep ($sleep)
$Mem_Open = _MemoryOpen($Process1)
$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]")
If $Mem_Read1 = "Of course." Then
TogglePause()
Else
sleep($sleep)
MouseClick ("left", 443, 222, 1, 5)
Sleep($sleep)
$Mem_Read1 = _MemoryRead($Mem_Answer1, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read2 = _MemoryRead($Mem_Answer2, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read3 = _MemoryRead($Mem_Answer3, $Mem_Open, "char[16]")
sleep(5)
$Mem_Read4 = _MemoryRead($Mem_Answer4, $Mem_Open, "char[16]")
sleep(5)
If $Mem_Read1 = "Level 40" Or $Mem_Read1 = "20" Or $Mem_Read1 = "Boxer" Then
MouseClick ("left", 407, 226, 1, 10)
ElseIf $Mem_Read2 = "Level 40" Or $Mem_Read2 = "20" Or $Mem_Read2 = "Boxer" Then
MouseClick ("left", 667, 223, 1, 10)
ElseIf $Mem_Read3 = "Level 40" Or $Mem_Read3 = "20" Then
MouseClick ("left", 410, 246, 1, 10)
ElseIf $Mem_Read4 = "Level 40" Or $Mem_Read4 = "20" Or $Mem_Read4 = "Boxer" Then
MouseClick ("left", 674, 243, 1, 10)
EndIf
EndIf
sleep($sleep)
MouseClick ("left", 422, 222, 1, 10)
MouseMove ($pos2[0], $pos2[1], 10)
_MemoryClose($Mem_Open)
WEnd
The memory addresses wont work on your client, of course, you'll have to find them yourself, and the MouseClick coordinates probably wont work on your pc either.
What this code does is:
It clicks where your mouse is (you have to place it on the NPC guy in Phoenix Castle yourself), then it clicks on the "Let's go" answer (or whatever it is, I kinda forgot) and then it check the values of the choices you get and clicks the correct one.
|
wow ty, i was trying to learn autoit by myself x.x
I already got nomadmemory. Thanks alot!!
|
|
|
12/30/2008, 00:25
|
#9
|
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
|
If you ever need any help with AutoIt, feel free to ask me. Ive written mostly every one of my bots in AutoIt and im quite fluent in the scripting language
Also, for some more learning on AutoIt, read my guides:
Part 1:  Part 2:
Also try UPSMan's guide on AutoIt memory:
Hiyoal
|
|
|
12/30/2008, 08:29
|
#10
|
elite*gold: 0
Join Date: Apr 2006
Posts: 31
Received Thanks: 4
|
@Hiyoal...
Ummm I've checked all of the links and i haven't figured out how to find the coordinates to where your mouse should click to answer the questions, and also how do we find the memory addresses? Sorry if I'm asking too difficult a question. 
Thanks,
S35
P.S.----I'm really new at this so if you can put it in Layman's terms that would be great XD
|
|
|
12/30/2008, 10:04
|
#11
|
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
|
To find the coordinates on screen is not a matter of memory. You will have to make your own algorithms for that.
Finding memory addresses is a CheatEngine basic. Look at the tutorial given in the CheatEngine Installer Package named Tutorial.exe.
Memory Reading is easy. Look at UPSMan's Guide and look at how it is structured.
Btw, you need NomadMemory.au3.
Quote:
|
Originally Posted by Hiyoal
#include <NomadMemory.au3>
$pid=ProcessExists("Conquer.exe")
If $pid=-1 Then
Msgbox(0,"Error","No Conquer Process Exists")
Else
$access=_MemoryOpen($pid)
$read=_MemoryRead(Address_From_CheatEngine,$access )
msgbox(0,"ReadMemory",$read)
Exit
EndIf
|
Hiyoal
|
|
|
12/30/2008, 19:41
|
#12
|
elite*gold: 0
Join Date: Apr 2006
Posts: 23
Received Thanks: 29
|
MouseGetPos() function in AutoIt returns a array, first value being the X position and 2nd being the Y position. The easy way to do this is to write a seperate program that displays the mouse position to find the coords your looking for on your screen and then youll be able to click on a position of the screen rather than coords on conquer.
code for position finder program(syntax probably wrong, dont know autoit well):
Code:
While 1
$pos = MouseGetPos()
GUICtrlSetData($lblTextX, $pos[0])
GUICtrlSetData($lblTextY,$pos[1])
Wend
that way youll constantly get a update of where your mouse is.
|
|
|
12/30/2008, 23:33
|
#13
|
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
|
Fixed your syntax.
Let me remind you though, that you would have to record these mouse positions manually, because memory does not interlink with mouse clicks. You would have to define the:
If something happens in memory then
Click to this Position (Set by YOU)
Endif
Also, If you would like to get cursor positions on the conquer2.0 client rather than the whole screen (useful if people move the Conquer Window) use:
Opt("MouseCoordMode",2)
Hope that helps a bit
Hiyoal
|
|
|
12/31/2008, 01:21
|
#14
|
elite*gold: 20
Join Date: Aug 2007
Posts: 1,749
Received Thanks: 2,199
|
Why the semi-colon after MouseGetPos() ?
|
|
|
12/31/2008, 01:43
|
#15
|
elite*gold: 20
Join Date: Mar 2007
Posts: 2,444
Received Thanks: 1,067
|
O lol, didnt see that one 
Editted again xD
Hiyoal
|
|
|
 |
|
Similar Threads
|
[Release]Macro Files for Macro Manager (AKA BOT)
02/16/2010 - Grand Chase Hacks, Bots, Cheats & Exploits - 16 Replies
@all FYI its not a cheat its just a macro file that enables you to run dungeon so you can do other choirs like mussicca said...!!
Contents
Mana Valley Dungeon Macro File
Xenia Frontier Dungeon UP and LEFT (Remap Dungeon)Macro File
Ignis Mountain Dungeon Macro File
Orc Temple Dungeon Macro File
|
Link cheatengine to a macro?
12/27/2008 - General Coding - 3 Replies
Ok, this is my first attempt at making a "game hack".
I dont know much about gamehacking, all i want to do is to make a simple macro that react to what a npc say.
I already found a text adress from the client (with cheat engine).
What i would like to do is, link the adress value to an action.
Ex:
If adress 0x019DBDBA = "Yes" Then move mouse to xxx-yyy and click.
|
LAB ARCHER LVLER macro(download from link)
12/04/2007 - CO2 Bots & Macros - 74 Replies
VERSION 1.5 RELEASE!!!!!!
POST YOUR FEEDBACKS PLEASE!!!!!!!!!
If you like it + k is welcome =)
i made this macro because prog4mer's macro was glitchy and i got mad, SO,
i totally made a new macro (from a brand new blank script) and i think its working better than prog4mer's macro(no offense prog4mer)
|
All times are GMT +1. The time now is 01:14.
|
|