Jump to content

Re-use item to get buff


KnightRyder

Recommended Posts

Is there a way to make it re-use an item if I loose a buff? For example, running in Suramar, if a patrol see's me and pops my illusion, is there a way to make it reuse the disguise then continue on with the quest? 

 

I could probably fit this into a fightclass, but I really don't want to do that to all my fightclasses. I am hoping there is some code or something I could add?

Link to comment
Share on other sites

Hello,

You can create plugin (change id in this plugin: http://wrobot.eu/files/file/517-potion-of-luck/ )

Or, if it is only for one quest, add step type 'RunCode' before 'pulse' (and after 'PickUp') quest with code:

Thread t = new Thread(() =>
{
	uint itemId = 62899;
	int questId = 93351;
	uint buffId = 135855;
	while (robotManager.Products.Products.IsStarted)
	{
		if (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause)
		{
			if (!Quest.HasQuest(questId))
				break;
			if (!ObjectManager.Me.HaveBuff(buffId))
			{
				ItemsManager.UseItem(itemId);
			}
		}
		Thread.Sleep(500);
	}
});
t.Start();

(ofcourse, change itemId, questId and buffId)

Link to comment
Share on other sites

Yes, it is only for one quest (at the moment, and I can adapt to more if needed) however I get an error:

[E] 14:15:08 - Compilator Error :
%localappdata%\Temp\gtuj2rll.0.cs(36,9) : error CS1502: The best overloaded method match for 'wManager.Wow.ObjectManager.WoWUnit.HaveBuff(string)' has some invalid arguments
%localappdata%\Temp\gtuj2rll.0.cs(36,35) : error CS1503: Argument 1: cannot convert from 'int' to 'string'

 

I've only changed the 3 ID's you mentioned, and have it running the code after pickup quest.

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