Postado Janeiro 25, 2011 14 anos Autor eu ja verifiquei isso , porem acredito que elas estão declaradas corretamente. tanto no form do healer quanto no form principal aki segue os codigos : form healer : Imports Tibia Imports Tibia.Util Imports Tibia.Objects Imports Tibia.Constants Public Class Form4 Public c As Client Public p As Player Private Sub TimerSpell_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerSpell.Tick If p.Health <= TextBox1.Text Then If p.Mana >= TextBox2.Text Then c.Console.Say(TextBox3.Text) End If End If End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked Then TimerSpell.Enabled = True Else TimerSpell.Enabled = False End If End Sub End Class form principal : Imports Tibia Imports Tibia.Util Imports Tibia.Objects Imports Tibia.Constants Public Class Form2 Public c As Client Public p As Player Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load c = Form1.ComboBox1.SelectedItem If c.LoggedIn Then p = c.GetPlayer Me.Text = "EmoBot [" + p.Name + "]" Form1.Hide() Else Me.Hide() MsgBox("Você precisa escolher o seu personagem.") End If End Sub Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged If c.LoggedIn Then If CheckBox2.Checked Then p.Skull = Skull.Red Else p.Skull = Skull.None End If End If End Sub Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged If c.LoggedIn Then If CheckBox3.Checked Then p.Skull = Skull.Black Else p.Skull = Skull.None End If End If End Sub Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged If c.LoggedIn Then If CheckBox4.Checked Then p.Skull = Skull.White Else p.Skull = Skull.None End If End If End Sub Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged If c.LoggedIn Then If CheckBox1.Checked Then c.Map.FullLightOn() Else c.Map.FullLightOff() End If End If End Sub Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged If c.LoggedIn Then If CheckBox5.Checked Then p.Addon = OutfitAddon.Addon1 Else p.Addon = OutfitAddon.None End If End If End Sub Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox6.CheckedChanged If c.LoggedIn Then If CheckBox6.Checked Then p.Addon = OutfitAddon.Addon2 Else p.Addon = OutfitAddon.None End If End If End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbmont.SelectedIndexChanged If c.LoggedIn Then If cmbmont.Text = "Widow Queen" Then p.MountId = 368 End If If cmbmont.Text = "Rapid Bird" Then p.MountId = 369 End If If cmbmont.Text = "War Bear" Then p.MountId = 370 End If If cmbmont.Text = "Black Sheep" Then p.MountId = 371 End If If cmbmont.Text = "Midnight Panther" Then p.MountId = 372 End If If cmbmont.Text = "Draptor" Then p.MountId = 373 End If If cmbmont.Text = "Titanica" Then p.MountId = 374 End If If cmbmont.Text = "Tin Lizzard" Then p.MountId = 375 End If If cmbmont.Text = "Blazebringer" Then p.MountId = 376 End If If cmbmont.Text = "Rapid Boar" Then p.MountId = 377 End If If cmbmont.Text = "Stampor" Then p.MountId = 378 End If If cmbmont.Text = "Undead Cavebear" Then p.MountId = 379 End If If cmbmont.Text = "- Nenhuma -" Then p.MountId = 0 End If End If End Sub Private Sub ComboBox1_SelectedIndexChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged If ComboBox1.SelectedItem = "Beggar Male" Then p.OutfitType = Tibia.Constants.OutfitType.BeggarMale ElseIf ComboBox1.SelectedItem = "Assassin Male" Then p.OutfitType = Tibia.Constants.OutfitType.AssassinMale End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click form3.show() End Sub Private Sub TimerAutoHaste_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerAutoHaste.Tick If utanigranhur.Checked Then If p.Mana >= 100 And p.HasFlag(Tibia.Constants.Flag.Hasted) = False Then c.Console.Say("Utani Gran Hur") End If ElseIf utanihur.Checked Then If p.Mana >= 60 And p.HasFlag(Tibia.Constants.Flag.Hasted) = False Then c.Console.Say("Utani Hur") End If End If End Sub Private Sub ChkAutoHaste_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChkAutoHaste.CheckedChanged If ChkAutoHaste.Checked Then TimerAutoHaste.Start() utanihur.Enabled = False utanigranhur.Enabled = False Else TimerAutoHaste.Stop() utanihur.Enabled = True utanigranhur.Enabled = True End If End Sub Private Sub utamovita_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles utamovita.CheckedChanged If utamovita.Checked Then timerutamovita.Start() Else timerutamovita.Stop() End If End Sub Private Sub timerutamovita_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerutamovita.Tick If p.Mana >= 40 And p.HasFlag(Tibia.Constants.Flag.ProtectedByMagicShield) = False Then c.Console.Say("Utamo Vita") End If End Sub Private Sub CheckBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox7.CheckedChanged If CheckBox7.Enabled Then exanapoxtimer.Start() Else exanapoxtimer.Stop() End If End Sub Private Sub exanapoxtimer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exanapoxtimer.Tick If p.Mana >= 30 And p.HasFlag(Tibia.Constants.Flag.Poisoned) = True Then c.Console.Say("exana pox") End If End Sub Private Sub CheckBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox8.CheckedChanged If CheckBox8.Enabled Then timerparalize.Start() Else timerparalize.Stop() End If End Sub Private Sub timerparalize_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timerparalize.Tick If p.Mana >= 30 And p.HasFlag(Tibia.Constants.Flag.Paralyzed) = True Then c.Console.Say("utani hur") End If End Sub Private Sub CheckBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) If CheckBox9.Enabled Then TimerDance.Start() Else TimerDance.Stop() End If End Sub Private Sub CheckBox9_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub TimerDance_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TimerDance.Tick Dim min As Integer = NumericUpDown1.Value TimerDance.Interval = min * 60000 p.Turn(Direction.Up) p.Turn(Direction.Up) p.Turn(Direction.Down) p.Turn(Direction.Down) p.Turn(Direction.Left) p.Turn(Direction.Left) p.Turn(Direction.Right) p.Turn(Direction.Right) End Sub Private Sub CheckBox9_CheckedChanged_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox9.CheckedChanged If CheckBox9.Checked Then TimerDance.Start() NumericUpDown1.Enabled = False Else TimerDance.Stop() NumericUpDown1.Enabled = True End If End Sub Private Sub CheckBox10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox10.CheckedChanged If c.LoggedIn Then If CheckBox10.Checked Then p.Addon = OutfitAddon.Both Else p.Addon = OutfitAddon.None End If End If End Sub Private Sub CheckBox11_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox11.CheckedChanged If CheckBox11.Checked Then p.WarIcon = WarIcon.Blue Else p.WarIcon = WarIcon.None End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Form4.Show() End Sub End Class HÁ TORNEI PUBLIC E O ERRO AINDA PERSISTE ;/ POR FAVOR ME AJUDEM ;X Editado Janeiro 25, 2011 14 anos por Rick Martin (veja o histórico de edições)
Postado Janeiro 25, 2011 14 anos Faça o seguinte, de 2 clicks no form do heal (irá abrir o evento load do mesmo) e adiciona as seguintes linhas: c = Form1.ComboBox1.SelectedItem p = c.GetPlayer e veja se irá funcionar! Pois o erro é que esta dando é que o "p" esta nulo. # Regras Gerais - TibiaKing.com # Contato: [email protected]Não respondo dúvidas via MP.
Postado Janeiro 25, 2011 14 anos Autor Faça o seguinte, de 2 clicks no form do heal (irá abrir o evento load do mesmo) e adiciona as seguintes linhas: c = Form1.ComboBox1.SelectedItem p = c.GetPlayer e veja se irá funcionar! Pois o erro é que esta dando é que o "p" esta nulo. agora ele não da nenhum erro então agr o bot nao trava mais agr ele tb nao está healando segue a imagem
Postado Janeiro 25, 2011 14 anos bom, agora os erros provavelmente serão relacionadas a valores de variaveis, procure utilizar a depuração do visual studio (ou o express mesmo) segue um link que explica como fazer tal depuração Link1 Link2 # Regras Gerais - TibiaKing.com # Contato: [email protected]Não respondo dúvidas via MP.
Postado Janeiro 25, 2011 14 anos Autor bom, agora os erros provavelmente serão relacionadas a valores de variaveis, procure utilizar a depuração do visual studio (ou o express mesmo) segue um link que explica como fazer tal depuração Link1 Link2 obrigado estarei lendo os links e mais tarde postarei os resultados. e pelo esforço em tentar me ajudar REP +
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.