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

[Guide]How to write a basic Questing Profile

Discussion in 'Honorbuddy Guides' started by Maffyx, Aug 26, 2015.

  1. Maffyx

    Maffyx Active Member Buddy Store Developer

    Joined:
    Feb 13, 2010
    Messages:
    1,079
    Likes Received:
    14
    Trophy Points:
    38
    Hello All,

    I’ve seen a lot of requests around the forums for a guide on how to write profiles. I’ve seen a lot of requests for grinding profiles but I feel that using the questing bot is a more useful since we can take advantage of Quest Behaviors and this can make our profiles more robust. This guide is not meant to be all inclusive but to be a starting point for those who want to begin building profiles. I apologize in advance for any poor formatting in this post, I'll try and edit it and fix it up as I go.


    First I want to start off with getting set up with a text editor. I personally use Notepad++ to write my profiles. It allows me to quickly edit and change text without much hassle.
    You can find Notepad++ here, and I don’t personally like the default background style for the editor, I use the Obsidian style. This can be changed in Settings > Style Configurator > Select Theme > Obsidian. I feel that one is pretty easy on the eyes.

    [​IMG]

    Another note on this is that you may want to change some of the text color settings. To do this go to the Language column on the left and scroll down to XML since this is what the profiles will be coded in. I opted to make my comments foreground color to be a lime green color so they stand out when I write them in. Of course you can mess around with these to be whatever you like.

    [​IMG]


    Second is that you will most likely want to distribute your profiles. That means you’ll probably want to set up an SVN. I personally use Assembla to host my files and then I use TortoiseSVN to add and commit them to the SVN host.

    How to use:

    1
    . Make your SVN account and have it set up
    a. If you’re using Assembla you’ll want to get your SVN trunk link
    b. This can be found under the SVN tab > Instructions sub tab at the top
    c. This link is what you’ll be checking out in the next couple of steps.​

    [​IMG]



    2. Make a folder somewhere that’s not in the Honorbuddy folder, I suggest on your desktop or in your documents. I just named mine my forum username.

    3. Now you’ll want to have your SVN trunk link ready.
    a. Right click on the newly created folder and select SVN Checkout

    [​IMG]

    b. It should have automatically pasted your SVN trunk link into the “URL of Repository” field.

    [​IMG]

    c. If the link looks right, hit okay and let it run, it should download everything from your repository. Right now it should be empty and show only a few folders called Trunk, Tag and Branches. For the purpose of this guide we’ll only use the trunk folder.

    d. If you want more information on the other folders check out this article.

    4. Okay so we should have our local repository set up and ready to go. Whenever you start a profile, save it to the trunk folder. I would recommend making a file structure convention based on the type of profile. Such as having a Farming folder then have sub folders for each expansion IE.

    a. Farming
    i. Classic
    ii. Burning Crusade
    iii. Wrath of the Lich King
    iv. Cataclysm
    v. Mists of Pandaria
    vi. Warlords of Draenor​

    b. Reputation
    i. Classic
    ii. Burning Crusade
    iii. Wrath of the Lich King
    iv. Cataclysm
    v. Mists of Pandaria
    vi. Warlords of Draenor​

    5. Now that we have our folder structure down let’s get into some of the resources we’ll need to start writing profiles.

    a. The most important thing you’ll be using for these profiles is the Honorbuddy Developers Tools.
    [​IMG]
    [​IMG]

    b. The next big thing we’re going to want to look at is the quest behaviors.
    i. These can be found in your Honorbuddy Folder under Quest Behaviors​
    ii. The documentation on these can sometimes be fuzzy so it can sometimes be advantageous to look at established profiles to reverse engineer them. I’ll go over a few of the main ones so we can see how they work.​
    1. InteractWith - Interacts with a mob or object, has a lot of different variables

    2. KillUntilComplete - Will grind on mobs until a condition is met

    3. UseItem - Uses an item in your bag

    4. RunMacro - Runs a macro command such as one you would use in game​

    c. Now that we have learned what some of these do, let’s implement them into a profile.

    6. Test Profile

    1.This is what a profile is going to look like and this is what we’ll have to fill in depending on what we want to do.
    a. I like to add a comments section at the top of my profile so that people know what the profile is for and how it is used regardless of where they got the profile. This way if they download it and forget about it they don’t have to try and find a post for it, they can read it inside the profile.​
    b. Tags​
    http://wiki.thebuddyforum.com/index.php?title=Honorbuddy:Levelbot:Grammar:HBProfile
    a. This will give us all the Elements we can use inside the Honorbuddy profile.​
    c. Conditions​
    a. These are how conditions are made for profiles, these will be checked before actions can be taken, this is how to structure them.​

    3. http://wiki.thebuddyforum.com/index...Levelbot:Grammar:Condition_attribute_examples
    a. As the page states these are not conclusive and could be potentially outdated or wrong.
    b. These just give you an idea of what you can do with the profile.​

    Here is the SVN to the Test Profile I wrote for this guide. It is fully documented and shows a few examples of KillUntilComplete and InteractWith.


    7. Helpful Resources

    a. https://www.thebuddyforum.com/honorbuddy-forum/community-developer-forum/
    i.This is where you should ask for help if you need help writing a profile or if you need a specific answer. Most people are willing to help if you have shown that you put in the effort to research and provide as much detail about what you’re looking for.​

    b. http://docs.honorbuddy.com/html/cd33c286-7af4-90b0-df04-9b928247da3e.htm
    i. This website shows all of the API information, you’ll find information related to the backend of the bot, some of the condition information can be found here, there isn’t a whole lot of documentation so it can take some guesswork.​

    c. https://en.wikipedia.org/wiki/List_..._entity_references#Predefined_entities_in_XML
    i. Since our profiles are in XML they require special characters to function so normal brackets like < and > don’t always function like we want them to.
    ii. So say we want to say If I’m level 27 or lower then we would mathematically put <= 27 however the bot can’t read that and we need to pass it something else. So we would put &lt;= 27
    iii. There are a lot of different quirks like this that can take some time to learn.​


    8. Publishing or Posting your Profile
    a. Now that we've finished our profile we need to publish it to our SVN.
    b. This is an easy process, make sure the file is in the correct folder based on your structure this is important because if you change this it may break later so make sure it's where you want it to begin with.
    c. Go to the file and right click on it and select SVN Commit
    [​IMG]

    d. After that a window should pop up and automate some stuff, you may be required to log in for this step, if so enter in the pertinent information.
    e. From there all you have to do is go to your SVN trunk link and navigate to the link of your profile. Right click on it and copy link address, this will save your link and you can save it to your posts or however you want to distribute it.





    Hopefully that helps some of you and enables more people to write profiles, I will try and add more information as I think of important things to add. These profiles can be as simple or as complex as needed. Thank you for reading and as always feel free to post any comments or feedback.

    Enjoy
     

    Attached Files:

    Last edited by a moderator: Jul 18, 2016
    speshulk926, Azhemoth and Z like this.
  2. Maffyx

    Maffyx Active Member Buddy Store Developer

    Joined:
    Feb 13, 2010
    Messages:
    1,079
    Likes Received:
    14
    Trophy Points:
    38
    I wanted to expand on my initial post and try and breakdown the Developer tools so people can learn how to use them. Please feel free to add or correct me on any information here.


    Profiles Tab:
    [​IMG]

    1. Local Player Info - This shows your current location, if you move, you need to hit the refresh button to get your most current position. I don't really use this too often, really only to compare to hotspot locations.

    2. Current Target Info - This will be very important in building profiles, it has a very convenient Copy XML button to pull out all the information related to the Unit. It will give you something like this when you copy it:

    <Vendor Name="Innkeeper Allison" Entry="6740" Type="Food" Nav="Fly" X="-8867.786" Y="673.6729" Z="97.90324" />

    Make sure you always hit refresh if you choose a new target.

    Let's break down the results:

    <Vendor Name="Innkeeper Allison" Entry="6740" Type="Food" Nav="Fly" X="-8867.786" Y="673.6729" Z="97.90324" />

    Vendor Name: This is obviously the name of the NPC

    Entry: This is going to be the Unit's ID number, another way to find this number is to go to WoWhead and search for the NPC name. IE:

    http://www.wowhead.com/npc=6740/innkeeper-allison

    That is the link to the same NPC. Notice the NPC = 6740, same as the Entry number. This is important for a lot of Quest Behaviors because they need Unit Id's to target and interact with.

    I would also like to note that this method applies to mobs as well, the Entry is synonomous with UnitId and MobId:

    <Vendor Name="Forest Spider" Entry="30" Type="Repair" Nav="Fly" X="-9226.476" Y="272.2993" Z="72.97188" />

    So we have the NPC name as Forest Spider, and the ID number is 30.

    Type: This is generally something you can ignore unless you need a specific vendor for your repair and vendor section. They'll be Repair, Food, Inkeeper, these are what you will be looking for when you need this NPC's, otherwise they're not needed.

    Nav: Again this is something you're generally not going to need and can most of the time be ignored.

    XYZ: These are pretty important, you're going to need these locations for most of the mobs and NPC's you're going to encounter.


    3. Common Buttons - These two buttons are pretty important.

    1. The first is Generate Blackspot. This is used when you have an area that the character can't navigate or an area you don't want it to go to, such as a pit they can't get out of or whatever it may be. The way a blackspot is made is by going to one edge of the area you want to blackspot, hitting the button, then running to the opposite edge, hitting the button again. This will give you a print out like:

    <Blackspot X="-5137.301" Y="544.6486" Z="84.33643" Radius="22.15761" />

    These go in the top of the profile near the vendors, mail, and avoid mob settings. Such as :

    HTML:
    <Blackspots>
    <Blackspot X="-5137.301" Y="544.6486" Z="84.33643" Radius="22.15761" />
    <Blackspot X="-5117.417" Y="537.1185" Z="85.25964" Radius="22.15761" />
    </Blackspots>
    
    Here is some input about blackspots from thebrodieman:


    2. The second button is a generate hotspot button. This will spit out a hotspot of your characters current location. This is a very convenient way to get multiple hot spots for huntinggrounds and what not. These look like:

    <Hotspot X="-1441.929" Y="9866.271" Z="200.9235" />

    Do note that if you are making hotspots underground that navigation can sometimes be a little weird due to how it may be meshed. Usually the navigation system is pretty good but you may have to watch your profile a few times and tweak the hotspots to make it work correctly.

    4. Quests - This will show the current quests in your quest log, this is an essential thing to have when building questing profiles.

    If you click on a quest and right click Copy XML it will Query WoWhead to get the quest information and populate a few things for you. Each quest will give you a different set of objectives, but there will always be a PickUp and TurnIn command. The printout looks like this:

    HTML:
    <PickUp Nav="Fly" QuestName="Venomblood Antidote" QuestId="28145" GiverName="Sun Priest Asaris" GiverId="47715" />
    <Objective QuestName="Venomblood Antidote" QuestId="28145" Type="KillMob" Nav="Fly" MobId="47748" KillCount="8" />
    <TurnIn Nav="Fly" QuestName="Venomblood Antidote" QuestId="28145" TurnInName="Sun Priest Asaris" TurnInId="47715" />
    
    So first we have the PickUp, this tells the bot the following: How to get there navigation wise, what the quest name is, what the questID is (This can be found with the WoWhead method listed above, IE: http://www.wowhead.com/quest=28145/venomblood-antidote ) The quest giver name, and the quest giver ID, again that can be found out via WoWhead: http://www.wowhead.com/npc=47715/sun-priest-asaris )

    Now we have the Objective, unless this is a complex quest outside of simply killing or gathering items then we can leave this be as the bot will use a database to figure out what to do. Otherwise we may have to implement a quest behavior to complete the task.

    Lastly we have the TurnIn, similar to the PickUp but obviously this is after the quest has been completed and is ready to turn in.

    There are also two other buttons to copy all quests and overrides, one will do the above for all the quests in your log. The other will make overrides for your profile.

    I will also note that if you pick up a quest it won't automatically show up in the quest log, so you have to hit refresh to make it show. If your quests seemingly disappear when you hit refresh, hit it again and they should come back.

    So now that know what we're looking at, how do we put this in the profile?

    I like to put my quest information inside a set of check loops. I set them up like this:

    HTML:
    <!-- The Crone's Bargain -->
    <While Condition="!HasQuest(12841) &amp;&amp; !IsQuestCompleted(12841)" >
       <PickUp Nav="Fly" QuestName="The Crone's Bargain" QuestId="12841" GiverName="Lok'lira the Crone" GiverId="29481" />
    </While>
    <While Condition="HasQuest(12841) &amp;&amp; !IsQuestCompleted(12841)" >
       <CustomBehavior File="InteractWith" QuestId="12841" MobId="29518" CollectionDistance="200" X="6929.614" Y="-1316.467" Z="831.2584" />
    </While>
    <While Condition="HasQuest(12841) &amp;&amp; IsQuestCompleted(12841)" >
       <TurnIn Nav="Fly" QuestName="The Crone's Bargain" QuestId="12841" TurnInName="Lok'lira the Crone" TurnInId="29481" /> 
    </While>
    <!-- End The Crone's Bargain -->
    
    So first I like to comment what quest I'm doing for reference if it breaks while I'm testing it, comments in HTML/XML are made by doing this :

    <!-- Anything inside these will not be read by the bot-->
    <!-- --> that's <!hypenhyphen TEXTHERE hyphenhypen>

    1. The first while loop looks to see if we don't have the quest and we haven't completed it. If these are true it will go and try to pick it up.

    2. The second loop checks to see if we have the quest but haven't completed it. If these are true then it will complete the actions needed to complete it.

    3. The last loop checks to see if we have the quest and it is completed, if these are true then it will go turn it in.

    Once all the loops have been done it moves to the next objective.


    Quest Overrides
    I'm going to go into another function of the quest tools, Quest Overrides.

    Overrides will look like this:
    HTML:
    <Quest Id="28145" Name="Venomblood Antidote">
       <Objective Type="KillMob" MobId="47748" KillCount="8">
              <Hotspots>
              </Hotspots>
       </Objective>
    </Quest>
    
    As you can see we have a quest ID, and name, what the bot is supposed to do which is kill 8 of the expressed mob id. But what we dont have is the where. The hotspots are empty which means it won't go anywhere.

    So when we copied the single quest XML earlier it included

    <Objective QuestName="Venomblood Antidote" QuestId="28145" Type="KillMob" Nav="Fly" MobId="47748" KillCount="8" />

    Looks pretty similar right? Well if this is working correctly by using the database then we don't need an override.

    The overrides are to improve details for quests that seem to be wonky within the database, so say we need better hotspots or it's not trying to pick up the right deal then we can fix that here or by using a quest behavior in the quest order. Quest behaviors cannot be used inside these, only inside the quest order.

    If you choose to use these, they must be outside of the quest order. Most commonly found above it. So going back to the profile structure it will look like this.

    HTML:
    <Quest Id="28145" Name="Venomblood Antidote">
       <Objective Type="KillMob" MobId="47748" KillCount="8">
         <Hotspots>
         </Hotspots>
       </Objective>
    </Quest>
    <QuestOrder>
    <!-- The Crone's Bargain -->
    <While Condition="!HasQuest(12841) &amp;&amp; !IsQuestCompleted(12841)" >
       <PickUp Nav="Fly" QuestName="The Crone's Bargain" QuestId="12841" GiverName="Lok'lira the Crone" GiverId="29481" />
    </While>
    <While Condition="HasQuest(12841) &amp;&amp; !IsQuestCompleted(12841)" >            
       <CustomBehavior File="InteractWith" QuestId="12841" MobId="29518" CollectionDistance="200" X="6929.614" Y="-1316.467" Z="831.2584" />
    </While>
    <While Condition="HasQuest(12841) &amp;&amp; IsQuestCompleted(12841)" >
       <TurnIn Nav="Fly" QuestName="The Crone's Bargain" QuestId="12841" TurnInName="Lok'lira the Crone" TurnInId="29481" />
    </While>
    <!-- End The Crone's Bargain -->
    </QuestOrder>
    
    Console Tab:
    [​IMG]

    This tab is for the more advanced users and is something I’m still learning about. From what I can tell it’s basically a test bed for testing out scripts that you’re trying to implement in a profile or plugin, or CR or what have you. I’ll try to do my best at explaining what everything does.

    1. New – This button will just give you a fresh window to test new scripts, as well as saves the old ones.

    2. Delete – Pretty self explanatory, select the script you want to delete in the drop down menu then hit delete.

    3. Run (F5) – This will try and debug your script and will post results or an error that hopefully helps solve what the problem may be.

    4. Click to set Keybind – I have not used this but I’m assuming it works as labeled, if you have a common script that you want to use often then you can bind it to a key to test often.


    Objects Tab:
    This tab will show a lot of information about the game world that is surrounding you. Think of it as a text version of a “radar” so to speak. This tab has three sub-tabs, Game Objects, Units, and Bag Items. I’ll go through each sub-tab individually as best as possible. If you want to copy any of the information you see for an Object or Unit or Bag Item, simply right click and select copy information and it will copy it to your clip board and will post it in your HB log. Again if any developers have better insight on these please add your knowledge!

    GameObjects Tab:
    [​IMG]

    This shows all the in game objects around you, including things such as mailboxes, chairs, mostly items you can interact with.

    1. Entry – This shows the objects Id number. This is very important if you want to use it, such as using an InteractWith quest behavior, this is the “MobId” you would use.

    2. Name – Pretty self explanatory, this is the name you see in the tooltip in game.

    3. GUID – I’m not completely sure but this may be related to the model id that blizzard uses internally, I’ve never needed this information.

    4. Position – This will show the XYZ location of the object in the game world.

    5. Distance – This will show the distance from you to the object, objects are listed by distance closest to farthest away from you.

    6. Type – I’m not exactly sure if this is ever going to be an option other than “GameObject” again I think this is related to the models in the game.

    7. SubType- I’m assuming these vary on the type of model that’s in the game and how it’s presented to the user. I would say this is the “real” type of object that is near you.

    8. SpellFocus – This is helpful for needing detailed interactions with objects, maybe similar ones in the area.

    9. LockType – I think this is used more for targeting with CR’s


    Units Tab:
    [​IMG]

    A lot of these options are going to be similar to the GameObjects subtab. All non-player NPC’s will show up in this tab, this includes player pets as well, so Mage’s Water Elementals, Warlocks’ Demons, etc.

    1. Entry – This shows the units Id number. This is very important if you want to use it, such as using an InteractWith or KillUntilComplete Quest Behavior, this is the “MobId” you would use.

    2. Name - Pretty self explanatory, this is the name you see in the tooltip in game.

    3. GUID – I’m not completely sure but this may be related to the model id that blizzard uses internally, I’ve never needed this information.

    4. Position – This will show the XYZ location of the object in the game world.

    5. Faction ID – This will show the faction ID of the unit, this is normally used for Grinding profiles, with the <Factions></Factions> tags.

    6. Distance – This will show the distance from you to the object, objects are listed by distance closest to farthest away from you.

    7. NPC Flags – This will show you what kind of options you will have if you were to interact with this NPC, some let you talk to them, some do nothing, some are repair or food vendors, some are quest givers, they’re mostly self explanatory.


    Bag Items Tab:
    [​IMG]

    This tab shows everything that is currently in your bags, reagent bank, and personal bank.

    1. Entry – This shows the items, ItemId, useful for the UseItem Quest Behavior.

    2. Name - Pretty self explanatory, this is the name you see in the tooltip in game.

    3. Stack Count – Shows the quantity of the stack of items.

    4. Type – I don’t think this will ever not be “Item”


    Auras Tab:
    [​IMG]

    Auras on Me: These will show the auras that are currently applied to your character. This is very helpful for a lot of InteractWith and other development options.

    1. SpellID – This shows the aura spell number that is applied to you, this can sometimes be found via WoWhead like other methods mentioned earlier in the guide.

    2. Name – This is the name that is usually shown on the tooltip, however some auras aren’t always interactive in game.

    3. StackCount – This shows the amount of the aura that is applied, some skill aura’s like a shaman’s elemental shield can have multiple stacks.

    4. AuraFlags – This shows whether or not the aura can be cancelled or is ongoing indefinitely.

    5. TimeLeft – This shows the duration that is left on the aura if it has one.

    6. Creator – Shows who made the Aura, usually this is the same as your character, but if you were buffed by someone it may be their name.

    7. CreatorGUID – Again I’m not super sure on what that means, I’m assuming it’s a blizzard thing.


    Auras on Current Target Tab: These options will be the same as above; however will only be applicable to whatever you’re targeting.



    Merchant Items Tab:
    [​IMG]

    If you go to a vendor and interact with it to bring up what items it sells you can see everything listed here. This list is ordered by appearance in the merchant page from left to right and top to bottom so :

    1 2
    3 4
    5 6

    1. ItemId – This shows the id number of the item.

    2. Name - Pretty self explanatory, this is the name you see in the tooltip in game.

    3. Quantity – How big the stack size is for each item.

    4. BuyPrice – This is the price in copper for each stack.

    5. NumAvailable – This is the amount that the vendor has available, -1 indicates that you can buy an infinite amount; other numbers would indicate a limited quantity for sale.


    Targeting Tab:

    I can’t get this tab to function if it is even functional, I’ll report back when I have more information. If anyone knows what this does or how to use it, please let me know.

    Update: Here is some input on the targeting tab from thebrodieman:

     
    Last edited: Sep 1, 2015
  3. Aion

    Aion Well-Known Member Buddy Store Developer

    Joined:
    Jan 18, 2011
    Messages:
    3,659
    Likes Received:
    66
    Trophy Points:
    48
  4. Maffyx

    Maffyx Active Member Buddy Store Developer

    Joined:
    Feb 13, 2010
    Messages:
    1,079
    Likes Received:
    14
    Trophy Points:
    38
    Hello All,

    I updated the reserved post of my guide to include a more thorough breakdown of the Developer Tools on HB. This will hopefully help some people with using the tools and what everything means. I plan in the future to make a guide on some of the quest behaviors so people know what's going on with those as well. As always please let me know if you have any questions, comments, or feedback. Thank you again for reading!
     
  5. thebrodieman

    thebrodieman Well-Known Member Buddy Store Developer

    Joined:
    Sep 11, 2011
    Messages:
    6,014
    Likes Received:
    77
    Trophy Points:
    48
    A couple of notes/updates for you!

    Blackspots - probably a good idea to note that these don't just create a hole that the bot won't path through, but any connection mesh segments as well. Say for example you have a 20 yard radius blackspot inside of a 200 yard square mesh segment (never will be that big but for arguement's sake). That entire mesh segment will become blackspotted. Segments are usually small and divided by hills, turns, objects etc. If any segment intersects through a blackspot, it will become a blackspot itself.

    Targeting Tab - if you are running the bot, and its set to kill things or collect items from mobs, you will see targets appear on the Targeting section on this tab. Their range updates rapidly as it remembers which to attack. Also, while in combat, this list will populate with all targets that are in combat with us (possibly all that return true on UNIT.IsTargetingMeOrPet). The Loot section of this tab represents all mobs that are Lootable within Loot Radius defined in settings while we are in a "Go loot" mode (lootable detected in range and is targeted for loot interaction)
     
    Maffyx likes this.
  6. kaloroll

    kaloroll New Member

    Joined:
    May 21, 2017
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    1
    Thanx, good guide
     

Share This Page