Jump to content

Recommended Posts

You can add this function to your fightclass or to plugin and mill all herbs in bags at once. For example, you can add it to Profession Helper plugin and call it from craftTask:

private bool milling() {
  string command = @"
  local function findherb()
    local function f(b,s)
      return select(7,GetItemInfo(GetContainerItemLink(b,s) or 0))==""Herb"" and select(2,GetContainerItemInfo(b,s))>=5
    end
    for i=0,4 do
      for j=1,GetContainerNumSlots(i) do
        if f(i,j) then return i,j end
      end
    end
  end
  local result = false
  while (true) do
    local b,s = findherb()
    if (not b or not s) then return result end
    result = true
    CastSpellByName(""Milling"")
    UseContainerItem(b,s)
  end";
  bool result = Lua.LuaDoString<bool>(command);
  Usefuls.WaitIsCastingAndLooting();
  return result;
}

 

Link to comment
https://wrobot.eu/forums/topic/9035-how-does-milling-work/#findComment-42081
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...