< 魔兽世界百科 >
|
![]() |
(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)
魔兽世界API
魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来.
Character Functions (游戏角色函数)
AbandonSkill - The player abandons a skill.
AcceptResurrect - The player accepts the request from another player to resurrect him/herself.
AcceptSkillUps()
AcceptXPLoss - Accept the XP loss to be reborn where you stand (The name is somewhat of an anachronism, since it’s now durability rather than XP that is lost).
AddSkillUp(index)
BuySkillTier(index)
CancelSkillUps()
DeclineResurrect() - Decline the request from another player to resurect him/herself.
GetBindLocation() - Get the name of the location for your Hearthstone.
GetBlockChance() -
GetComboPoints() - Get the current number of combo points.
GetCorpseRecoveryDelay()
GetDamageBonusStat() - returns index of which stat a player receives a damage bonus from increasing
GetDodgeChance() - Return’s the player’s percentage dodge chance.
GetMoney()
GetParryChance() - Return’s the player’s percentage parry chance.
GetReleaseTimeRemaining() - Returns the amount of time left before your ghost is pulled from your body.
GetResSicknessDuration()
GetRestState()
GetTimeToWellRested()
GetTitleText()
GetXPExhaustion()
HasFullControl()
HasSoulstone()
IsResting()
NotWhileDeadError - Generates an error message saying you cannot do that while dead.
RemoveSkillUp(index)
ResurrectHasSickness()
RessurectHasTimes() - ? (NEW IN 1300)
RetrieveCorpse() - Resurrects when near corpse. e.g., The "Accept" button one sees after running back to your body. -- Taedirk
SetSelectedSkill(index)
Chat Functions (聊天窗口函数)
These are functions which are specific to chat window management. Also see the Channel Functions and Communication Functions sections.
AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
AddChatWindowMessages - Adds a messaging group to the specified chat window.
ChangeChatColor(chatType,r,g,b) - Update the color for a type of chat message.
ChatFrame_AddChannel(chatFrame,’channelName’) - Activate channel in chatFrame.
ChatFrameLog() - ?
ChatFrame_OnHyperlinkShow(arg1, arg2, arg3) - ?
GetChatTypeIndex(type) - Get the numeric ID of a type of chat message.
GetChatWindowChannels(index) - Get the chat channels received by a chat window.
GetChatWindowInfo(index) - Get setup information about a chat window.
GetChatWindowMessages(index) - Get the chat message types received by a chat window.
JoinChannelByName("channel"{,"password"{,frameId}}) - Join the specified chat channel (with optional password, and register for specified frame)
RemoveChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel invisible (hidden) in a specific ChatFrame.
RemoveChatWindowMessages(chatFrameIndex,"messageGroup") - Remove a set of chat messages from this window.
SetChatWindowAlpha(index,alpha) - Sets the Alpha value(transparency) of ChatFrame
SetChatWindowColor(index,r,g,b) - Sets the background color of a a chat window.
SetChatWindowDocked(index,docked) - Set whether a chat window is docked.
SetChatWindowLocked(index,locked) - Sets ChatFrame so that it is or is not movable.
SetChatWindowName(index,"name") - Sets the name of ChatFrame to "name".
SetChatWindowShown(index,shown) - Shows or Hides ChatFrame depending on value of
SetChatWindowSize(index,size) - Sets the font size of a chat window.
Communication Functions (交流类函数)
These are the functions which communicate with other players. Also see the Channel Functions and 发现不支持的代码:Chat Functions sections.
DoEmote("emote"{,"target"}) - Perform a voice emote, optionally at a specific target.
GetDefaultLanguage("unit") - Returns the default language that the unit is speaking after logon.
GetLanguageByIndex(index) - Returns the language specified by the index.
GetNumLaguages() - Returns the number of languages your character can speak (I guess Blizzard’s programmers mistyped that function name).
REMOVED PlayVocalCategory("category") - REMOVED IN 1300 -- Flickering 16:43,
RandomRoll - Does a random roll between the two values.
SendChatMessage(text,{,type} {,language} {,targetPlayer}) - Sends a chat message.
- 感谢WOWWIKI提供英文函数资料 -
引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:
论坛形式的传播: