Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2
You last visited: Today at 09:30

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



VB Programmers... Hopefully *M* - Help Needed

Discussion on VB Programmers... Hopefully *M* - Help Needed within the Conquer Online 2 forum part of the MMORPGs category.

Reply
 
Old   #1
 
Stink.Fly's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 103
Received Thanks: 16
VB Programmers... Hopefully *M* - Help Needed

Ok, ive been taking apart *M*s source code for his multi hack... trying to figure out how it works etc, but as of yet, still cannot find out how to send mouse events PURELY to a hooked client... This is the entire code for the main form. (ive edited out loads of code which didnt relate to the clicker function.

Code:
[SIZE=1]Dim Handle As Long[/SIZE]
[SIZE=1]Dim ProcessID As Long[/SIZE]
[SIZE=1]Dim ProcessHandle As Long[/SIZE]
[SIZE=1]Dim POINT_API As POINTAPI[/SIZE]
[SIZE=1]Dim X As Long, Y As Long, Z As Long, A As Long[/SIZE]
[SIZE=1]Private Const PROCESS_ALL_ACCESS = &H1F0FFF[/SIZE]
[SIZE=1]Option Explicit[/SIZE]
 
[SIZE=1]Private Sub LeftClick()[/SIZE]
[SIZE=1][COLOR=black]'   mouse_event LEFT_DOWN, 0&, 0&, X, Y[/COLOR][/SIZE]
[SIZE=1][COLOR=black]'   mouse_event LEFT_UP, 0&, 0&, X, Y[/COLOR][/SIZE]
[SIZE=1][COLOR=blue]   mouse_event RIGHT_DOWN, 0&, 0&, X, Y - For testing ive only enabled these clicks.[/COLOR][/SIZE]
[SIZE=1][COLOR=blue]   mouse_event RIGHT_UP, 0&, 0&, X, Y[/COLOR][/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Function GetMousePosX() As Long[/SIZE]
[SIZE=1]   Z = GetCursorPos(POINT_API)[/SIZE]
[SIZE=1]   GetMousePosX = POINT_API.X[/SIZE]
[SIZE=1]End Function[/SIZE]
 
[SIZE=1]Private Function GetMousePosY() As Long[/SIZE]
[SIZE=1]   Z = GetCursorPos(POINT_API)[/SIZE]
[SIZE=1]   GetMousePosY = POINT_API.Y[/SIZE]
[SIZE=1]End Function[/SIZE]
 
[SIZE=1]Private Function GetKeyState(Key As Integer) As Boolean[/SIZE]
[SIZE=1]   GetKeyState = CBool(GetAsyncKeyState(Key))[/SIZE]
[SIZE=1]End Function[/SIZE]
 
[SIZE=1]Private Sub StartClick()[/SIZE]
[SIZE=1]   If Clicker.Enabled = False Then[/SIZE]
[SIZE=1]       Clicker.Interval = CInt(Val(Text8.Text))[/SIZE]
[SIZE=1]       Clicker.Enabled = True[/SIZE]
 
[SIZE=1]       Label13.Caption = " Status: Clicking..."[/SIZE]
[SIZE=1]   End If[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub StopClick()[/SIZE]
[SIZE=1]   If Clicker.Enabled = True Then[/SIZE]
[SIZE=1]       Clicker.Enabled = False[/SIZE]
 
[SIZE=1]       Label13.Caption = " Status: Clicking Stopped!"[/SIZE]
[SIZE=1]   End If[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub ClickCounter_Timer()[/SIZE]
[SIZE=1]   If A = 0 Then[/SIZE]
[SIZE=1]       ClickCounter.Enabled = False[/SIZE]
[SIZE=1]       Command24.Caption = "Click"[/SIZE]
[SIZE=1]       Label3.Caption = "0 Clicks Per Sec"[/SIZE]
[SIZE=1]   Else[/SIZE]
[SIZE=1]       Label3.Caption = CStr(A * 0.25) & " Clicks Per Sec"[/SIZE]
[SIZE=1]       A = 0[/SIZE]
[SIZE=1]   End If[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Clicker_Timer()[/SIZE]
[SIZE=1]   Call LeftClick[/SIZE]
[SIZE=1]   DoEvents[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Command22_Click()[/SIZE]
[SIZE=1]   Call StartClick[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Command23_Click()[/SIZE]
[SIZE=1]   Call StopClick[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Command24_Click()[/SIZE]
[SIZE=1]   If ClickCounter.Enabled = False Then ClickCounter.Enabled = True[/SIZE]
[SIZE=1]   If Label3.Caption <> "Counting..." Then Label3.Caption = "Testing..."[/SIZE]
 
[SIZE=1]   A = A + 1[/SIZE]
[SIZE=1]   Command24.Caption = CStr(A)[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Hotkey_XY_Timer()[/SIZE]
[SIZE=1]   If GetKeyState(vbKeyF9) = True Then Call StartClick[/SIZE]
[SIZE=1]   If GetKeyState(vbKeyF10) = True Then Call StopClick[/SIZE]
 
[SIZE=1]   Label14.Caption = "X: " & CStr(GetMousePosX)[/SIZE]
[SIZE=1]   Label16.Caption = "Y: " & CStr(GetMousePosY)[/SIZE]
 
[SIZE=1]   DoEvents[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Timer1_Timer() 'Window Hooking[/SIZE]
[SIZE=1]   Handle = FindWindow(vbNullString, "[Conquer2.0]")[/SIZE]
[SIZE=1]   GetWindowThreadProcessId Handle, ProcessID[/SIZE]
[SIZE=1]   ProcessHandle = OpenProcess(PROCESS_ALL_ACCESS, False, ProcessID)[/SIZE]
[SIZE=1]   If Handle > 0 Then[/SIZE]
[SIZE=1]   WinHook.Text = "Hooked"[/SIZE]
[SIZE=1]   Else[/SIZE]
[SIZE=1]   WinHook.Text = "Waiting..."[/SIZE]
[SIZE=1]   End If[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Form_Load()[/SIZE]
[SIZE=1]frm_MultiHack.Show[/SIZE]
[SIZE=1]frm_MultiHack.Visible = True[/SIZE]
[SIZE=1]Call Timer3_Timer[/SIZE]
[SIZE=1]Timer4.Enabled = False[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Form_Unload(Cancel As Integer)[/SIZE]
[SIZE=1]Call Option1_Click 'Turn Speed off on close[/SIZE]
[SIZE=1]Timer4.Enabled = False[/SIZE]
[SIZE=1]Timer5.Enabled = False[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Timer4_Timer()[/SIZE]
[SIZE=1]Timer4.Enabled = True[/SIZE]
[SIZE=1]SendKeys "{F10}"[/SIZE]
[SIZE=1]End Sub[/SIZE]
 
[SIZE=1]Private Sub Timer5_Timer() '//Spam F10/XP Skill[/SIZE]
[SIZE=1]Timer5.Enabled = False[/SIZE]
[SIZE=1]Call Timer4_Timer[/SIZE]
[SIZE=1]End Sub[/SIZE]
So if someone could possibly give me the syntax for sending clicks to a specific window handle plzz letme know...

I heard something about SendMessage (hWnd, event, reply)

And question for *M*.. is this where you got the click code from?
Stink.Fly is offline  
Old 03/06/2008, 15:06   #2
 
elite*gold: 0
Join Date: Sep 2006
Posts: 774
Received Thanks: 8,576
*** will you people stop saying "hooked", just because you open the process handle its NOT hooked. A hook is a function working in between or before original function allowing you to manipulate/intercept parameters passed on to it, etc.
And yes as I said SendMessage works..
phize is offline  
Old 03/06/2008, 15:46   #3
 
elite*gold: 0
Join Date: Nov 2006
Posts: 65
Received Thanks: 284
This is what i use in my autoclicker, look .

well here comes the part when sending mouse clicks..
That function there i took somewhere when i was searching info about this.

Code:
SendMessage Handlex, WM_RBUTTONDOWN, 1&, MakeLong(15, 20)
SendMessage Handlex, WM_RBUTTONUP, 1&, MakeLong(15, 20)

Function MakeLong(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
MakeLong = (HiWord * &H10000) Or (LoWord And &HFFFF&)
End Function
Handlex is handle of child window of CO.
Makelong(coordX,coordY)

and WM_RBUTTONDOWN = &H204
mr.anzi is offline  
Thanks
1 User
Old 03/06/2008, 16:31   #4
 
Stink.Fly's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 103
Received Thanks: 16
Quote:
Originally Posted by RootCore View Post
God will you people stop saying "hooked", just because you open the process handle its NOT hooked. A hook is a function working in between or before original function allowing you to manipulate/intercept parameters passed on to it, etc.
And yes as I said SendMessage works..
-.- hello? new to vb... how was I supposed to know that? Makes sense though so thanks.

Quote:
Originally Posted by mr.anzi View Post
This is what i use in my autoclicker, look .

well here comes the part when sending mouse clicks..
That function there i took somewhere when i was searching info about this.

Code:
SendMessage Handlex, WM_RBUTTONDOWN, 1&, MakeLong(15, 20)
SendMessage Handlex, WM_RBUTTONUP, 1&, MakeLong(15, 20)
 
Function MakeLong(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
MakeLong = (HiWord * &H10000) Or (LoWord And &HFFFF&)
End Function
Handlex is handle of child window of CO.
Makelong(coordX,coordY)

and WM_RBUTTONDOWN = &H204
w00t, ill give it a go. Thanks
Stink.Fly is offline  
Old 03/06/2008, 18:10   #5
 
Stink.Fly's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 103
Received Thanks: 16
kk... now it seems i need to get the child window of a client... WTF? How can it have a child window if its all contained inside the main window? My idea of chld would be a form/window generated from withtin the parent window... correct or not?
Stink.Fly is offline  
Old 03/06/2008, 19:22   #6
 
elite*gold: 0
Join Date: Sep 2006
Posts: 774
Received Thanks: 8,576
That is correct, and the whole user interface of CO is made of child windows.
phize is offline  
Old 03/07/2008, 10:46   #7
 
Stink.Fly's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 103
Received Thanks: 16
Quote:
Originally Posted by RootCore View Post
That is correct, and the whole user interface of CO is made of child windows.
mkay, and to retrieve these child handles?
Stink.Fly is offline  
Reply


Similar Threads Similar Threads
sa mga programmers.......
03/09/2024 - Grand Chase Philippines - 5 Replies
gawa nman sana kayo ng fragment hack hehehehhe ang hirap ng drop ngaun kahit saan.... 2frags per finish
inventory clean up. Programmers needed
07/21/2009 - Archlord - 14 Replies
Ok i've come to the point when this becomes obligatory and first thing on to do list.. i will need your help kind people, im talking propably to emme, fireandice, and other experianced beasts in programming. the idea is to make a module that can be attached to archlord process- - inventory bag 4 has to be open it will recognize items you hold in your backpack via memory read. then it will delete all unwanted items(in config u can add the item id' to the 'dont trash' list.
VB Programmers Needed
08/20/2005 - Conquer Online 2 - 2 Replies
Ok, Guys After working on this bot I cant seem to get this screenshot routine to work. As its really late im going to bed, But I want know if anyone has a function in VB that can get a screenshot of the CO WINDOW not the whole desktop. I have made something that does what I want when I test it on notepad or something. But CO doesnt want to be captured. In the morning ill put up my code becuase its too messy right now. So yeah. Also: You know the auto miner that makes the picture...



All times are GMT +2. The time now is 09:30.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.