July 1, 20178 yr 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."); } }
July 1, 20178 yr Author 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."); } }
July 1, 20178 yr Author It seems that if (!Me.HaveBuff("Arcane Intellect") does work, but it doesn't buff.
July 1, 20178 yr Author 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."); } }
July 1, 20178 yr Hello, replace Buffer.Pulse(); by while (wManager.Wow.Helpers.Conditions.ProductIsStarted) { if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { Buffer.Pulse(); } }
July 1, 20178 yr Author 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?
July 1, 20178 yr 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
Create an account or sign in to comment