• 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
      If the horde mine has the same layout as an alliance one (which I strongly suspect it is) then converting A to H can be done by a simple spatial translation.
      Get Horde entrance coordinates (Mine 0 in my file), notice the difference, and apply the difference to all other coordinates in the file, like
      A = (1000, 3000, 2000), H= (2000, 2000, 1000), difference is (+1000, -1000, -1000). Add this difference to all (X,Y,Z) in the files. You'll need some script certainly to do it, not by hand.

      Upd: Wrong. Horde mine is indeed identical, but it is also turned across the vertical axis. So one need to: 1) figure out the turn angle, 2) apply the turn to coordinates... So not right now, may be in the evening :)
       
      Last edited: Nov 26, 2014
    2. Probe87

      Probe87 New Member

      Joined:
      Nov 13, 2012
      Messages:
      17
      Likes Received:
      0
      Trophy Points:
      0
      You are my Hero! Thanks 4 this Awesome Profile ;)
       
    3. Boomer

      Boomer New Member

      Joined:
      Jan 15, 2010
      Messages:
      107
      Likes Received:
      0
      Trophy Points:
      0
      Thanks for working on this!!
      I noticed that if there is a pick or something in the cart that you can only have one of, it still tries - repeatedly - to mine the object. I canceled and tried to restart and then it just stops with a message in HB: "[FlyTo-v1844(fatal)] Toon doesn't have flying capability in this area, and there is no ground path to the destination. Please learn the flying skill appropriate for this area.
      Bot stopping! Reason: Fatal error in quest behavior, or profile."
       
    4. Morroklump

      Morroklump New Member

      Joined:
      Dec 26, 2012
      Messages:
      21
      Likes Received:
      0
      Trophy Points:
      0
      Can someone help me with this error?

       
    5. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      I am going to provide a version that improves handling of Coffee and Pick shortly. Upd: Done.
      But if you stop the profile inside the mine you'll need to run to back to the entrance manually. I do not see an easy way to pickup the correct place in the chain of waypoints after the profile was stopped in an unmeshed area.
      Alternatively, you may want to use "Pause" instead of "Stop" to clear up the problems (and join my petition to HB team to make "Pause" button more visible and more easily accessible :) ).
       
      Last edited: Nov 25, 2014
      Boomer likes this.
    6. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      This most probably means that you forget to load a profile. First turn "Questing" on, then load a profile. It may produce an error, but not that one.
       
    7. Klikster

      Klikster Member

      Joined:
      Mar 8, 2010
      Messages:
      141
      Likes Received:
      1
      Trophy Points:
      18
      Just loaded this up for a test this morning. Mined everything perfectly and even started the work orders for me. Can't wait until this gets upgraded to Lv3! :) (I'll hold off upgrading my mine until then.)
       
    8. Totesviech

      Totesviech Member

      Joined:
      Apr 24, 2012
      Messages:
      840
      Likes Received:
      1
      Trophy Points:
      18
      Hello Garrison / Miner is not working!

       

      Attached Files:

    9. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Most probably that means that your mine is still empty. Are you able to see the yellow dots for ore at the minimap?
      Other possibility is your Mineral Gathering is turned on, since 1.2 that you are using was not switching it off automatically. You may want to try v1.5 that does.
       
    10. KissMe4711

      KissMe4711 New Member

      Joined:
      Jun 18, 2013
      Messages:
      96
      Likes Received:
      0
      Trophy Points:
      0
      One thing: when there sometimes will be a mob, that you kill the bot dont loot.
       
    11. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      This is a byproduct of an unmeshed area: if a mob dies farther than you can immediately reach - it is unreachable (no path to the destination can be calculated).
       
    12. Maelnum

      Maelnum New Member

      Joined:
      Jul 9, 2014
      Messages:
      48
      Likes Received:
      1
      Trophy Points:
      0
      Here is a suggestion about making the code easier to manage: Why not combine the C# code of MyCTM and InteractWith in a new custom behavior?

      Call it MineCTM (get it?)
      Have it first declare object ids that we want to interact with (ores, herbs, mine crates, work order boxes)
      Copy paste the code of MyCTM
      After it arrives at location do the InteractWith on any of those objects that are within 15 yards, then return back

      Then just call it in xml profile as MineCTM Waypoint. Should be able to cut it down to 20 lines of code this way, unless I'm missing something?

      For returning back from depths of mine I'd personally just use garrison hearthstone and turn in stones for work orders tomorrow.
       
    13. Aceman22

      Aceman22 New Member

      Joined:
      May 25, 2012
      Messages:
      7
      Likes Received:
      0
      Trophy Points:
      0
      I maxed fishing and now everytime i start this bot it logs me out for max fishing. Is there a way to fix this?
       
    14. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Thank you for a very insightful suggestion (Actually, two of them). Logically yes, the setup consists of the things you've mentioned. Gather raduis is actually a dependent of a waypoint, but it is a minor tweak. I was thinking to reduce the code by a kind of macro-processing, using e.g. a Python script to generate the full current version out of a compact description. But going directly to a specialized CustomBehavior is probably even more efficient thing. What bothers me here is a necessity to mess with "Quest Behaviors" folder... TortoiseSVN will mark everything red, HB developers will be non-pleased... but the more I think about it the more I like it. Just need to save the list of objects somewhere - better yet we may store a procedure somewhere written in terms relative to "Me". But this "procedure" desire comes from my experience with MoP garden, for a WoD Mine it wil be an overkill. Let me think.

      And herth method is nice too. Personally I enjoy looking (when looking) at bot running but more time-concious people may want to insert hearth at the end of actual mining.

      Upd. I have looked at MyCTM and InteractWith code. Modifying them is not as easy as it seemed, at least for me, who is rather a newb in HB architecture. But studying the code I've noticed that InteractWith allows to specify a list of objects! - I've totally overlooked this feature. This will allow to reduce repeatable things down to a manageable level, I hope. I'll try it with the Horde mine, which people are asking for. So thank you for pushing me in this direction :)
       
      Last edited: Nov 27, 2014
    15. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      You are kidding, right? (Sorry, I was really amazed at this dependency). Let me quickly check the profile. No, nothing about fishing here. Do you have a log?
      These things cause some suspicion:
      Code:
      	<MinDurability>0.2</MinDurability>
      	<MinFreeBagSlots>5</MinFreeBagSlots>
      
      But I rather expect a toon to run to a vendor not to logout...
      Another thing is to check AutoAngler settings. Bots often respect each other setting even then they can't change some. Was AutoAngler set to logout after max? Nope, I do not see such an option there...
      So the only cause of action is too look at the log. After we see how HB explains the logout we may check cs code for these words, take a look and try to understand how to disable the logout.

      But main suspects so far remain Durability and Free Bag Slots.
       
    16. KissMe4711

      KissMe4711 New Member

      Joined:
      Jun 18, 2013
      Messages:
      96
      Likes Received:
      0
      Trophy Points:
      0
      ah, ok, that´s it .. so far, this script ist amazing and very helpful - thanks a lot.
       
    17. Prostak

      Prostak Member

      Joined:
      Mar 17, 2013
      Messages:
      249
      Likes Received:
      16
      Trophy Points:
      18
      Horde version is uploaded. I've changed a name of the first post to reflect this, but do not see a way to change a name of the thread. Is there any or should I just start a new one?
      To whom it may be interesting: Horde version is identical to Ally version, calculated based on it by a spatial translation and a rotation, which itself are calculated based on exact measurements of two points inside both of the mines. Let me post a (rather ugly but working) Python code here in case anyone will want to adapt something made by Allys for their mine, and more importantly - for myself, because I will misplace this piece of code just before it will be needed again:
      Code:
      ins = open('GarrisonMiner_A_mine_level_2_ONLY.xml', 'r' )
      ous = open("GarrisonMiner_H_mine_2_ONLY.xml", "w" )
      
      import math
      
      # Mine 1
      Ally1_X, Ally1_Y, Ally1_Z    = 1886.043, 83.0498,  84.29963
      Horde1_X, Horde1_Y, Horde1_Z = 5466.456, 4430.831, 145.7061
      
      xshift, yshift, zshift = Horde1_X - Ally1_X, Horde1_Y - Ally1_Y, Horde1_Z - Ally1_Z
      print( "Shift: ", xshift, yshift, zshift )
      
      # Mine Bulyzhnik
      AllyB_X, AllyB_Y, AllyB_Z    = 1851.025, 162.6187, 17.93922
      HordeB_X, HordeB_Y, HordeB_Z = 5397.303, 4483.142, 78.94901
      
      AllyVec_X, AllyVec_Y, AllyVec_Z = AllyB_X-Ally1_X, AllyB_Y-Ally1_Y, AllyB_Z-Ally1_Z
      AllyVec_Len = math.sqrt( AllyVec_X**2 + AllyVec_Y**2 )
      print( "Ally Vec: ", AllyVec_X, AllyVec_Y, AllyVec_Z, ", Len: ", AllyVec_Len )
      
      HordeVec_X, HordeVec_Y, HordeVec_Z = HordeB_X-Horde1_X, HordeB_Y-Horde1_Y, HordeB_Z-Horde1_Z
      HordeVec_Len = math.sqrt( HordeVec_X**2 + HordeVec_Y**2 )
      print( "Horde Vec: ", HordeVec_X, HordeVec_Y, HordeVec_Z, ", Len: ", HordeVec_Len )
      
      Cos_Turn = (AllyVec_X*HordeVec_X + AllyVec_Y*HordeVec_Y) / (math.sqrt(AllyVec_X**2 + HordeVec_X**2) * math.sqrt(AllyVec_Y**2 + HordeVec_Y**2))
      Angle_Turn = math.acos( Cos_Turn )
      Sin_Turn = - math.sin(Angle_Turn)
      print( "Cos: ", Cos_Turn, ", Angle: ", Angle_Turn, "Sin: ", Sin_Turn )
      
      for line in ins:
          if( 'X="' in line and 'Y="' in line and 'Z="' in line ):
              # extract X, Y, Z
              a = line
              xbeg, xsep, xrest = a.partition('X="')
              xstr, xqsep, xrest2 = xrest.partition('"')
              aX = float(xstr)
      
              ybeg, ysep, yrest = xrest2.partition('Y="')
              ystr, yqsep, yrest2 = yrest.partition('"')
              aY = float(ystr)
      
              zbeg, zsep, zrest = yrest2.partition('Z="')
              zstr, zqsep, zrest2 = zrest.partition('"')
              aZ = float(zstr)
      
              # Modify X, Y, Z - this calls for a procedure, but I am a newb in Python too
              #
              # Having Cos and Sin, H coords are calculated as follows:
              #
              # hZ = aZ + zshift
              #
              # subtract Ally1 from aX, aY
              # hX = aX * Cos - aY * Sin
              # hY = aX * Sin + aY * Cos
              #
              # or (if a turn is in a different direction actually):
              #
              # hX = aX * Cos + aY * Sin
              # hY = -aX * Sin + aY * Cos
              #
              # Now, add Ally1 back, add xshift and yshift and you are done
      
              hZ = aZ + zshift
      
              aX, aY = aX - Ally1_X, aY - Ally1_Y
      
              hX = aX*Cos_Turn  + aY*Sin_Turn
              hY = -aX*Sin_Turn + aY*Cos_Turn
      
              hX = hX + Ally1_X + xshift
              hY = hY + Ally1_Y + yshift
          
              res = xbeg + xsep + str(hX) + xqsep + ybeg + ysep + str(hY) + yqsep + zbeg + zsep + str(hZ) + zqsep + zrest2
              print( res, file=ous, end = "" )
          
          else:
              print( line, file=ous, end = "" )
      ins.close()
      ous.close()
      
      Amazingly, it works without changes, just rubs a wall in a couple of places. I do not have enough firepower (measured in toons and time) to refine and polish Horde version as much as an Ally one. So if anyone is interested - please take it from here.
       
    18. YourBody

      YourBody New Member

      Joined:
      Sep 22, 2014
      Messages:
      15
      Likes Received:
      0
      Trophy Points:
      0
      Nice !
      It works very good on my Ally, my Horde Char has Problems to finish the mine.
      I really like it and i hope you improve this tool to Garisson/Herb/Mine @ lvl3 on Ally and Horde.
      Daily Garisson tasks automatically done is great,

      Thanks!
       
    19. ebrinker

      ebrinker New Member

      Joined:
      Aug 22, 2012
      Messages:
      3
      Likes Received:
      0
      Trophy Points:
      1
      Hi,

      I really love this profile and works very well on my toons.

      Thanks!
       
    20. Kmica

      Kmica Member

      Joined:
      Jan 20, 2012
      Messages:
      626
      Likes Received:
      12
      Trophy Points:
      18
      Now i just need Mine Lvl 3 profile :)
       

    Share This Page