Jump to content

Recommended Posts

I got a companion called "Field Repair Bot 75B", which works like a simple blacksmith—it sells junk and repairs gear.

I want to be able to summon it whenever my bags are full so I can sell trash without having to walk back to town every time. 
Plus, it’d be great to repair my gear.

                  Game Version: 1.13 Vanilla                    
Dev Info:
(Id found: 46457, Name found: , NameInGame found: Field Repair Bot 75B, Know = True, IsSpellUsable = True, IsInActionBar = True))

repair.PNG

8 hours ago, Droidz said:

Hello,

When you use this spell, does an NPC or GameObject appear (if so, could you provide me with the entry ID)? Or do you directly get the sales window?

It's a spell that, when used, summons an NPC.

When clicked, that NPC opens the blacksmith window, which allows you to sell and repair items.
 


Spell ID: 46457
NPC ID: (Entry: 50041 )

Hello,

Try with this plugin Main.cs :

using System.Threading;
using wManager.Wow.Class;
using wManager.Wow.Enums;
using wManager.Wow.Helpers;

public class Main : wManager.Plugin.IPlugin
{
    const int SpellId = 46457;
    const int NpcId = 50041;
    
    public void Initialize()
    {
        robotManager.Events.FiniteStateMachineEvents.OnRunState += (engine, state, cancelable) =>
        {
            if (state is wManager.Wow.Bot.States.ToTown)
            {
                MovementManager.StopMove();
                new Spell(SpellId).Launch(true);
                Thread.Sleep(5000);

                var npc = new Npc
                {
                    ContinentId = (ContinentId)Usefuls.ContinentId,
                    Name = "Field Repair Bot 75B",
                    Entry = NpcId,
                    Position = wManager.Wow.ObjectManager.ObjectManager.Me.Position,
                    Type = Npc.NpcType.Repair,
                    Faction = Npc.FactionType.Neutral
                };
                
                NpcDB.ListNpc.RemoveAll(n => n.Active && n.Entry == npc.Entry && n.Type == npc.Type && n.ContinentId == npc.ContinentId && n.CurrentProfileNpc);
                
                NpcDB.AddNpc(npc, false, true);
            }
        };
    }

    public void Dispose()
    {
    }

    public void Settings()
    {
    }
}

 

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...