|
You last visited: Today at 19:44
Advertisement
@VB Programmers (Conquer)
Discussion on @VB Programmers (Conquer) within the Conquer Online 2 forum part of the MMORPGs category.
04/19/2006, 05:06
|
#1
|
elite*gold: 0
Join Date: Apr 2006
Posts: 3
Received Thanks: 0
|
I'm used to programming for a game called Tibia and in it I use a couple simple scripts, one of these scripts is this:
Code:
Public Function Tibia_Hwnd()
Dim tibiaclient As Long
tibiaclient = FindWindow("tibiaclient", vbNullString)
'Return hwnd to function
Tibia_Hwnd = tibiaclient
End Function
Anyways, how would I adjust this to Conquer?
Also, reading is like this:
Code:
Public Function Memory_ReadLong(windowHwnd As Long, Address As Long) As Long
' Declare some variables we need
Dim pid As Long ' Used to hold the Process Id
Dim phandle As Long ' Holds the Process Handle
Dim valbuffer As Long ' Long
' First get a handle to the "game" window
If (windowHwnd = 0) Then Exit Function
' We can now get the pid
GetWindowThreadProcessId windowHwnd, pid
' Use the pid to get a Process Handle
phandle = OpenProcess(PROCESS_VM_READ, False, pid)
If (phandle = 0) Then Exit Function
' Read Long
ReadProcessMemory phandle, Address, valbuffer, 4, 0&
' Return
Memory_ReadLong = valbuffer
' Close the Process Handle
CloseHandle phandle
End Function
Same question, yes I'm very new here, but it's just these that I'm suffereing with here.
(If this is the wrong thread feel free to move it~)
~Chanceler~
|
|
|
04/19/2006, 05:47
|
#2
|
elite*gold: 0
Join Date: Aug 2005
Posts: 359
Received Thanks: 14
|
How about instead of "tibiaclient", try "[Conquer2.0]"
Shouldn't be doing such challenging code if you can't understand what it's doing.
~Chris
|
|
|
04/19/2006, 06:28
|
#3
|
elite*gold: 0
Join Date: Dec 2005
Posts: 91
Received Thanks: 0
|
Quote:
Originally posted by ChrisR872@Apr 19 2006, 05:47
How about instead of "tibiaclient", try "[Conquer2.0]"
Shouldn't be doing such challenging code if you can't understand what it's doing.
~Chris
|
lol yeah hes right....
Edit: Hes right in both points he makes...
|
|
|
04/19/2006, 14:57
|
#4
|
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
|
No. where you have tibiaclint stick a vbnullstring, then put Conquer in the second arg.
FindWindow(vbnullstring, "[Conquer2.0]")
Arg1 takes a classname, second arg takes the window name.
|
|
|
04/19/2006, 15:57
|
#5
|
elite*gold: 0
Join Date: Aug 2005
Posts: 359
Received Thanks: 14
|
Yep, unknownone is correct. I thought it looked funny, but didn't take the time to look it up.
~Chris
|
|
|
04/19/2006, 17:49
|
#6
|
elite*gold: 0
Join Date: Dec 2005
Posts: 91
Received Thanks: 0
|
Quote:
Originally posted by unknownone@Apr 19 2006, 14:57
No. where you have tibiaclint stick a vbnullstring, then put Conquer in the second arg.
FindWindow(vbnullstring, "[Conquer2.0]")
Arg1 takes a classname, second arg takes the window name.
|
Smartarse
|
|
|
04/19/2006, 19:12
|
#7
|
elite*gold: 0
Join Date: Apr 2006
Posts: 3
Received Thanks: 0
|
Quote:
How about instead of "tibiaclient", try "[Conquer2.0]"
Shouldn't be doing such challenging code if you can't understand what it's doing.
~Chris
|
Tried it, doesn't work, gives me an error.
Quote:
No. where you have tibiaclint stick a vbnullstring, then put Conquer in the second arg.
FindWindow(vbnullstring, "[Conquer2.0]")
Arg1 takes a classname, second arg takes the window name.
|
I'll try it when I get home, thanks.
~Chanceler~
|
|
|
04/20/2006, 16:03
|
#8
|
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
|
Hmm, i tried to do this but it doesnt work for me....
i just replaced the "FindWindow(vbnullstring, "[Conquer2.0]")"
is this good? i never used this function....
|
|
|
04/20/2006, 16:39
|
#9
|
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
|
Quote:
Originally posted by toreddo@Apr 20 2006, 15:03
Hmm, i tried to do this but it doesnt work for me....
i just replaced the "FindWindow(vbnullstring, "[Conquer2.0]")"
is this good? i never used this function....
|
You need to declare all teh functions and constants you use.
Code:
Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpNewBytes As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpNewBytes As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Const PROCESS_VM_READ = &H10
Const PROCESS_VM_WRITE = &H20
Const PROCESS_ALL_ACCESS = &H1F0FFF
Then make sure you're reading the right address.
|
|
|
04/20/2006, 16:56
|
#10
|
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
|
Hm... still not working 
here's my code:
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As Long, lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpNewBytes As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpNewBytes As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Const PROCESS_VM_READ = &H10
Const PROCESS_VM_WRITE = &H20
Const PROCESS_ALL_ACCESS = &H1F0FFF
'' THE COMMAND BUTTON
Private Sub Command1_Click()
Call open_conq
End Sub
''THE FUNCTION
Public Function open_conq()
Dim conqclient As Long
conqclient = FindWindow(vbNullString, "[Conquer2.0]")
open_conq = conqclient
End Function
|
|
|
04/20/2006, 17:34
|
#11
|
elite*gold: 20
Join Date: Jun 2005
Posts: 1,013
Received Thanks: 381
|
Quote:
Originally posted by toreddo@Apr 20 2006, 15:56
Hm... still not working 
here's my code:
|
Whats wrong with that? Works fine. Next step you just need to read memory for whatever address you want. The function Memory_ReadLong wors for that, you just pass the handle for conquer and the adress you want to read.
for example if i wanted to read my player ID from an active conquer window, i just call
PlayerID = Memory_ReadLong(open_conq(), &H57b418)
|
|
|
04/20/2006, 21:33
|
#12
|
elite*gold: 0
Join Date: Dec 2005
Posts: 831
Received Thanks: 60
|
Quote:
Originally posted by unknownone+Apr 20 2006, 17:34--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (unknownone @ Apr 20 2006, 17:34)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin--toreddo@Apr 20 2006, 15:56
Hm... still not working 
here's my code:
|
Whats wrong with that? Works fine. Next step you just need to read memory for whatever address you want. The function Memory_ReadLong wors for that, you just pass the handle for conquer and the adress you want to read.
for example if i wanted to read my player ID from an active conquer window, i just call
PlayerID = Memory_ReadLong(open_conq(), &H57b418) [/b][/quote]
Well i tried the whol evening now, but i just dont get it work :S
is there a tutorial or something for this, because i need this very well...
And with TSearch you can find addresses right?
|
|
|
04/21/2006, 19:32
|
#13
|
elite*gold: 0
Join Date: Dec 2005
Posts: 91
Received Thanks: 0
|
Quote:
Originally posted by toreddo+Apr 20 2006, 21:33--></span><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (toreddo @ Apr 20 2006, 21:33)</td></tr><tr><td id='QUOTE'>
Quote:
Originally posted by -unknownone@Apr 20 2006, 17:34
<!--QuoteBegin--toreddo
|
Quote:
@Apr 20 2006, 15:56
Hm... still not working 
here's my code:
|
Whats wrong with that? Works fine. Next step you just need to read memory for whatever address you want. The function Memory_ReadLong wors for that, you just pass the handle for conquer and the adress you want to read.
for example if i wanted to read my player ID from an active conquer window, i just call
PlayerID = Memory_ReadLong(open_conq(), &H57b418)
|
Well i tried the whol evening now, but i just dont get it work :S
is there a tutorial or something for this, because i need this very well...
And with TSearch you can find addresses right? [/b][/quote]
yup, tsearch is good for finding address quickly
|
|
|
 |
Similar Threads
|
I need a programmers help!
04/09/2010 - CO2 Programming - 3 Replies
:D......
can anyone create a bot for DexterityCO, its like a auto npc answerer in just seconds or milisec its for the npc named "sevensages" i need it to be clicked faster... and is it possible that you can create an auto gold loot w/o getting close to the gold and in a wide looting range? and you can put gold up to 999B instead of 1B is it possible?
i really need this kind of bots and i really need your help thanks...
:handsdown::handsdown::handsdown:!
|
Looking for programmers
05/11/2009 - World of Warcraft - 0 Replies
PrimaryGaming is looking for 1 or 2 MYSQL programmers (Windows & if possible Linux) for a private WoW server. If you are interested please contact me or TheMule for more details via mIRC or Ventrilo, our contact info can be found here.
PG Team
|
All About Programmers
10/22/2008 - CO2 Programming - 35 Replies
I've made this topic to discuss people's opinions and stereotypes about programmers as a whole (opinions about individuals aren't helpful).
I've always wondered what people thought about programmers and what they expect us to act like.
This is a very, very 'out-there' thread but I think it sorta sticks to the forum topic :D
Here are a few questions that come to mind when I think about programmers:
Do you think of everyday problems in terms of programing?
Are all programmers irritable...
|
to programmers
01/20/2007 - Conquer Online 2 - 1 Replies
I'm trying to send a f2 to the game with my macro (autohotkey ControlSend, ,{F2},ahk_id %id%) however the game doesn't seem to respond to this at all. I tried sending to firefox (for f11 fullscreen) and it works. So it must be a special way that the game intercepts keypresses. Anyone can help me with this? Like what specific control of the conquer window should i use? (right now i left it blank...)
ps. If i have the window activated and use the regular send function to send keys it works. ...
|
any programmers please look
11/28/2006 - Conquer Online 2 - 14 Replies
ok i have a question not sure if possible maybe it is maybe its not.is there any way for a trojin to hit a flying archer.maybe some sort of programable thing that can be done for it im not sure what is server side and what is client side but i would like some input on this so i dont waist a bunch of my time on something that is imposible.
|
All times are GMT +1. The time now is 19:45.
|
|