文档库 最新最全的文档下载
当前位置:文档库 › 魔兽世界API_魔兽世界全局函数

魔兽世界API_魔兽世界全局函数

魔兽世界API
魔兽世界全局函数


帐号游戏时间范围函数 (Account PlayTime Limit Functions)此类API函数是专门为防沉迷系统而设计的,能计算出当前玩家游戏时间等内容,当前只在亚洲地区有效。

GetBillingTimeRested() - 返回当前帐户已登陆时间。

PartialPlayTime() - 如果用户状态为“疲劳(tired)”则返回1:降低经验及掉落。

NoPlayTime() - 如果用户状态为“不健康的(unhealthy)”则返回1:无经验及掉落。




--------------------------------------------------------------------------------



动作函数 (Action Functions)这些函数对动作按钮进行操作(通常玩家的动作有可能通过下面列表中的函数执行)。


保护 界面 ActionButtonDown(id) - 按下指定动作按钮。
保护 界面 ActionButtonUp(id) - 释放指定动作按钮。
ActionHasRange(slot) - 检测指定动作按钮是否受距离限制 (是则返回 1,否则返回 nil) 。
界面 BonusActionButtonDown - 触发指定额外动作按钮 (宠物或仆从)。
界面 BonusActionButtonUp - 释放指定额外动作按钮 (宠物或仆从)。
保护 CameraOrSelectOrMoveStart() - 在 3D 界面开始 "左键单击" 动作。 (1.10 - 保护)
保护 CameraOrSelectOrMoveStop([stickyFlag]) - 在 3D 界面结束 "左键单击" 动作。 (1.10 - 保护)
ChangeActionBarPage() - 更改系统动作按钮页面为系统变量 CURRENT_ACTIONBAR_PAGE 指定页。
GetActionBarToggles() - 获取系统动作条显示状况。
GetActionCooldown(slot) - 获取指定动作按钮冷却状况。
GetActionCount(slot) - 获取动作按钮所需物品剩余量 (绷带/毒药/等),无物品或不可用时返回 0。
GetActionText(slot) - 获取动作按钮文本标签 (宏, 等),不存在则返回 nil。
GetActionTexture(slot) - 获取指定动作按钮材质路径。
GetBonusBarOffset() - 检测何种额外动作条已显示。
HasAction(slot) - 假如指定动作条按钮有技能执行,则返回 1,其他情况返回 nil。
IsActionInRange(slot) - 测试技能是否在施展距离内 (1=是, 0=否, nil=不可用)。
IsAttackAction(slot) - 技能为“攻击”动作则返回 1 (战斗中闪光), 其他情况返回 nil。
IsAutoRepeatAction(slot) - 技能可自动重复时返回 1,其他情况返回 nil。
IsCurrentAction(slot) - 技能动作正在执行时返回 1,其他情况返回 nil。
IsUsableAction(slot) - 技能可立即执行时返回 1,其他情况返回 nil。
IsConsumableAction(slot) - 技能有施展次数时返回 1 (例如:施法物品),其他情况返回 nil。
IsEquippedAction(slot) - 必须装备才能施展的技能返回 1 (例如:链接到必须装备的物品),其他情况返回 nil。
PetHasActionBar() - 检测玩家宠物是否有动作条。
PickupAction(slot) - 将指定动作按钮的技能提取并放置于光标上。
PickupPetAction(slot) - 将指定的宠物动作按钮的

技能提取并放置于光标上。
PlaceAction(slot) - 将鼠标上的技能放置于指定动作按钮。
SetActionBarToggles(show1,show2,show3,show4[, alwaysShow]) - 设置指定系统动作条显示。 - 1.12 版本添加 'alwaysShow'。
保护 TurnOrActionStart() - 在 3D 界面开始 "右键单击" 动作。(1.10 - 保护)
保护 TurnOrActionStop() - 在 3D 界面结束 "右键单击" 动作。 (1.10 - 保护)
保护 UseAction(slot[, checkCursor[, onSelf]]) - 执行绑定到指定 ID 的动作按钮技能,可定向玩家 (与目标无关)。





--------------------------------------------------------------------------------



行为函数 (Activity Functions)这个部分的函数会引发玩家角色的动作(未在别处加以保护, 非简单确认步骤)

AcceptDuel() - 玩家同意接受决斗挑战.
保护 AttackTarget() - 攻击选定目标.
CancelDuel() - 拒绝决斗挑战.
CancelLogout()
CancelMeetingStoneRequest() - 将角色从集合石队列中移除
ClearTutorials()
ConfirmSummon()
保护 DescendStop() --增加于2.1
Dismount() --增加于2.0.3
FlagTutorial("tutotial")
保护 ForceLogout()
ForceQuit()
GetSummonConfirmAreaName()
GetSummonConfirmSummoner()
GetSummonConfirmTimeLeft()
Logout - 注销当前玩家角色.
Quit - 退出应用程序(游戏), 而非 LUA 脚本.
RandomRoll(low, high) - 随机产生在两个(正整数)数值闭区间的整数.
保护 SitStandOrDescendStart() - 切换玩家坐下/站立姿势.
保护 StartDuel("name") - 向玩家发出决斗邀请(根据名字)
TogglePVP() - 切换 PVP 状态
ToggleSheath() - 拔出/收起武器.
UseSoulstone() - 使用激活的灵魂石复活自己.





--------------------------------------------------------------------------------



插件函数 (AddOn Functions)DisableAddOn(index or "AddOnName") - 禁止某插件下次载入.
DisableAllAddOns() - 禁止所有插件下次被载入..
EnableAddOn(index or "AddOnName") - 在下次进程开启指定插件.
EnableAllAddOns() - 在下次进程开启全部插件.
GetAddOnDependencies(index or "AddOnName") - 取得插件依赖列表.
GetAddOnInfo(index or "AddOnName") - 取得插件相关信息.
GetAddOnMetadata(index or "name", "variable") - 从插件的TOC文件中获取标签内容(值)。
GetNumAddOns() - 取得用户插件数量.
IsAddOnLoaded(index or "AddOnName") - 指定插件已读取则返回 true.
IsAddOnLoadOnDemand(index or "AddOnName") - 测试插件是否可动态载入.
LoadAddOn(index or "AddOnName") - 发出动态载入插件读取请求.
ResetDisabledAddOns() -





--------------------------------------------------------------------------------



竞技场函数(Arena Functions)ArenaTeamInviteByName(teamIndex, playerName) - Invites the specified player to the specified arena team.
ArenaTeamLeave(teamIndex) - Leaves the specified arena team.
ArenaTeamRoster(teamIndex) - Sends a request to the server to request the most recen

t information on a specific Arena Team that you are in.
ArenaTeamUninviteByName(teamIndex, playerName) - Removes the specified played from the specified arena team.
ArenaTeamDisband(teamIndex) - Disbands the arena team without any warning! Requires you to be the leader of the team. (Known to be implemented as of 2.1.3, but may have existed before).
GetArenaCurrency() - Gets the amount of arena points a player currently has to spend.
GetArenaTeam(teamIndex) - Returns information regarding the players arena team, nil if the player is not in the passed team
GetArenaTeamRosterInfo(teamIndex, playerIndex) - Returns information regarding a player from the specified team, this requires a call to ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.
GetNumArenaTeamMembers(teamIndex[, showOffline]) - Gets the number of arena team members, this requires a call to ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.
GetBattlefieldTeamInfo(index) - Gets info about a registered Arena Team at the end of an arena match.
GetCurrentArenaSeason() - Gets the current Arena season.
IsActiveBattlefieldArena() - Returns true if in an Arena Match, also Returns true for the second argument if it's a registered match.
IsArenaTeamCaptain(teamIndex) - Returns a value based on whether the player is the arena team captain.
IsBattlefieldArena() - Returns true if the battlemaster you're talking to can queue you for arenas





--------------------------------------------------------------------------------



拍卖函数 (Auction Functions)CalculateAuctionDeposit(runTime) - 返回当前指定持续时间拍卖物品的堆放信息 (单位:分钟).
CanSendAuctionQuery() - 拍卖行搜索按钮可用时返回 1, 否则为 nil.
CancelAuction(index) - 取消指定拍卖 (在物主列表).
ClickAuctionSellItemButton() - 将当前 '拣起' 的物品放到 '拍卖' 栏.
CloseAuctionHouse() - 关闭 (打开的) 拍卖窗口.
GetAuctionHouseDepositRate() - 返回当前开启的拍卖窗口内物品 [含未显示] 存放比例 (百分率) (可能根据 CalculateAuctionDeposit).
GetAuctionInvTypes(classIndex, subclassIndex) - 返回物品的子类.
GetAuctionItemClasses() - 返回拍卖物品的主分类.
GetAuctionItemInfo("type", index) - 返回指定拍卖物品细节.
GetAuctionItemLink("type", index) - 返回指定拍卖物品的 itemLink.
GetAuctionItemSubClasses(classIndex) - 返回拍卖物品种类次序的子类.
GetAuctionItemTimeLeft("type", index) - 返回指定拍卖物品剩余时间状态.
GetAuctionSellItemInfo() - 返回当前拍卖物品相关信息 (未选择为 nil).
GetBidderAuctionItems([page]) - (取得竞标人信息).
GetNumAuctionItems("type") - 返回指定拍卖物品列表大小.
GetOwnerAuctionItems([page]) - (取得拍卖人信息).
GetSelectedAuctionItem("type") - 返回选择的拍卖物品索引 (1-

50), 未选择返回 0.
IsAuctionSortReversed("type", "sort") - 指定拍卖物品的排列类型逆序排列时返回 1, 否则为 nil.
PlaceAuctionBid("type", index, bid) - 对选择拍卖物品投标.
QueryAuctionItems("name", minLevel, maxLevel, invTypeIndex, classIndex, subclassIndex, page, isUsable, qualityIndex) - (请求检索符合条件的物品).
SetSelectedAuctionItem("type", index) - ?.
SortAuctionItems("type", "sort") - 根据指定分栏对指定拍卖列表进行排序.
StartAuction(minBid, buyoutPrice, runTime) - 开始拍卖 '创建拍卖' 面板内物品.
界面 AuctionFrameAuctions.duration - 设置拍卖持续总计时间.





--------------------------------------------------------------------------------



银行函数 (Bank Functions)BankButtonIDToInvSlotID(buttonID) - 以背包位置 ID 方式返回银行包裹位置 ID.
CloseBankFrame() - 关闭 (打开的) 银行窗口. --Ramble
GetBankSlotCost(numSlots) - 返回购买下个银行包裹位置的价格. --Ramble
GetNumBankSlots() - 返回已购买银行包裹位置数量, 如果已购完返回特定标志.
PurchaseSlot() - 购买一个空余的银行包裹位置.





--------------------------------------------------------------------------------



战场函数 (Battlefield Functions)AcceptAreaSpiritHeal() - 接受灵魂治疗.
CancelAreaSpiritHeal() - 取消灵魂治疗.
CanJoinBattlefieldAsGroup() - 玩家不能加入战场团队则返回 nil.
AcceptBattlefieldPort(index[, acceptFlag]) - 接受或拒绝一个传送至战场的请求.
CheckSpiritHealerDist() - 死亡时如果你在精神医者复活的范围内,返回true.
CloseBattlefield() - 关闭候列战场窗口.
GetHonorCurrency() - 获取当前荣誉值
GetAreaSpiritHealerTime() - 返回距精神医者下一次释放复活的时间.
GetBattlefieldEstimatedWaitTime(index) - 返回战场队列估算的排队时间.
GetBattlefieldFlagPosition(index) - 获得战场旗帜的位置.
GetBattlefieldInfo(index) - 返回你最近打开队列窗口的战场的详细信息.
GetBattlefieldInstanceExpiration() - 获取战场即将关闭的时间.
GetBattlefieldInstanceInfo(index) - 获得战场的副本ID.
GetBattlefieldInstanceRunTime() - 单位:毫秒, 返回本次战场已运行的时间. (似乎是从服务器上获取数据,因为它和time()函数并不同步)
GetBattlefieldMapIconScale() - 调整在战场小地图上标记图标的比例.
GetBattlefieldPortExpiration(index) - 获得对应战场传送的剩余时间.
GetBattlefieldPosition(index) - 获取战场中与你不在同一小队或团队的玩家姓名与位置 .
GetBattlefieldScore(index) - 获得一个玩家的战场分数.
GetBattlefieldStatData(playerIndex, slotIndex) - 获取战场中某一个玩家某一分栏的详细信息 . (例如战歌峡谷的夺旗数)
GetBattlefieldStatInfo(index) - 从战场记分板的指定分栏获取信息 .
GetBattlefieldStatus(index) - 返回玩家所在或正

在队列中的战场的状态 .
GetBattlefieldTimeWaited(index) - 获取玩家在战场队列中的时间 .
GetBattlefieldWinner() - 获得战场中获胜者 .
GetNumBattlefieldFlagPositions() - Get the number of flag positions available from GetBattlefieldFlagPosition().
GetNumBattlefieldPositions() - Get the number of positions available from GetBattlefieldPosition().
GetNumBattlefieldScores() - Returns the number of scores(players) listed in the battlefield scoreboard.
GetNumBattlefieldStats() - Get the number of battleground specific columns.
GetNumBattlefields() - Get the number of running battlefields for the last battleground queue window you opened.
GetNumWorldStateUI() - 获取世界状态的UI数量
GetSelectedBattlefield() - Get the selected battlefield to join first.
GetWorldStateUIInfo(i) - Get score and flag status within a battlefield.
JoinBattlefield(index[, joinAs]) - 加入战场队列 .
LeaveBattlefield() - 离开战场.
ReportPlayerIsPVPAFK("unit") - 获取当前战场中的一玩家是否AFK
RequestBattlefieldPositions() - Request new data for GetBattlefieldPosition().
RequestBattlefieldScoreData() - Request new data for GetBattlefieldScore().
SetBattlefieldScoreFaction([faction]) - Set the faction to show on the battlefield scoreboard.
SetSelectedBattlefield(index) - Select the battlefield instance you want to join or the first one that becomes available.
ShowBattlefieldList(index) - Displays a queue window for the specified battlefield. Only works if you are already in a queue for the battlefield. Index corresponds to location in queue array.





--------------------------------------------------------------------------------



绑定函数(Binding Functions)移除 GetActionSelfCastKey() -
移除 GetAutoLootToggleKey() -
GetBinding(index) - 获取索引的动作和快捷键.
GetBindingAction("KEY" [,checkOverride]) - 获取绑定该键的动作.
GetBindingKey("command") - 获取该动作绑定的键.
界面 GetBindingText("key", "prefix", returnAbbr) - 获取键值字串.
GetCurrentBindingSet() - 查询当前快捷键设置是否为指定帐号/角色.
GetNumBindings() - 获取总快捷键数与标题.
LoadBindings(which) - 读取默认/帐号/角色的特定快捷键配置.
RunBinding("command"[, "up"]) - 运行名为 "command" 的快捷键
移除 SetActionSelfCastKey("SHIFT" or "CTRL" or "ALT") -
移除 SetAutoLootToggleKey("SHIFT" or "CTRL" or "ALT") -
SaveBindings(which) - 保存帐号或角色键配置.
SetBinding("key"[, "command"]) - 设置或取消键绑定. (2.0 - 不能在战斗中使用.)
SetBindingSpell("KEY", "Spell Name") - 设置绑定键到技能, 与 /cast 使用技能一样.
SetBindingClick("KEY", "ButtonName" [,"mouseButton"]) - 设置绑定键到按钮对象. 绑定鼠标时, 按键按下时发生鼠标点击事件, 释放时发生鼠标 up.
SetBindingItem("KEY", "itemname") -
SetBindingMacro("KEY", "macroname"|macroid) -
SetConsoleKey("key"

) - 设置控制台键 (通常 "`").
SetOverrideBinding(owner, isPriority, "KEY" [,"COMMAND"]) - 设置/清除重复绑定键.
SetOverrideBindingSpell(owner, isPriority, "KEY", "spellname") -
SetOverrideBindingClick(owner, isPriority, "KEY", "ButtoName"[,"mouseButton"]) -
SetOverrideBindingItem(owner, isPriority, "KEY", "itemname") -
SetOverrideBindingMacro(owner, isPriority, "KEY", "macroname"|macroid) -
ClearOverrideBindings(owner) - 重置全部重复值.
SetMouselookOverrideBinding("KEY" [,"COMMAND"]) -
IsModifierKeyDown() - 等价于 (IsShiftKeyDown() 或 IsControlKeyDown() 或 IsAltKeyDown()).
IsModifiedClick("action") - 绑定该动作按钮按下返回 1, 否则 nil.
IsMouseButtonDown([button or "button"]) -





--------------------------------------------------------------------------------



增减益函数 (Buff/Debuff Functions)请勿混淆 buffId 和 buffIndex, 这是不同概念!

CancelPlayerBuff(buffIndex) - 从玩家身上移除特定增益.
CancelTrackingBuff() - 取消当前追踪增益 (追踪矿物等.)
GetPlayerBuff(buffId, buffFilter) - 获取特定效果信息 (有益, 有害或被动)
GetPlayerBuffApplications(buffIndex) - 获取特定增益/减益的叠加数.
GetPlayerBuffDispelType(buffIndex) - 获取玩家身上指定减益类型 ("魔法", "诅咒", "疾病", 或 "毒药")
GetPlayerBuffTexture(buffIndex) - 获取特定增益图标标识
GetPlayerBuffTimeLeft(buffIndex) - 获取增益持续剩余时间
GetWeaponEnchantInfo() - 返回主手和副手武器附魔信息.
UnitBuff("unit", index[, showCastable]) - 获取特定单位的增益信息.
UnitDebuff("unit", index[, showDispellable]) - 获取特定单位的减益信息.





--------------------------------------------------------------------------------



视角函数 (Camera Functions)下列 API 仅对鼠标观察模式提供的按下右键和控制移动方向功能. 不支持按下鼠标左键切换视角.

保护 CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - 保护)
保护 CameraOrSelectOrMoveStop([stickyFlag]) - End "Left click" in the 3D world. (1.10 - Protected)
CameraZoomIn(increment) - Zooms the camera into the viewplane by increment.
CameraZoomOut(increment) - Zooms the camera out of the viewplane by increment.
FlipCameraYaw(degrees) - 在 Z 轴旋转指定角度.
IsMouselooking() - 鼠标观察激活时返回 1, 否则为 nil.
MouselookStart()
MouselookStop()
MoveViewDownStart() - 镜头向下旋转.
MoveViewDownStop() - 停止调用 MoveViewDownStart() 旋转的镜头.
MoveViewInStart() - Begins zooming the camera in.
MoveViewInStop() - Stops zooming the camera in after MoveViewInStart() is called.
MoveViewLeftStart() - Begins rotating the camera to the Left.
MoveViewLeftStop() - Stops rotating the camera after MoveViewLeftStart() is called.
MoveViewOutStart() - Begins zooming the camera out.
MoveViewOutStop() - Stops zooming the camera out after Mov

eViewOutStart() is called.
MoveViewRightStart() - Begins rotating the camera to the Right.
MoveViewRightStop() - Stops rotating the camera after MoveViewRightStart() is called.
MoveViewUpStart() - 镜头向上旋转.
MoveViewUpStop() - 停止调用 MoveViewUpStart() 旋转的镜头.
保护 PitchDownStart() - Begins pitching the camera Downward.
保护 PitchDownStop() - Stops pitching the camera after PitchDownStart() is called.
保护 PitchUpStart() - Begins pitching the camera Upward.
保护 PitchUpStop() - Stops pitching the camera after PitchUpStart() is called.
NextView() - Cycles forward through the five predefined camera positions.
PrevView() - Cycles backward through the five predefined camera positions.
ResetView(index) - Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index).
SaveView(index) - Replaces the specified (1-5) predefined camera positions with the current camera position.
SetView(index) - Sets camera position to a specified (1-5) predefined camera position.





--------------------------------------------------------------------------------



频道函数 (Channel Functions)这些是针对聊天频道的函数. 同时参看聊天窗口函数 (Chat Window Functions) 和通信函数 (Communication Functions) 部分.

AddChatWindowChannel(chatFrameIndex, "channel") - 在指定窗口打开频道.
ChannelBan("channel", "name") - 在指定频道屏蔽一名玩家.
ChannelInvite("channel", "name") - 邀请指定玩家到频道中.
ChannelKick("channel", "name") - 从频道中剔除指定玩家.
ChannelModerate("channel") - 开启频道管理指令, 如 ChannelKick/Ban 等.
ChannelModerator("channel", "name") - 设置指定玩家为频道管理员.
ChannelMute("channel", "name") - 禁止指定玩家在频道中发言.
ChannelToggleAnnouncements("channel") - 切换频道显示/隐藏叫喊.
ChannelUnban("channel", "name") - 解除屏蔽玩家.
ChannelUnmoderator("channel", "name") - 解除频道管理员.
ChannelUnmute("channel", "name") - 允许指定玩家发言.
DisplayChannelOwner("channel") - 在默认聊天中显示特殊频道主人.
EnumerateServerChannels() - 获取全部有效的服务频道 (区域依赖).
GetChannelList() - 获取已加入的频道列表.
GetChannelName("channel" or index) - 获取指定频道名称.
GetChatWindowChannels(index) - 获取聊天窗口的频道名称列表.
JoinChannelByName("channel"[, "password"[, frameId]]) - 加入指定频道 (可选密码和框架标识) (更新于 1.9)
LeaveChannelByName("channel") - 离开指定频道.
ListChannelByName(channelMatch) - 在聊天窗口显示指定频道的成员.
ListChannels() - 在聊天窗口中列出全部频道.
RemoveChatWindowChannel(chatFrameIndex, "channel") - 创建隐藏频道 (不可见).
SendChatMessage("text"[, "type"[, language[, targetPlayer, ...]]]) - 发送聊天信息.
SetChannelOwner("channel", "name") - 设置频道主人.
SetC

hannelPassword("channel", "password") - 更改当前频道密码.





--------------------------------------------------------------------------------



角色函数 (Character Functions)AbandonSkill(index) - 玩家忘却技能.
AcceptResurrect() - 接受他人复活.
AcceptSkillUps()
AcceptXPLoss() - 接受灵魂使者复活时的损失.
AddSkillUp(index)
BuySkillTier(index)
CancelSkillUps()
CheckBinderDist() - 检测玩家是否在炉石绑定指令距离.
ConfirmBinder() - 确认炉石绑定请求.
DeclineResurrect() - 拒绝他人复活.
GetBindLocation() - 获取炉石绑定区域名称.
GetBlockChance() - 获取玩家格挡几率.
GetCombatRating() - 获取玩家战斗频度. TBC 新增
GetCombatRatingBonus() - 获取玩家战斗奖励频度. TBC 新增
GetComboPoints() - 获取当前连击点.
GetCorpseRecoveryDelay() - 玩家接受复活剩余时间.
GetCritChance() - 获取爆击率()
GetCurrentTitle() - 获取玩家当前头衔 ID.
GetDamageBonusStat() - 获取额外伤害奖励状态索引.
GetDodgeChance() - 获取玩家躲闪几率.
GetMoney() - 获取拥有的金钱额度 (铜币).
GetParryChance() - 获取玩家招架几率.
GetRangedCritChance() - 获取远程爆击率
GetReleaseTimeRemaining() - 获取玩家灵魂释放剩余时间.
GetResSicknessDuration() -
GetRestState() - 获取休息状态.
GetSpellBonusDamage(spellTreeID) -
GetSpellBonusHealing() -
GetSpellCritChance(school)-
GetTimeToWellRested() - Defunct.
GetTitleName(index) - 获取玩家当前标题名称.
GetXPExhaustion() - 获取角色当前休息经验奖励, 没有奖励返回 nil.
HasFullControl()
HasSoulstone() - (获取是否灵魂绑定.)
IsFlying() -
IsIndoors - 返回1为在室内.返回nil值则在室内,你可以使用坐骑.
IsMounted - 坐骑状态返回1 否则为nil值.
IsOutdoors - 返回1为室外,否则为nil.返回1为室内可以使用坐骑
IsResting() - (获取是否处在休息状态.)
IsStealthed() - 如果为潜行或影遁返回1,否则为nil
IsSwimming() -
IsTitleKnown(index) - 若玩家的称为是有效值返回1,否则为nil值
NotWhileDeadError() - 生成一个内容为“你已死亡,无法这样进行这项动作”的错误信息.
RemoveSkillUp(index)
ResurrectHasSickness() - Appears to be used when accepting a resurrection will give you resurrection sickessness.
ResurrectHasTimer() - 返回玩家要接受复活是否要等待一段时间
RetrieveCorpse() - 在尸体附近时复活. e.g., 当玩家跑回自己尸体附近时显示的“接受复活”按钮.
SetCurrentTitle(index) - 设置玩家当前的称号ID
SetSelectedSkill(index)
GetPVPDesired() - 获取玩家当前是否为PVP标志





--------------------------------------------------------------------------------



聊天窗口函数 (Chat Window Functions)下列是聊天窗口管理函数. 情同时参考频道函数 (Channel Functions) 和 通信函数(Communication Functions) 部分.


AddChatWindowChannel(chatFrameIndex, "channel") - 在指定聊天页面显示频道.
AddChatWindowMessages - 在指定聊天窗口添加信息群.
ChangeChatColor(chatType,r,g,b) - 更换信息种类显示颜色.
界面 ChatFrame_AddChannel(chatFrame, "channelName") - 在聊天页面激活频道.
界面 ChatFrame_OnHyperlinkShow(reference, link, button) - 在点击聊天链接时呼叫.
GetChatTypeIndex(type) - 获取聊天信息类型的数字 ID.
GetChatWindowChannels(index) - 获取聊天窗口收到的聊天频道.
GetChatWindowInfo(index) - 获取聊天窗口的设置信息.
GetChatWindowMessages(index) - 获取聊天窗口收到的信息类型.
JoinChannelByName("channel"[, "password"[, frameId]]) - 加入指定频道 (可选密码和注册的指定框架) (更新于 1.9)
LoggingChat(newState) - 启用/禁用将聊天记录保存为\WoWChatLog.txt.
LoggingCombat(newState) - 启用/禁用将站点记录保存为\WoWCombatLog.txt
RemoveChatWindowChannel(chatFrameIndex, "channel") - 在指定聊天窗口关闭频道.
RemoveChatWindowMessages(chatFrameIndex,"messageGroup") - 在聊天窗口移除聊天信息.
SetChatWindowAlpha(index,alpha) - 设置聊天窗口透明度
SetChatWindowColor(index,r,g,b) - 设置一个聊天框背景的颜色.
SetChatWindowDocked(index,docked) - 设置聊天窗口停泊状态.
SetChatWindowLocked(index,locked) - 设置聊天窗口锁定状态.
SetChatWindowName(index,"name") - 设置聊天窗口名称.
SetChatWindowShown(index,shown) - 显示/隐藏聊天窗口.
SetChatWindowSize(index,size) - 设置聊天框体的字体大小.





--------------------------------------------------------------------------------



评论函数 (Commentator Functions)此类别的函数都是被保护的.据推测这些函数是用来观看竞技场比赛的

CommentatorAddPlayer()
CommentatorEnterInstance()
CommentatorExitInstance()
CommentatorFollowPlayer()
CommentatorGetCamera()
CommentatorGetCurrentMapID()
CommentatorGetInstanceInfo()
CommentatorGetMapInfo()
CommentatorGetMode()
CommentatorGetNumMaps()
CommentatorGetNumPlayers()
CommentatorGetPlayerInfo()
CommentatorLookatPlayer()
CommentatorRemovePlayer()
CommentatorSetBattlemaster()
CommentatorSetCamera()
CommentatorSetMapAndInstanceIndex()
CommentatorSetMode()
CommentatorSetMoveSpeed()
CommentatorSetPlayerIndex()
CommentatorStartInstance()
CommentatorToggleMode()
CommentatorUpdateMapInfo()
CommentatorUpdatePlayerInfo()
CommentatorZoomIn()
CommentatorZoomOut()





--------------------------------------------------------------------------------



交流函数 (Communication Functions)主要与其他玩家进行交流设置的函数.另外你可以参考频道函数和聊天窗口函数.

DoEmote("emote"[, "target"]) - 做出表情, 对目标做出表情.
GetDefaultLanguage("unit") - 返回目标单位登陆后默认的语言.
GetLanguageByIndex(index) - Returns the language sp

ecified by the index.
GetNumLaguages() - 返回你的角色能够说的语言数量(怀疑打错了).
RandomRoll(low, high) - 在low和high之间产生一个随机数.
SendAddonMessage("prefix", "text", "type") - 在隐藏的频道中发送信息. - (添加于 1.12)
SendChatMessage("text"[, "type"[, language[, targetPlayer]]]) - 发送信息.





--------------------------------------------------------------------------------



包裹函数 (Container/Bag Functions)此类别的函数主要管理你的背包 (背包, 物品袋).你也可以参考背包函数和银行函数.

ContainerIDToInventoryID(BagId) GetBagName(BagId) - 获取对应 ID 包裹名称.
GetContainerItemCooldown(BagId, slot)
GetContainerItemInfo(BagId, slot) - 获取包裹中物品信息.
GetContainerItemLink(BagId, slot) - 返回包裹中物品链接 (itemLink).
GetContainerNumSlots(BagId) - 返回对应 ID 包裹的容量格数.
HasKey() - 玩家拥有钥匙扣时返回 1, 否则返回 nil.
界面 OpenAllBags() - 打开/关闭所有背包.
界面 CloseAllBags() - 关闭全部包裹.
PickupBagFromSlot(slot) - 拾取指定位的背囊并置于鼠标指针. 假如已经拾起物品, 将把此物品放到指定包位, 并在需要时置换.
PickupContainerItem(BagId,slot)
PutItemInBackpack() - 尝试放置物品到背囊 (包裹 0).
PutItemInBag(inventoryId) - 尝试放置物品到指定背包.
界面 PutKeyInKeyRing() - 尝试放置物品到钥匙扣.
SetBagPortaitTexture(texture,slot)
SplitContainerItem(BagId,slot,amount)
界面 ToggleBackpack() - 切换背囊打开/关闭.
界面 ToggleBag(BagId) - 打开或关闭指定背包.
保护 UseContainerItem(BagId, slot[, onSelf]) - 使用包裹中指定位置物品. (警告: 假如商人窗口开启, 使用包裹物品则为出售!) - 1.12 添加 'onSelf'





--------------------------------------------------------------------------------



手艺函数 (Crafting Functions)此类函数代替老的制作物品类函数,除此之外还有附魔和猎人宠物窗口 (你可以参考商业技能函数)。 附魔在界面打开的情况这些函数只有在使用时才能生效。你可以使用GetCraftSkillLine()来获取当前打开的商业技能面板中的技能。

CloseCraft()
CollapseCraftSkillLine(index)
CraftIsPetTraining() -
DoCraft(index)
ExpandCraftSkillLine(index)
GetCraftButtonToken()
GetCraftDescription(index)
GetCraftDisplaySkillLine()
GetCraftIcon(index)
GetCraftInfo(index)
GetCraftItemLink(index) - 返回可制造物品的物品链接。
GetCraftName()
GetCraftNumReagents(index)
GetCraftReagentInfo(index,reagentIndex)
GetCraftReagentItemLink(index,reagentIndex) - 返回制造物品所需的试剂之一的物品链接
GetCraftSelectionIndex()
GetCraftSkillLine()
GetCraftSpellFocus(index) - ?.
GetNumCrafts()
SelectCraft(index)





--------------------------------------------------------------------------------



光标函

数 (Cursor Functions)AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
ClearCursor() - Clears whatever item the cursor is dragging from the cursor. - (添加于 1.12)
CursorCanGoInSlot(invSlot) - Return true if the item currently held by the cursor can go into the given inventory (equipment) slot
CursorHasItem() - 假如当前光标放置物品则返回 true.
CursorHasMoney() - true/false
CursorHasSpell() - true/false
DeleteCursorItem()
DropCursorMoney - Drops the amount of money held by the cursor.
DropItemOnUnit("unit") - Drops an item from the cursor onto a unit.
EquipCursorItem(invSlot)
GetCursorMoney - Returns the amount of money held by the cursor.
GetCursorPosition() - Returns the cursor's position on the screen.
HideRepairCursor()
InRepairMode() - Returns true if your cursor is in repair mode
PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
PickupBagFromSlot(slot) - Picks up the bag from the specified slot, placing it in the cursor. If an item is already picked up, this places the item into the specified slot, swapping the items if needed.
PickupContainerItem(bagID,slot)
PickupInventoryItem(invSlot) - "Picks up" an item from the player's worn inventory.
PickupMacro(index) - Pickup a macro button icon.
PickupMerchantItem(index) - Places the item on the cursor.
PickupPetAction(slot) - Drags an action from the specified pet action bar slot into the cursor.
PickupPlayerMoney - Picks up an amount of money from the player.
PickupSpell(spellID, "bookType") - Loads an action button onto the cursor to be dropped into a quickbar slot.
PickupStablePet(index) - ?.
PickupTradeMoney(amount)
PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.
PutItemInBackpack() - attempts to place item in backpack (bag slot 0).
PutItemInBag(inventoryId) - attempts to place item in a specific bag.
ResetCursor()
SetCursor("cursor" or nil)
ShowContainerSellCursor(index,slot)
ShowInspectCursor() - Change the cursor to the magnifying glass inventory inspection cursor
ShowInventorySellCursor() - ?.
ShowMerchantSellCursor(index) - Changes the cursor to the merchant sell cursor.
ShowRepairCursor()





--------------------------------------------------------------------------------



调试函数 (Debugging Functions)debugprofilestart() - starts a timer for profiling during debugging.
debugprofilestop() - return the time in milliseconds since the last call to debugprofilestart()
FrameXML_Debug(flag) - Sets FrameXML logging state which is output to /WoW Folder/Logs/FrameXML.log
GetDebugStats()
debugstack(start, count1, count2) - Returns a string representation of the current calling stack (as of 1.9)





--------------------------------------------------------------------------------



禁用函数 (Disabled Functions)这些函数存在, 但被完全禁用了.

AppendToFile - ?.
DeleteFile() - ?
ReadFil

e() - ?.





--------------------------------------------------------------------------------



试衣间函数 (Dressing Room Functions)控制试衣间界面的函数. 新增于版本1.7.

界面 DressUpItem(ItemId) - 将在试衣间界面中显示穿着相应 ItemId 物品效果.
界面 DressUpItemLink("ItemString" or "ItemLink") - 将在试衣间界面中显示穿着指定物品效果.
界面 SetDressUpBackground(isAuctionFrame) - 设置物品试穿效果是否显示于拍卖行窗口.





--------------------------------------------------------------------------------



附魔函数 (Enchanting Functions)GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
ReplaceEnchant()
ReplaceTradeEnchant() - Confirm the replacement of an enchantment via trade.
BindEnchant() - Confirm the binding of the item when enchanting.





--------------------------------------------------------------------------------



声望函数 (Faction Functions)CollapseFactionHeader(index) - Collapse a faction header row.
ExpandFactionHeader(index) - Expand a faction header row.
FactionToggleAtWar(index) - Toggle the At War flag for a faction.
GetFactionInfo(index) - Gets details for a specific faction/faction header.
GetNumFactions() - Returns the number of lines in the faction display.
GetSelectedFaction() - Returns the row index of the currently selected faction in reputation window. (New in 1.10)
GetWatchedFactionInfo() - Returns information about the currently watched faction. (New in 1.10)
IsFactionInactive(index) - Returns true if the faction is marked inactive. (New in 1.10)
SetFactionActive(index) - Remove a faction from inactive group. (New in 1.10)
SetFactionInactive(index) - Move a faction to inactive group. (New in 1.10)
SetSelectedFaction(index) - Sets the currently selected faction in reputation window. (New in 1.10)
SetWatchedFactionIndex(index) - Sets which faction should be watched in Blizzard reputation bar. (New in 1.10)
UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "Alliance") - string returned is localization-independent (used in filepath)





--------------------------------------------------------------------------------



框架管理 (Frame Management)CreateFrame("frameType"[ ,"name"][, parent][, "inheritFrame"]) - Create a new frame of the specified type
CreateFont("name") - Dynamically create a font object
GetFramesRegisteredForEvent(event) - Returns a list of frames that are registered for the given event. - 新增于2.3
GetNumFrames() - Get the current number of Frame (and derivative) objects
EnumerateFrames(currentFrame) - Get the Frame which follows currentFrame
GetMouseFocus() - Returns the frame that currently has the mouse focus.
界面 MouseIsOver - Determines whether or not the mouse is over the specified frame.
PetActionBarFrame:Show(), :Hide() - Shows or hides the Pet Actionbar

Frame for players with pets. (Workaround for the petbar issue)
界面 ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)
界面 UIFrameFadeIn(frame, fadeTime, startAlpha, endAlpha)
界面 UIFrameFlash(...)





--------------------------------------------------------------------------------



好友函数 (Friend Functions)AddFriend("playerName") - 添加一位玩家到好友列表.
GetFriendInfo(index) - 返回对应好友的名字,等级,职业,位置和在线状态.
GetNumFriends() - 返回你的好友数.
GetSelectedFriend() - 返回你当前选中好友的索引号.
RemoveFriend("name" or index) - 从好友列表中移除一位好友
SetSelectedFriend(index) - Update the current selected friend.
ShowFriends() - Request updated friends information from server.
界面 ToggleFriendsFrame([tabNumber]) - Opens/closes the friends pane (possibly on a specific tab).





--------------------------------------------------------------------------------



GM 函数 (GM Functions)保护 DeleteGMTicket()
GMRequestPlayerInfo() - access denied (darn)
GetGMStatus()
GetGMTicket()
GetGMTicketCategories() - Return all available ticket categories (not as a table)
GMSurveyAnswerSubmit(question, rank, comment) - ?
GMSurveyCommentSubmit(comment) - ?
GMSurveyQuestion ?
GMSurveySubmit ?
保护 NewGMTicket(type,"text")
保护 Stuck() - Informs the game engine that the player is Stuck.
保护 UpdateGMTicket(type,"text")





--------------------------------------------------------------------------------



闲聊函数 (Gossip Functions)CloseGossip() - Dismiss the gossip window.
GetGossipActiveQuests() - Retrieves a list of the active (?) quests on the NPC you are talking to.
GetGossipAvailableQuests() - Retrieves a list of the available quests on the NPC you are talking to.
GetGossipOptions() - Retrieves a list of the available gossip items on the NPC you are talking to.
GetGossipText() - Retrieves the gossip text.
SelectGossipActiveQuest(index) - Selects an active quest.
SelectGossipAvailableQuest(index) - Selects an available quest.
SelectGossipOption(index) - Selects on a gossip item.





--------------------------------------------------------------------------------



队伍函数 (Group Functions)同样可以查看: 团队函数

AcceptGroup() - 接受组队邀请.
CheckReadyCheckTime() - 未知, called from UIParent's OnUpdate!
ConfirmReadyCheck(isReady) - 报告你是否已经就位.
ConvertToRaid() - 转化为团队.
DeclineGroup() - 拒绝组队邀请.
DoReadyCheck() - 进行一次就位检查.
GetLookingForGroup()
GetLootMethod() - 返回当前的物品分配模式
GetLootThreshold() - 返回当前物品分配模式下的物品质量下限(仅在队伍分配或队长分配时有效)
GetMasterLootCandidate(index) - Return the name of a player who is eligible to receive loot in master mode
GetNumPartyMembers() - 返回小队成员数
GetPar

tyLeaderIndex() - 当玩家不是队长时,返回队长的索引号(1-4).
GetPartyMember(index) - Returns the unit id of the party member at the given index if that party slot is filled, otherwise nil.
InviteUnit("name" or "unit") - Invites the specified player to the group you are currently in (new for WoW 2.0)
IsPartyLeader() - 当玩家是队长时返回true.
LeaveParty() - 退出队伍
PromoteByName("name") - Promotes by name the target.
PromoteToPartyLeader("unit") - 将对应玩家提升为队长.
SetLootMethod("lootMethod"[, "masterPlayer" or threshold]) - 设置物品分配模式
SetLootThreshold(itemQuality) - 在队伍分配或队长分配时设置物品质量下限
UninviteUnit("unit" or "name") - Kick a unit from the party if player is group leader.
UnitInParty("unit") - 当对应玩家是玩家所在队伍的成员时返回true.
UnitIsPartyLeader("unit") - 当对应玩家是队长是返回true.





--------------------------------------------------------------------------------



公会函数 (Guild Functions)AcceptGuild() - 接受加入公会的邀请.
BuyGuildCharter("guildName") - 买一个对应公会的公会徽章.
CanEditGuildInfo() - 如果你可以编辑公会信息时返回true
CanEditMOTD() - Returns true if you are allowed to edit the guild motd.
CanEditOfficerNote() - Returns true if you are allowed to edit a guild member's officer note.
CanEditPublicNote() - Returns true if you are allowed to edit a guild member's public note.
CanGuildDemote() - Returns true if you are allowed to demote a guild member.
CanGuildInvite() - Returns true if you are allowed to invite a new member to the guild.
CanGuildPromote() - ?.
CanGuildRemove() - ?.
CanViewOfficerNote() - ?.
CloseGuildRegistrar() - ?.
CloseGuildRoster() - ?.
CloseTabardCreation()
DeclineGuild() - ?.
GetGuildCharterCost() - 返回购买公会徽章的花费.
GetGuildInfo("unit") - 返回对应玩家所属的公会名称.
GetGuildInfoText() - Returns the persistant Guild Information data. (new in 1.9)
GetGuildRosterInfo(index) - This function is used to get info on members in the guild.
GetGuildRosterLastOnline(index) - Returns time since last online for indexth member in current sort order.
GetGuildRosterMOTD() - Returns guild's MOTD.
GetGuildRosterSelection() - Returns the index of the current selected guild member.
GetGuildRosterShowOffline() - Returns true if showing offline members of the guild.
GetNumGuildMembers(offline) - Returns the number of guild members total.
GetTabardCreationCost() - Returns cost in coppers.
GetTabardInfo() -?.
GuildControlAddRank("name") - Add another rank called "name". Only Guildmaster?
GuildControlDelRank - 删除等级? 仅会长有效?
GuildControlGetNumRanks() - Returns number of ranks after guild frame open. Any guild member can use this.
GuildControlGetRankFlags() - Returns list of values for each permission for your rank.
GuildControlGetRankName(index) - Returns name of the ra

nk. Any guild member can use this.
GuildControlSaveRank("name") - Only Guildmaster?
GuildControlSetRank(rank) - ?.
GuildControlSetRankFlag(index, enabled) - Enable/disable permission for some action.
GuildDemote("name") - ?.
GuildDisband() - ?.
GuildInfo() - Displays information about the guild you are a member of.
GuildInvite("name") - ?.
GuildLeave() - 退出公会.
GuildPromote("name") - ?.
GuildRoster() - Fetches the guild list and fires a GUILD_ROSTER_UPDATE event.
GuildRosterSetOfficerNote(index, "note") - ?.
GuildRosterSetPublicNote(index, "note") - ?.
GuildSetLeaderByName("name") - ?.
GuildSetMOTD("note") - ?.
GuildUninviteByName("name") - ?.
GuildUninvite() - kicks the member by number?
IsGuildLeader() - ?.
IsInGuild() - Lets you know whether you are in a guild.
SetGuildInfoText() - Sets the persistant Guild Information data. Limit is 500 letters (GuildInfoEditBox is limited to this number). Longer texts are possible, but will be reseted during the day. (new in 1.9)
SetGuildRosterSelection(index) - Selects/deselects a guild member according current sorting order.
SetGuildRosterShowOffline(enabled) - Sets/Resets the show offline members flag.
SortGuildRoster("sort") - Sorts guildroster according "sort". Any unknown values sort on "name".
TurnInGuildCharter() - ?.





--------------------------------------------------------------------------------



公会银行函数(Guild Bank Function)所有函数新增于版本2.3


BuyGuildBankTab() - Buys a guild bank tab
CanWithdrawGuildBankMoney() - Boolean, true if player is permitted to withdraw funds. No bank proximity required.
CloseGuildBankFrame() - Closes the guild bank frame
DepositGuildBankMoney(money) - Deposits "money" amount in copper.
GetCurrentGuildBankTab() - Integer of selected tab, >= 1
GetGuildBankItemInfo(tab, slot) - Returns texture, amount and integer 1 or nil depending on locked state
GetGuildBankItemLink(tab, slot) - Returns itemLink
GetGuildBankMoney() - Integer, funds available in copper.
GetGuildBankMoneyTransaction(index) - No bank proximity required, however QueryGuildBankLog function requires proximity.
GetGuildBankTabCost() - Integer OR nil - cost in copper OR no tabs available to buy
GetGuildBankTabInfo(tab) - Returns the name and icon of the guild bank tab queried.
GetGuildBankTabPermissions(tab) - Gets display / player's access info. Limited data available without bank proximity.
GetGuildBankTransaction(tab, index)
GetGuildBankWithdrawLimit() - Returns withdraw limit for currently selected rank in guild control
GetGuildTabardFileNames()
GetNumGuildBankMoneyTransactions() - Returns number of money log entries
GetNumGuildBankTabs() - Integer count of bought tabs, >= 0. No bank proximity required.
GetNumGuildBankTransactions(tab) - Returns number of log transactions for tab "tab"
IsTabViewable(tab) - Returns true if specified tab is viewable by player, false otherwise
PickupGuildBankItem(tab,

slot) - Picks up an item from the guild bank
PickupGuildBankMoney(money) - Picks up "money" copper from the guild bank
QueryGuildBankLog(tab) - Updates bank log data from the server, called before all transaction functions. "Money tab" is MAX_GUILDBANK_TABS+1
QueryGuildBankTab(tab) - Updates bank tab data from the server, called before all item functions.
SetCurrentGuildBankTab(tab) - Select different bank tab in the UI
SetGuildBankTabInfo(tab, name, iconIndex) - Modifies name and icon for tab
SplitGuildBankItem(tab, slot, amount) - Picks up part of a stack
WithdrawGuildBankMoney(money) - Withdraws "money" copper from the guild bank






--------------------------------------------------------------------------------



荣誉函数 (Honor Functions)GetHonorCurrency() - Return the amount of honor the player has available to purchase items.
GetInspectHonorData() - Return honor info for the inspected unit (if available).
GetInspectPVPRankProgress() - Return rank progress for the inspected unit (if available). Ranges from 0 to 1.
GetPVPLastWeekStats() - Get your PvP/Honor statistics for last week.
GetPVPLifetimeStats() - Get your PvP/Honor statistics for your lifetime.
GetPVPRankInfo(rank[, unit]) - Get information about a specific PvP rank.
GetPVPRankProgress() - Get information about the PvP rank progress.
GetPVPSessionStats() - Get your PvP/Honor statistics for this session.
GetPVPThisWeekStats() - Get your PvP/Honor statistics for this week.
GetPVPYesterdayStats() - Get your PvP/Honor statistics for yesterday.
HasInspectHonorData() - Determine if the inspected unit's honor data is available.
RequestInspectHonorData() - Request honor data for inspected unit.
UnitIsCivilian("unit") - Returns true if the unit is a civilian NPC.
UnitPVPName("unit") - Returns unit's name with PvP rank prefix (e.g., "Corporal Allianceguy").
UnitPVPRank("unit") - Get PvP rank information for requested unit.





--------------------------------------------------------------------------------



屏蔽函数 (Ignore Functions)AddIgnore("name") - Add a player to your ignore list.
AddOrDelIgnore("name") - Toggles the ignore state of the specified name.
DelIgnore("name") - Delete a player from your ignore list.
GetIgnoreName(index) - Get the name of the player on your ignore list at index.
GetNumIgnores() - Get the number of players on your ignore list.
GetSelectedIgnore()
SetSelectedIgnore(index)





--------------------------------------------------------------------------------



检测函数 (Inspection Functions)CheckInteractDistance("unit",distIndex)
ClearInspectPlayer() - Reset inspect data once finished with it (Called on inspect window hide)
GetInspectHonorData() - Return honor info for the inspected unit (if available).
GetInspectPVPRankProgress() - Return rank progress for the inspected unit (if available). Ranges from 0 to 1.
HasInspectHonorData() - Determine if the inspected unit's hon

or data is available.
界面 InspectUnit("unit") - Inspects the specified / selected "unit".
NotifyInspect("unit")
RequestInspectHonorData() - Request honor data for inspected unit.





--------------------------------------------------------------------------------



副本函数(Instance Functions)CanShowResetInstances() - 返回玩家当前是否能够进行重置副本的操作 .
GetBattlefieldInstanceExpiration() - 获取战场即将关闭的时间 .
GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield.
GetBattlefieldInstanceRunTime() - In milliseconds, the time since battleground started. (seems to be queried from server because it is not in sync with time())
GetInstanceBootTimeRemaining() - ?.
GetNumSavedInstances() - Gets the number of instances that the player is saved to.
GetSavedInstanceInfo(index) - 返回用户的副本进度.
IsInInstance() - Returns 1 if the player is in an instance.
ResetInstances() - Confirm reset of instances.
GetCurrentDungeonDifficulty() - Returns the player's current Dungeon Difficulty setting (1-3).
SetDungeonDifficulty(difficulty) - Sets the player's Dungeon Difficulty setting (for the 5-man instances).
GetInstanceDifficulty() - 返回当前副本的难度(1-3, 玩家不在副本则返回1).






--------------------------------------------------------------------------------



背包函数 (Inventory Functions)这些函数主要管理你的"背包",已装备的物品.同样可以查看包裹函数和银行函数.

AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
BankButtonIDToInvSlotID(buttonID) - Returns the ID number of a bank button in terms of inventory slot ID.
CancelPendingEquip(index) - This function is used to cancel a pending equip.
ConfirmBindOnUse()
ContainerIDToInventoryID(bagID)
CursorCanGoInSlot(invSlot) - Return true if the item currently held by the cursor can go into the given inventory (equipment) slot
EquipCursorItem(invSlot)
EquipPendingItem(invSlot) - Equips the currently pending Bind-on-Equip or Bind-on-Pickup item from the specified inventory slot. (Internal - do not use)
GetInventoryAlertStatus(index) - Returns one of several codes describing the "status" of an equipped item.
GetInventoryItemBroken("unit",invSlot) - Determine if an inventory item is broken (no durability).
GetInventoryItemCooldown("unit",invSlot) - Get cooldown information for an inventory item.
GetInventoryItemCount("unit",invSlot) - Determine the quantity of an item in an inventory slot.
GetInventoryItemLink("unit",invSlot) - Returns an itemLink for an inventory (equipped) item.
GetInventoryItemQuality("unit",invSlot) - Return the quality of an inventory item.
GetInventoryItemTexture("unit",invSlot) - Return the texture for an inventory item.
GetInventorySlotInfo(invSlotName) - Get the info for a named inventory slot (slot ID and texture)
GetWeaponEnchantInfo() - Return information about main and offhand w

eapon enchantments.
HasWandEquipped() - Returns 1 if a wand is equipped, false otherwise.
IsInventoryItemLocked(id) - Returns whether an inventory item is locked, usually as it awaits pending action.
KeyRingButtonIDToInvSlotID(buttonID) - Map a keyring button to an inventory slot button for use in inventory functions.
PickupBagFromSlot(slot) - Picks up the bag from the specified slot, placing it in the cursor. If an item is already picked up, this places the item into the specified slot, swapping the items if needed.
PickupInventoryItem(invSlot) - "Picks up" an item from the player's worn inventory.
SetInventoryPortaitTexture - ?.
UpdateInventoryAlertStatus()
保护 UseInventoryItem(invSlot) - Use an item in a specific inventory slot.





--------------------------------------------------------------------------------



物品函数 (Item Functions)这些函数主要利用物品链接或者是物品信息进行各种操作.同时还可以参考包裹函数以及背包函数.

EquipItemByName("name" [,slot]) - Equips an item by its name, optionally into a specified slot. GetAuctionItemLink("type", index) - Returns an itemLink for the specified auction item.
GetContainerItemLink(bagID, slot) - Returns the itemLink of the item located in bag#, slot#.
GetCraftItemLink(index) - Returns an itemLink for the specified craftable item.
GetCraftReagentItemLink(index,reagentIndex) - Returns an itemLink for one of the reagents needed to craft the given item
GetItemCooldown(itemid or "name" or itemLink) - 返回开始时间,冷却时间,启用.
GetItemCount(itemID, "itemName", or "itemLink", [includeBank]) - 返回当前制定的物品在你背包中的数量 GetItemInfo(itemId or "itemString") - Returns information about an item.
GetItemQualityColor(quality) - Returns the RGB color codes for a quality.
GetItemSpell(item) - 返回名称,等级
GetMerchantItemLink(index) - Returns an itemLink for the given purchasable item
GetQuestItemLink - Returns an itemLink for a quest reward item.
GetQuestLogItemLink - ?.
GetTradePlayerItemLink(id) - Returns an itemLink for the given item in your side of the trade window (if open)
GetTradeSkillItemLink(index) - Returns the itemLink for a trade skill item.
GetTradeSkillReagentItemLink(index, reagentId) - Returns the itemLink for one of the reagents needed to craft the given item
GetTradeTargetItemLink(id) - Returns an itemLink for the given item in the other player's side of the trade window (if open)
IsUsableItem(item) - Returns usable, noMana.
IsConsumableItem(item) -
IsCurrentItem(item) -
IsEquippedItem(item) -
IsEquippableItem(itemid or "name" or itemLink) - 返回1或nil
IsEquippedItemType("type") - Where "type" is any valid inventory type, item class, or item subclass.
IsItemInRange(item, [unit]) - Nil for no valid target, 0 for out of range, 1 for in range.
ItemHasRange(item) -
OffhandHasWeapon() - Determine if your offhand carries a weapon.
SplitContainerItem(bag

ID,slot,amount) - Picks up part of a stack.
界面 SetItemRef(link, text, button) - Handles item link tooltips in chat.





--------------------------------------------------------------------------------



物品描述函数 (Item Text Functions)描述物品信息

CloseItemText() - 关闭一个物品信息窗口(书, 面板, 等).
ItemTextGetCreator() - 获取当前物品的创建者(如果是玩家制造的).
ItemTextGetItem() - 获取文本名称.
ItemTextGetMaterial() - Get the material on which the text is printed.
ItemTextGetPage() - Get the page number of the currently viewed page.
ItemTextGetText() - Get the page contents of the currently viewed page.
ItemTextHasNextPage() - Determine if there is another page after the current one.
ItemTextNextPage() - Request the next page of the text.
ItemTextPrevPage() - Request the previous page of the text.





--------------------------------------------------------------------------------



按键绑定函数 (Key Binding Functions)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.
界面 GetBindingText("key", "prefix") - Gets the string value for the key.
GetCurrentBindingSet() - Queries if current set of key bindings is character or account specific
GetNumBindings() - Get total number key bindings and headers.
LoadBindings(which) - Loads default, account or character specific key binding set into memory from disk.
RunBinding("command"[, "up"]) - Executes the key binding named "command"
SaveBindings(which) - Saves account or character specific key bindings from memory to disk.
SetBinding("key"[, "command"]) - Sets or unsets key bindings.
SetConsoleKey("key") - Sets the console key (normally "`").





--------------------------------------------------------------------------------



基础知识函数 (Knowledge Base Functions)KBArticle_BeginLoading()
KBArticle_GetData()
KBArticle_IsLoaded()
KBQuery_BeginLoading()
KBQuery_GetArticleHeaderCount()
KBQuery_GetArticleHeaderData()
KBQuery_GetTotalArticleCount()
KBQuery_IsLoaded()
KBSetup_BeginLoading()
KBSetup_GetArticleHeaderCount()
KBSetup_GetArticleHeaderData()
KBSetup_GetCategoryCount()
KBSetup_GetCategoryData()
KBSetup_GetLanguageCount()
KBSetup_GetLanguageData()
KBSetup_GetSubCategoryCount()
KBSetup_GetSubCategoryData()
KBSetup_GetTotalArticleCount()
KBSetup_IsLoaded()
KBSystem_GetMOTD()
KBSystem_GetServerNotice()
KBSystem_GetServerStatus()





--------------------------------------------------------------------------------



寻求组队函数(Looking For Group Functions)用于寻求组队

AcceptLFGMatch()
CanSendLFGQuery(typeID, lfgNdx)
CancelPendingLFG()
ClearLFGAutojoin()
ClearLFMAutofill()
ClearLookingForGroup()
ClearLookingForMore()
DeclineLFGMatch()
GetLFGPartyResults(typ

e, lfgNdx, index, partyIndex)
GetLFGResults(type, lfgNdx, index)
GetLFGStatusText()
GetLFGTypeEntries(type)
GetLFGTypes() {"None", "Dungeon", "Raid", "Quest (Group)", "Zone", "Heroic Dungeon"}
GetNumLFGResults(type, lfgNdx)
IsInLFGQueue()
LFGQuery(typeID, lfgNdx [, class])
SetLFGAutojoin()
SetLFGComment()
SetLFGType(slot, type)
SetLFMAutofill()
SetLFMType()
SetLookingForGroup(slot, type, index)
SetLookingForMore()
SortLFG("type")





--------------------------------------------------------------------------------



地区函数 (Location Functions)返回当前玩家所在区域信息

GetMinimapZoneText() - 返回显示于小地图上的区域文本.
GetRealZoneText() - 返回副本或区域名称.
GetSubZoneText() - 返回子区域文本 (例如: "运河").
GetZonePVPInfo() - 返回当前区域的 PVP 信息.
GetZoneText() - 返回区域文本 (例如: "暴风城").





--------------------------------------------------------------------------------



拾取函数 (Loot Functions)CloseLoot([uiFailedFlag])
保护 ConfirmBindOnUse()
ConfirmLootRoll(slot) - Confirm a loot roll (NEW IN 1300)
ConfirmLootSlot(slot) - Confirm looting of a BoP item.
GetAutoLootDefault() - Returns 1 if Auto Loot is enabled (checked), nil if disabled (unchecked).
GetLootMethod() - Return the currently active lootMethod
GetLootRollItemInfo(rollId)
GetLootRollItemLink(rollId)
GetLootRollTimeLeft(rollid)
GetLootSlotInfo(slot) - Returns icon path, item name, and item quantity for the item in the given loot window slot
GetLootSlotLink(slot) - Returns an itemLink for the item in the given loot window slot
GetLootThreshold() - Return the current loot threshold (for group/master loot)
GetMasterLootCandidate(index) - Return the name of a player who is eligible to receive loot in master mode
GetNumLootItems() - Returns amount of objects to loot (number)
GiveMasterLoot(slot,index)
移除 IsAutoLootKeyDown() - Replaced by IsModifiedClick("AUTOLOOTTOGGLE") IsFishingLoot()
LootSlot(slot) - Used to confirm the looting of a BOP item
LootSlotIsCoin(slot)
LootSlotIsItem(slot)
RollOnLoot(rollId[, roll]) - Roll or pass on a loot event started by the game engine.
SetAutoLootDefault(true/false) -
SetLootMethod("lootMethod"[, "masterPlayer" or threshold]) - Set the current loot method
SetLootPortrait()
SetLootThreshold(itemQuality) - Set the threshold for group/master loot





--------------------------------------------------------------------------------



彩票函数(Lottery Functions)BuyRandomPicks - ? - (添加于 1.12)
CloseLottery - ? - (添加于 1.12)
GetJackpotAmount - ? - (添加于 1.12)
GetLastLotteryNumbers - ? - (添加于 1.12)
GetLotteryPrizeInfo - ? - (添加于 1.12)
GetMoneyPrizes - ? - (添加于 1.12)
GetNextDrawTime - ? - (添加于 1.12)
GetNumLotteryPrizes - ? - (添加于 1.12)
GetNumPastDrawResults - ? - (添加于 1.12)
GetPastDrawResult - ? - (添加于 1.1

相关文档