VB.NET - TUTORIAL AUTO POTION
Página 1 de 1
VB.NET - TUTORIAL AUTO POTION
EAI PESSOAL VIM DEIXAR O TUTO DE AUTO POTION !!
CÓDIGOS :
Em cima do public class form 1
Código:
Imports System.Runtime.InteropServices
Imports System.Threading
De baixo de Public class Form
Código:
<DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, _
CharSet:=CharSet.Unicode, EntryPoint:="keybd_event", _
ExactSpelling:=True, SetLastError:=True)> _
Public Shared Sub KEYB_Event(ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal Tecla As Keys) As Keys
Declare Sub MOUSE_EVENT Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Const VK_CONTROL As Byte = &H11
Const VK_KEY_Q As Byte = &H51
Const VK_KEY_W As Byte = &H57
Const VK_KEY_E As Byte = &H45
Const KEYEVENTF_KEYUP As Byte = &H2
AGORA ADD 1 TIMER E 2 BUTTON : BUTTON 1 ATIVAR E BUTTON 2 DESATIVAR
No Button 1
CÓDIGO :
Timer1.start
No Button 2
CODIGO :
Timer1.stop
No TIMER
CÓDIGO:
Const VK_KEY_1 As Byte = &H31
Const VK_KEY_2 As Byte = &H32
Const VK_KEY_3 As Byte = &H33
KEYB_Event(VK_KEY_Q, 0, 0, 0) 'Segura o button 1
KEYB_Event(VK_KEY_Q, 0, 0, 0)
Thread.Sleep(60) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_W, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 1
KEYB_Event(VK_KEY_W, 0, 0, 0) 'Segura o button 2
Thread.Sleep(26) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 2
KEYB_Event(VK_KEY_E, 0, 0, 0) 'Segura o button 3
Thread.Sleep(60) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 3
CRÉDITOS :
Eric
CÓDIGOS :
Em cima do public class form 1
Código:
Imports System.Runtime.InteropServices
Imports System.Threading
De baixo de Public class Form
Código:
<DllImport("user32.dll", CallingConvention:=CallingConvention.StdCall, _
CharSet:=CharSet.Unicode, EntryPoint:="keybd_event", _
ExactSpelling:=True, SetLastError:=True)> _
Public Shared Sub KEYB_Event(ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer)
End Sub
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal Tecla As Keys) As Keys
Declare Sub MOUSE_EVENT Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10
Const VK_CONTROL As Byte = &H11
Const VK_KEY_Q As Byte = &H51
Const VK_KEY_W As Byte = &H57
Const VK_KEY_E As Byte = &H45
Const KEYEVENTF_KEYUP As Byte = &H2
AGORA ADD 1 TIMER E 2 BUTTON : BUTTON 1 ATIVAR E BUTTON 2 DESATIVAR
No Button 1
CÓDIGO :
Timer1.start
No Button 2
CODIGO :
Timer1.stop
No TIMER
CÓDIGO:
Const VK_KEY_1 As Byte = &H31
Const VK_KEY_2 As Byte = &H32
Const VK_KEY_3 As Byte = &H33
KEYB_Event(VK_KEY_Q, 0, 0, 0) 'Segura o button 1
KEYB_Event(VK_KEY_Q, 0, 0, 0)
Thread.Sleep(60) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_W, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 1
KEYB_Event(VK_KEY_W, 0, 0, 0) 'Segura o button 2
Thread.Sleep(26) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 2
KEYB_Event(VK_KEY_E, 0, 0, 0) 'Segura o button 3
Thread.Sleep(60) ' aqui é o tempo que passa pra outra magia
KEYB_Event(VK_KEY_E, 0, KEYEVENTF_KEYUP, 0) 'Solta o button 3
CRÉDITOS :
Eric
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos