TricksterJoe 0 Posted October 22, 2017 Share Posted October 22, 2017 So i have this piece of code public sealed class DemonsAmongUs : QuestGrinderClass { public DemonsAmongUs() { Name = "Demons Among Us"; QuestId.AddRange(new[] { 40593 }); if ((!Quest.HasQuest(40593) && Quest.GetQuestCompleted(40593))) { Logging.Write(string.Format("Quest Completed [{0}]", 40593)); return; } else if (!Quest.HasQuest(40593) && !Quest.GetQuestCompleted(40593)) { PickUp(); QuestInfo(); return; } else if (Quest.HasQuest(40593)) { QuestInfo(); } return; } public void QuestInfo() { Step.AddRange(new[] { 1, 1, 5, 1 }); wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(-8369.698f, 240.3663f, 155.3077f), 100675, 1); wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(new Vector3(-8318.188, 290.8993, 156.8326), 246706); wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithGameObject(new Vector3(-8379.064, 322.0625, 147.0138), 246707); Logging.Write(string.Format("Demons Among us - Collected portals")); HotSpots.Add(new Vector3(-8371.924f, 268.3316f, 155.3485f)); HotSpots.Add(new Vector3(-8306.045f, 294.0955f, 156.8326f)); HotSpots.Add(new Vector3(-8324.408f, 242.0122f, 155.3472f)); HotSpots.Add(new Vector3(-8346.664f, 306.8766f, 155.3472f)); HotSpots.Add(new Vector3(-8380.933f, 321.979f, 147.1347f)); EntryTarget.Add(100993); } } 100993 - The mob ID It does everything fine, it collects both items (246706, 246707) i add hotspots and entry target, but it still won't attack anything. Why? Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/ Share on other sites More sharing options...
camelot10 155 Posted October 22, 2017 Share Posted October 22, 2017 (edited) its a bad practice to run quest inside constructor. use pulse Edited October 22, 2017 by camelot10 Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/#findComment-33980 Share on other sites More sharing options...
TricksterJoe 0 Posted October 22, 2017 Author Share Posted October 22, 2017 3 hours ago, camelot10 said: its a bad practice to run quest inside constructor. use pulse would you mind elaborating? is there a proper way to building this C# based profiles? some examples? Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/#findComment-33982 Share on other sites More sharing options...
camelot10 155 Posted October 22, 2017 Share Posted October 22, 2017 #if VISUAL_STUDIO using robotManager.Helpful; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using wManager.Wow.Bot.Tasks; using wManager.Wow.Class; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using wManager.Wow.Enums; #endif public class TheWillOfTheLichKing : QuestClass { Vector3 _npcPos = new Vector3(2348.741, -5694.941, 384.0876, "None"); public TheWillOfTheLichKing() { Name = "The Will Of The Lich King"; QuestId.Add(12714); Step.AddRange(new[] { 0, 0, 0, 0, 0 }); } public override bool IsComplete() { return ObjectManager.Me.Position.DistanceZ(_npcPos) > 30; } public override bool Pulse() { if (GoToTask.ToPositionAndIntecractWithNpc(_npcPos, 29488)) Thread.Sleep(10 * 1000); return true; } } Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/#findComment-33983 Share on other sites More sharing options...
TricksterJoe 0 Posted October 22, 2017 Author Share Posted October 22, 2017 2 minutes ago, camelot10 said: #if VISUAL_STUDIO using robotManager.Helpful; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; using wManager.Wow.Bot.Tasks; using wManager.Wow.Class; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; using wManager.Wow.Enums; #endif public class TheWillOfTheLichKing : QuestClass { Vector3 _npcPos = new Vector3(2348.741, -5694.941, 384.0876, "None"); public TheWillOfTheLichKing() { Name = "The Will Of The Lich King"; QuestId.Add(12714); Step.AddRange(new[] { 0, 0, 0, 0, 0 }); } public override bool IsComplete() { return ObjectManager.Me.Position.DistanceZ(_npcPos) > 30; } public override bool Pulse() { if (GoToTask.ToPositionAndIntecractWithNpc(_npcPos, 29488)) Thread.Sleep(10 * 1000); return true; } } How would implementing this in the XML go ? what about quest where u need to kill multiple mobs, or collect certain game objects? or doing both? sorry for all this questions, it's my first day actually working with WRobot and i am a bit lost :) Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/#findComment-33984 Share on other sites More sharing options...
camelot10 155 Posted October 22, 2017 Share Posted October 22, 2017 run any other quester profile and check WRobot\Profiles\Quester\Cache\ for answers Link to comment https://wrobot.eu/forums/topic/7450-c-not-attacking-targets/#findComment-33985 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now