KnightRyder 77 Posted October 15, 2016 Share Posted October 15, 2016 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 https://wrobot.eu/forums/topic/4126-re-use-item-to-get-buff/ Share on other sites More sharing options...
Droidz 2738 Posted October 15, 2016 Share Posted October 15, 2016 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) KnightRyder 1 Link to comment https://wrobot.eu/forums/topic/4126-re-use-item-to-get-buff/#findComment-19142 Share on other sites More sharing options...
KnightRyder 77 Posted October 15, 2016 Author Share Posted October 15, 2016 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 https://wrobot.eu/forums/topic/4126-re-use-item-to-get-buff/#findComment-19167 Share on other sites More sharing options...
Droidz 2738 Posted October 16, 2016 Share Posted October 16, 2016 Code fixed in original post. Link to comment https://wrobot.eu/forums/topic/4126-re-use-item-to-get-buff/#findComment-19185 Share on other sites More sharing options...
KnightRyder 77 Posted October 16, 2016 Author Share Posted October 16, 2016 6 hours ago, Droidz said: Code fixed in original post. Thank you so much. Works perfectly now. Link to comment https://wrobot.eu/forums/topic/4126-re-use-item-to-get-buff/#findComment-19219 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