Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Bom tava fazendo 1 cavebot testei mais o button nao esta funcionando

Code inteiro

Imports Tibia

Imports Tibia.Util

Imports Tibia.Objects

Imports Tibia.Constants

Public Class Form4

Public Pick As Item = Items.Tool.Pick

Public Rope As Item = Items.Tool.Rope

Public Shovel As Item = Items.Tool.LightShovel

Public arrayWalker As String()

Dim p As Player

Dim c As Client

Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

c = Client.GetClients()(0)

p = c.GetPlayer()

End Sub

Private Sub CaveBot_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaveBot.Tick

Dim myArray() As String = Waypoint.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 Waypoint.SelectedIndex >= (Waypoint.Items.Count - 1) Then 'se listbox estiver no fim

Waypoint.SelectedIndex = 0 'ira mandar selecionar o primeiro item, fazendo assim um loop

Else

Waypoint.SelectedIndex = Waypoint.SelectedIndex + 1 'se não estiver no fim, irá pular para o próximo item da lista

End If

End If

End If

If myArray(0) = "Walk" Then

p.[GoTo] = New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Else

If myArray(0) = "Rope" Then

Dim rope__1 As New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Dim tile As Tile = c.Map.GetTile(rope__1)

c.Inventory.UseItemOnTile(Rope.Id, tile)

Else

If myArray(0) = "Shovel" Then

Dim shovel__2 As New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Dim tile As Tile = c.Map.GetTile(shovel__2)

c.Inventory.UseItemOnTile(Shovel.Id, tile)

Waypoint.SelectedIndex = Waypoint.SelectedIndex + 1

End If

End If

End If

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

Dim loc As Tibia.Objects.Location

loc.X = p.Location.X

loc.Y = p.Location.Y

loc.Z = p.Location.Z

Waypoint.Items.Add(loc.X & "," & loc.Y & "," & loc.Z)

End Sub

Private Sub TargetAll_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TargetAll.Tick

If c.LoggedIn = True Then

Dim Bl As New BattleList©

Dim BLMonsters As List(Of Creature) = Bl.GetCreatures().ToList

Dim aux As String = ""

For ind As Integer = 0 To BLMonsters.Count - 1

If BLMonsters(ind).Z <> p.Z Then Continue For

If Not BLMonsters.Item(ind).IsSelf Then

aux = BLMonsters(ind).Name.ToLower

If BLMonsters(ind).IsAttacking AndAlso BLMonsters(ind).IsReachable Then

BLMonsters(ind).Attack()

End If

Exit For

End If

Next ind

End If

End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged

If CheckBox2.Checked Then

TargetAll.Start()

Else

TargetAll.Stop()

End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim x As Integer = p.Location.X

Dim y As Integer = p.Location.Y

Waypoint.Items.Add("Rope(" & x & ", " & y & ", " & p.Location.Z.ToString() & ")")

Waypoint.SelectedIndex = 0

End Sub

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

Waypoint.Items.Add(loc.X & "," & loc.Y & "," & loc.Z)

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged

If CheckBox1.Checked Then

CaveBot.Start()

Else

CaveBot.Stop()

End If

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

Dim loc As Tibia.Objects.Location

loc.X = p.Location.X

loc.Y = p.Location.Y

loc.Z = p.Location.Z

Waypoint.Items.Add(loc.X & "," & loc.Y & "," & loc.Z)

End Sub

End Class

Eu cirie 2 Button de Rope para testar no primeiro coloquei

     	Dim x As Integer = p.Location.X

    	Dim y As Integer = p.Location.Y

    	Waypoint.Items.Add("Rope(" & x & ", " & y & ", " & p.Location.Z.ToString() & ")")

    	Waypoint.SelectedIndex = 0
e no segundo
     	Dim loc As Tibia.Objects.Location

    	loc.X = p.Location.X

    	loc.Y = p.Location.Y

    	loc.Z = p.Location.Z

    	Waypoint.Items.Add(UseItem.Tool.Rope, loc.X & "," & loc.Y & "," & loc.Z)

mais de alguma forma ele nao ta usando a rope alguem pode me ajudar para ele add a coodernada e nessa coodernada ele usar a rope ? vlws a todos (y~

tk-melhor.png

KIIZH.png

Postado
  • Autor


Private Sub CaveBot_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CaveBot.Tick

Dim myArray() As String = Waypoint.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&#231;&#227;o

If p.Location = New Location(CInt(myArray(0)), CInt(myArray(1)), CInt(myArray(2))) Then 'se a posi&#231;&#227;o do player for a que est&#225; seleciona no listbox

If Waypoint.SelectedIndex >= (Waypoint.Items.Count - 1) Then 'se listbox estiver no fim

Waypoint.SelectedIndex = 0 'ira mandar selecionar o primeiro item, fazendo assim um loop

Else

Waypoint.SelectedIndex = Waypoint.SelectedIndex + 1 'se n&#227;o estiver no fim, ir&#225; pular para o pr&#243;ximo item da lista

End If

End If

End If

If myArray(0) = "Walk" Then

p.[GoTo] = New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Else

If myArray(0) = "Rope" Then

Dim rope__1 As New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Dim tile As Tile = c.Map.GetTile(rope__1)

c.Inventory.UseItemOnTile(Rope.Id, tile)

Else

If myArray(0) = "Shovel" Then

Dim shovel__2 As New Location(Convert.ToInt32(myArray(0)), Convert.ToInt32(myArray(1)), Convert.ToInt32(myArray(2)))

Dim tile As Tile = c.Map.GetTile(shovel__2)

c.Inventory.UseItemOnTile(Shovel.Id, tile)

Waypoint.SelectedIndex = Waypoint.SelectedIndex + 1

End If

End If

End If

tu mereçe 1 head shot --' ,o entra msn la ai o code /\

tk-melhor.png

KIIZH.png

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo