Postado Dezembro 12, 2012 12 anos vou postar o codigo que estou usando no walker.. ele funciona, a rope tb, enfim.. mas qndo sobe pra parte de cima com a rope começam os problemas.. normalmente ele fica parado em cima.. caso eu desca um buraco, ele tb da problema.. a depuracao do vb.net para segue o codigo Private Sub btnAddPos_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddPos.Click Select Case comboboxPos.Text.ToLower() Case "center" listboxWalker.Items.Add("Walk:" & p.X & "," & p.Y & "," & p.Z) Case "north" listboxWalker.Items.Add("Walk:" & p.X & "," & (p.Y - 1) & "," & p.Z) Case "south" listboxWalker.Items.Add("Walk:" & p.X & "," & (p.Y + 1) & "," & p.Z) Case "east" listboxWalker.Items.Add("Walk:" & (p.X + 1) & "," & p.Y & "," & p.Z) Case "west" listboxWalker.Items.Add("Walk:" & (p.X - 1) & "," & p.Y & "," & p.Z) End Select End Sub Private Sub btnRope_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRope.Click Select Case comboboxPos.Text.ToLower() Case "center" listboxWalker.Items.Add("Rope:" & p.X & "," & p.Y & "," & p.Z) Case "north" listboxWalker.Items.Add("Rope:" & p.X & "," & (p.Y - 1) & "," & p.Z) Case "south" listboxWalker.Items.Add("Rope:" & p.X & "," & (p.Y + 1) & "," & p.Z) Case "east" listboxWalker.Items.Add("Rope:" & (p.X + 1) & "," & p.Y & "," & p.Z) Case "west" listboxWalker.Items.Add("Rope:" & (p.X - 1) & "," & p.Y & "," & p.Z) End Select End Sub Private Sub btnShovel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShovel.Click Select Case comboboxPos.Text.ToLower() Case "center" listboxWalker.Items.Add("Shovel:" & p.X & "," & p.Y & "," & p.Z) Case "north" listboxWalker.Items.Add("Shovel:" & p.X & "," & (p.Y - 1) & "," & p.Z) Case "south" listboxWalker.Items.Add("Shovel:" & p.X & "," & (p.Y + 1) & "," & p.Z) Case "east" listboxWalker.Items.Add("Shovel:" & (p.X + 1) & "," & p.Y & "," & p.Z) Case "west" listboxWalker.Items.Add("Shovel:" & (p.X - 1) & "," & p.Y & "," & p.Z) End Select End Sub Private Sub timerWalker_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerWalker.Tick Dim myArrayAction() As String = listboxWalker.SelectedItem.ToString().Split(":") Dim myArrayLocation() As String = myArrayAction(1).Split(",") Dim loc As Tibia.Objects.Location loc.X = myArrayLocation(0) loc.Y = myArrayLocation(1) loc.Z = myArrayLocation(2) Dim tile As Tile = c.Map.GetTile(loc) If (myArrayAction(0) = "Rope") Then c.Inventory.UseItemOnTile(3003, tile) End If If (myArrayAction(0) = "Shovel") Then c.Inventory.UseItemOnTile(3457, tile) End If If p.IsWalking = False Then c.GetPlayer.GoTo = New Location(CInt(myArrayLocation(0)), CInt(myArrayLocation(1)), CInt(myArrayLocation(2))) If p.Location = New Location(CInt(myArrayLocation(0)), CInt(myArrayLocation(1)), CInt(myArrayLocation(2))) Then If listboxWalker.SelectedIndex >= (listboxWalker.Items.Count - 1) Then listboxWalker.SelectedIndex = 0 Else listboxWalker.SelectedIndex = listboxWalker.SelectedIndex + 1 End If End If End If End Sub Private Sub chkEnable_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkEnable.CheckedChanged If (chkEnable.Checked) Then timerWalker.Start() Else timerWalker.Stop() End If End Sub End Class não faço ideia do que fazer pra resolver.. se puderem me ajudar...
Postado Dezembro 12, 2012 12 anos Private Sub timerWalker_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerWalker.Tick Dim myArrayAction() As String = listboxWalker.SelectedItem.ToString().Split(":") Dim myArrayLocation() As String = myArrayAction(1).Split(",") Dim loc As Tibia.Objects.Location loc.X = myArrayLocation(0) loc.Y = myArrayLocation(1) loc.Z = myArrayLocation(2) Dim tile As Tile = c.Map.GetTile(loc) Select Case myArrayAction(0) Case "Rope" c.Inventory.UseItemOnTile(3003, tile) Case "Shovel" c.Inventory.UseItemOnTile(3457, tile) Case "Walk" If p.IsWalking = False Then c.GetPlayer.GoTo = New Location(CInt(myArrayLocation(0)), CInt(myArrayLocation(1)), CInt(myArrayLocation(2))) End If End Select If listboxWalker.SelectedIndex >= (listboxWalker.Items.Count - 1) Then listboxWalker.SelectedIndex = 0 Else listboxWalker.SelectedIndex = listboxWalker.SelectedIndex + 1 End If End Sub
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.