Jump to content

iMod

Elite user
  • Posts

    581
  • Joined

  • Last visited

Everything posted by iMod

  1. Sure it is possible if you understand C# otherwise you need someone who does and will change it for you. The how-to would be a book like "learning c#". BTW: There is an error won't help anyone.
  2. /// <summary> /// Determines if the spell is known or not /// </summary> /// <param name="spell">The spell we want to check</param> /// <returns>Returns true if the spell is known otherwise false</returns> public static bool IsSpellKnown(Spell spell) { // Check spell bool isSpellKnown = Lua.LuaDoString<bool>($"return IsSpellKnown({spell.Id});"); // Return return isSpellKnown; } /// <summary> /// Determines if the given target has the buff with the given conditions /// </summary> /// <param name="spell">The spell you want to check</param> /// <param name="target">The target you want to check</param> /// <param name="buffTimeLeft">Recast if buff time is under the given time</param> /// <param name="stacks">How much stacks you want at the target</param> /// <param name="owner">Flag that determines if we need to be the owner</param> /// <returns>Returns true if the target has the spell on it with the given conditions otherwise false</returns> public static bool HasBuff(Spell spell, WoWUnit target, double buffTimeLeft = 0, int stacks = 0, bool owner = true) { // Get target auras List<Aura> auraList = target.GetAllBuff(); // Get aura Aura aura = null; if (owner) { // Set aura = auraList.Where(s => s.ToString().Contains(spell.Name) && s.Owner == ObjectManager.Me.Guid).FirstOrDefault(); } else { // Set aura = auraList.FirstOrDefault(s => s.ToString().Contains(spell.Name)); } // Any found? if (aura != null) { // Validate if (aura.TimeLeftSeconde > buffTimeLeft && aura.Stack >= stacks) { // Return return true; } } // Return return false; } /// <summary> /// Cast a spell /// </summary> /// <param name="spell">The spell you want to cast</param> /// <param name="target">The target you want to cast at</param> /// <param name="debuff">The debuff we are looking for</param> /// <param name="buffTimeLeft">Recast if buff time is under the given time</param> /// <param name="stacks">How much stacks you want at the target</param> /// <param name="owner">Flag that determines if we need to be the owner</param> /// <param name="force">Force use the skill and ignore debuffs</param> /// <returns>Returns true if we can cast the spell otherwise false</returns> public static bool CastSpell(Spell spell, WoWUnit target, double buffTimeLeft = 0, int stacks = 0, Spell debuff = null, bool owner = true, bool force = false) { // Check if the spell is known if (!IsSpellKnown(spell)) { // Skip return false; } // Wait until global cooldown is done Thread.Sleep(SpellManager.GlobalCooldownTimeLeft()); // Check if buff exists bool hasDebuff; if (debuff != null) { hasDebuff = Functions.HasBuff(debuff, target, buffTimeLeft, stacks, owner); } else { hasDebuff = Functions.HasBuff(spell, target, buffTimeLeft, stacks, owner); } // Validate spell if (!ObjectManager.Me.IsStunned && !ObjectManager.Me.IsDead && !ObjectManager.Me.IsCast && !target.IsDead && spell.IsSpellUsable && spell.IsDistanceGood && (force || !hasDebuff) && !TraceLine.TraceLineGo(target.Position)) { if (target.Guid == ObjectManager.Me.Guid) { // Cast on self Lua.LuaDoString($"CastSpellByID({spell.Id}, \"player\")"); } else { // Cast on target Lua.LuaDoString($"CastSpellByID({spell.Id}, \"target\")"); } // Log Logging.WriteDebug($"Cast: {spell.NameInGame}"); // Return return true; } // Return return false; } Short answer: Check if you are currently casting with "ObjectManager.Me.IsCast". I would recommend to put all the validations into a method. Another way would be to use @Droidz inbuild engine. Have fun. PS: If a method is missing just call me, I just copied it right out of my framework. BTW: It is used for WOTLK and I'm not sure if there where changes in the lua commands. But at the end it should give you an idea how it could be done. There are allways multi ways to reach the goal.
  3. Discord: https://discordapp.com/invite/3yHrH86 Just take a look into the tutorial section and if you still have questions just ask in the forum. Happy botting.
  4. Just write a converter or use FindAndReplace function in any text editor. Gather profiles are quite the same as hb there are just a few differences.
  5. Ja kein thema, das ist bei mir nicht anders ;)
  6. Sollten wir hinbekommen, ich schreibe dir sobald ich weiß das ich Zeit finde dafuer, ich denke das wird so im laufe der Woche geschehen.
  7. Hm also was ich euch anbieten koennte, wenn es ein paar Leute sind, wäre eine Routine in C# zu schreiben und die groben Dinge zu erklären dabei. Das ganze würde dann über TeamViewer laufen. Da ich leider kaum Zeit finde müsste das jemand anderes organisieren.
  8. Why should someone spend hours of creating profiles for free? ;) i think you got the point. Have fun with hb. Oh btw no one said you will get profiles. I remember the first time with hb they had nothing, too and there where also ppl like you xD
  9. The bot is legion ready. If you are too lazy to create profiles it is not wrobot fault. You paid for the bot not for profiles or stuff like that. If you buy something read the description before you buy and blame!
  10. Was wäre denn z.B eine tiefer greifende Frage? Nur um mal einschätzen zu koennen was man ca wissen muss.
  11. It wont renew automaticaly, you just get an email that will inform you. Just ignore it if you don't want to renew it.
  12. Is a quest profile loaded? I only can see the fight class loaded up.
  13. /// <summary> /// Gets all specified units in the specified range /// </summary> /// <param name="range">The range we are looking in</param> /// <param name="objectType">The type of object we are looking for</param> /// <returns>Returns a list of all available units of the given type</returns> public static IEnumerable<WoWUnit> GetUnits(int range, WoWObjectType objectType) { // Get units IEnumerable<WoWUnit> results = ObjectManager.GetWoWUnitHostile().Where(u => u.Type == objectType && u.IsAlive && (u.GetDistance <= range) && u.IsAttackable); // Return return results; } Get all mobs who attack your pet in a range of 15 (range based of your character not your pet) int attackingUnits = This.GetUnits(40, WoWObjectType.Units).Count(t => t.TargetObject == ObjectManager.Pet);
  14. Oh okay xD thats why i was asking what kind of extension you are playing ;) Those lua commands are not available in vanilla i think. So yeah @Droidz need to implement the macro method ;) not sure if that ever happen but just write him a message and ask him about it.
  15. Damn that was my other idea :D Well maybe you need to check the general bot setting. I'm not sure but i think there was a option for autoattacks. Found nothing like auto attack in the libs. May thats a question for @Droidz
  16. Well the documentation says it is http://wowprogramming.com/docs/api/StopAttack
  17. oh i think it should be Lua.DoString("StopAttack();"); Forgot the ; at the end of the lua command. If that wont work i'm out of ideas =/ i'm not that pro in lua commands.
  18. Hast du bei den Spells in den Settings Friendly auf true?
  19. i'm not sure and did not test it but try Lua.LuaDoString(new List<string>() { "FirstCommand", "Second command", "ThirdCommand" });
  20. It is a lua function. Which extension are you using?
  21. As you thought the bot is not just clicking, it is scanning the area around it self and if there is something you want around it it will generate a new path to the node for example. after it it is going back to your waypoint. If i'm not wrong there is a range number in the general settings for the scanning area. The gather bot should allready do what you where talking about.
  22. Lua.DoString("StopAttack()"); This should prevent you from doing auto attacks, I'm not sure if the bot uses auto attack. if yes it could make problems in stopping it.
  23. Sounds strange but make sure that you restart the bot after you learned new spells.
×
×
  • Create New...