Jump to content

sakado

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by sakado

  1. If this code is useful, I think there are things that need to be completed. I didn't check this. I don't know much about coding, can anyone with knowledge help me? Can you edit this code exactly?

     

    using wManager.Wow.Enums;
    using wManager.Wow.Helpers;
    using wManager.Wow.ObjectManager;

    public static void CheckAndProcessOre()
    {
        string oreName = "Copper Ore";
        int requiredAmount = 10;

        if (IsBagFull())
        {
            WoWGameObject smeltingNPC = FindNearestSmeltingNPC();
            if (smeltingNPC != null)
            {
                Navigator.GoTo(smeltingNPC.Position);
            }
        }
        else
        {
            MineOre(oreName, requiredAmount);
        }
    }

    public static bool IsBagFull()
    {
        List<WoWItem> bags = Bag.GetBagItem();

        foreach (WoWItem bag in bags)
        {
            if (bag != null && bag.IsValid && bag.ItemInfo != null)
            {
                int freeSlots = bag.ItemInfo.MaxCount - bag.StackCount;
                if (freeSlots == 0)
                {
                    return true;
                }
            }
        }

        return false;
    }

    public static void MineOre(string oreName, int requiredAmount)
    {
        WoWGameObject oreNode = FindNearestOreNode(oreName);
        if (oreNode != null)
        {
            Navigator.GoTo(oreNode.Position);
            oreNode.Interact();
            wManager.wManagerSetting.WaitLocalPlayerIsIdleMS = 2000;
            int currentAmount = GetItemCount(oreName);
            if (currentAmount >= requiredAmount)
            {
                WoWGameObject smeltingNPC = FindNearestSmeltingNPC();
                if (smeltingNPC != null)
                {
                    Navigator.GoTo(smeltingNPC.Position);
                }
            }
        }
    }

    public static WoWGameObject FindNearestOreNode(string oreName)
    {
        return ObjectManager.GetNearestWoWGameObject(ObjectManager.GetWoWGameObjectByEntryList(Mining.OreEntryList).FindAll(node => node.Name == oreName && !node.InUse && node.IsValid && node.IsAlive));
    }

    public static int GetItemCount(string itemName)
    {
        WoWItem[] items = Bag.GetBagItem().ToArray();
        return items.Sum(item => item.ItemInfo.Name == itemName ? item.StackCount : 0);
    }

    public static WoWGameObject FindNearestSmeltingNPC()
    {
        return ObjectManager.GetNearestWoWGameObject(ObjectManager.GetWoWGameObjectByEntryList(Mining.SmeltingEntryList).FindAll(npc => npc.IsValid && npc.Is
    Alive));
    }

    public static int[] SmeltingEntryList = { /* Smelting NPC'ID */ };
     

  2. 26 minutes ago, Nax said:

    Evet, biraz lua / C# ile oldukça basit. Bir şans vermeli ve bir hata bulursanız yardım istemelisiniz.

    do you think this could be it?

    """"

    function Smelt() local smeltingItemID = ?????? local smeltingSpellID = ?????

    if IsSpellKnown(smeltingSpellID) then

    if HasItem(smeltingItemID) then

    if IsInZone("SmeltingZone") then UseItem(smeltingItemID) CastSpellByID(smeltingSpellID)

    end

    end

    end

    end

    function OnTick(event, ticks)

    if event == "??????" then

    smelt()

    end

    end

    RegisterEvent("OnTick", OnTick)

    """""

    I'm a bit of a beginner, I don't know how to integrate

  3. 4 minutes ago, Nax said:

    Evet, biraz lua / C# ile oldukça basit. Bir şans vermeli ve bir hata bulursanız yardım istemelisiniz.

    I haven't started right now, I want some help if I can start smelting, the rest seems easy, only this code is needed.

  4. I need a chained profile that will automatically gather ores and, after reaching a certain quantity, process them at a smelting location and create items at a Blacksmith. At the very least, if this is not possible, having a processing module when reaching the smelting and Blacksmith locations would suffice. How can I accomplish this?

  5. Hello everyone, I'm playing TBC addon, I want to train characters only in Horde faction related to wrobot, I only need addon that I can make quest or automatic gear, of course this TBC should also work. I need a plugin that will equip itself in the Character Auto outfit class.

  6. 4 minutes ago, Zan said:

    Posting multiple times will not get you help any faster. @Droidz will answer when he can. Plus you should have tried the TRIAL key before purchasing.

    Thank you for your reply, I wanted to be informed. I downloaded the same version but it does not accept the license key, is there a mistake I made? I installed the old version, the old version wrobot does not bother, but the 'language key is valid for other wrobots' message.

×
×
  • Create New...