Advertisement
Guest User

Bot.vb

a guest
Aug 14th, 2018
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.67 KB | None | 0 0
  1. Public Class Bot
  2.     Private Declare Function GetCursorPos Lib "user32.dll" (ByRef lpPoint As POINT_API) As Boolean
  3.  
  4.     Private Structure POINT_API
  5.         Public X As Integer
  6.         Public Y As Integer
  7.     End Structure
  8.  
  9.     Private foodXY As POINT_API
  10.  
  11.     Private Sub GetMouseXY(ByRef p As POINT_API)
  12.         GetCursorPos(p)
  13.         MessageBox.Show("OK!", "Position found")
  14.     End Sub
  15.  
  16.     Private Sub TimerEat_Tick(sender As Object, e As EventArgs) Handles TimerEat.Tick
  17.         eatfood(foodXY.X, foodXY.Y)
  18.     End Sub
  19.  
  20.     Private Sub Bot_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  21.         Try
  22.             TryAttachToProcess("Classictibia")
  23.             txtPID.Text = "PID: " + _targetProcess.Id.ToString
  24.         Catch ex As Exception
  25.             MsgBox("Injection failed!")
  26.         End Try
  27.     End Sub
  28.  
  29.     Private Sub TimerLoop_Tick(sender As Object, e As EventArgs) Handles TimerLoop.Tick
  30.         CheckMana()
  31.         If CheckInsert = True Then Application.Exit()
  32.     End Sub
  33.  
  34.     Private Sub butMana_Click(sender As Object, e As EventArgs) Handles butMana.Click
  35.         If getManaTrain = False Then getManaTrain = True Else getManaTrain = False
  36.     End Sub
  37.  
  38.     Private Sub butEat_Click(sender As Object, e As EventArgs) Handles butEat.Click
  39.         If getEatFood = False Then getEatFood = True Else getEatFood = False
  40.     End Sub
  41.  
  42.     Private Sub butREC_Click(sender As Object, e As EventArgs) Handles butREC.Click
  43.         TimerFoodPos.Enabled = True
  44.     End Sub
  45.  
  46.     Private Sub TimerFoodPos_Tick(sender As Object, e As EventArgs) Handles TimerFoodPos.Tick
  47.         GetMouseXY(foodXY)
  48.         TimerFoodPos.Stop()
  49.     End Sub
  50. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement