• Visit Honorbuddy
  • Visit Rebornbuddy
  • Visit Demonbuddy
  • Visit Exilebuddy
  • Visit Hearthbuddy
  • Visit Pokefarmer
  • Visit Buddystore

[PB] [Alliance] Alchemy (and semi-generic material gatherer) proof of concept

Discussion in 'Archives' started by suremail, Apr 12, 2011.

  1. suremail

    suremail New Member

    Joined:
    Dec 26, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    [PB] [Alliance] Alchemy (and semi-generic) material gatherer proof of concept

    One of the biggest issues with ProfessionBuddy right now is just the lack of profiles for professions. Unattended mining/herbing is great, but those two weren't really that much of a pain to level up using Gatherbuddy/Honorbuddy to begin with.

    So my idea was to make a ProfessionBuddy profile that, with a little modification, could work for different professions. At the very least it could serve as a good skeleton for professions that require gathered materials (inscription, alchemy, blacksmithing, etc).

    The general premise is that you put a list of item IDs and quantities into the xml file, associate them with the correct gathering profile, and the bot will gather until it has all of the necessary items.

    ex:

    Code:
    			/* First profile (index 0) */
    			temp.Add( new int[]{ 2447, 59 } );	/* Peacebloom */
    			temp.Add( new int[]{ 765, 59 } );	/* Silverleaf */
    			((ArrayList)var2).Add(temp.ToArray( typeof(int[]) ));
    			temp.Clear();
    
    This profile has a few of the items necessary to start alchemy and will gather until it has enough and then move to a new area. I have tested this so far as the first eight items on the WoW Profession alchemy guide and it correctly goes to each new area. The complete item list is in the xml file, and just commented out. Enabling the other items is just a matter of copy/pasting and associating them with the correct gathering profile.

    This profile is meant to be opened in a text editor. There are comments and formatting that will be lost if you open it in ProfessionBuddy and save it to the same file. Without the formatting the logic will be very hard to follow.

    This is not a complete profile. This profile is geared more towards profile makers and people who have a basic understanding of programming.

    Improvements that could be made:

    • Selling / mailing extra items
    • Loading a profession buddy profile when the gathering phase is complete (There are none currently, which is why it doesn't do this)
    • Gather only the items in the profile (use the GB2 blacklist options)
    • Needs Horde profiles / item associations
     

    Attached Files:

    Last edited: Apr 13, 2011
  2. NizaJakub2

    NizaJakub2 New Member

    Joined:
    Feb 24, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Nice work! Where is blacklist node? I didnt find it in ur code and when I run it, it gathered all herbs and when have enough of selected herbs, changed profile. Thx m8
     
    Last edited: Apr 19, 2011
  3. suremail

    suremail New Member

    Joined:
    Dec 26, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    I don't quite follow what you're asking.

    If you're asking, "How do I stop it from gathering certain herbs?" then the answer is you can't with the code the way it is. You could configure Gatherbuddy2 to only gather the types of herbs you need (while ignoring others) if it is a big issue for you.

    If you're asking, "How does it know to change gathering profiles after it collects the herbs?" then the answer is in the part of the profession profile where the herbs are listed.

    Code:
    temp.Add( new int[]{ 765, 59 } );	/* Silverleaf */
    765 is the item id of the gathered Silverleaf plant, and 59 is the number of Silverleaf to gather.

    Code:
    ((ArrayList)var2).Add(temp.ToArray( typeof(int[]) ));
    That creates a new set of herbs to look for, so any of the temp.Add lines above it are included. In the case of the first set it is Peacebloom and Silverleaf. The bot will stay on the first gathering profile until it has at least 59 Peacebloom and at least 59 Silverleaf. It will stay on the second profile until it has at least 93 Briarthorn, 33 Bruiseweed, etc.

    The gathering profiles are listed near the bottom and look like this:

    Code:
    				<If Condition="0 == (int)var1" IgnoreCanRun="True" ChildrenCount="2">
    					<CustomAction Code="Log(&quot;Loading 1-75 profile&quot;);" />
    					<LoadProfileAction Path="HBProfiles\(GB2 1-300)Herb&amp;Mining\Alliance\(GB2 1-75)(Elwynn.Alliance)Herb&amp;Mining.xml" ProfileType="Honorbuddy" />
    				</If>
    All old-world gathering profiles are set up for Alliance, but not all herbs are currently configured. To get the profession profile to do all old-world gathering would require someone taking the time to just see what herbs can be found in each gathering profile. It's not hard. It's just tedious and I haven't been playing WoW that much lately.
     
  4. NizaJakub2

    NizaJakub2 New Member

    Joined:
    Feb 24, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    ok thx, the first was correct :)
     
  5. tia79

    tia79 New Member

    Joined:
    Jan 15, 2010
    Messages:
    406
    Likes Received:
    1
    Trophy Points:
    0
    This just dont work..

    Code:
    Err: If (!GatherbuddySettings.Instance.GatherHerbs)Compile Error : Navnet GatherbuddySettings finnes ikke i gjeldende kontekst
    
    
    Objektreferanse er ikke satt til en objektforekomst.
     
  6. Inrego

    Inrego New Member Buddy Store Developer

    Joined:
    Feb 7, 2010
    Messages:
    2,766
    Likes Received:
    68
    Trophy Points:
    0
    I already made a profile like this, but just for mining. It's fully functional. You can see more info in the link in my sig.
     

Share This Page