Desculpe reabrir o tópico, mas to apanhando pra fazer esse walker rodar..
seguinte.
criei um form1, o qual pega o nome do char pra abrir o bot
depois abre o form2..
ae nesse form2 tem um button que abre o form3
esse form3 coloquei o codigo do walk, mas nao ta funcionando..
qndo rodo pelo vb, da o erro marcado em amarelo na imagem anexada abaixo..
vo deixar o codigo do form3.. se puderem ver pra achar o erro..
enquanto isso vou quebrando a cabeça aqui, mas ja to agarrado nisso há tempos..
no aguardo
valeu
Imports Tibia
Imports Tibia.Util
Imports Tibia.Objects
Imports Tibia.Constants
Public Class Form3
Dim c As Client
Dim p As Player
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim loc As Tibia.Objects.Location
loc.X = p.Location.X
loc.Y = p.Location.Y
loc.Z = p.Location.Z
ListBox1.Items.Add(loc.X & "," & loc.Y & "," & loc.Z)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Timer1.Enabled = True
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Timer1.Enabled = False
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim myArray() As String = ListBox1.SelectedItem.ToString().Split(",") 'separa os items do ListBox1
If p.IsWalking = False Then 'verifica se o player esta andando
c.GetPlayer.GoTo = New Location(CInt(myArray(0)), CInt(myArray(1)), CInt(myArray(2))) 'manda o player para essa posição
If p.Location = New Location(CInt(myArray(0)), CInt(myArray(1)), CInt(myArray(2))) Then 'se a posição do player for a que está seleciona no listbox
If ListBox1.SelectedIndex >= (ListBox1.Items.Count - 1) Then 'se listbox estiver no fim
ListBox1.SelectedIndex = 0 'ira mandar selecionar o primeiro item, fazendo assim um loop
Else
ListBox1.SelectedIndex = ListBox1.SelectedIndex + 1 'se não estiver no fim, irá pular para o próximo item da lista
End If
End If
End If
End Sub
End Class