Jump to content
Automation Vault

Plugin API


Recommended Posts

  • Vault Administrator
Posted (edited)

The current API available in all plugins.


bool HasItem(string ItemName) // Returns True if the player has the passed item name in their bags.


string GetWEPWUser(); // Returns the current username of the logged in WEPW user.


int ItemCount(string ItemName) // Returns the stack count of itemName in the players bags.


string GetPlayerClass(); // Returns a string with the class of the player IE "Druid".


Log(string Message) // Prints info to WEPWs log.


bool LoadRotation(string RotationName) // Attempts to load the passed rotation name - returns false if fails.


WoWUnit GetPlayer(); // Returns the local Player WoWUnit.


CastSpell(string Name); // Attempts to cast the passed spell.


UseMacro(string MacroName); // Attempts to trigger the passed MacroName.


bool UnitHasAura(WowUnit Unit,string AuraName); // Returns True if the passed WoWunit has AuraName active. False otherwise.


List<WoWUnit> GetUnitsList() // Returns a list of all Loaded units in the object manager.


List<WowObject> GetObjects(); // Returns a list of all loaded Objects in the Object manager.


List<WowUnit> GetPlayersList() // returns a list of all loaded Players in the Object Manager.


InteractWithObject(WoWObject Object); // Interacts with the passed Object. Consider this clicking the passed WoWObject in-game.


InteractWithUnit(WoWUnit Unit); // Interacts with the passed Unit. Consider this clicking the passed unit in-game.


PluginSleep(int MS); // Sleeps the plugin thread for MS.


bool IsObjectBobbing(WoWObject Object); // Returns true if the passed WoWObject has the bobbing Flag set. (Used for fishing bobber.)


bool IsObjectValid(WowObject Object); // Returns true if the object is still valid in-game and in memory.


string GetBOTState(); // Returns the current BOT state IE OffPathToGather etc etc...


SetBOTState(string State); // Sets the BOT state to the passed string.


SendKey(int KeyCode int Delay); // Sends the KeyCode to your WoW client for Delay ms.


FaceUnit(WowUnit Unit); // Turns the player in-game to face the passed WoWUnit.


int GetStuckTime(); // Returns the current stuck count.


bool IsObjectOwnedByPlayer(WoWObject Object); // Returns true if the passed Object is owned by the player. IE a fishing bobber is owned by the player.


Path(); // Basic path call that will follow the last generation mesh path. So you would generate a path then call Path(); each thread tick to run the generated path.


int GetCurrentPoint(); // Returns the current Point in the path the BOT is on.


int GetCurrentPathSize(); // Returns how many points are in the current path.


bool FindMeshPathToUnit(WowUnit Unit); // Generates a mesh path to the passed Unit. You would then call Path(); after this to run the generated Path.


bool FindMeshPathToObject(WowObject Object); // Generates a mesh path to the passed Object. You would then call Path(); to run the path.


bool IsUnitValid(WowUnit Unit); // Returns true if the unit is valid in memory and in-game. IE the unit hasn't unloaded.


bool FindMeshPathToPoint(float X,float Y,float Z); // generates a mesh path to the passed X,Y,Z.


TargetUnit(WoWUnit Unit); // Targets the passed Unit.


WowUnit GetTargetUnit(); // Returns the players current target.


UseCommand(string Command); // attempts to use keybindable commands.

// Commands here :
// https://wowpedia.fandom.com/wiki/BindingID


BlackListPoint(X,Y,Z); // Blacklists the passed point in the meshes. in a circle of roughly ~8 yards.


int GetUnitReaction(WoWUnit Unit, WoWUnit Unit); // Returns the unit reaction between the passed units. 

    public enum UnitReaction
        Unknown = -1,
        Hated = 0,
        Hostile = 1,
        Unfriendly = 2,
        Neutral = 3,
        Friendly = 4,
        Honored = 5,
        Revered = 6,
        Exalted = 7


bool CompareGUID(WowGuid GUID, WowGuid GUID); Returns true if the passed GUIDs are equal.


WowUnit FindUnitByGUID(WowGuid GUID); // Returns the WowUnit with the passed GUID.


int DistanceToUnit(WoWUnit Unit, WoWUnit Unit); // Returns the distance between the two passed Units. IE DistanceToUnit(Player,Target);


int DistanceBetweenPoints(Float[] P1, Float[] P2); // Returns the distance between the passed points.


float[] UnitPosToFloatArray(WoWUnit Unit); // Returns the Units position as a float[].


float[] VecToFloatArray(Vector3 Vector); // Converts a Vector3 to a float[];


Vector3 FloatToVec(float x, float y , float z); // Converts the passed X,Y,Z values into a Vector3.


UseItem(string Item); // Attempts to use the passed ItemName.


float GetZ(float X, Float Y); // attempts to use the meshes to calcuate the height at the given X & Y values.


StopMoving(); // Stops the player from moving forward.


WoWGuid[] GetUnitGUIDBlackList(); // Returns all the currently blacklisted GUIDs.


BlackListUnitGUID(WowUnit Unit); // Addes the passed WoWUnit to the blacklist. (It wont be consider for looting / combat etc)


int GetZoneID(); // Returns Zone ID of player.


int GetMapID(); // Returns the Map ID of the player.


int GetAreaID(); // Returns the Area ID of the player.


Vector3 GetCorpsePos(); // Returns the current players corpse's X,Y,Z values if the player is dead.


bool IsUnitLootable(WoWUnit Unit); // Returns true if the passed Unit is lootable.


bool IsInWorld();  // Returns true if the client is in-game IE not in a loading screen etc.


int FreeBagSpace(); // returns the current free bag space of the player.


bool HasSpell(int SpellID); // Returns true if the players Spell book contains the passed spell ID.


string GetLastMessage(); // Returns the last error message displayed in-game IE "you are facing the wrong way.".


bool IsPointInWater(float x, float y, float z); // Loads Meshes. Returns True if the passed X,Y,Z values are in Water.


WowUnit FindPlayerByName(String Name); // Returns the WoWUnit Player with the Passed Name.


WowUnit FindUnitByName(string Name); // Return the WoWUnit Unit with the passed name.


WowObject FindObjectByName(string Object); // Returns the WowObject Object with the passed Name.


public NPCInfo(string name, int id, int Level, int Health, int zoneID, List<Vector3> spawns, int mapID)
    Name = name;
    ID = id;
    level = Level;
    health = Health;
    ZoneID = zoneID;
    WSpawns = spawns;
    MapID = mapID;           


NPCInfo GetNearestRepair(); // Returns the nearest Repair vendor according to the Database.


NPCInfo GetNearestVendor(); // Returns the nearest Sell Vendor according to the Database.


NPCInfo GetNearestClassTrainer(); // Returns the nearest player class trainer according to the Database.


BlackListRepairVendorByName(string RepairVendorName); // Blacklists the passed RepairVendor name (it wont be consider when querying the Database for nearest Repair vendor.)


RemoveBlackListedRepairVendorByName(string RepairVendorName); // Removes the passed Repair Vendor Name from the blacklist.


BlackListSellVendorByName(string Name); // Blacklists the passed Sell Vendor by name. (The vendor will not be considered when querying the Database by GetNearestVendor())


RemoveBlackListedSellVendorByName(); // Removes the passed Sell Vendor Name from the blacklist.


bool ItemHasEnch(int Slot, string Name); // Checks if the players equipment slot has the passed ench name.

public enum EquipmentSlot
  Head = 0,
  Neck = 1,
  Shoulder = 2,
  Shirt = 3,
  Chest = 4,
  Waist = 5,
  Legs = 6,
  Feet = 7,
  Wrist = 8,
  Hands = 9,
  Ring1 = 10,
  Ring2 = 11,
  Trinket1 = 12,
  Trinket2 = 13,
  Back = 14,
  MainHand = 15,
  OffHand = 16,
  Extra = 17,
  Tabard = 18,
  Maximum = 19

// Find Ench names here :
// https://wago.tools/db2/SpellItemEnchantment?build=[Name_lang]=fish&page=1


int GetCreatureType(WoWUnit Unit); // Returns the CreatureType of the passed Unit. 

public enum CreatureType
  None = 0,
  Beast = 1,
  Dragonkin = 2,
  Demon = 3,
  Elemental = 4,
  Giant = 5,
  Undead = 6,
  Humanoid = 7,
  Critter = 8,
  Mechanical = 9,
  NotSpecified = 10,
  Totem = 11,
  NonCombatPet = 12,
  GasCloud = 13,
  WildPet = 14,
  Aberration = 15


bool IsUnitSkinnable(WowUnit Unit); // Returns true if the passed WowUnit is Skinnable.


bool PopMessage(string Message); // Displays an information prompt with the passed Message.


Edited by MrFade
Link to comment
Share on other sites

  • Create New...