Jump to content

Andreavnn

Members
  • Posts

    30
  • Joined

  • Last visited

Posts posted by Andreavnn

  1. So like this? I think I am understanding this a bit more know. I only know very little about #C from grade school like 12 years ago

     

    static Main()
    {
      wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) =>
            {
                var me = wManager.Wow.ObjectManager.ObjectManager.Me;
                if (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
                    unit.IsValid &&
                    !me.IsCast &&
                    unit.IsGoodInteractDistance) // put here your conditions to running backwards
                {
                    var p = robotManager.Helpful.Math.GetPosition2DOfAngleAndDistance(me.Position, robotManager.Helpful.Math.GetAngle(unit.Position, me.Position), wManager.Wow.Helpers.CustomClass.GetRange - unit.GetDistance - 12);
                    var z = wManager.Wow.Helpers.PathFinder.GetZPosition(p);
                    if (z != 0)
                    {
                        p.Z = z;
                        wManager.Wow.Bot.Tasks.GoToTask.ToPosition(p, 3.5f, true, context => (wManager.Wow.Helpers.Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause));
                    }
                }
            };
    };
    
            robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState +=
                delegate (Engine engine, State state, CancelEventArgs cancelable)
                {
                    if (!string.IsNullOrWhiteSpace(state.DisplayName) &&
                        state.DisplayName == "Regeneration" &&
                        ObjectManager.Pet.IsValid &&
                        ObjectManager.Pet.IsAlive &&
                        ObjectManager.Pet.HaveBuff("Feed Pet Effect") &&
                        !state.NeedToRun)
                    {
                        while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
                               !Conditions.IsAttackedAndCannotIgnore &&
                               ObjectManager.Pet.IsValid &&
                               ObjectManager.Pet.IsAlive &&
                               ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
                        {
                            Thread.Sleep(800);
                        }
                    }
                };
        }

     

  2. @Droidz

    Is this how I would combine these two codes together? Or is that something that can't be done this way? 

    static Main()
        {
            wManager.Events.FightEvents.OnFightLoop += (unit, cancelable) => {
                if (unit.IsValid && ObjectManager.Target.IsTargetingMyPet && ObjectManager.Target.GetDistance <= 12)
                {
                    wManager.Wow.Helpers.Move.Backward(Move.MoveAction.PressKey, 2000);
                }                                                                                        
    {
            robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += delegate (Engine engine, State state, CancelEventArgs cancelable)
            {
                if (!string.IsNullOrWhiteSpace(state.DisplayName) && 
                    state.DisplayName == "Regeneration" && 
                    ObjectManager.Pet.IsValid &&
                    ObjectManager.Pet.IsAlive &&
                    ObjectManager.Pet.HaveBuff("Feed Pet Effect") &&
                    !state.NeedToRun)
                {
                    while (Conditions.InGameAndConnectedAndAliveAndProductStartedNotInPause &&
                            !Conditions.IsAttackedAndCannotIgnore &&
                            ObjectManager.Pet.IsValid &&
                            ObjectManager.Pet.IsAlive &&
                            ObjectManager.Pet.HaveBuff("Feed Pet Effect"))
                    {
                        Thread.Sleep(800);
                    }
                };
    }

     

  3. Having a new issue with wrobot, where the avatar is attempting to skin defeated mobs. But the mob wasn't looted by the another player. It keep trying over and over again. Sometimes getting stuck in an endless loop. Is there a setting to prevent this or is there something I am missing?> 

    Log files upload.. 

    29 Dec 2017 02H48.log.html

     

    EDIT* Realize it might be a plugin I am using with my flightclass and wrobot. 

  4. I am having trouble getting this two abilities to work together. They share the same CD. I have them with the condition to check if the opposite is usable before they are activated. However, the bot will still attempt to use one or the other while they are on CD. I am also having an issue with Aimed Shot, it is a cast spell, but doesn't have a cast bar so they bot isn't waiting until it is complete before attempting to use another ability. Advice? 

     

    EDIT* Seem to have them working slightly by off setting their CD times in the Flightclass manager. Still looking for additional advice to make them work together better. So the bot doesn't attempt to use them at the same time. 

  5. Is there a way to setup the both so it won't try to sell items if it doesn't have enough money? Mine gets stuck right now trying to sell without enough money.

    EDIT* A way for the bot to know its bags are full and will not return the the mail box until it has sold everything or made more room. It would also wait until something sold and go get its money to post more auctions, etc. 

    EDIT** Maybe a way for set up thresholds so the once the both has made X amount of money it will change the Buy item only have this much money to a new number. If the bot was setup with a 1g threshold once it has made X amount of money that threshold would change to 5g and so fourth. So you can build up a bank, etc. 

    I am running into the  problem the bot spends all its money down to 1g and when it post it can't post everything because it doesn't have enough money, etc. 

     

    EDIT*** Having issues with the bot not being able to post some items. It says it cannot select the item. Not sure the actual verbiage. Until the item I manually moves from one slot to another or the bot is completely closed out and starred over. Ideas? I don't run want add-ons with the bot.

    EDIT**** Said fuck it

  6. On 12/10/2017 at 11:54 AM, Ordush said:

    Your in-game macro is not using UseItemByName, it's taking what you have in container slot 0,1. This means it will only try to feed your pet with whatever is in that slot.

    You can do the same with your bot with the following Code:

    
    if GetPetHappiness() < 3 then
      CastSpellByName("Feed Pet")
      PickupContainerItem(0,1)
    end  

    This will make the bot feed the pet with whatever you have in slot 0,1 in your bags (like your macro) if the pet is not happy. :)

    Edit: For the first code snippet to work, you could make a foreach loop and check every slot in your bag for itemname. :)

    Where you put this at? As a spell with a lua code or what? 

  7. Looking for some help with creating a code snippet or pluigin, etc. That will pause a classflight, won't attempt to use abilities, then will check target distance. If the distance to the target is less than X it will move back by X than resume the flightclass rotation. 

    *Yes this is for a hunter flightclass

    *I have everything working for a vanilla hunter flightclass, but the deadzone issues where it gets stuck between melee and range. 

×
×
  • Create New...