KnightRyder 77 Posted October 16, 2016 Share Posted October 16, 2016 Is there a way to attack or be attacked by an NPC, then when NPC is beaten at 1%, then interact with the same NPC? I found the following, but not sure how to adapt it to what I need. On 2/1/2016 at 8:24 AM, Droidz said: Use item on hostile weakened mob Add step type "PickUp" (put quest name in parameter) Add step type "RunCode", in parameter put this code: Thread t = new Thread(() => { uint itemId = 62899; int questId = 28000; while (robotManager.Products.Products.IsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (!Quest.HasQuest(questId)) break; if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive && ObjectManager.Target.HealthPercent <= 25) { ItemsManager.UseItem(itemId); } } Thread.Sleep(500); } }); t.Start(); (you need to have quest in your questlog, you can replace "62899" but the item id, "28000" by the quest id and "25" by the max target health) Add step type "Pulse" (put quest name in parameter) (use quest type kill or interact) Add step type "TurnIn" (put quest name in parameter) (sample if based on this quest: Do the Imp-Possible ) Link to comment https://wrobot.eu/forums/topic/4144-attack-npc-then-interact/ Share on other sites More sharing options...
eeny 523 Posted October 16, 2016 Share Posted October 16, 2016 This will stop the bot atacking- works like the above Thread t = new Thread(() => { int questId = 9889; while (robotManager.Products.Products.IsStarted) { if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { if (!Quest.HasQuest(questId)) break; if (ObjectManager.Target.IsAlive && ObjectManager.Target.HealthPercent <= 30) { wManager.Wow.Helpers.Fight.StopFight(); } } Thread.Sleep(500); } }); t.Start(); Create a quest pulse to interact with NPC... run this code before- profit! Link to comment https://wrobot.eu/forums/topic/4144-attack-npc-then-interact/#findComment-19225 Share on other sites More sharing options...
KnightRyder 77 Posted October 16, 2016 Author Share Posted October 16, 2016 YES. I was able to finish the quest because of this. Thank you sir. Link to comment https://wrobot.eu/forums/topic/4144-attack-npc-then-interact/#findComment-19229 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