August 2, 20205 yr 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!
August 3, 20205 yr Do you get some kind of Buff? If not you could check if you have a Pet with the given name.
August 3, 20205 yr 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");
August 7, 20205 yr Author 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 =[
August 7, 20205 yr 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");
August 7, 20205 yr Author 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
August 7, 20205 yr Author 2 minutes ago, TheSmokie said: Should print yes or no. Once you have the npc following you Gotcha. Write "no" in logs
August 7, 20205 yr Author 1 hour ago, TheSmokie said: Did you edit the code to your npc name? I Yes. Captured Beryl Sorcerer
August 8, 20205 yr 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; } }
August 10, 20205 yr Author 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!
Create an account or sign in to comment