• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • [A] Garrison Mine level 1 Profile

    Discussion in 'Farming' started by Prostak, Nov 20, 2014.

    1. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      [AH] Garrison Mine level 1 and (upd) level 2 Profiles

      The garrison mine is still unmeshed, so this profile utilizes CTM.
      Alliance, fort level 2, mine level 1, herb garden level 1.

      Profile can be started inside main building or outside and finishes at placing mine order. I have not found the way to automate pressing the button, so any help is welcome here.
      Also I would like to know how to send the ore to a particular Toon.


      Upd: This is "Questing" profile, not GB!
      Upd2: Important: If your toon is a miner, switch off minerals gathering in HB "Settings and Tools". - (Upd: No longer needed, turned off by the profile temporarily). Otherwise HB will try to create a path to a node in an unmeshed area and will fail.
      ----------------------------
      Upd3: updated version 1.2 attached. Changes:
      - some stucks and misses cleared in the mine
      - herbs added
      - cache types added (3 of them observed so far - who knew?)
      - some intelligence added, like: do not go to the empty mine or cache. Will skip other tasks if the toon is near the mine already. Place inside the main building or at the town center to get a full run.
      Level 1 mine farming: View attachment GarrisonMiner.xml

      Upd4: Alliance Mine level 2 attached. It has some misses and since nodes sometimes appear behind the miner - run back should be made a work run, not a walk run it is now. Still, I hope it is better than nothing.
      Thanks to TreeK for providing a method to place an order (only the Mine order placing is included yet, but we will see what we can do :) )
      Upd5: minor stuck removal, also now use Coffee and Picks both as a speedboost and as a stuck prevention.

      Upd6, ver 1.5: - coffee and pick consumed at the entrance, then the remaining items are deleted;
      - deadend level 2 gather radius reduced: may skip a cart, but prevents running into the "cart in the wall";
      - herb gathering also disabled for profile duration: breaks pathing

      Hint: when stuck inside the mine and trying to manually correct things do not press Stop - Start buttons. Use Pause - Resume instead.

      Upd7, ver 1.6: I need to apologize to yall: I have not noticed previously that InteractWith can use a list of objects. Thanks to the talk with Maelnum this is now implemented. Complexity of the code reduced significantly, it became more easily to manage. You should see less error messages and (slightly) faster decision-making on waypoints.

      Upd8: Horde mine level 2 version is attached. It does only mine tasks for now, in which it is identical to Ally v1.6 (made by a movement of Ally version by 1000 miles in space and rotation by 1/5 radian. Approximately. So may rub a wall in a couple of places.)
      View attachment GarrisonMiner_H_mine_2_ONLY.xml

      Upd9: Ver1.7 attached. Changes are:
      - other work orders added (Alchemy, Engineering, Salvaging, etc). If you have a building on one of the small plots, the profile will try to place an order.
      - Secrets of Draenor learned;
      - placing mine order duplicated before the mine run: just in case you'll be stuck
      - level 2 mine part skipped if empty - you should be able to use this profile for mine level 1
      - if you try to start profile not in the Lunarfall area the profile will use Hearth to Garrison stone.
      Thanks to BaturalNoobs and others for valuable suggestions. I apologize for not using a more clean code for order placement (may wait unnecessary time), promise to investigate eventually.
      View attachment GarrisonMiner_A_fort_level_2_mine_level_2.xml

      Upd10:
      Level 3 version posted in a new thread
      https://www.thebuddyforum.com/honorb...ores-mine.html to reflect current status of things. (This "Level 1" in the title became a bit misleading )
      Same version should do level 2 (tested) and probably level 1 (not tested).
       
      Last edited: Dec 3, 2014
      MrB and Kmica like this.
    2. surfman

      surfman Member

      Joined:
      Dec 11, 2012
      Messages:
      59
      Likes Received:
      0
      Trophy Points:
      6
      Going to give this a try .. Thank you for starting the Garrison automation hopefully we get more in the near future.
      Well done Prostak
       
    3. FarmerJim

      FarmerJim New Member

      Joined:
      Sep 17, 2013
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      Seems to work out nicely, great improvement from the last update :D

      Noticed it wasn't picking up mining carts though, any way to tweak that a little since there is ore, stone and a few other items available in those carts ?

      One other item that would be awesome is to use the miners coffee and mining pick items that drop from the carts if they are available to speed up the harvesting :)

      Either way, good job and thank you.
       
    4. TreeK

      TreeK New Member

      Joined:
      Jul 10, 2012
      Messages:
      170
      Likes Received:
      1
      Trophy Points:
      0
      You can use something like this to pick up and create new work orders. It interacts with the mine cache, then the work order guy and then uses lua to queue up 10 new work orders. You could use lua to figure out how many orders are available and just queue that many, but this works well enough. Same basic code can be used to repeat the process at all the buildings with work orders.

      Code:
      <CustomBehavior File="InteractWith" MobId="235886" WaitForNpcs="False" AttemptCountMax="1" NonCompeteDistance="0" WaitTime="2000" Range="8" CollectionDistance="1000" X="1902.24" Y="101.8611" Z="83.52671" />
      <CustomBehavior File="InteractWith" MobId="77730" InteractByQuestFrameDisposition="Complete" WaitForNpcs="False" AttemptCountMax="1" NonCompeteDistance="0" WaitTime="4000" Range="8" CollectionDistance="1000" X="1900.747" Y="100.1649" Z="83.52679" />
      <CustomBehavior File="Misc\RunLua" Lua="C_Garrison.RequestShipmentCreation()" NumOfTimes="10" WaitTime="1000" />
       
    5. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      My mine is still level 1. I'll get back to it when it is upgraded. Some quest or drop is needed for an upgrade?
       
    6. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Thank you! I'll give it a try right now. I was playing with InteractByQuestFrameDisposition, but with no success. And yes, if this works, we can repeat it at each building. I am always forgetting something doing these chores manually :)
       
    7. FarmerJim

      FarmerJim New Member

      Joined:
      Sep 17, 2013
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      Its not a drop, its sold by the blueprints vendor in your level 2 town hall. Called excavation. Costs some gold and resources.
       
    8. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Works for mine. Works for the Forge too. Forge is complicated though: the mob is moving and a toon sometimes returns to the original position after Interact, making Lua miss. I've played with different approaches, the one that works relatively stable is waiting for the mob to get in range.
      Code:
      		<!-- Forge: Shipment + Yulia Samras -->
      		<CustomBehavior File="InteractWith" MobId="236403" NumOfTimes="4" WaitForNpcs="False" CollectionDistance="40" MovementBy="ClickToMoveOnly" /-->
      		<!--WoWUnit Name="Yulia Samras" Entry="77792" X="1832.687" Y="197.3552" Z="72.75887" /-->	
      		<CustomBehavior File="MyCTM" DestName="Forge Steps" X="1828.156" Y="202.9302" Z="72.81211"  />
      		<CustomBehavior File="MyCTM" DestName="Forge Inside" X="1831.018" Y="200.9332" Z="72.75875"   />	
      		<!-- Wait Until she's close enough, otherwise toon can move away from her and Lua will miss -->
      		<CustomBehavior File="Message" Text="Waiting for Closing" LogColor="LawnGreen" />
      		<While Condition="(ObjectManager.GetObjectsOfType&lt;WoWUnit&gt;().Any(u =&gt; (u.Entry == 77792) &amp;&amp; u.Distance &gt;= 5))" >
      		</While>
      		<CustomBehavior File="Message" Text="In Distance" LogColor="LawnGreen" />
      	
      		<CustomBehavior File="InteractWith" MobId="77792" InteractByQuestFrameDisposition="Complete" WaitForNpcs="False" AttemptCountMax="4" NonCompeteDistance="0" WaitTime="1000"  CollectionDistance="5" />
      		<CustomBehavior File="Misc\RunLua" Lua="C_Garrison.RequestShipmentCreation()" NumOfTimes="10" WaitTime="1000" />
      
      This takes some time though (and misses too, but mouse click also fails to open the dialog sometimes - need to do more tests).

      Probably faster way is to move to the mob's location first but I have not found the way to do it. Is there anything like "Move to a mob's location" or "Target this" and "Move to a target"?
      I'll create a code for my other buildings but need to check for a couple of days before publishing: order miss is a bad thing.
       
    9. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Oh! I see him now. Never bothered to check this guy, since mouse tooltip says "He just talks". Ok, stay tuned...
       
    10. Mascoba

      Mascoba New Member

      Joined:
      Sep 7, 2013
      Messages:
      24
      Likes Received:
      0
      Trophy Points:
      0
      Prostak try to make separate profiles for example "GarrisonMiner/Herbalist 1" (gathers lvl 1 mine and garden), "GarrisonMiner/Herbalist 2" (gathers lvl 2 mine and garden), "GarrisonMiner/Herbalist 3" (gathers lvl 3 mine and garden). Ty again for great job u do.
       
    11. Kmica

      Kmica Member

      Joined:
      Jan 20, 2012
      Messages:
      626
      Likes Received:
      12
      Trophy Points:
      18
      I would also like 3 different profiles for all 3 Garrison levels. Would be very usefull.
      Rly nice profile, to automate the basic daily tasks.

      Did u try turn mining off in the profile (dont have time atm to test it...) :

      PHP:
      <CustomBehavior File="UserSettings" HarvestMinerals="False" />    
       
      Last edited: Nov 23, 2014
    12. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I've attached profile for Mine 2. Profile for Mine 1 is not deleted.
      We do not need to separate Herbalist Garden 1 and 2 since it can be picked by the same (pretty simple) code.
      And I do not have buildings level 3 yet. We'll see what we can do then.

      And yes, adding some structure in the code is probably will be needed: mine code is simple but became very bulky due to added node types and waypoints. We should probably separate it to a standalone (but loaded automatically if needed) profile.
       
    13. MrB

      MrB Member

      Joined:
      Jun 29, 2010
      Messages:
      582
      Likes Received:
      2
      Trophy Points:
      18
      Alliance level 2 works really well, thank you for that
       
    14. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Updated to use Coffee and Picks (both as a speed bump and as a stuck prevention: if these are not consumed then the 6th object can't be extracted from the node and the bot mines this node endlessly).
       
    15. TreeK

      TreeK New Member

      Joined:
      Jul 10, 2012
      Messages:
      170
      Likes Received:
      1
      Trophy Points:
      0
      There may be, though I am the wrong person to ask, don't mess around with profiles too often. Best advice I can offer is to watch in a profile that Kick made where he has to interact with a similarly mobile quest giver and see how he handles it. Might be a place where a quest behavior is needed to ensure 100% success.

      Very nice work on the CTM through the mines. When I found that area wasn't meshed, I admitted defeat and resigned myself to doing it manually until it was handled properly by HB, or someone else much more patient than myself tackled it. So thank you!

      One thing I did notice, when you have 5 picks or coffee in your bags and and you open a mine cart with another in it, the cart will not despawn and the bot will attempt to loot it over and over. Not sure if there is a behavior available that can remove an item from our bags, but might want to take a look so you could run a check to make sure we have no more than 4 in our bags before looting each node.
       
    16. Tiebiex

      Tiebiex New Member

      Joined:
      Nov 1, 2012
      Messages:
      274
      Likes Received:
      0
      Trophy Points:
      0
      You can use a bagcleaner plugin( like mr itemremover2) and add the two items to delete.
       
    17. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I've used previously PocketGnome, which was (rip, old buddy) an unmeshed bot, so unmeshed areas don't frighten me. Actually the code is simple: follow the path and execute the same procedure at each waypoint. With XML it grows pretty balky very soon though. I'd love to have a BB that do just that: follow a path and execute some procedure assigned to a waypoint. Or probably there is a way to reduce the amount of repeating code in XML right now.

      Re moving target I have found a QuestBehaviors\Misc the file TargetAndMoveToMob.cs . Probablyy that's what we need. I'll try it. But looking at Kick's work is always a good advice :)

      I've just uploaded a version that takes care of Coffee and Picks by consuming them. I am always hesitant to throw away a useful item :) But if the consumption rate appears too low then we'll need to destroy some items, yes.

      Thank you for your kind words. I am using your fixes in PetBattle stuff regularly. So it feels nice to give something useful back.
       
      Last edited: Nov 24, 2014
      supersonic likes this.
    18. supersonic

      supersonic Member

      Joined:
      Jan 15, 2010
      Messages:
      100
      Likes Received:
      0
      Trophy Points:
      16
      Tried it on two chars already, work quite nice, sometimes happens that node is way to far behind wall so it is blizzards fault, bot just stands there and keeps hittin wall.
      Overall very nice job! I wish someone had patience to do same thing for horde ;)
      dobra robota ;)
       
    19. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I hope to reduce these "stucks" eventually. The cure is to reduce the mining radius at this waypoint: reduce bot in While and InteractWithObject, these should be identical.
       
    20. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I have tried to add "HarvestMinerals" to profile config, it failed. So I am using a hack which switches of harvesting permanently (which is not so good).
      Thank you for the hint, I'll try it.

      Upd. Tried, it works and does not make a change permanent. Thank you for a nice hint!
       
      Last edited: Nov 24, 2014

    Share This Page