Public Class Form1
'Variables
Dim ProcessName As String = "BlackShot"
Dim WindowClass As String = "Gamebryo Application" 'If you wanna hack another game than AVA you have to replace this string with the window class name of your game
'You can use google to find out hoplicatiow you can get the window class for the game you wanna hack with this trainer
'The easiest way to get the window class is by using WinSpy++ (Spy++)
Dim p As Process = Nothing
Dim RealName As String
Dim Xpos As Integer
Dim Ypos As Integer
Dim NewPoint As New System.Drawing.Point
Dim Panel1MouseDown As Boolean = False 'This variable was made to avoid bugs if the window gets moved while pressing the hotkey for setting it to center screen.
'Function for detecting key presses
Private Declare Function GetKeyPress Lib "user32" Alias "GetAsyncKeyState" (ByVal key As Integer) As Integer
'Initiate hack
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
On Error Resume Next 'This is a bad way to avoid crashes. I have no idea why i made it like this in the past. ^^
Me.ShowInTaskbar = False
Me.ShowIcon = False
If Process.GetProcessesByName(ProcessName).Count > 0 Then
If Process.GetProcessesByName(ProcessName).Count = 1 Then 'Process found
p = Process.GetProcessesByName(ProcessName)(0)
Else 'More than one process running
HotkeyTimer.Stop()
RefreshTimer.Stop()
MessageBox.Show(ProcessName + ".exe seems to have multiple instances! Closing...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Application.Exit()
Exit Sub
End If
Else 'Stop the hack
HotkeyTimer.Stop()
RefreshTimer.Stop()
MessageBox.Show(ProcessName + ".exe not running! Closing...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Application.Exit()
Exit Sub
End If
RefreshTimer.Start()
InitProc(WindowClass)
End Sub
'Exit on clicking the picture with the x in it
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
Application.Exit()
End Sub
'Showing the bigger x while hovering over the close button (picture)
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseEnter
PictureBox1.Image = My.Resources.CloseButtonHover10x10
End Sub
'Setting the picture back to the smaller x when the mouse is no longer over the picture
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles PictureBox1.MouseLeave
PictureBox1.Image = My.Resources.CloseButton10x10
End Sub
'Mouse gets down on Panel1
Private Sub Panel1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseDown
Panel1MouseDown = True
Xpos = MousePosition.X - Me.Location.X
Ypos = MousePosition.Y - Me.Location.Y
End Sub
'Moving the window with the mouse
Private Sub Panel1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseMove
If e.Button = MouseButtons.Left Then
NewPoint = MousePosition
NewPoint.X = NewPoint.X - Xpos
NewPoint.Y = NewPoint.Y - Ypos
Me.Location = NewPoint
End If
End Sub
'Same as Panel1_MouseDown for the title area
Private Sub Label3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label3.MouseDown
Panel1MouseDown = True
Xpos = MousePosition.X - Me.Location.X
Ypos = MousePosition.Y - Me.Location.Y
End Sub
'Same as Panel1_MouseMove for the title area
Private Sub Label3_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label3.MouseMove
If e.Button = MouseButtons.Left Then
NewPoint = MousePosition
NewPoint.X = NewPoint.X - Xpos
NewPoint.Y = NewPoint.Y - Ypos
Me.Location = NewPoint
End If
End Sub
'Setting back the MouseDown variable
Private Sub Panel1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseUp
If Panel1MouseDown = True Then
Panel1MouseDown = False
End If
End Sub
'Setting back the MouseDown variable
Private Sub Label3_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label3.MouseUp
If Panel1MouseDown = True Then
Panel1MouseDown = False
End If
End Sub
'Add hotkey functions here
Private Sub HotkeyTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HotkeyTimer.Tick
'Hide/Show window
If GetKeyPress(Keys.F7) Then
If Me.Visible = False Then
Me.Visible = True
Else
Me.Visible = False
End If
While GetKeyPress(Keys.F7)
End While
End If
'Show window and set location to center screen
If GetKeyPress(Keys.F8) Then
If Panel1MouseDown = False Then
Dim currentArea = Screen.FromControl(Me).WorkingArea
Me.Top = currentArea.Top + CInt((currentArea.Height / 2) - (Me.Height / 2))
Me.Left = currentArea.Left + CInt((currentArea.Width / 2) - (Me.Width / 2))
Me.Visible = True
End If
While GetKeyPress(Keys.F8)
End While
End If
End Sub
'Check if process is running and stop the hack if it's not
Private Sub RefreshTimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RefreshTimer.Tick
If Process.GetProcessesByName(ProcessName).Count > 0 Then
If Process.GetProcessesByName(ProcessName).Count = 1 Then 'Process found
p = Process.GetProcessesByName(ProcessName)(0)
Else 'More than one process running
HotkeyTimer.Stop()
RefreshTimer.Stop()
MessageBox.Show(ProcessName + ".exe seems to have multiple instances! Closing...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Application.Exit()
Exit Sub
End If
Else 'Stop the hack
HotkeyTimer.Stop()
RefreshTimer.Stop()
MessageBox.Show(ProcessName + ".exe not running! Closing...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Application.Exit()
End If
End Sub
'Example function for activating a function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim Adr1 As Int32 = Memory.ReadInt32(p, &HA9FF6CC) 'Address
Adr1 = Memory.ReadInt32(p, Adr1 + &HA9FF6CC) 'Offset1
Adr1 = Memory.ReadInt32(p, Adr1 + &HA9FF6CC) 'Offset2 (Add more offsets if needed)
'ATTENTION: The last offset MUST be added in the writing part (in this example the last offset is &H123)
'Replace the value (999) with what you want to change it to and the method (WriteInt32) with the method for the value type of the value you wanna change.
WriteInt32(p, Adr1 + &HA9FF6CC, 9999999)
Catch ex As Exception 'If something failed
MessageBox.Show("Writing to memory failed: " & vbCrLf & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub
End Class
That was what i did , It still shows me BlackShot.exe not running or Error in running project . I followed your instructions and Run blackshot first followed buy running the trainer as admin. Still , what is wrong? does this method support Garena version of Blackshot?