< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来.
Key Binding Functions (按键设置函数)
DefaultBindings() - Loads default WoW key bindings into memory.
GetBinding(index) - Get action and key bindings for that index.
GetBindingAction("key") - Get the action bound to that key.
GetBindingKey("command") Get the key(s) bound to that action.
GetNumBindings() - Get total number key bindings and headers.
ResetBindings() - Loads key bindings into memory from disk
RunBinding("command") - ?
SaveBindings() - Saves key bindings from memory to disk
SetBinding("key"{,"command"}) - Sets or unsets key bindings.
SetConsoleKey - ?
LUA Functions (脚本语言函数)
These functions are part of the LUA programming language, described here (http://www.lua.org/manual/5.0/manual.html).
assert(value) - asserts a value is non-nil, otherwise shows dialog and outputs debug diagnostic information if you have a debugger attached to wow.exe
date - Returns the current date according to the user’s machine.
error - ?.
gcinfo - ?.
getfenv - ?.
getmetatable - ?.
next - ?.
pcall(func, arg1, arg2, ...) - Returns a boolean value to catch errors from the function call (func).
setfenv - ?.
setmetatable - ?.
time - Returns time in seconds since epoch (
type(var) - Returns the type of variable.
unpack - ?.
xpcall - ?.
Location Functions (区域位置功能函数)
These functions are related to the current location of the player and how it is displayed.Globals associated with Location. Events associated with Location.
GetMinimapZoneText() - Returns the zone text, that is displayed over the minimap.
GetRealZoneText() - Returns either instance name or zone name
GetSubZoneText() - Returns the subzone text (e.g. "The Canals").
GetZonePVPInfo() - Returns PVP info for the current zone.
GetZoneText() - Returns the zone text (e.g. "
Loot Functions (物品拾取功能函数)
CloseLoot({uiFailedFlag})
ConfirmBindOnUse()
ConfirmLootRoll(slot) - Confirm a loot roll (NEW IN 1300)
GetLootMethod() - Return the currently active loot method
GetLootRollItemInfo(rollId)
GetLootRollTimeLeft(rollid)
GetLootSlotInfo(slot) - Returns icon path, item name, and item quantity.
GetLootSlotLink(slot)
GetLootThreshold() - Return the current loot threshold (for group loot)
GetMasterLootCandidate() - Return the player who receives loot in master mode
GetNumLootItems() - Returns amount of objects to loot (number)
GiveMasterLoot(slot,index)
IsFishingLoot()
LootSlot(slot) - Broken or Disabled Efil 20:06,
LootSlotIsCoin(slot)
LootSlotIsItem(slot)
RollOnLoot(rollId{,roll}) - Roll or pass on a loot started by the game itself.
SetLootMethod("method"{,"masterPlayer" or ,threshold}) - Set the current loot method
SetLootPortrait()
SetLootThreshold(threshold) - Set the threshold for group loot
Macro Functions (宏管理函数)
CreateMacro("name", icon, "body", local) - Create a new macro.
DeleteMacro(index) - Deletes a macro.
EditMacro(index, "name", iconIndex, "body", local) - Saves a macro.
GetMacroIconInfo(index) - Returns texture of the icons provided by Blizzard.
GetMacroIndexByName("name") - Returns macro index.
GetMacroInfo(index) - Returns "name", iconTextureID, "body", local.
GetNumMacroIcons() - Returns the number of usable icons provided by Blizzard.
GetNumMacros() - Returns the number of macros the user has.
PickupMacro(index) - Pickup a macro button icon.
REMOVED 已失效 RunMacro - This does not appear to exist anymore Flickering ,
REMOVED 已失效 SaveMacros() - Save all macros to WTF/Account/user/macros-local.txt. (Removed in 1.6, macros are saved on exit -- Flickering 14:15,
感谢WOWWIKI提供英文函数资料
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: