Jump to content
bbh_blocked_dnftl
Automation Vault

Questing API


MrFade

Recommended Posts

  • Vault Administrator
Posted (edited)

 

The current API available in all questing profiles.

Please note questing profiles have full access to the Plugin API as well.
 

float[] GetNPCPostionFromDB(int NpcID) // Returns a float[] array with X,Y,Z positions of the request NPC_id (queries database).

 

SetQuestSellVendors(list<int> Vendors)  /// Sets the sell vendors for the questing profile. If this is not set the BOT will use the database to determine the nearest Sell vendor.

 

SetQuestRepairVendors(list<int> Repairvendors) // Sets the Repair vendors list for a questing profile if this is not set the BOT will use the database to fetch the nearest Repair vendor.

 

SetQuestRepairAt(int ItemDurability) // Sets the item durability % that the BOT will repair at (default 30).

 

SetQuestSellAt(int FreeSlots) // Sets the amount of free slots the BOT much have in order to sell. (Default 2).

 

int DumpQuestSellAt() // returns the current SellAt value (the amount of free slots the BOT will sell at.)

 

int DumpQuestRepairAt() // Returns the item durability % (as an int) the BOT must have before attempting to repair.

 

bool RemoveNameFromObjectAvoidWhiteList(string ObjectName) // Removes the Object name from the avoidance WHITELIST (the object will be avoided). Returns true if the name was on the list false otherwise.

 

bool AddNameToObjectAvoidWhiteList(string Name) // Adds Object name to the avoidance whitelist (the object WILL NOT be avoided).

 

bool AddNameToAvoidWhiteList(string Name) // Adds the name of a NPC to the avoidance whitelist (the NPC WILL NOT BE avoided.)

 

bool RemoveNameFromAvoidWhiteList(string Name) // Removes NPC name from Avoidance whitelist (the NPC WILL BE avoided.)

 

SetFood(string FoodName, int EatAt) /// FoodName -> The Item name the BOT must use to eat.  EatAt -> The HP value the BOT must have (or less than) to eat.

 

SetDrink(string DrinkName, int DrinkAt) // DrinkName -> The Item the BOT must use to drinking. DrinkAt -> The % of Power/Mana the BOT must drink at.

 

StartMobAvoidance(); // Starts the avoidance thread

 

QuestGoToPoint(float X, float Y, float Z, Bool AutoLoot = false, FightMobs = true) // Paths to the X,Y,Z value. Autoloot (false by default) if true will loot any lootable mobs along the way. FightMobs (true by default) if true will attack any mobs that agro the MOB along the way.

 

StopQuestProfile(); // Stops the current quest profile.

 

bool HasPlayerFinishedQuest(int QuestID) // Returns true if the player has Finished the passed quest ID.

 

bool CanTurnInQuest(int QuestID) // Returns True if the player has completed all objectives for the given quest ID.

 

public class QuestReturnInfo  // Returned by more complex quest API calls to help debug.
{
  public bool Sucessful = false;
  public int TimeInSeconds = 0;
  public string FailReason = "";
}

 

QuestReturnInfo AcceptQuestFrom(int QuestGiver,int QuestID) /// Queries the database for the spawn location of QuestGiver ID. The BOT will then attempt to path to the spawn location and interact with the QuestGiver and attempt to accept QuestID.

 

QuestReturnInfo TurnInQuestAt(int QuestTurnIn, int QuestID) // Queries database for QuestTurnIn spawn location paths there and attempts to interact with QuestTurnIn in order to turn in QuestID.

 

public class QuestObjective
{
  public int ObjIndex = 1;
  public int ObjEndCount = 1;
  public int AmountObjs = 1;
  public string Type = ""; //KillMobIDs - Gather Obj / etc etc
  public int QuestID = 0;
  public List<int> MobIDs = null;  // This will be used for multie mob searching
  public List<NPCDB.NPCInfo> NpcList = null;  // This will be used for better searching as well ! 
  public List<ObjDB.ObjectInfo> ObjectList = null; /// This will be used for better scanning objects ie NODES etc etc;
  public List<int> ObjIDs = null; // Multi Object searching
  public List<Vector3> CustomSpawns = null;
  public string UseItemName = ""; /// The item name we must use !
  public int AuraID = 0; // IE only use item when unit has AURA 
}

 

QuestObjective  CreateObjective(string Type,  int ObjIndex, int ObjCount, int AmountObjs, int QuestID, List<int> MobIDs , List<int> ObjIDs, List<Vector3> CustomSpawns);

/// I'll write more on this later lol sorry
/// This is mostly handled all entirely by the database now days but it is still possible to manaully create your objectives here is an old-ish guide on it:
//  https://automationvault.forumflash.com/forums/topic/1834-guide-to-making-a-quest-profile-from-a-noobs-perspective/

 

List<Vectors> TableToVecList(Table) // Used to convert a lua Table to a List of Vectors.

 

float[] TableToFloatArray(Table) // Used to convert a lua table to an array of float.

 

List<int> TableToList(Table) // Used to convert a lua table to an List of ints.

 

List<string> TableToStringList(Table) // Used to convert a lua table to a list of strings.

 

SellItemsAt(int SellAt) // Sets the amount of free slots the BOT must have before attempting to sell.

 

bool IsOnQuest(int QuestID) // returns true if the player has the passed QuestID in their quest log.

 

LoadAndRunQuestProfile(string Name) // Stops the current quest profile and loads and starts the passed profile name.

 

QuestReturnInfo GrindUntilLvl(int Lvl, QuestObjective MyObj, Bool AutoLoot = false) // Grinds mobs defined in the QuestObjective until the player reaches the passed Lvl. If Auto-loot is set to true the BOT will loot any lootable mobs.

 

QuestReturnInfo KillMobsUntilItem(string ItemName, QuestObjective MyObj, int ItemCount = 1) // Grinds mobs defined in the QuestObjective until the BOT has ItemCount of ItemName in its bags.

 

QuestReturnInfo QuestTrainAt(int TrainerID = 0, string TrainerName = "") // if trainer ID is passed the BOT will query the database for its spawn location path there and attempt to train. If TrainerName is passed the BOT will scan all LOADED NPCs (everything within render distance) for TrainerName if it finds it, it will path to it and attempt to train otherwise it will fail. 

 

QuestFlyToPoint(float X, Float Y, Float Z, float HeightOffset) /// The BOT will attempt to Path to the given point using the flight meshes.

 

QuestReturnInfo CompleteEntireQuest(int QuestID) /// The BOT will query the Database for ALL information regarding the quest and handle it all - From Accepting - to Objectives - To turning in the quest. (This is what the Auto-Quester features is based on.)

 

QuestReturnInfo AcceptQuestUsingDB(int Quest) //  now supports accepting quests from game objects, units and items. If the quest is started by a quest item the BOT will attempt to determine how to get that item (grinding/gathering) once it has done that it will accept the quest from the item and then return.

 

QuestReturnInfo TurnInQuestUsingDB(int QuestID) // Will QUery the Database for the quest turn in of the passed QuestID path there and turn in the Quest.

 

CompleteObjectiveOfQuest(int QuestID, int ObjectiveIndex) // Queries all the objective information from the Database based on the QuestID and attempts to complete the given quest objective. indexing starts a 1.

 

QuestReturnInfo GrindAreaUntilLevel(int Level) // The BOT will loop through all loaded NPCs in the area and determine the best MOB to grind until the player reaches the passed Level. 

 

UseDBToRepair(bool state = true) // if true the BOT will use the Database to determine the nearest RepairVendor and use that to repair. if false the BOT will rely on the SetQuestRepairVendors list.

 

UseDBToSell(bool state = true) // if true the BOT will use the Database to determine the nearest SellVendor and use that. If false the BOT will rely on the SetQuestSellVendors list.

 

NPCInfo GetNearestClassTrainer(); // Queries the Database and returns the NpcInfo of the nearest class trainer of the player.

 

QuestReturnInfo TrainAtNearestClassTrainer(); // Queries the Database for the nearest class trainer of the player's class and attempts to path to it and train.

 

QuestReturnInfo GrindAndGather(List<int> Spawns, int TargetRadius, float[] StartingPoint, bool SkinMobs = false); // This is the API point that the Map feature uses. 
   // List<Int> Spawns -> IDs of things that you want to kill / gather.
   // int TargetRadius -> The Radius around StartingPoint you want to farm in.
   // StartingPoint -> The Starting point that the Radius is based around.
   // SkinMobs -> If true it will skin all skinable mobs (false by default.)


// Queries all Spawns IDs from the Database for spawn locations.

 

IgnoreLowLevelQuests(bool state = true) // If the this is set to true AcceptQuestUsingDB and other "Complete" questing APIs will ignore quests that are consider grey to the player. This improves players running questing profiles from random points.

 

BlackListRepairVendorByName(string Name) /// Blacklists the Repair vendor name - This Repair vendor will no longer be consider when searching for a valid Repair vendor.

 

RemoveBlackListedRepairVendorByName(string Name) /// Removes the repair vendor from the blacklist. This repair vendor will once again be consider when looking for a near by RepairVendor.

 

BlackListSellVendorByName(string Name) // Blacklists the Sell Vendor name. The Vendor sell name will now longer be consider when searching for a near by vendor to sell at.

 

RemoveBlackListedSellVendorByName(string Name) // Removes the SellVendor name from the blacklist. This vendor will once again be considered for selling when the BOT is looking for the nearest vendor to sell to.
Edited by MrFade
Link to comment
Share on other sites

×
×
  • Create New...