Everything posted by Seminko
-
Check whether an item is usable
@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); } } }
-
Check whether an item is usable
@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"); } }
-
Check whether an item is usable
I think we need to use GetActionCooldown --> http://wowprogramming.com/docs/api/GetActionCooldown
-
Check whether an item is usable
Oh damn... I thought we were on to sth... well, thanks anyways
-
Check whether an item is usable
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.
-
Check whether an item is usable
isUsable returns false
-
Check whether an item is usable
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"); }
-
Check whether an item is usable
BTW, why are we using SpellUsable when we want to check if an ITEM is usable? --- Mana Agate has a CD
-
Check whether an item is usable
Is this how Csharp works? Wow, that's strange... Nevertheless, still no go --> not all code paths return a value
-
Caught fish logging?
THat looks fine. Thanks Droidz!
-
Check whether an item is usable
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); }
-
Caught fish logging?
Is there an option that would log the fish you catch and the time you catch it at?
-
Check whether an item is usable
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); }
-
Automatic rebuff - why doesn't it work
Thank you!
-
Automatic rebuff - why doesn't it work
You're a godsend Droidz! Is there a helper condition sth like HaveMana?
-
Automatic rebuff - why doesn't it work
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."); } }
-
Automatic rebuff - why doesn't it work
It seems that if (!Me.HaveBuff("Arcane Intellect") does work, but it doesn't buff.
-
Automatic rebuff - why doesn't it work
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."); } }
-
Automatic rebuff - why doesn't it work
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."); } }
- FightClass Editor - move after cast?
-
Where do you grind safely?
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 :)
- FightClass Editor - move after cast?
-
Where do you grind safely?
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
-
Lure not being applied
Can confirm, it works now! Well done!
-
Lure not being applied
Uuu, exciting. Can't wait for the new update :) Thx again