Postado Agosto 20, 2011 13 anos 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~
Postado Agosto 21, 2011 13 anos Qual o code que vc ta usando pra usar a rope? Nao vi porra nenhuma nesses code
Postado Agosto 21, 2011 13 anos 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çã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 tu mereçe 1 head shot --' ,o entra msn la ai o code /\
Postado Agosto 21, 2011 13 anos Exclui vc do meu msn pessoal, Depois te add no outro #Topico Acontece algo quando vc usa esse code? Ou o char so fica parado Editado Agosto 21, 2011 13 anos por Kimoszin (veja o histórico de edições)
Postado Agosto 21, 2011 13 anos Autor ele adiciona aff me deleto do msn , ele adiciona a coodernada no waypoints - listbox1 , e quando cliclo em Active , ele fika parado
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.