Jump to content

iMod

Elite user
  • Posts

    581
  • Joined

  • Last visited

Posts posted by iMod

  1. On 5/7/2021 at 2:14 AM, Sye24 said:

    I'd recommend using lua.

    
    
    			List<string> RaidDatabase = new List<string>();
                int GetRaidMembers = Lua.LuaDoString<int>("return GetNumRaidMembers();");
                for (int i = 0; i <= GetRaidMembers; i++)
                {
                    List<string> RaidMemberNames = Lua.LuaDoString<List<string>>("unpack(UnitName(\"raid\".." + i + "));");
                    foreach(string Members in RaidMemberNames)
                    {
                        if(!RaidDatabase.Contains(Members))
                        {
                            RaidDatabase.Add(Members);
                            Logging.Write("Raid Database built.");
                        }
                    }
                }
                return RaidDatabase;

     

    Thanks for your anwer.

    I'm currently using

            public static int? GetGroupNumber(this WoWUnit instance)
            {
                // Create lua command
                string luaCommand = $@"for i = 1, GetNumRaidMembers() do
                                                        name, rank, groupNumber = GetRaidRosterInfo(i);
                                                        if(name == '{instance.Name}') then
                                                            return groupNumber;
                                                         end
                                                      end
                                                      ";
    
                // Get index number of the unit
                int result = Framelock.Lock(() =>
                {
                    // Return
                    return Lua.LuaDoString<int>(command: luaCommand);
                });
    
                // Failed?
                if (result == 0)
                {
                    // Return
                    return null;
                }
    
                // Return
                return result;
            }

    But I will compare both methods and check what performs better.

  2. 3 hours ago, gogge said:

    How can i change the pause key? Its annoying to click it each time i leave combat

    ALT + X = Pause
    ALT + C = Stop the product

    If you already knew them forget my answer ?

  3. On 2/12/2021 at 8:12 PM, Sleepwalker said:

    Is there any snippets for having more than 1 target? I'd like to use Swipe in AoE 2+ targets and Shred in single target

    UnitExtension:

            /// <summary>
            /// Gets the units around our unit in the given range.
            /// </summary>
            /// <param name="range">The range we are looking in.</param>
            /// <param name="objectType">The object type we are looking for.</param>
            /// <returns>Returns a list of units if we found one, otherwise a empty list.</returns>
            public static IEnumerable<WoWUnit> GetAttackableUnits(this WoWUnit instance, int range, WoWObjectType objectType = WoWObjectType.Unit)
            {
                // Get units
                IEnumerable<WoWUnit> results = ObjectManager.GetObjectWoWUnit().Where(u => u.Type == objectType && u.IsAlive && u.MaxHealth > 500 && (u.Position.DistanceTo2D(instance.Position) <= range) && u.IsAttackable && !TraceLine.TraceLineGo(u.Position));
    
                // Return
                return results;
            }

     

    Sample:

    bool useSwipe = (ObjectManager.Me.GetAttackableUnits(5).Count() >= 3);

     

  4. 5 hours ago, maukor said:

    Hello, is there any way to check in conditions, if your movement speed is lower than 200%? (travel form out of combat default) Cause if player hit by a mob, hes movement speed becomes around 160% or lower, dont remember exact speed,

    Something to put into fightclass for reshift:

     

     if (ObjectManager.Me.HaveBuff(5419) &&  "Here condition for if speed is lower than 200%" && !Fight.InFight)
            {
               
                 Travel.Launch();

            }    

    Take a look at "ObjectManager.Me.SpeedMoving"

  5. WoWUnit Extension "IsAutoAttacking" (WOTLK)

            /// <summary>
            /// Gets the flag if the unit is auto attacking.
            /// </summary>
            /// <returns>Returns true if the unit is auto attacking, otherwise false.</returns>
            public static bool IsAutoAttacking(this WoWUnit instance)
            {
                // Read
                bool result = Memory.WowMemory.Memory.ReadBoolean(address: instance.GetBaseAddress + (uint)0xA20);
    
                // Return
                return result;
            }

    I'm not sure about the other extension offsets.

  6. Nice to see some progress even on that pc of old code ;)
    One thing i don't understand is how can it be more accurate if you still loop over the tabs and take the one with the highes points? Is is because you read out the name? If so how about multi language can that cause some issues?

    I know its just a sample code but you may should check if its not a priest because you don't got any else block. (2cents)

  7. Change your init method to

        public void Initialize() // When product started, initialize and launch Fightclass
        {
            _isLaunched = true;
            {
                EventsLuaWithArgs.OnEventsLuaWithArgs += delegate (LuaEventsId id, List<string> args)
                {
                    if (id == LuaEventsId.MODIFIER_STATE_CHANGED && args.Count == 2)
                    {
                        //  Possible values are LSHIFT, RSHIFT, LCTRL, RCTRL, LALT, and RALT
                        string key = args[0];
    
                        // 1 means that the the key has been pressed. 0 means that the key has been released
                        int state = int.Parse(args[1]);
    
                        // AOE mode
                        if (key == "LALT" && state == 0)
                        {
                            // Set status
                            aoeMode = !aoeMode;
                            Logging.Write($"AOE {this.aoeMode.ToString()}");
                        }
    
                        // Burst mode
                        if (key == "LCTRL" && state == 0)
                        {
                            // Set status
                            burstMode = !burstMode;
                            Logging.Write($"BURST {this.burstMode.ToString()}");
                        }
                    }
    
                };
            }
            Logging.Write("[My fightclass] Is initialized.");
            Rotation();
        }

    Make sure the aoe or burst mode are really enabled by checking the log.
    Also it helps if you write more logging stuff to make sure the routine enters the if block or not just for debugging.

  8. On 5/29/2018 at 12:30 AM, Ordush said:

    In Vanilla, functions like GetSpellBonusHealing(); and GetSpellBonusDamage(spellTreeID); does not exist.
    Is there a way to get these stats with WRobot?

    Only in theorie, you can calculate and make a guess, otherwise no.
    If i'm not wrong there was a lua library that does it for a healing addon but sadly i don't remember the name y.y

  9. 4 minutes ago, Zan said:

    It just shows up in Red. I do use resharper but I thought I put ignore error for it. I'll screen shot it after I get home from work. I use it on 7.1.5 private server btw.

    Just hover with your mouse over the red text and tell me the error message wich should pop up ?

  10. 2 minutes ago, Zan said:

    @iMod are you getting errors in VS using DistanceTo? My projects are all red when I use it. Even using it inside .Order it gives an error.

    Nah i'm lucky i don't had to update any of my projects after updates since yet and DistanceTo is working for me (WOTLK)
    What kind of error do you get?

  11. 1 hour ago, hanyoo69 said:

    NOT HERE TO BE RUDE, but  i paid for this and now i have to pay for profiles? This is ridiculous, 20 bucks for a quester?! I have no job atm and summer is here and 20 bucks is a lot for me. And are there any free questers 1-60? 

    The profiles should be like 5 bucks at least, i can always pay 20 bucks for a botter from epicnpc to level my char to 60 for 20 bucks, but i have friends and i wanna chat while i bot lol

     

    The forum is full of posts like yours. If you buy a product without to inform your self about, its your own fault.
    Those people can be happy that there are some ppl who selling their stuff that cheap. And for real try to create your own and you will see if you want quality you need to pay for it.
    Welcome in the world.

  12. 7 minutes ago, Ordush said:

    cool so use GUID which i get with Party and then check position between the two GUIDs?

    The Party namespace offers you a whole object list of the player so you just need to select 2 player and use the DistanceTo property of the position property.of the WoWPlayer object you selected.

    But yeah you also can use the guid.

  13. 2 hours ago, Ordush said:

    Hey all

    I have been looking through the ObjectManager, i can't seem to find anything.

    Is there a way to check range between two units? i.e. Party1 and Party2?

    I know that a player has to be near them to check their range, but i just want it to do this:
    if range between Party1 and Party2 < 5 return true else return false.
    Obviously it will return false if the player can't see party1 and party2. ?

    Perhaps @Droidz knows if the units party1-4 is implemented in the ObjectManager? I know that his fightclass editor, can heal party. ?

                WoWPlayer one = new WoWPlayer();
                WoWPlayer two = new WoWPlayer();
    
                // Get distance between 2 objects
                float distance = one.Position.DistanceTo(two.Position);

    If you are looking for party stuff take a look at "wManager.Wow.Helpers.Party"
    Hope i understood the question right ?

    Do you want to be able to check if the whole group is near or just one of them?

  14. 5 hours ago, zealtla said:

    HI,everyone.sometimes target not in line of sight,and player can't cast spell,but bot won't move,so I want to write a function with C# in FC to handle this use  events.

    Which events is about  target not in line of sight? tks!

    Donno if that helps and its right out of the mind and just an idea...

                        wManager.Events.FightEvents.OnFightStart += (WoWUnit unit, System.ComponentModel.CancelEventArgs e) =>
                        {
                            // Not in LoS
                            if (TraceLine.TraceLineGo(unit.Position))
                            {
                                // Get waypoints to the target
                                IEnumerable<robotManager.Helpful.Vector3> waypoints = PathFinder.Pather.FindPath(ObjectManager.Me.Position, unit.Position, out bool result, out bool resultPartial);
    
                                foreach (robotManager.Helpful.Vector3 waypoint in waypoints)
                                {
                                    if (!TraceLine.TraceLineGo(waypoint))
                                    {
                                        // In LoS
                                        MovementManager.MoveTo(waypoint);
    
                                        // While moving....
                                    }
                                }
                            }
                        };

    You also need to cancel that event and i'm not sure if its the right one. There is no "not in LoS" event as far i know.

  15. I'm not sure how your complete code looks like or if you just using c# but if you have your own project you need to add a reference to Quester.dll and use the following using

    using Quester.Profile;

    You also need

    using wManager.Wow.Class;
    using wManager.Wow.Helpers;

    if you dont already using them.

  16. I'm not sure if you can use multi lines. 
    If not just use 

    return ObjectManager.GetObjectWoWUnit().Count(u => u.IsAlive && u.MaxHealth > 500 && ((ObjectManager.Me.TargetObject.Position.DistanceTo2D(u.Position) - ObjectManager.Me.TargetObject.CombatReach) <= 15) && u.IsAttackable && !TraceLine.TraceLineGo(u.Position)) > 3;

    You need to select " Sharp Code" as condition and add the line into Value.

×
×
  • Create New...