What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Leatherworking Make magnificent hide of exotic leather?

ltbaron

New Member
Joined
Sep 18, 2013
Messages
282
Reaction score
1
Hello,

I need a plugin or script to questing order to make magnificent hide when I have 50+ exotic leather, any thoughts?
 
Hello,

I need a plugin or script to questing order to make magnificent hide when I have 50+ exotic leather, any thoughts?


Hi! I was looking for the same plugin, but with no luck. So I had to do it myself on the base of Tidy Bags plugin.
The code is attached, all you need is to create a file \Honorbuddy\Plugins\CraftHides\CraftHides.cs and copy the code into it. Do not forget to replace the strings "Leatherworking" and "Magnificent Hide" if you are playing in other language.
Hope this helps!

Code:
namespace PluginCraftHides
{
    using Styx;
    using Styx.Common;
    using Styx.Common.Helpers;
    using Styx.CommonBot;
    using Styx.CommonBot.Frames;
    using Styx.CommonBot.Inventory;
    using Styx.CommonBot.Profiles;
    using Styx.CommonBot.Profiles.Quest.Order;

    using Styx.Helpers;
    using Styx.Pathing;
    using Styx.Plugins;
    using Styx.WoWInternals;
    using Styx.WoWInternals.Misc;
    using Styx.WoWInternals.World;
    using Styx.WoWInternals.WoWObjects;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.IO;
    using System.Linq;
    using System.Reflection;
    using System.Runtime.InteropServices;
    using System.Text;
    using System.Threading;
    using System.Windows.Forms;
    using System.Windows.Media;
    using System.Xml.Linq;

    public class CraftHides : HBPlugin
    {
        public override string Name { get { return "CraftHides"; } }
        public override string Author { get { return "HorribleHeffalump"; } }
        public override Version Version { get { return new Version(0,0,0,1); } }
	public bool InventoryCheck = false;
	private bool _init;

        private string LeatherworkingSpellName = "Leatherworking";
        private string MagnificentHideSpellName = "Magnificent Hide";
 
        public override void Initialize()
        {
            if (_init) return;
            base.Initialize();
            Lua.DoString("SetCVar('AutoLootDefault','1')");
            Lua.Events.AttachEvent("LOOT_CLOSED", LootFinished);
            Lua.Events.AttachEvent("MAIL_CLOSED", MailboxFinished);
            Logging.Write(LogLevel.Normal, Colors.DarkRed, "CraftHides Plugin initialized");
            _init = true;
        }
		
        private void LootFinished(object sender, LuaEventArgs args)
        {
            if (InventoryCheck == false)
            {
                InventoryCheck = true;
            }
        }
		
	private void MailboxFinished(object sender, LuaEventArgs args)
        {
            if (InventoryCheck == false)
            {
                InventoryCheck = true;
            }
        }

        public override void Pulse()
        {
	if (_init)
            if (StyxWoW.Me.IsActuallyInCombat
                || StyxWoW.Me.Mounted
                || StyxWoW.Me.IsDead
                || StyxWoW.Me.IsGhost
                ) {
                return;
            }

            if (InventoryCheck) { 
                ProfileHelperFunctionsBase p = new ProfileHelperFunctionsBase();
                if (p.GetItemCount(72120) >= 50)
                {
                    Logging.Write(LogLevel.Normal, Colors.DarkRed, "[{0} {1}]: Got {2} leather, creating hide", this.Name, this.Version, p.GetItemCount(72120));
                    Lua.DoString("CastSpellByName(\"" + LeatherworkingSpellName + "\")");
                    StyxWoW.Sleep(500);
                    Lua.DoString("local s for i=1,GetNumTradeSkills() do s=GetTradeSkillInfo(i) if (s==\"" + MagnificentHideSpellName + "\") then DoTradeSkill(i) end end");
                    StyxWoW.Sleep(4000);
                }
		InventoryCheck = false;
                StyxWoW.SleepForLagDuration();
            }
        }
    }
}
 
:( doesn't work in grinding. not sure if it'll work in questing. Would like to see this fixed and working for making misthide bracers if possible. I would even be willing to donate a little to see it happen
 
Back
Top