te_di 2 Posted August 2, 2020 Share Posted August 2, 2020 Hey! Have a problem with quest Abduction on WotLK Bot have to use item on weakened NPC and bring him to quest giver. I've done with cathing npc, but bot continue taming npcs because quest hasn't have complete condition "Catch the npc" So my question is: How can i force bot go to quest giver after cathing npc? Sorry if wrote smth incorrect, Hope you can undesrand my exploration Thanks! Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/ Share on other sites More sharing options...
Talamin 138 Posted August 3, 2020 Share Posted August 3, 2020 Do you get some kind of Buff? If not you could check if you have a Pet with the given name. Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59375 Share on other sites More sharing options...
TheSmokie 242 Posted August 3, 2020 Share Posted August 3, 2020 If you tell me if he is your pet (use Dev tools, C# and past this code,) i can make you a custom code for this quest like i used for ponys in my death knight profile, i just need to know if he returns as a pet or not and quest info like what item you use on him etc. run this code and look at logs to see if he returns as a pet or not after you use pet on him. if(ObjectManager.GetObjectWoWUnit().Count(u => u.IsMyPet && u.Name == "Put name here")) { Logging.Write("Yes"); } else Logging.Write("no"); Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59376 Share on other sites More sharing options...
te_di 2 Posted August 7, 2020 Author Share Posted August 7, 2020 On 8/3/2020 at 8:24 AM, TheSmokie said: If you tell me if he is your pet (use Dev tools, C# and past this code,) i can make you a custom code for this quest like i used for ponys in my death knight profile, i just need to know if he returns as a pet or not and quest info like what item you use on him etc. run this code and look at logs to see if he returns as a pet or not after you use pet on him. if(ObjectManager.GetObjectWoWUnit().Count(u => u.IsMyPet && u.Name == "Put name here")) { Logging.Write("Yes"); } else Logging.Write("no"); Sorry for late response. Hope It's still avaliable. I've made what you asked and: Cannot run C# code: Compilator Error : e:\WRobot\Data\temp\am41c1gz.0.cs(22,12) : error CS0029: ( robotManager.Helpful.Var.SetVar("dbgOutput", VALUE_HERE); ) dbgOutput = Execute time: 1660 =[ Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59425 Share on other sites More sharing options...
TheSmokie 242 Posted August 7, 2020 Share Posted August 7, 2020 Oh do it like this if(ObjectManager.GetObjectWoWUnit().Count(u => u.IsMyPet && u.Name == "Put name here") == 1) { Logging.Write("Yes"); } else Logging.Write("no"); Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59426 Share on other sites More sharing options...
te_di 2 Posted August 7, 2020 Author Share Posted August 7, 2020 2 minutes ago, TheSmokie said: Oh do it like this if(ObjectManager.GetObjectWoWUnit().Count(u => u.IsMyPet && u.Name == "Put name here") == 1) { Logging.Write("Yes"); } else Logging.Write("no"); ( robotManager.Helpful.Var.SetVar("dbgOutput", VALUE_HERE); ) dbgOutput = Execute time: 1 Now Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59427 Share on other sites More sharing options...
TheSmokie 242 Posted August 7, 2020 Share Posted August 7, 2020 Look in logs Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59428 Share on other sites More sharing options...
TheSmokie 242 Posted August 7, 2020 Share Posted August 7, 2020 Should print yes or no. Once you have the npc following you Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59429 Share on other sites More sharing options...
te_di 2 Posted August 7, 2020 Author Share Posted August 7, 2020 2 minutes ago, TheSmokie said: Should print yes or no. Once you have the npc following you Gotcha. Write "no" in logs Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59430 Share on other sites More sharing options...
TheSmokie 242 Posted August 7, 2020 Share Posted August 7, 2020 Did you edit the code to your npc name? I Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59432 Share on other sites More sharing options...
te_di 2 Posted August 7, 2020 Author Share Posted August 7, 2020 1 hour ago, TheSmokie said: Did you edit the code to your npc name? I Yes. Captured Beryl Sorcerer Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59434 Share on other sites More sharing options...
TheSmokie 242 Posted August 7, 2020 Share Posted August 7, 2020 Can you provide me a video with the quest? Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59435 Share on other sites More sharing options...
te_di 2 Posted August 7, 2020 Author Share Posted August 7, 2020 1 hour ago, TheSmokie said: Can you provide me a video with the quest? Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59436 Share on other sites More sharing options...
Droidz 2738 Posted August 8, 2020 Share Posted August 8, 2020 try to remove the code u.IsMyPet && Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59441 Share on other sites More sharing options...
TheSmokie 242 Posted August 8, 2020 Share Posted August 8, 2020 Hello, This code works for your quest. Thank you @droidz for the idea of removing u.IsMyPet. (Tested,) public sealed class Abduction : QuestClass { public Abduction() { Name = "Abduction"; QuestId.Add(11590); Step.AddRange(new[] { 1, 0, 0, 0, 0 }); } public override bool IsComplete() { if(ObjectManager.GetObjectWoWUnit().Count(u => u.Name == "Captured Beryl Sorcerer") == 1) { Conditions.ForceIgnoreIsAttacked = false; } return ObjectManager.GetObjectWoWUnit().Count(u => u.Name == "Captured Beryl Sorcerer") == 1 && Conditions.ForceIgnoreIsAttacked == false; } public override bool Pulse() { string TarName = "Beryl Sorcerer"; var HostleNpc = ObjectManager.GetNearestWoWUnit(ObjectManager.GetWoWUnitByEntry(25316)); var hotspots = new List<Vector3>() { new Vector3(3486.18f, 6074.44f, 65.86797f), new Vector3(3362.955f, 6091.348f, 66.686f) }; Conditions.ForceIgnoreIsAttacked = true; if (HostleNpc != null && HostleNpc.IsValid && !ObjectManager.Me.InCombat) { GoToTask.ToPositionAndIntecractWithNpc(HostleNpc.Position, HostleNpc.Entry); return true; } if (ObjectManager.Target.Name == TarName) { if (ObjectManager.Me.InCombat) { Lua.LuaDoString("AttackTarget();"); if (ObjectManager.Target.HealthPercent <= 55) { Lua.LuaDoString("StopAttack();"); ItemsManager.UseItem(34691); return true; } } return true; } GoToTask.ToPositionAndIntecractWithNpc(hotspots[Others.Random(0, hotspots.Count - 1)], 29488, 1); return true; } } Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59444 Share on other sites More sharing options...
te_di 2 Posted August 10, 2020 Author Share Posted August 10, 2020 On 8/9/2020 at 1:25 AM, TheSmokie said: Hello, This code works for your quest. Thank you @droidz for the idea of removing u.IsMyPet. (Tested,) public sealed class Abduction : QuestClass { public Abduction() { Name = "Abduction"; QuestId.Add(11590); Step.AddRange(new[] { 1, 0, 0, 0, 0 }); } public override bool IsComplete() { if(ObjectManager.GetObjectWoWUnit().Count(u => u.Name == "Captured Beryl Sorcerer") == 1) { Conditions.ForceIgnoreIsAttacked = false; } return ObjectManager.GetObjectWoWUnit().Count(u => u.Name == "Captured Beryl Sorcerer") == 1 && Conditions.ForceIgnoreIsAttacked == false; } public override bool Pulse() { string TarName = "Beryl Sorcerer"; var HostleNpc = ObjectManager.GetNearestWoWUnit(ObjectManager.GetWoWUnitByEntry(25316)); var hotspots = new List<Vector3>() { new Vector3(3486.18f, 6074.44f, 65.86797f), new Vector3(3362.955f, 6091.348f, 66.686f) }; Conditions.ForceIgnoreIsAttacked = true; if (HostleNpc != null && HostleNpc.IsValid && !ObjectManager.Me.InCombat) { GoToTask.ToPositionAndIntecractWithNpc(HostleNpc.Position, HostleNpc.Entry); return true; } if (ObjectManager.Target.Name == TarName) { if (ObjectManager.Me.InCombat) { Lua.LuaDoString("AttackTarget();"); if (ObjectManager.Target.HealthPercent <= 55) { Lua.LuaDoString("StopAttack();"); ItemsManager.UseItem(34691); return true; } } return true; } GoToTask.ToPositionAndIntecractWithNpc(hotspots[Others.Random(0, hotspots.Count - 1)], 29488, 1); return true; } } Thanks! I will check it! Link to comment https://wrobot.eu/forums/topic/12398-quest-abduction-tame-npc-and-go-to-quest-giver/#findComment-59465 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