Seminko 40 Posted July 1, 2017 Share Posted July 1, 2017 Heya, i have put together a quick custome profile from bits and pieces around the forum. It doesn't give any error but does not buff me at all. Any ideas? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class CustomProfile : Custom_Profile.ICustomProfile { private bool isRunning; private static WoWLocalPlayer Me = ObjectManager.Me; public void Pulse() { while (isRunning) { if (!Me.HaveBuff("Arcane Intellect"))// && //!ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Arcane Intellect"); Logging.WriteDebug("Buffed [Arcane Intellect]"); Thread.Sleep(Usefuls.Latency + 600); } if (!Me.HaveBuff("Frost Armor"))// && !ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Frost Armor"); Logging.WriteDebug("Buffed [Frost Armor]"); Thread.Sleep(Usefuls.Latency + 600); } if (!Me.HaveBuff("Dampen Magic"))// && !ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Dampen Magic"); Logging.WriteDebug("Buffed [Dampen Magic]"); Thread.Sleep(Usefuls.Latency + 600); } Thread.Sleep(1000); } } public void Dispose() { Logging.Write("Buffer stopped."); } } Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/ Share on other sites More sharing options...
Droidz 2738 Posted July 1, 2017 Share Posted July 1, 2017 Hello, you never put "true" at "isRunning" Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28641 Share on other sites More sharing options...
Seminko 40 Posted July 1, 2017 Author Share Posted July 1, 2017 1 hour ago, Droidz said: Hello, you never put "true" at "isRunning" I updated it. It says it buffed me but it didn't. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class CustomProfile : Custom_Profile.ICustomProfile { private static WoWLocalPlayer Me = ObjectManager.Me; public void Pulse() { if (!Me.HaveBuff("Arcane Intellect"))// && //!ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Arcane Intellect"); Logging.WriteDebug("Buffed [Arcane Intellect]"); Thread.Sleep(Usefuls.Latency + 600); } if (!Me.HaveBuff("Frost Armor"))// && !ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Frost Armor"); Logging.WriteDebug("Buffed [Frost Armor]"); Thread.Sleep(Usefuls.Latency + 600); } if (!Me.HaveBuff("Dampen Magic"))// && !ObjectManager.Me.InCombat { SpellManager.CastSpellByNameLUA("Dampen Magic"); Logging.WriteDebug("Buffed [Dampen Magic]"); Thread.Sleep(Usefuls.Latency + 600); } Thread.Sleep(1000); } public void Dispose() { Logging.Write("Buffer stopped."); } } Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28653 Share on other sites More sharing options...
Seminko 40 Posted July 1, 2017 Author Share Posted July 1, 2017 It seems that if (!Me.HaveBuff("Arcane Intellect") does work, but it doesn't buff. Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28654 Share on other sites More sharing options...
Seminko 40 Posted July 1, 2017 Author Share Posted July 1, 2017 Updated the script again, but it only buffs once. Don't know how to make it check for the buffs repeatedly. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.ComponentModel; using System.Diagnostics; using System.Threading; using robotManager.Helpful; using robotManager.Products; using wManager.Wow.Helpers; using wManager.Wow.ObjectManager; public class CustomProfile : Custom_Profile.ICustomProfile { public void Pulse() { try { Buffer.Pulse(); } catch (Exception e) { Logging.WriteError("CustomProfile > Pulse(): " + e); } } public void Dispose() { try { Buffer.Dispose(); } catch (Exception e) { Logging.WriteError("CustomProfile > Dispose(): " + e); } } } internal static class Buffer { public static bool Pulse() { try { if (!ObjectManager.Me.HaveBuff("Arcane Intellect") && !ObjectManager.Me.InCombat) { SpellManager.CastSpellByNameLUA("Arcane Intellect"); Logging.WriteDebug("Buffed [Arcane Intellect]"); Thread.Sleep(Usefuls.Latency + 1600); } if (!ObjectManager.Me.HaveBuff("Frost Armor") && !ObjectManager.Me.InCombat) { SpellManager.CastSpellByNameLUA("Frost Armor"); Logging.WriteDebug("Buffed [Frost Armor]"); Thread.Sleep(Usefuls.Latency + 1600); } if (!ObjectManager.Me.HaveBuff("Dampen Magic") && !ObjectManager.Me.InCombat) { SpellManager.CastSpellByNameLUA("Dampen Magic"); Logging.WriteDebug("Buffed [Dampen Magic]"); Thread.Sleep(Usefuls.Latency + 1600); } return true; } catch (Exception e) { try { Dispose(); } catch { } Logging.WriteError("Buffer > Pulse(): " + e); Products.ProductStop(); return false; } } public static void Dispose() { Logging.Write("Stop Buffer."); } } Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28670 Share on other sites More sharing options...
Droidz 2738 Posted July 1, 2017 Share Posted July 1, 2017 Hello, replace Buffer.Pulse(); by while (wManager.Wow.Helpers.Conditions.ProductIsStarted) { if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { Buffer.Pulse(); } } Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28675 Share on other sites More sharing options...
Seminko 40 Posted July 1, 2017 Author Share Posted July 1, 2017 24 minutes ago, Droidz said: Hello, replace Buffer.Pulse(); by while (wManager.Wow.Helpers.Conditions.ProductIsStarted) { if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { Buffer.Pulse(); } } You're a godsend Droidz! Is there a helper condition sth like HaveMana? Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28680 Share on other sites More sharing options...
Droidz 2738 Posted July 1, 2017 Share Posted July 1, 2017 2 minutes ago, Seminko said: You're a godsend Droidz! Is there a helper condition sth like HaveMana? Use SpellManager.SpellUsableLUA("spell name") http://wowwiki.wikia.com/wiki/API_IsUsableSpell Seminko 1 Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28681 Share on other sites More sharing options...
Seminko 40 Posted July 1, 2017 Author Share Posted July 1, 2017 Thank you! Link to comment https://wrobot.eu/forums/topic/6335-automatic-rebuff-why-doesnt-it-work/#findComment-28693 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