Jump to content

Use item on hostile "weakened" mob


eeny

Recommended Posts

Hey all

Anyone got a profile example that demonstrates the use of "use item on opponent with less than 25% health"?

 

I can get a  bot to attempt to use an item on a mob before combat... but once the bot starts fighting it seems it will only kill the mob- not use the item.

http://www.wowhead.com/quest=28000/do-the-imp-possible is a good example.

He should prove easy pickings. Weaken him with combat, and then use this enchanted sack to capture him. Then I'll do the talking...

 

I can see how i could use fight classes to use item at >25%, is there a way to put that sort of action in a quest profile though?

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

  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)

  4. Add step type "TurnIn" (put quest name in parameter)

Link to comment
Share on other sites

  • 2 years later...

Can Droidz or someone else who knows please explain me how to do same stuff with quest where need use item on hostile "dead" mob. This part of code

if (ObjectManager.Target.IsValid && ObjectManager.Target.IsAlive && ObjectManager.Target.HealthPercent <= 25)

do not work because when bot kill mob, he loose target.

Link to comment
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...