Вы находитесь на странице: 1из 8

Introduction

Professionbuddy is a plugin designed to automate Tradeskill related tasks including but not
limited to automatically leveling Tradeskills, disenchanting items, milling herbs or crafting a list
of items.

Tasks are built by drag and dropping Actions onto the right pane and editing the actions to the
desired settings.The user can then save the tasks to a profile as well as load profiles.
ProfessionBuddy supports loading .zip files as well as saving to .zip. When a profile is saved to
a .zip file any Honorbuddy/GB gathering profiles that the ProfessionBuddy profile uses is
automatically added to the zip. This makes distributing multiple files much easier.

Having basic knowledge of the C# language is recommended to build advanced profiles as well
as some knowledge of Honorbuddy's API

How do I use ProfessionBuddy?


note:I will use PB as an acronym for ProfessionBuddy.
1. Run Honorbuddy and set bot to 'Professionbuddy' from the drop-down list
2. Open the PB window by clicking the 'Bot Config' button in HB
3. Select one of the profiles in the profile list on the left side of the config window
and press 'Load Profile' button (or double-click it)
4. If the profile has any settings attached to it a new tab named 'Profile Settings'
will be loaded in the right side of the window. Adjust the settings if needed and
close PB's window
5. Press the 'Start' button in Honorbuddy

How do I make profiles?


You can drag and drop Actions from the Action List on the left to the Task List that's on the right
side and then configure the action's settings to your likings in the PropertyGrid.

There is a wide variety of Actions to choose from such as actions that will craft recipes,
mill,disenchant,prospect, fly or run to locations, train, sell/buy from vendors and AH and more.
There's also an "If Condition" and "While Condition" that can be used to perform actions under
certain conditions.

Once you have have all the actions that you need in the Task List hit the start button and
Professionbuddy will perform all the actions in the Task List

In order to make advanced profiles like one that levels a profession you need to know basic C#.
If you have some experience with making quest orders then this shouldn't be a problem.

Action Tab
This tab shows a list of actions that can be placed in the Task List via drag and drop or using that
‘add’ button. This list also includes an 'If Condition' which will execute all the actions it contains
if the condition is true.

Tradeskill Tab
This Tab contains all your current tradeskills and all the learned recipes you bot has learned.
There's a search filter text box to the upper left corner and a drop-down list of Categories to the
upper right.

The list has 3 different columns, Name, recipe repeatable count, and color representing the
recipes difficulty. This list supports multiple selection which makes it easy to add allot of recipes
to the Task list. To add the Recipes to the Task List you need to select them and then click the
'Add' button that is below the list. To the left of the 'Add' button is a numeric value that
represents the number of times the recipes will be repeated when added to the Task list.

To the right of the 'Add' button is a drop down list with different modes that will alter the
recipe's repeat behavior. The 1st and default mode, 'Specific' will attempt to repeat the recipe
the specified number of times.

The second mode 'Craftable' will repeat the recipe until it runs out of mats.

The third and final mode 'Banker' is only available if the user has an addon called DataStore
installed. It's available on Curse gaming and comes with that Altaholic Addon. It basically keeps
track of inventory, auctions, mail and bank items for all your characters, and even has multiple
account support. This mode is nice to restock your bankers with crafted goods to sell on AH for
example. It checks to see how many of the crafted items you have on your alts and then it
deducts the 'Repeat' amount from it. For example if you had 12 Flask of Steelskin on your alts
and your 'Repeat' number is 20 it would makes 8 flasks. (20-12 =8).

Task List
The Task List is where all your 'If Condition's and Actions are. To change the properties of an
action you must select it and then change the settings in the Property grid below. There are
several keybind that make editing easier.

Keybinds:
Shift + drag n drop: By default dropping an action on top of an 'If condition' places it inside that
'If Condition' this keybind cancels that effect.

Ctrl + drag n drop: copies an action or an 'If Condition' and all of its actions

Delete: deletes selected action/If Condition


Esc: Clears current selection

Property Grid
This control shows the settings of the currently selected Action in the Task list. The settings are
pretty much self-explanatory but if there's any doubt, check the actions detailed description
below the Action list.

There is one common setting that might need an explanation, Location. The Location setting is
used by many actions and it describes a location in the game. It accepts a HotSpot style Tag or
any combination of 3 numbers and automatically converts them to the correct format. Also the
button with 3 dots '...' will automatically place the location of the player in the text edit box or
the player's current target's location if he/she has one.

API
I have added quite a few small helper API for use with the 'If/While Condition's and Custom
Actions. They are there to serve as shortcuts. You can also use HB's api if needed.

If/While Condition
The 'If/While Condition' will runs the actions that they contain if an expression is true.

Execution starts from the top action and goes down the list of actions that the If/While
Condition contains. If at any time the Condition becomes false then execution stops right away
unless the property 'Ignore Execution Until done' is set to true in which case execution will
ignore the Condition until it finishes executing the last action at the bottom of the list

The While Condition will repeated execute a set of actions as long as its condition remains true.

A While condition can repeatedly execute actions within while the If Condition cannot (unless
it's embedded within a While Condition)

Custom Action
A Custom action will execute a C# statement

Declaration
Declarations are used to define your own fields, properties, methods or other types

SubRoutines
Subroutines can contain a group of actions that you can execute by using 'Call Subroutine'
action. This allows you to have more compact and organized profiles

Useful stuff to use in If/While Conditions, Wait and Custom Actions


Generic Tradeskill API
The following tradeskills are currently supported and have wrappers for them

Alchemy,Blacksmithing,Cooking,Enchanting,Engineering,FirstAid,Fishing,Herbalism,Inscription,J
ewelcrafting,Leatherworking,Mining and Tailoring.

Each of the listed tradeskills wrapers has 2 properties, Level and MaxLevel

[ProfessionName].Level - returns current level for mining. Mining can be used for any
profession, example Mining.Level

[ProfessionName].Bonus – returns the bonus skill amount that is added from items or
buffs

[ProfessionName].MaxLevel - returns the max skill level for a profession. The max skills
are 75,150,225,300,375,450 and 525. Example Mining.MaxLevel

CanRepeatNum (RecipeID) - returns the number of times the recipe can be repeated with
current mats, RecipeID is the wowhead ID

CanCraft (RecipeID) - checks if the player has the recipe, has the tools and mats to make it.
returns a bool

HasMats (RecipeID) - checks if the player has material for the recipe

HasRecipe (RecipeID) - checks if the player has the specific recipe

HasTools (RecipeID) - checks if the player has the tools need to craft the recipe.

HBRelog
HBRelog.IsConnected – Returns true of there is an open IPC connection to HBRelog.
HBRelog.CurrentProfileName – Name of the current HBRelog profile
HBRelog.RestartWow() – Restarts Wow and Honorbuddy
HBRelog.RestartHB() – Restarts Honorbuddy
String[] HBRelog.GetProfileNames() – returns an array of HBRelog profiles names
HBRelog.StartProfile(string profileName) – Starts a profile
HBRelog.StopProfile(string profileName) – Stops a profile
HBRelog.PauseProfile(string profileName) – Pauses a profile
HBRelog.IdleProfile(string profileName,TimeSpan time) – Idles a profile for time duration
HBRelog.SetProfileStatus(string status) – Sets the current HBRelog profiles status text
ProfileStatus HBRelog.GetProfileStatus (string profileName) – returns the status of a profile
ProfileStatus is an enum that is defined as..
public enum ProfileStatus
{
Unknown,
Paused,
Running,
Stopped
}

HBRelog.Logon(string character) – Restarts Wow and logs on a character


HBRelog.Logon(string character, string server)
HBRelog.Logon(string character, string server, string customClass)
HBRelog.Logon(string character, string server, string customClass,string botBase, string
profilePath)

Non TradeSkill related API


HasNewMail - This is a property that returns true if player has new mail.

DataStore - This is a Dictionary<uint,int> that gets populated when PB starts up or when


RefreshDataStore() is called. The dictionary key is an item ID and value is the number of items
total that are on that server/faction.

MailCount - This property returns the number of mail in the inbox, requires mailbox to be open
or recently visited.

InbagCount (ItemID) - Returns the number of items the player has in the bags that match
ItemID

InBankCount (ItemID) - Returns the number of items the player has in personal bank that match
ItemID.

InGBankCount (ItemID) - Returns the number of items the player has in guild bank that match
ItemID. Requires Datastore WoW Addon. No RefreshDataStore() call is required

InGBankCount (CharacterName,ItemID) Same as above except it gives the choice to get item
count on a character that isn’t currently logged in game.

OnAhCount (ItemID) - Returns the number of items the player has on AH that match ItemID.
Requires Datastore WoW Addon. No RefreshDataStore() call is required
OnAhCount (CharacterName,ItemID) Same as above except it gives the choice to get item
count on a character that isn’t currently logged in game.

Log(string,params object[] args) - prints a message to Honorbuddy's Log

Log(Color,string,params object[] args) - prints a message to Honorbuddy's Log using the specific
color

Log(Color headerColor,string header,Color msgColor,string msg,params object[] args) - prints a


message to Honorbuddy's Log

DistanceTo (x,y,z) - returns distance to location

MoveTo (x,y,z) - moves to location

CTM (x,y,z) - uses Click-To-Move to go to location

RefreshDataStore() - Imports a fresh copy of the DataStore database.

SwitchToBot(string botName) - Switches to a the specified Bot

SwitchCharacter(string character,string server,string botName) – Logs out and switches to


character on server and use switch bot to ‘botname’

Me - The localplayer object. e.g. ObjectManager.Me

var1,var2...var9 - I added 9 static 'object' type variables to store info to use later in code.
For more readable profiles use declarations instead.

HasDataStoreAddon return true If the WoW addon ‘DataStore’ is installed.

Settings["Name"] - This is used in conjuction of the Settings Action from the action list. It
returns the current value assigned to a setting that can be edited by the end user from a gui.You
use a Settings Action to give it a type and default value. Since the type returned is an object
type you must cast to the real type when reading the value from it. Example
(bool)Settings["Level Mining"]

Other Misc Stuff from HB's API - thanks to Inrego for the compilation.

Me.MapId == X Check what continent I'm on.

0 = Eastern Kingdoms
1 = Kalimdor

530 = Outlands

571 = Northrend

Me.ZoneId == X
Check
what zone I'm in. ZoneIDs can be found on Wowhead.com

Me.IsHorde / Me.IsAlliance Returns true/false.

Me.FreeNormalBagSlots The number of free bag slots.

Lua.DoString(string.Format("RunMacroText(\"{0}\")", "/s hello"), 0);

Input to the chat box. Chat strings can be inserted, or stuff like /use Hearthstone

Lua.DoString("RunMacro('Test')"); Run the ingame macro named "test"

Lua.DoString("UseItemByName(ItemID)"); Use the item with given ItemID. ItemID can be found on
Wowhead.com

ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(o => o.Entry ==


#objectID ) != null &&
ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(o => o.Entry ==
#objectID ).Location.Distance(new WoWPoint(x,y,z)) < #distance

This line checks if the given #objectID is within #distance yards of the (x,y,z) coord.

Example:

Wait(

ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(o => o.Entry == 190536 ) != null


&& ObjectManager.GetObjectsOfType<WoWGameObject>().FirstOrDefault(o => o.Entry ==
190536 ).Location.Distance(new WoWPoint(-8288.816, 1424.703, -0.01198259)) < 3

Will wait until the the boat with objectID 190536 is within 3 yards of (-8288.816, 1424.703,
-0.01198259).

This can be used for all boats and zeppelins. You can find the objectIDs and their coords in HB Developer
Tools.
List of Portals
Stormwind

Portal to Blasted Lands - ID:195141 Loc:<-9007.58, 871.8698, 129.6922>


Portal to Tol Barad - ID:206594 Loc:<-8208.7, 450.793, 117.667>
Portal to Twilight Highlands - ID:207694 Loc:<-8186.149, 413.7292, 116.7497>
Portal to Uldum - ID:207695 Loc:<-8233.281, 415.5955, 117.4477>
Portal to Hyjal - ID:207692 Loc:<-8212.33, 399.0208, 117.273>
Portal to Deepholm - ID:207693 Loc:<-8223.319, 451.1823, 117.4883>

Org – thanks to Extacy,No1knowsy,imdasandman and Thumped

Portal to Blasted Lands - ID:195142 Loc:<1768.45, -4325.86, -8.3711>


Portal to Tol Barad - ID:206595 Loc:<2031.22, -4330.87, 95.471>
Portal to Moonglade - ID:206110 Loc:<1897.63, -4196.58, 37.2524>
Portal to Twilight Highlands - ID:207686 Loc:<2029.233, -4379.827, 97.9757>
Portal to Uldum - ID:207687 Loc:<2039.67, -4356.288, 98.00434>
Portal to Hyjal - ID:207688 Loc:<2042.752, -4395.662, 97.93639>
Portal to Deepholm - ID:207689 Loc:<2065.653, -4390.647, 98.04689>
Portal to Vashj'ir - ID:207690 Loc:<2063.337, -4362.29, 98.11018>

Вам также может понравиться