Jump to content

Recommended Posts

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

  1. Add step type "PickUp" (put quest name in parameter)
  2. 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)

  3. Add step type "Pulse" (put quest name in parameter) (use quest type kill or interact)

  4. 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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...