Jump to content

Marsbar

Elite user
  • Posts

    411
  • Joined

  • Last visited

Posts posted by Marsbar

  1. No simple way that I can think of ? 

    You'd probably want a small plugin that checks how far your other char is and if the distance gets too high, stop any fight with the current target (or finish it first) and run to your party member. The problem is you're likely wanting to do this on northdale with the unit view distance being quite low (probably for performance reasons) so you'd have to make the range quite low. 

  2. 55 minutes ago, Matenia said:

    This guy literally admits to scamming FNV out of his money... even worse, someone sent him those files in the first place.
    I'll personally pay the $20 (to replace the lost license if he has to refund), if Droidz bans him, his IP and his MAC address permanently.

    I second this, @Droidz you shouldn't allow this.

  3. In a plugin I'm writing I create an instance of a class.

    I do not want to dispose it when the bot is stopped (which is fine and working) however I don't want to create another instance of it if it already exists as there would then be 2 of them (as I'm not disposing the original).

    I can't track it in a variable within my plugin because once the bot is restarted a new instance of the plugin is spawned and would not have those variables.

    Is there something I can set in a wrobot variable to track whether my plugin has launched and thus I don't need to track it in my plugin?

  4. maybe something like this?

        private bool rangedPull;
        public float Range
        {
            get
            {
                if (!Fight.InFight && ObjectManager.GetWoWUnitHostile().Count(u => u.Position.DistanceTo(ObjectManager.Target.Position) <= 30 && u.IsAttackable) > 1) // if there is more than one mob within 30 yards of the your target's position
                {
                    rangedPull = true;
                    return 29f;
                }
                else
                {
                    rangedPull = false;
                    return 5f;
                }
            }
        }

    To note, that will only stay at range while out of fight because if the mob you're attacking is a caster, you'll want to run to it. You can of course edit that and add more logic

  5. So what's your problem with it? It starts facing the mob, the rangemanger initiates because your pet has aggro and your bot runs away from the mob until its far enough for it to be able to use ranged attacks again, then it turns and continues attacking. Are you saying after it's run away it does NOT turn around and is now facing away from the mob?

    Edit: You can also add further conditions to the rangemanager so that it doesn't run away if the mob is below a certain amount of HP.

  6. Can you give a little more info?

    When you mean it wont rezz do you mean it walks to its corpse, the popup comes up where you can select resurrect and it simply doesn't do it and you want it to? (I have noticed a bug on some private servers where the popup comes up but the rezz button doesnt work unless you move like 3 yards closer)

    Or do you mean if for some reason it can't rezz you want it to spirit rezz?

  7. Untested but, c# condition:

    ObjectManager.GetObjectWoWPlayer().Where(x => x.PlayerFaction == ObjectManager.Me.PlayerFaction && !x.HaveBuff("Mark of the Wild") && x.GetDistance2D < 40).Count() > 0

    Not Spell is C# Code - True in spell settings:

    Interact.InteractGameObject(ObjectManager.GetObjectWoWPlayer().Where(x => x.PlayerFaction == ObjectManager.Me.PlayerFaction && !x.HaveBuff("Mark of the Wild") && x.GetDistance2D < 40).FirstOrDefault().GetBaseAddress);
    SpellManager.CastSpellByNameLUA("Mark of the Wild");

    Again.. completely untested. Might work for you.

    Also you'd want to add another condition to make sure you only do this out of combat.

     

    Edit: As a side note, I saw that in the fightclass editor there is a Optional General Setting called Additional C# code we could add a function in there which can be used in the conditions/spells and make it more clean.

    We could add:

    public List<WoWPlayer> GetUnbuffedFriendlies(string buffname)
        {
            return ObjectManager.GetObjectWoWPlayer().Where(x => x.PlayerFaction == ObjectManager.Me.PlayerFaction && !x.HaveBuff(buffname) && x.GetDistance2D < 40).ToList();
        }

    Then in the condition and spell we can do things like - Condition:

    GetUnbuffedFriendlies("Mark of the Wild").Count() > 0

    and spell:

    Interact.InteractGameObject(GetUnbuffedFriendlies("Mark of the Wild").FirstOrDefault().GetBaseAddress);
    SpellManager.CastSpellByNameLUA("Mark of the Wild");

    Once again though... its all sudo code and is untested...

×
×
  • Create New...