Jump to content

Leatherworking and Tailoring crafted matherials


kergudu

Recommended Posts

This bot has smelting/milling features, but no the same for crafting top matherials for leatherworking and tailoring. For example, it cant craft bolt of cloth from cloth stack. 

So, i found some lua scripts and wrote snippets for fight class. Add this snippet to the bottom of fight class profile (with lowest priority), and it alow grind more cloth/leather and keep your bags empty.

Grind Magnificent Hide (MOP):

Spoiler

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>MeInCombat</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>ItemCount</ContionType>
          <Param xsi:type="FightClassConditionItemNumber">
            <Number>50</Number>
            <Type>BiggerOrEqual</Type>
            <Id>72120</Id>
          </Param>
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>HaveTarget</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>InBattleground</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>CastSpellByName("Leatherworking") local q,n,_,a="Magnificent Hide"for i=1,GetNumTradeSkills()do n,_,a=GetTradeSkillInfo(i)if(n==q)then CloseTradeSkill()DoTradeSkill(i,a)break;end;end</SpellName>
      <Priority>1</Priority>
      <CombatOnly>false</CombatOnly>
      <Timer>60000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <CanMoveDuringCast>No</CanMoveDuringCast>
      <CastOnSelf>true</CastOnSelf>
      <CastOn>player</CastOn>
    </FightClassSpell>

 

Grind Bolt of Windwool Cloth (MOP)

Spoiler

    <FightClassSpell>
      <FightClassConditions>
        <FightClassCondition>
          <ContionType>InBattleground</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>MeInCombat</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>HaveTarget</ContionType>
          <Param xsi:type="FightClassConditionBool" />
        </FightClassCondition>
        <FightClassCondition>
          <ContionType>ItemCount</ContionType>
          <Param xsi:type="FightClassConditionItemNumber">
            <Number>5</Number>
            <Type>BiggerOrEqual</Type>
            <Id>72988</Id>
          </Param>
        </FightClassCondition>
      </FightClassConditions>
      <SpellName>CastSpellByName("Tailoring") local q,n,_,a="Bolt of Windwool Cloth"for i=1,GetNumTradeSkills()do n,_,a=GetTradeSkillInfo(i)if(n==q)then CloseTradeSkill()DoTradeSkill(i,a)break;end;end</SpellName>
      <Priority>1</Priority>
      <CombatOnly>false</CombatOnly>
      <Timer>60000</Timer>
      <NotSpellIsLuaScript>true</NotSpellIsLuaScript>
      <CanMoveDuringCast>No</CanMoveDuringCast>
      <CastOnSelf>true</CastOnSelf>
      <CastOn>player</CastOn>
    </FightClassSpell>

 

If you want to grind other top crafted matherials, just change it name in lua script and item id and count in FightClassConditionItemNumber condition

Link to comment
Share on other sites

  • 2 months later...

for last WoW versions LUA code should look like this:

CastSpellByName("Tailoring");
for i,r in ipairs(C_TradeSkillUI.GetAllRecipeIDs()) do
  local x=C_TradeSkillUI.GetRecipeInfo(r);
  if x.name=="Bolt of Windwool Cloth" then
    C_TradeSkillUI.CloseTradeSkill();
    C_TradeSkillUI.CraftRecipe(r,x.numAvailable);
    break;
  end;
end

 

Link to comment
Share on other sites

combine motes like this:

for i=0,4 do
 for j=1,28 do
  local _,c,_,_,_,_,h=GetContainerItemInfo(i,j)
  if c>9 and string.find(h,"Mote of Harmony") then
   UseContainerItem(i,j)
   return
  end 
 end 
end

 

Link to comment
Share on other sites

  • 1 month later...

C# variant (universal)

public int craft(string profession, string matherial) {
  SpellManager.CastSpellByNameLUA(profession);
  Lua.LuaDoString("CloseTradeSkill()");
  string command = String.Format(
   "toCraft=0 local q,n,_,a=\"{0}\" "+
   "for i=1,GetNumTradeSkills() do n,_,a=GetTradeSkillInfo(i) if(n==q) then toCraft=a DoTradeSkill(i,a) break end end",
   matherial);
  int result = Lua.LuaDoString<int>(command,"toCraft");
  return result;
}

 

Link to comment
Share on other sites

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