Wow lua api. See full list on wowwiki-archive.


Wow lua api ) UNIT_AURA: unitTarget, updateInfo unitTarget string : UnitId updateInfo UnitAuraUpdateInfo? : Optional table of information about changed auras. This is a documentation representation of the World of Warcraft Lua API to be used with the EmmyLua plugin for IntelliJ IDEA. The API is no longer being updated here until further notice. For a general tutorial on setting up event handling in your addon, see Handling events and the Frame:RegisterEvent() method. Returns information about the charges of a charge-accumulating player ability. 1 Vanilla) ACTIONBAR_PAGE_CHANGED. nameplates = C_NamePlate. name, realm = UnitName(unit) = UnitFullName(unit) = UnitNameUnmodified(unit) Lua API. Rank is optional, if omitted, highest possible is picked automatically. 当 actionbar 数字出现时开启, 通常当法术拖动到actionbar时. 60123. net Developer Portal</title> <base href="/"> <meta name="viewport" content This API is available during normal game play. Enum and Constants table; LE Returns the buffs/debuffs for the unit. count = GetItemCount(itemID or "itemName" or "itemLink"[, includeBank][, includeCharges]) itemID / "itemName" / "itemLink" Number/String/String - Numeric ID of the item, name of the item, or itemLink of the item to query. a Level ?? target, or is a special boss, UnitLevel() will return -1. Returns the currently visible nameplates. ← Widget API ← Frame < CreateTexture CreateTexture is a method on Frame objects that creates and returns a new Texture. list can be value1, value2, value3, valueN; although, you will never see it used in that manner since you can just access value1 through valueN directly. SendChatMessage(msg [, chatType, languageID, target]) Arguments [] msg string - The message to be sent. Sounds used in FrameXML are defined in the SOUNDKIT table. Returns the system uptime of your computer in seconds, with millisecond precision. 1 Reference Manual. Returns the cooldown info of a spell. name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("unit", [index] or ["name", "rank"][, "filter"]) unitId String - The unit to query information for index or name Number or Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. It's officially documented in Blizzard_APIDocumentation which is accessible via the /api command. This tutorial expands on instructions in the source code at FrameXML/InterfaceOptionsFrame. com Aug 9, 2024 · To get started with the WoW API, register for an API key on the Blizzard Developer Portal, understand the API documentation, set up your development environment, obtain an OAuth 2. ← WoW API < UnitHealth Returns the current health of the specified unit. Can also just refer to the Lua. The Widgets API was manually edited from the old Wowprogramming website (no longer available) and doesn't have any automated generation as of now. facing = GetPlayerFacing() Returns facing number - Direction the player is facing in radians, in the [0, 2π] range, where 0 is North and values increase counterclockwise. ← WoW API < UnitIsDead Very useful to determine if a mod should be doing something if "unit" is dead. Returns info for an item. g This has the advantage of being portable to standard Lua (although redundant, since standard Lua would make this assignment implicitly) and more readable to non-WoW Lua programmers. Details . randomseed are interfaces to the simple random generator functions rand and srand that are provided by ANSI C. This function is restricted . There is one named _G["GameTooltip"], but others are created with CreateFrame("GameTooltip") or <GameTooltip>. Plays the specified sound by SoundKitID. This is essentially an alias of UnitAura with the "HARMFUL" filter applied. Breaking changes for classic addons If you are using this dependency to develop WoW classic addons, make sure to use the dedicated repository wow-classic-declarations . db2. icon, itemCount, locked, quality, readable, lootable, itemLink, isFiltered, noValue, itemID, isBound = GetContainerItemInfo(bagID, slot) World of Warcraft API事件列表 (1. When in a EU time zone CEST (UTC+2) and playing on Moon Guard US, CDT (UTC-5). 558 Returns the position of a unit in the current world area. relativeFrame String/Widget - Name or reference to a frame to attach obj to. . Documentation generated from Blizzard's FrameXML API documentation The API Documentation is generated from the WoW Source API files by executing: Use a toy in player's toybox. 1 environment; Loads the official Blizzard API documentation; Parses Warcraft Wiki API documentation; Widgets. See full list on wowwiki-archive. One reason for this is: You could export data from inside WoW to the outside and immediately react to this with another program of yours. The returned table will contain multiple regions in the case where objects at the top ← WoW API < UnitClass Returns the class (Mage, Warrior, etc) of the specified unit. See Widget handlers. max_health Integer - the maximum health of the specified unit, returns 0 if the specified unit does not exist (eg. seconds = GetTime() Utility functions: WrapTextInColorCode() CreateTextureMarkup() CreateAtlasMarkup() Protected strings []. (secure) frame:HookScript("handler", func) handler string - the name of the handler type, like 'OnShow', 'OnClick'. name The API is no longer being updated here until further notice. #protected - This can only be called from secure code . The hook will be called with the same arguments after the original call is performed. fandom. Hide The Eluna Lua Engine© API allows you to add your own Lua code to be executed when certain events (called "hooks") occur. isVisible boolean - True if the region and its parents are shown, making Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. Adds IntelliSense features for World of Warcraft API to VS Code. Large messages are truncated to max 255 characters, and only valid chat message characters are permitted. 'HookScript' can be used on secure frames Creates a Frame object. CastSpellByName("Flash Heal(Rank 2)"); -- Cast Flash Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. org web site for Lua 5. This is essentially an alias of UnitAura with the "HELPFUL" filter. Note that the World of Warcraft API does not provide all standard Lua functions. g. Returns the position of a unit on the current map posX, posY = GetPlayerMapPosition("unit"); unit String - The unitId for which the position is returned. random returns a pseudo-random integer in the Registers the frame to an event. Sets an anchor point for the region. GetNamePlates([isSecure]) ← Widget API ← Region < SetPoint Sets an attachment point of an UI component. Includes the WoW Lua 5. (self, elapsed) Payload [] self ScriptObject - The updated widget. registered boolean - Returns true if the frame is successfully registered to the event. power = UnitPower(unitToken [, powerType, unmodified]) World of Warcraft API; UI beginner's guide; UI FAQ; Events; Widget API; WoW API Widget API XML UI Event API WoW Lua Macro API CVars Changes. Events. The WoW API is available to AddOns and macro scripts. forceNoDuplicates ← WoW API < CastSpellByName CastSpellByName(spellName{, onSelf}); name String - Name of the spell to cast. Note that the value returned by UnitLevel("player") will most likely be incorrect when World of Warcraft API; UI beginner's guide; UI FAQ; Events; Widget API; WoW API Widget API XML UI Event API WoW Lua Macro API CVars Changes. script Event frames are generally notified in the order they were first registered. Note that time() and date() are tied to your system's clock which can be manually changed. blue number - Range 0 to 1. All are all documented here for consistency, and to allow for commentary Returns the frames that currently have mouse focus. Used to traverse a list. UseContainerItem(bagId, slot [, onSelf]) (bagId, slot [, onSelf]) bagId Integer - The bag id, where the item to use is located slot Integer - The slot in the bag, where the item to use is located onSelf Boolean - Optional parameter, if the This is a documentation representation of the World of Warcraft Lua API to be used with the EmmyLua plugin for IntelliJ IDEA. If the unit's level is unknown, i. Also appears to be self-only. In addition to this list, see also Debugging Functions. Oct 7, 2024 · How you do these things in WoW is prescribed by the WoW API. Frame Events are messages sent by the WoW client to UI code (via OnEvent script handlers), mostly in reaction to things occurring in the game world. "Frame" or "Button". "target" given but there is no target) Print the maximum health of player and target units to the chat window Modifiers Examples Description Number %5d, %3s: Minimum digits or string length with leading spaces Zero and number %05d, %03s: Minimum digits or string length with leading zeroes Returns the system uptime of your computer in seconds, with millisecond precision. Insertions are always at the back. Note that firing a gun or a spell, or getting aggro, does NOT trigger this event. net API The interface options interface and APIs have changed significantly in 10. ← WoW Lua val = math. fontString:SetTextColor(red, green, blue [, alpha]) red number - Range 0 to 1. You can, with a small exception, not change any file of your computer's system. Documentation of popular ← WoW API < GetWeaponEnchantInfo This appears to be used for handling TEMPORARY enchants to weapons - like POISONS. TextureBase :SetTexture([textureAsset, wrapModeHorizontal, wrapModeVertical, filterMode]) Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. The Event API and the WoW UI are built around these messages being recieved by Frames from WoW, through the use of event handlers, and by expressly registering for messages for a frame. Features API. ← Widget API ← Frame < SetScript Sets an event handler for a specific event type for this frame. This method also lets developers the option to reuse virtual textures declared in XML. Lua in the World of Warcraft API [] Note that the World of Warcraft API does not provide all standard Lua functions. Returns the zero-based index of current form/stance. Returns the number (or available charges) of an item in the inventory. In inherits Frame, created with CreateFrame("Button") ← Widget API ← Frame < HookScript Sets a function to be called automatically after the original function is called, or "post hook". Returns info for an item in a container slot. CVars. local max_health = UnitHealthMax(unit); unit UnitId - the unit whose max health to query. The World of Warcraft API, or WoW API, is a set of Lua functions and facilities provided by the Blizzard WoW Client, to allow interaction with the World of Warcraft and its user interface. Cannot be 'nil'. Frame:CreateTexture(["textureName"[, "layer"]][, "inheritsFrom"]) textureName String - Name of ⦁ API ⦁ WoW Lua; WildStar ⦁ AddOns ⦁ API ⦁ WildStar Lua; Engine; Tools. CreateTexture allows Lua to create textures that would otherwise only be available to XML. regions = GetMouseFoci() regions ScriptRegion[] For the common case of simply testing if a region has mouse focus, consider using ScriptRegion:IsMouseMotionFocus(). localizedClass, englishClass, classIndex = UnitClass("unit"); unit String - the unitId to query, e. Basic functions. Returns whether the region (and its parents) are shown. height number - Size in points. UnitLevel("target")); If the current target is a Level 50 mob, this macro will print Level 50 in your chat window. frame = CreateFrame(frameType [, name, parent, template, id]) The Keyring was added again in Patch 1. Returns nil if no spell is being cast. Enums. net API Returns the current health of the unit. Works with "player", "partyN" or "raidN" as unit type. Custom tooltips made in Lua must inherit a virtual XML template: ← WoW API < UnitHealthMax Returns the maximum health of the specified unit. channel string? = SFX - The sound channel. name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitDebuff("unit", index or ["name", "rank"][, "filter"]) unitId String - The unit you want debuff information for. 0. Meanwhile, actual LUA programming is used to create the add-ons you see in game like Details for example. "player" localizedClass, englishClass, classIndex localizedclass The localized class of the specified unit as Creates a fontstring. e. Triggered when an item is Right Clicked. ← WoW API < GetItemCount Returns count information for the item. 已知值: "LeftButton", "RightButton" ACTIONBAR_SHOWGRID. The list below is incomplete, and kept up to date through user contributions. Eluna is a Lua engine for World The Interface window includes a tab for third-party AddOns to share a common look and feel. A small subset of the existing API remains as deprecated functions, along with a set of deprecated XML templates for various options controls. ← WoW API < GetFactionInfo This function was updated in patch 3. The Lua user interface code can be exported from the game client. Returns 1 if "unit" is dead, nil otherwise. The file must be present, and have the same name (plus extension) as its parent folder for the addon to be recognized by ← WoW API < UseContainerItem Use an item from a container. Note that if the Configuration Scope setting is set to User instead of Workspace and the extension has loaded once, then it will simply always load for Lua files, just like the old behavior. func function - the Lua function to call or 'nil' to remove the handler for i = 1, 4 do local frame = _G["PartyMemberFrame". Feb 7, 2017 · In a World of Warcraft Vanilla Lua Addon Development, how can I issue an HTTP call to receive data back? If not, how can I get data from a web source into the game while playing? I have a feeling the answer is tragically short, but would like the question asked and answered on Stack Overflow. frame = CreateFrame(frameType [, name, parent, template, id]) Arguments frameType string - Type of the frame; e. The WoW API is available to AddOns and macro scripts. seconds = GetTime() Returns seconds number - The current system uptime in seconds, e. func function - function to be called. Comparison []. spell, rank, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo("unit") unit String - The UnitId to query (e. Returns the current power resource of the unit. About Eluna. Returns the name and realm of the unit. name, description, standingId, bottomValue, topValue, earnedValue, atWarWith, canToggleAtWar, isHeader, isCollapsed, hasRep, isWatched, isChild = GetFactionInfo(factionIndex) (factionIndex ← WoW Lua. 1), described in the Lua 5. Also known as Kstrings - they prevent strings from being parsed. Regions can now be configured to propagate mouse input to other obscured regions. isShown = ScriptRegion:IsShown() isVisible = ScriptRegion:IsVisible() isShown boolean - True if the region should be shown, but it depends on the parents if it's visible. Lua is a scripting language and is used in the WoW User Interface and addons. ← WoW API < UnitLevel Returns the unit's level. 3. i] frame:SetScript("OnShow", frame. If Merchant window is open, this will sell the item. Add a new in-game command, give life to creatures with new AI, or even light players who try to duel on fire! If the hook exists, you can script it. 0 token, and make API calls using a programming language like Python or JavaScript, being mindful of rate limits and implementing error handling. Invoked when drawing the user interface (many times per second). . 1, but a few functions differ in Blizzard's implementation. Sets the widget script handler. Note: these are mostly standard Lua functions available in most Lua environments. ← WoW API < UnitBuff Retrieves info about a certain buff on a certain unit. 7 onwards. Information from UnitIsDeadOrGhost("unit"): Does not work for ("pet") unless the pet bar is still active. local health = UnitHealth(unit); unit UnitId - identifies the unit to query health for health Integer - current health of the specified unit, returns 0 if the specified unit does not exist (eg. A new menuing system has been implemented, intended to serve as a replacement for UIDropDownMenu going forward. Sets the backdrop texture of a frame. If Returns the direction the character is facing in radians. random and math. 2 Get's details for a specific faction/faction header, you can only view information on factions you have already encountered. start, duration, enabled, modRate = GetSpellCooldown(spell) = GetSpellCooldown(index, bookType) The "Activate WoW API extension" command is used. Battle. random returns a pseudo-random real number in the range [0,1). onSelf Boolean - Should the spell be cast on the player (vs target)? If no target exists and the onSelf evaluates to false, cursor is switched to casting mode. This is the main reference for the WoW Ui 'Lua runtime' in World of Warcraft. 魔兽世界API (World of Warcraft API) 是由暴雪提供的一系列函数,插件和宏用这些函数来对魔兽世界的界面和行为作出交互和修改。 下面列出的列表既不完整,内容也不保证最新,仅供参考,欢迎补充和完善。 GameTooltip (inherits from Frame) formats a tooltip. willPlay, soundHandle = PlaySound(soundKitID [, channel, forceNoDuplicates, runFinishCallback]) soundKitID number - Sound Kit ID in SoundKitEntry. The extended payload can be supplied to the Sets the layering strata of the frame. World of Warcraft API; This page was last edited on 15 August 2023, at 04:45. Sets the font instance's basic font properties. Several API functions accept unitId as an argument for whom the action applies, though some functions only accept a subset of possible values. Called when the user clicks a button. lua:483. When called with a number n, math. The examples were taken at the same time. Of course, Lua in WoW has its limitations. See Widget_handlers. Returns the index of the player's current specialization. Notably, operating system and file I/O libraries are not present. green number - Range 0 to 1. Frame : SetBackdrop ( nil or { -- defaults bgFile = "bgFile" , edgeFile = "edgeFile" , tile = false , tileEdge = false , tileSize = 0 , edgeSize = 32 , insets = { left = 0 , right = 0 , top = 0 , bottom = 0 } }) A unitId (or unit token&#91;1&#93;) identifies a unit by their relationship to the player as a target, party member, pet, or other such role. This data is used to make sites like raider. local currentSpec = GetSpecialization( [ isInspect [, isPet] [, specGroup] ] ) isInspect Boolean - if true, return information for the inspected player isPet Boolean - if true, return information for the /dump prints variable or expression results to the chat frame and is part of the Blizzard DebugTools interface. See also WoW Glue API. 我整理了一些 魔兽世界经典 的可用API 并且简单做了一些中文解释,请需要的朋友自取,后续还会发布一些大家能够用到或者常用的信息,比如宏开发或者插件 WA(WeakAuras) or DBM (Deadly Boss Mods)开发相关 These are the observed in-game global API changes from comparing the previous version of the Global Function List to the newly-generated one (diff). 13. These functions are part of the Lua programming language (v5. line = Frame:CreateFontString([name, drawLayer, templateName]) Arguments [] name string? - The global variable name that will be assigned, or nil for an anonymous fontstring. Not sure why the petbar stays active when the pet dies -- it used to gray out, now it will disappear after some time or some event happens <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Blizzard Battle. Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. ScriptRegion:SetScript(scriptTypeName, script) Arguments [] scriptTypeName string - Name of the script type, for example "OnShow". arg1: 用于单击按钮的鼠标按钮. io etc. (itemId or "itemName" or "itemLink", includeBank, includeCharges) includeBank Boolean - true: count Merging PR #11 wich add/remove functions that are present in the WoW API release 8. index Sep 19, 2022 · [分享] 魔兽世界经典 官方API整理,并给出了一个API使用的具体示例,希望帮助更多新手朋友入门. ← WoW API < UnitDebuff Retrieve info about a certain debuff on a certain unit. alpha number?Optional. 1. if PlayerHasToy(92738) then UseToy(92738); end UseToyByName() ← WoW API < GetPlayerMapPosition A one-time call to SetMapToCurrentZone() is required before GetPlayerMapPosition() will return the correct values. elapsed number - The time in seconds since the last OnUpdate dispatch, but excluding time when the user interface was not being drawn such as while zoning into the game world [citation needed] WoW API for VS Code. See New menu system for details. #anchorfamily - Frames that are anchored to a restricted frame can only have their other anchors set to frames within that same anchor hierarchy. Output is color coded for easier reading. currentSpec = GetSpecialization([isInspect, isPet, specGroup]) ← WoW API < UnitCastingInfo Returns information on the spell currently cast by the specified unit. /script SendChatMessage("Level ". The official usage of this function is to return a list (retN) starting from index to the end of the list (list). success = FontInstance:SetFont(fontFile, height, flags) Arguments [] fontFile string - Path to the font file. Lua Functions [] These functions are part of the Lua programming language (v5. count = GetItemCount(itemInfo [, includeBank, includeUses, includeReagentBank]) Events are a basic and important message passing system for WoW and its UI. 12. 当actionbar页面更改时启动, 通常在按下pageup或pagedown 按钮时. The List of all Events details this World of Warcraft API; UI beginner's guide; UI FAQ; Events; Widget API; WoW API Widget API XML UI Event API WoW Lua Macro API CVars Changes. See Mouse input propagation. currentCharges, maxCharges, cooldownStart, cooldownDuration, chargeModRate = GetSpellCharges(spell) = GetSpellCharges(index, bookType) Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. Securely posthooks the specified function. frame:SetScript("handler", func) handler string - the name of the handler type, like 'OnShow', 'OnClick'. Fired when a player engages auto-attack. ScriptRegionResizing:SetPoint(point [, relativeTo [, relativePoint]] [, offsetX, offsetY]) point string : FramePoint - The point of this region. toc (Table of Contents) files contain information about a particular addon (such as its name, description, saved variables, etc), as well as instructions on how the addon should be loaded by the client (for example, the order in which lua and xml files should be loaded). This function is usually used to capture the arguments passed to an ellipsis (). posY, posX, posZ, instanceID = UnitPosition(unit) Arguments [] unit string : UnitId - The unit for which the position is returned. When called without arguments, math. The API is used to gather data from the game and is retail only as of now. An OnLoad event fires for a Frame during load, allowing it register for these event messages. Works with secure frames. Does not work with all unit types. Below is an almost complete list of every function provided by Blizzard that you can use in the creation of your addon Documentation for the World of Warcraft web APIs. Holes get up filled up eagerly from the back. Sets the texture to an image. "target" given but there is no target) Print the target's health to the chat frame: DEFAULT_CHAT_FRAME:AddMessage( "target Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. Contribute to Blizzard/api-wow-docs development by creating an account on GitHub. Tables display up to 30 values, the rest are skipped and a message is shown. The World of Warcraft API is a set of functions, provided by Blizzard, that allow you to interact and modify the World of Warcraft game through the use of addons and macros. obj:SetPoint(point, relativeFrame, relativePoint, ofsx, ofsy); obj:SetPoint(point, relativeFrame, relativePoint); obj:SetPoint(point, ofsx, ofsy); obj:SetPoint(point); point String - Point of the object to adjust based on the anchor. hasMainHandEnchant Boolean - 1 if has an enchant on the main-hand weapon, nil if no enchant mainHandExpiration Number - Duration of enchant on the main-hand weapon in MILLISECONDS, nil if no enchant mainHandCharges Number - Amount of charges on the ← WoW API < GetSpecialization Returns the index of the player's current specialization. net API Sends a chat message. Hero Talent Trees are introduced into the C_ClassTalents Automated updating of API pages at this location, to reflect patch changes, has ceased from 10. UseToy(itemId) itemId number - itemId of a toy. registered = Frame:RegisterEvent(eventName) eventName string - Name of the frame event. Wowpedia We have moved to Warcraft Wiki. index = GetShapeshiftForm([flag]) Set the font color. This is a third party extension for LuaLS with annotations. random([l [, u]]); val = random([l [, u]]); The functions math. Creates a Frame object. Fires when a buff, debuff, status, or item bonus was gained by or faded from an entity (player, pet, NPC, or mob. syxii ypkev oexagt rohhun xjpdwqc ejzzy gmiw avkxv butdmh zvlirsr