Jump to content

Seminko

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Seminko

  1. @Droidz @iMod guys save me, this is now not related to vanilla or retail. I solved the problem using Timer but for that to work I had to scrap the static bool Pulse and put everything under the main routine. It works great, unfortunately, something got probably wrong with Dispose since when I click the stop button in the bot GUI, it crashes. HELP! 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; using Timer = robotManager.Helpful.Timer; public class CustomProfile : Custom_Profile.ICustomProfile { private const int CastEverySeconds = 120; private bool _isRunning; private Timer _timer; public void Pulse() { try { while (wManager.Wow.Helpers.Conditions.ProductIsStarted) { if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause) { try { if (!ObjectManager.Me.HaveBuff("Arcane Intellect") && !ObjectManager.Me.InCombat && !ObjectManager.Me.IsMounted && SpellManager.SpellUsableLUA("Arcane Intellect")) { SpellManager.CastSpellByNameLUA("Arcane Intellect", true); Logging.WriteDebug("Buffed [Arcane Intellect]"); Thread.Sleep(Usefuls.Latency + 1500); } if (!ObjectManager.Me.HaveBuff("Ice Armor") && !ObjectManager.Me.IsMounted && SpellManager.SpellUsableLUA("Ice Armor") && !ObjectManager.Me.InCombat) { SpellManager.CastSpellByNameLUA("Ice Armor"); Logging.WriteDebug("Buffed [Ice Armor]"); Thread.Sleep(Usefuls.Latency + 1500); } if (!ObjectManager.Me.HaveBuff("Dampen Magic") && !ObjectManager.Me.InCombat && !ObjectManager.Me.IsMounted && SpellManager.SpellUsableLUA("Dampen Magic")) { SpellManager.CastSpellByNameLUA("Dampen Magic", true); Logging.WriteDebug("Buffed [Dampen Magic]"); Thread.Sleep(Usefuls.Latency + 1500); } if (!ItemsManager.HasItemById(5514) && !ObjectManager.Me.InCombat && !ObjectManager.Me.IsMounted && SpellManager.SpellUsableLUA("Conjure Mana Agate")) { SpellManager.CastSpellByNameLUA("Conjure Mana Agate"); Logging.WriteDebug("Conjure Mana Agate"); Thread.Sleep(Usefuls.Latency + 2000); } if (ItemsManager.HasItemById(5514) && !ObjectManager.Me.IsMounted && ObjectManager.Me.ManaPercentage < 15 && (_timer == null || _timer.IsReady)) { ItemsManager.UseItem(5514); _timer = new Timer(CastEverySeconds * 1000); Logging.WriteDebug("Using Mana Agate"); Thread.Sleep(Usefuls.Latency + 1500); } } catch (Exception e) { try { Dispose(); } catch { } Logging.WriteError("Buffer > Pulse(): " + e); Products.ProductStop(); } } Thread.Sleep(Usefuls.Latency + 1000); } } catch (Exception e) { Logging.WriteError("CustomProfile > Pulse(): " + e); } } public void Dispose() { try { Dispose(); } catch (Exception e) { Logging.WriteError("CustomProfile > Dispose(): " + e); } } }
  2. @Droidz Alright, so updated your script but it still says it's not usable for some reason: string s = wManager.Wow.Helpers.ItemsManager.GetItemSpell(5514); if (!string.IsNullOrWhiteSpace(s)) { bool isUsable = wManager.Wow.Helpers.SpellManager.SpellUsableLUA(s); if (isUsable) { Logging.WriteDebug("Usable"); } else { Logging.WriteDebug("Not usable"); } }
  3. I think we need to use GetActionCooldown --> http://wowprogramming.com/docs/api/GetActionCooldown
  4. Oh damn... I thought we were on to sth... well, thanks anyways
  5. IsUsableItem does not seem to exist in Vanilla. The closest to I was able to find for vanilla is GetActionCooldown Not sure how to structure it though.
  6. Omg, you're right, I accidentaly deleted return true. Back to Csharp, I'm quite familiar with AutoIt and when you declare a variable it can be reached from anywhere in the whole script, that's why i'm so confused. :) Now i tried finding out the issue but it seems even though I have the item and the item is usable it returns false: string s = wManager.Wow.Helpers.ItemsManager.GetItemSpell(5514); bool isUsable = false; if (!string.IsNullOrWhiteSpace(s)) { isUsable = wManager.Wow.Helpers.SpellManager.SpellUsableLUA(s); } else { Logging.WriteDebug("Error1"); } if (isUsable) //(ObjectManager.Me.ManaPercentage < 10 && ItemsManager.HasItemById(5514) && isUsable) { ItemsManager.UseItem(5514); Logging.WriteDebug("Using Mana Agate"); Thread.Sleep(Usefuls.Latency + 1500); } else { Logging.WriteDebug("Error2"); }
  7. BTW, why are we using SpellUsable when we want to check if an ITEM is usable? --- Mana Agate has a CD
  8. Is this how Csharp works? Wow, that's strange... Nevertheless, still no go --> not all code paths return a value
  9. THat looks fine. Thanks Droidz!
  10. I'm a C# virgin, please bear with me. It says that isUsable doesn't exist in the current context. Does that mean that 'string.IsNullOrWhiteSpace(s)' returned true? Here's my code: string s = wManager.Wow.Helpers.ItemsManager.GetItemSpell(5514); if (!string.IsNullOrWhiteSpace(s)) { bool isUsable = wManager.Wow.Helpers.SpellManager.SpellUsableLUA(s); } if (ObjectManager.Me.ManaPercentage < 10 && ItemsManager.HasItemById(5514) && isUsable) { ItemsManager.UseItem(5514); Logging.WriteDebug("Using Mana Agate"); Thread.Sleep(Usefuls.Latency + 1500); }
  11. Is there an option that would log the fish you catch and the time you catch it at?
  12. Heya, I have a working script that will use a Mana Agate when on 10% mana and create a new one. The issue is Mana Agate has a cooldown. How do I check whether it is off cooldown? I google a bit and came up with this, but something is off: bool spellName = Lua.LuaDoString<bool>("start, duration, enable = GetActionCooldown(37); return enable;"); if (ObjectManager.Me.ManaPercentage < 10 && ItemsManager.HasItemById(5514) && spellName) { ItemsManager.UseItem(5514); Thread.Sleep(Usefuls.Latency + 1300); }
  13. You're a godsend Droidz! Is there a helper condition sth like HaveMana?
  14. 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."); } }
  15. It seems that if (!Me.HaveBuff("Arcane Intellect") does work, but it doesn't buff.
  16. 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."); } }
  17. 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."); } }
  18. Hey Droidz, is there I was I could add this using the FightClass editor?
  19. Sounds great, even though of putting together a list? :) If you don't want to make it public per se, I'd appreciate a whisp :)
  20. Hey fellas, is there a way to make the bot move after a spell is cast using the FightClass Editor? Frost Nova is what I have in mind. So if a target is closer than 12yards, cast Frost Nova, but don't stand there like a moron but move back. Thanks, Seminko
  21. Hey fellas, I've been botting for quite a while using a plethora of different bots. BUT. Only for fishing. I always though grinding for xp or money is too risky. I don't really want to bot when there's people around. Do you have any good spots where there are close to no people around? Do you let the bot grind with people around and go afk for extended periods of time? I guess it also depends on how fluid your FightClass is. Any thoughts are welcome Seminko
  22. Uuu, exciting. Can't wait for the new update :) Thx again
×
×
  • Create New...