Jump to content

Recommended Posts

This is a continuation of the below thread- however Vanilla isnt legion where a 32 bot can 'manage' against a lvl 40 mob.

We need the ability to specify what vendors to use in a profile and we need the ability to put a level range on the vendors so the bots dont go walking into chain deaths.

wManager.Wow.Helpers.NpcDB.AcceptOnlyProfileNpc = true;

Isnt cutting it any more...

 

 

Link to comment
https://wrobot.eu/forums/topic/7604-specific-vendor-in-profile/
Share on other sites

btw, accept only profile nps is not 100% working as well.

And the one more problem, when you add an NPC inside the quester profile, you can't choose faction of that npc. So it always added as Neutral. Thats make your NPC base full of Neutral npc that are not neutral at all. And changeing theyr faction inside NPC base wont help at all, because when you load your quest profile it will rewrite your base with neutral nps again, The only solution here is to open each profile with something like Notepad and edit each npc in each profile by hands.

But that's will only help you not to rush to an opposite faction NPC, not with the high level locations. And you will still waste a tone of time running to an nps with a weird way through mobs.

Hello,

You cannot with default, but if you use custom code (plugin in this sample):

using System;
using System.Collections.Generic;

public class Main : wManager.Plugin.IPlugin
{
    public void Initialize()
    {
        // NPC list
        var npcs = new List<Tuple<int, int, wManager.Wow.Class.Npc>>  // Item1=minlevel, Item2=maxlevel, Item3=npc
        {
            new Tuple<int, int, wManager.Wow.Class.Npc>(1, 5, new wManager.Wow.Class.Npc
            {
                Type = wManager.Wow.Class.Npc.NpcType.Repair,
                Name = "Npc name for level 1 to 5",
                Entry = 12345,
                ContinentId = wManager.Wow.Enums.ContinentId.Azeroth,
                Faction = wManager.Wow.Class.Npc.FactionType.Neutral,
                Position = new robotManager.Helpful.Vector3(1, 2, 3),
                CanFlyTo = true
            }),
            new Tuple<int, int, wManager.Wow.Class.Npc>(6, 9, new wManager.Wow.Class.Npc
            {
                Type = wManager.Wow.Class.Npc.NpcType.Repair,
                Name = "Npc name for level 6 to 9",
                Entry = 6789,
                ContinentId = wManager.Wow.Enums.ContinentId.Azeroth,
                Faction = wManager.Wow.Class.Npc.FactionType.Neutral,
                Position = new robotManager.Helpful.Vector3(6, 7, 8),
                CanFlyTo = true
            }),
            // ...
        };

        // do:
        uint lastLevelCheck = 0;
        robotManager.Events.FiniteStateMachineEvents.OnBeforeCheckIfNeedToRunState += (engine, state, cancelable) =>
        {
            var level = wManager.Wow.ObjectManager.ObjectManager.Me.Level;
            if (state != null && state.DisplayName == "To Town" && lastLevelCheck != level)
            {
                robotManager.Helpful.Logging.WriteDebug("Check NPC for current level");
                wManager.Wow.Helpers.NpcDB.AcceptOnlyProfileNpc = true;
                wManager.Wow.Helpers.NpcDB.ListNpc.RemoveAll(n => n.CurrentProfileNpc);
                foreach (var npc in npcs)
                {
                    if (npc.Item1 >= level && npc.Item2 <= level)
                    {
                        wManager.Wow.Helpers.NpcDB.AddNpc(npc.Item3, false, true);
                        robotManager.Helpful.Logging.WriteDebug("Add npc: " + npc.Item3);
                    }
                }
                lastLevelCheck = level;
            }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

(not tested, tell me if this don't works)

In this sample, wrobot will refresh npc list at all level (and add npcs by level), but you can add condition to check current charater zone (by position disdance), ...

You can also run this code in quester step (put only content of method "Initialize()")

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...