Postado Outubro 15, 2011 13 anos foreach (Creature c in c.BattleList.GetCreatures) { <- erro creature c foreach (string atckmonster in listBox2.Items) { if (target.Name == atckmonster) { <- erro target if (c.IsReachable & c.Type == CreatureType.NPC) { <- erro craturetype e type if (p.TargetId == 0) { c.Attack(); } } } } }
Postado Outubro 19, 2011 13 anos Autor if (c.LoggedIn) { BattleList BL = new BattleList(c); if (p.TargetId == 0) { foreach (String atckmonster in listBox2.Items) { Creature c = BL.GetCreatures().FirstOrDefault(m => !m.IsSelf() && m.IsReachable() && Tibia.Constants.CreatureLists.AllCreatures.ContainsKey(m.Name)); if (c != null) { if (c.Name == atckmonster) { c.Attack(); } } } } } Problema ali no Creature c, acusa o c
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.