日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2023/12/14 编程问答 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 魔兽世界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
2)
SubmitNumbers - ? - (添加于 1.12)


宏函數 (Macro Functions)CreateMacro(“name”, icon, “body”, local) - 創建一個新的宏(2.0 - 無法在戰斗中創建).
CursorHasMacro() - 返回1或nil (新增于 2.0.3) DeleteMacro(id|“name”) - 刪除1個宏.
EditMacro(index, “name”, iconIndex, “body”, local) - 編輯/保存宏.
GetMacroIconInfo(index) - 返回 Blizzard 指定的圖標.
GetMacroIndexByName(“name”) - 返回宏索引.
GetMacroInfo(index) - 返回宏的 “name”, iconTextureID, “body”, local.
GetNumMacroIcons() - 返回 Blizzard 使用宏圖標數.
GetNumMacros() - 返回玩家宏數量.
PickupMacro(index) - 拾取宏按鈕上的圖標.
保護 RunMacro(id|“name”) - 運行宏
保護 RunMacroText(“macro”) - 運行宏
SecureCmdOptionParse(“command”) - 宏中使用條件選擇時, 返回合適的選擇.


郵件函數 (Mail Functions)郵件相關事件.


CheckInbox() - 從服務器接收數據放置到客戶端的收件箱中.
ClearSendMail() - 清除發送郵件表格并將附件放回包裹. --Bug 15:52, 6 Feb 2005 (EST)
ClickSendMailItemButton() - This seems to just simulate a click on the send item mail slot (will pickup the item there). --Bug 18:59, 4 Feb 2005 (EST)
CloseMail() - 關閉郵件窗口. --Bug 19:04, 4 Feb 2005 (EST)
DeleteInboxItem(index) - Deletes the inbox item at index. It returns immediately, it does not seem to wait for the deletion to go through, giving the normal problems with rapid mail removal attempts.
DropCursorMoney - Drops the amount of money held by the cursor.
GetCoinIcon(amount)
GetInboxHeaderInfo(index) - 返回收件箱標題信息.
GetInboxItem(index) - Returns description of the attachment attached to message at (index).
GetInboxNumItems() - 返回收件箱中郵件數.
GetInboxText(index) - Returns the message text of message at (index). It also reads the inbox item, thus reducing its timeout to <= 3 days.
GetInboxInvoiceInfo(index) - Returns informations about an auction house invoice. It also reads the inbox item, thus reducing its timeout to <= 3 days.
GetNumPackages() - Not yet fully implemented. Currently it always returns 1. --Bug 16:28, 6 Feb 2005 (EST)
GetNumStationeries() - Not yet fully implemented. Currently it always returns 1. --Mikk 17:03, 17 May 2006 (EDT)
GetPackageInfo(index) - Not yet fully implemented. Currently an index of 1 returns “Test Package”. --Bug 16:28, 6 Feb 2005 (EST)
GetSelectedStationeryTexture() - Not yet fully implemented. Currently it returns “STATIONERYTEST” when the mailbox is open. --Bug 16:28, 6 Feb 2005 (EST)
GetSendMailCOD() - ?.
GetSendMailItem() - ?.
GetSendMailMoney() - ?.
GetSendMailPrice() - ?.
GetStationeryInfo(index) - Not yet fully impleme
nted. Currently an index of 1 returns “Default Stationery”. --Mikk 17:03, 17 May 2006 (EDT)
HasNewMail() - Returns nil if there is no new mail. --Bug 19:14, 4 Feb 2005 (EST)
InboxItemCanDelete(index) - ?.
ReturnInboxItem(index) - Returns to the sender the attached item in the mail message at the specified index.
SelectPackage(index) - Not yet fully implemented. It does nothing visible. --Bug 16:28, 6 Feb 2005 (EST)
SelectStationery(index) - Not yet fully implemented. It does nothing visible. --Bug 16:28, 6 Feb 2005 (EST)
SendMail(“target”, “subject”, “body”) - If the mailbox is open, this sends mail. --Buttahcup 4 Feb 2005
保護 SetSendMailCOD(amount) - Make next mail sent using SendMail() COD target for amount. --Drundia 21:30, 25 April 2006 (EDT)
保護 SetSendMailMoney(amount) - Add money to next mail sent using SendMail(). --Drundia 21:30, 25 April 2006 (EDT)
TakeInboxItem(index) - 收取收件箱中的附件.
TakeInboxMoney(index) - 收取收件箱中的金錢. --Drundia 21:30, 25 April 2006 (EDT)
TakeInboxTextItem(index) - Creates a permanent copy of letter (readable “Plain Letter”) --Drundia 21:30, 25 April 2006 (EDT).


地圖函數 (Mapping Functions)下列是世界地圖顯示相關函數.


GetCorpseMapPosition() - 返回當前世界地圖中尸體位置.
GetCurrentMapContinent() - 返回當前世界地圖顯示的大陸號碼.
GetCurrentMapZone() - 返回當前世界地圖顯示的區域號碼.
GetMapContinents() - 返回大陸名稱.
GetMapInfo() - 返回當前世界地圖名稱和尺寸.
GetMapLandmarkInfo(landmarkIndex) - 返回當前世界地圖標記信息.
GetMapOverlayInfo(overlayIndex) - 返回當前世界地圖覆蓋信息.
GetMapZones(continentIndex) - 返回大陸區域名稱.
GetNumMapLandmarks() - 返回當前世界地圖標記號碼.
GetNumMapOverlays() - 返回當前世界地圖覆蓋號碼…
GetPlayerMapPosition(“unit”) - 返回對象在當前世界地圖位置.
GetWorldLocMapPosition(continent, x, y)
ProcessMapClick(x,y) - Passes a click to the client, which then calculates if the zone has to be changed.
RequestBattlefieldPositions() - 為 GetBattlefieldPosition() 請求新數據.
SetMapToCurrentZone() - 設置地圖顯示當前玩家所在區域.
SetMapZoom(continentIndex[, zoneIndex]) - 設置地圖顯示區域.
SetupFullscreenScale() - 設置全屏顯示比例, 如世界地圖, 最佳為全屏.
界面 ToggleMinimap - 切換小地圖顯示狀態.
界面 ToggleWorldMap - 切換世界地圖顯示狀態…
UpdateMapHighlight(x,y) - 提供地圖高亮信息.
CreateWorldMapArrowFrame(“frame”) - 為玩家方位創建指示方向光標.
UpdateWorldMapArrowFrames() - 更新玩家方位指示方向光標.
ShowWorldMapArrowFrame(bool) - 切換玩家方位指示.
PositionWorldMapArrowFrame(x,y) - 設置玩家
方位指示光標位置.


集合石函數 (Meeting Stone Functions)


CancelMeetingStoneRequest() - 將玩家從集合石列表移除.
GetMeetingStoneStatusText()
IsInMeetingStoneQueue()


商人函數 (Merchant Functions)


BuyMerchantItem(index[, qty]) - 從商人處購買物品.
BuybackItem(index) - 購回售出的物品.
CanMerchantRepair() - 商人提供修理時返回 true.
CloseMerchant() - 關閉交易窗口.
GetBuybackItemInfo(index) - 返回售出物品的信息.
GetMerchantItemInfo(index) - 返回指定商品相關信息.
GetMerchantItemLink(index) - 返回指定商品的 itemLink.
GetMerchantItemMaxStack(index) - 返回商人出售物品堆疊最大數量.
GetMerchantNumItems() - 返回商人出售物品種類數量.
GetRepairAllCost()
HideRepairCursor()
InRepairMode() - 光標為修理模式時返回 true.
IsVendorActive - ? - (添加于 1.12)
PickupMerchantItem(index) - 拾取物品到光標上.
RepairAllItems() - 修理全部裝備和背包里的物品.
ShowMerchantSellCursor(index) - 切換光標到出售狀態.
ShowRepairCursor() - 切換光標到修理狀態.


移動函數 (Movement Functions)Use with caution - movement started by a script must be stopped by script. Keys/Mouse will not stop movement. These functions no longer work (fail silently) in patch 1.6 if NOT triggered from a hardware event (just like spell casts). As of patch 1.10 many of these functions were protected for use of only Blizzard signed code.


保護 CameraOrSelectOrMoveStart() - Begin “Left click” in the 3D world. (1.10 - 保護)
保護 CameraOrSelectOrMoveStop([stickyFlag]) - End “Left click” in the 3D world. (1.10 - Protected)
FollowByName(“name”[, exactMatch]) - Follow a player with the specified player name
FollowUnit(“unit”) - Follow an ally with the specified UnitID
保護 Jump() - The player jumps.
保護 MoveBackwardStart - The player begins moving backward at the specified time.
保護 MoveBackwardStop - The player stops moving backward at the specified time.
保護 MoveForwardStart - The player begins moving forward at the specified time.
保護 MoveForwardStop - The player stops moving forward at the specified time.
保護 StrafeLeftStart - The player begins strafing left at the specified time.
保護 StrafeLeftStop - The player stops strafing left at the specified time.
保護 StrafeRightStart - The player begins strafing right at the specified time.
保護 Strafe
RightStop - The player stops strafing right at the specified time.
保護 ToggleAutoRun - Turns auto-run on or off
ToggleMouseMove()
保護 ToggleRun - Toggle between running and walking.
保護 TurnLeftStart - The player starts turning left at the specified time.
保護 TurnLeftStop - The player stops turning left at the specified time.
保護 TurnOrActionStart() - Begin “Right Click” in the 3D world. (1.10 - 保護)
保護 TurnOrActionStop() - End “Right Click” in the 3D world. (1.10 - 保護)
保護 TurnRightStart - The player starts turning right at the specified time.
保護 TurnRightStop - The player stops turning right at the specified time.


音樂播放器 (Music Player Functions)下列指令僅作用于 Mac 的 iTunes


保護 MusicPlayer_BackTrack() - Go back a track (Mac iTunes only) - (添加于 1.12)
保護 MusicPlayer_NextTrack() - Go forward a track (Mac iTunes only) - (添加于 1.12)
保護 MusicPlayer_PlayPause() - Toggle play/paulse (Mac iTunes only) - (添加于 1.12)
保護 MusicPlayer_VolumeDown() - Reduce music volume (Mac iTunes only) - (添加于 1.12)
保護 MusicPlayer_VolumeUp() - Increase music volume (Mac iTunes only) - (添加于 1.12)


寵物函數 (Pet Functions)


BuyStableSlot()
CastPetAction(index) - 施放相應的寵物技能.
CheckPetUntrainerDist() - Check wether the player is close enough to the pet untrainer.
ClickStablePet(index) - ?.
ClosePetStables() - 關閉獸欄界面.
ConfirmPetUnlearn() - 確認寵物忘卻技能請求.
DropItemOnUnit(“unit”) - 對目標使用光標上物品.
GetNextStableSlotCost()
GetNumStablePets() - 返回獸欄中寵物數量.
GetNumStableSlots() - 返回擁有的獸欄數量.
GetPetActionCooldown(index) - 返回指定寵物動作條技能冷卻信息.
GetPetActionInfo(index) - 返回指定寵物動作條技能信息.
GetPetActionsUsable() - 假如當前玩家寵物技能可使用則返回特征值.
GetPetExperience() - 返回寵物當前經驗和升級經驗總需求.
GetPetFoodTypes() - 返回寵物喜歡的食物種類列表.
GetPetHappiness() - 返回寵物快樂度, 傷害加成, 以及忠誠度增長率.
GetPetIcon() - 返回玩家寵物圖標材質引用字串.
GetPetLoyalty() - 返回寵物當前忠誠度等級.
GetPetTimeRemaining() - Returns in milliseconds about some timeout for the player’s pet.
GetPetTrainingPoints() - 返回寵物當前訓練點數總量和用量.
GetSelectedStablePet() - ?.
GetStablePetFoodTypes(index) - 返回獸欄中指定寵物喜歡的食物種類列表.
GetStablePetInfo(index) - 返回獸欄中指定寵物信息.
HasPetSpells() - 玩
家有寵物技能則返回 true.
HasPetUI() - 玩家有寵物界面則返回 true.
PetAbandon() - 永久遺棄寵物.
PetAggressiveMode() - 設置寵物為攻擊模式.
PetAttack() - 命令寵物攻擊目標.
IsPetAttackActive() - 寵物正在進行攻擊時返回 true.
PetStopAttack() - 寵物停止攻擊.
PetCanBeAbandoned() - 寵物可遺棄則返回 true.
PetCanBeRenamed() - 寵物可重命名返回 true.
PetDefensiveMode() - 設置寵物為防御模式.
PetDismiss() - 解散寵物.
PetFollow() - 命令寵物跟隨.
PetHasActionBar() - 檢測玩家寵物是否有技能條.
PetPassiveMode() - 設置寵物為被動模式.
PetRename(“name”) - 給寵物起名.
PetWait() - 命令寵物停止跟隨.
PickupPetAction(slot) - 在寵物技能條中拾取技能.
PickupStablePet(index) - (召喚指定獸欄中寵物).
SetPetStablePaperdoll(modelObject) - ?.
StablePet(index) - ?.
TogglePetAutocast(index) - 切換指定寵物自動施放狀態.
ToggleSpellAutocast(index, bookIndex) - 切換指定寵物技能自動施放狀態.(技能書).
GetSpellAutocast(index, bookIndex) - 獲取指定寵物技能自動施放狀態.
UnstablePet(index) - ?


Petition Functions


CanSignPetition() - ?.
ClosePetition() - ?.
GetNumPetitionNames() - ?.
GetPetitionInfo() - ?.
GetPetitionNameInfo(index) - ?.
OfferPetition() - ?.
RenamePetition(“name”) - ? - (NEW IN 1300)
SignPetition() - ?.


任務函數 (Quest Functions)同時參考閑聊函數 (Gossip Functions)


AbandonQuest - 放棄指定任務.
AcceptQuest - 接受指定任務.
AddQuestWatch(x) - 添加任務到監視列表.
CloseQuest - ?.
CollapseQuestHeader - Collapses a quest header.
CompleteQuest - 結束指定任務.
ConfirmAcceptQuest - 接受任務.
DeclineQuest - Declines the currently offered quest.
ExpandQuestHeader - 展開任務標題.
GetAbandonQuestName - 獲取放棄任務的名稱.
GetActiveLevel(index) - 獲取激活任務的等級 (僅當 QUEST_GREETING 事件后有效).
GetActiveTitle(index) - 獲取激活的任務標題 (僅當 QUEST_GREETING 事件后有效).
GetAvailableLevel(index) - 獲取有效任務的等級 (僅當 QUEST_GREETING 事件后有效).
GetAvailableTitle(index) - 獲取有效任務的標題 (僅當 QUEST_GREETING 事件后有效).
GetGreetingText()
GetNumActiveQuests - 獲取 NPC 對話激活任務數量 (僅當 QUEST_GREETING 事件后有效).
GetNumAvailableQuests - 獲取 NPC 對話中有效任務數量 (僅當 QUEST_GREETING 事件后有效).
GetNumQuestChoices - Returns the number of rewards for a completed quest.
GetNumQuestItems - Returns the number of items ness
ecary to complete a particular quest.
GetNumQuestLeaderBoards([questIndex]) - Returns the number of available quest objectives.
GetNumQuestLogChoices - Returns the number of options someone has when getting a quest item.
GetNumQuestLogEntries - 返回任務日志條目數.
GetNumQuestLogRewards - 返回指定任務的回報.
GetNumQuestRewards - ?.
GetNumQuestWatches() - 返回激活的監視任務數量.
GetObjectiveText() - 獲取當前任務對象文本.
GetProgressText()
GetQuestBackgroundMaterial - Returns the material string associated with the particular quest.
GetQuestGreenRange() - Return for how many levels below you quests and mobs remain “green” (例如: 經驗數)
GetQuestIndexForTimer - ?.
GetQuestIndexForWatch(watchIndx) - 返回指定監視的任務索引
GetQuestItemInfo - 返回任務物品基礎信息.
GetQuestItemLink - 返回任務獲取物品鏈接.
GetQuestLogChoiceInfo - Returns a bunch of data about a quest reward choice from the quest log.
GetQuestLogItemLink - ?.
GetQuestLogLeaderBoard(ldrIndex[, questIndex]) - Gets information about the objectives for a quest.
GetQuestLogPushable - 任務窗口中加載的任務可共享則返回 true.
GetQuestLogQuestText - Returns the description and objectives required for the specified quest.
GetQuestLogRequiredMoney - ?.
GetQuestLogRewardInfo - Returns a pile of reward item info.
GetQuestLogRewardMoney - Returns a number representing the amount of copper returned by a particular quest.
GetQuestLogRewardSpell - ?.
GetQuestLogSelection - Returns a number associated with the QuestLogSelection index.
GetQuestLogTimeLeft - ?.
GetQuestLogTitle - Returns the string which is associated with the specific QuestLog Title in the game.
GetQuestMoneyToGet - ?
GetQuestReward - Gets the quest reward specified.
GetQuestText - 獲取當前任務描述.
GetQuestTimers - Returns all of the quest timers currently in progress.
GetRewardMoney - 返回任務獲取金錢數.
GetRewardSpell - ?.
GetRewardText - ?.
GetTitleText - Retrieves the title of the quest while talking to the NPC about it.
IsCurrentQuestFailed - ?.
IsQuestCompletable - 任務可完成則返回 true.
IsQuestWatched(questIndex) - 確認指定任務是否被監視.
IsUnitOnQuest(questIndex, “unit”) - 確認指定對象是否在制定任務中.
QuestChooseRewardError - Throws an error when the quest choose reward method doesn’t work.
QuestLogPushQuest - 初始化當前任務日志中選中任務的共享.
RemoveQuestWatch(index) - 移除一個任務監視 (任務索引還是監視索引?).
SelectActiveQuest - 在 NPC 對話中選擇一個激活的任務 (僅當 QUEST_GREETING 事件后有效).
SelectAvailableQuest - 在 NPC 對話中選擇一個可用的任務 (僅當 QUEST_GREETING 事件后有效).
SelectQuestLogEntry - Sets the selected quest, required for most GetQuest functions.
SetAbandonQuest - 在 AbandonQuest 前調用.
界面 ToggleQuestLog - 打開/關閉任務日志.


團隊函數 (Raid Functions)See also: Group Functions


ConvertToRaid() - Converts party to raid.
DemoteAssistant(“name”) - Demotes player from assistant status. Requires raid leadership.
GetNumRaidMembers() - Returns the number of raid members.
GetRaidRosterInfo(index) - Returns information about the members of your raid .
GetRaidRosterSelection - ?.
GetRaidTargetIndex(“unit”) - Get the raid target index assigned to a unit.
IsRaidLeader() - Returns a value based on whether the player is a raid leader
IsRaidOfficer() - Returns a value based on whether the player is a raid officer (assistant (?)).
PromoteToAssistant(“name”) - Promotes player to assistant status. Requires raid leadership.
RequestRaidInfo() - Returns information about which instances you are saved to
SetRaidRosterSelection(index) - ?.
SetRaidSubgroup(index, subgroup) - Move a raid member from his current subgroup into a different (non-full) subgroup.
SwapRaidSubgroup(index1, index2) - Swaps raid members into different groups
SetRaidTarget(“unit”, index) - Set the raid target index for a unit.
UninviteFromRaid(index) - Boots someone from a raid
UnitInRaid(“unit”) - Returns 1 if unit is in your raid, nil if not.


Security and Protection Functionsissecure() - Determine if the current environment is secure.
issecurevariable([table] ,name) - Determine if the specified variable is secure.
securecall(function or functionName, …) - Call a function from a secure environment without risking secure status.
hooksecurefunc([table], functionName, hookfunc) - Creates a secure ‘post hook’ for the named function. The hookfunc is invoked after the original function, and receives the same parameters. Return values from hookfunc are discarded. This is the only safe way to hook functions that execute protected functionality.
InCombatLockdown() - Returns true if the in-combat AddOn restrictions are active.


設置函數 (Settings Functions)


GetBaseMip() - Get the world appearance Texture Detail.
GetCVar(“varname”) - Get the current (active) setting for a variable in config.wtf
GetCVarDefault(“varname”)
GetCurrentMultisampleFormat() - Get the current in-use multi-sample (antialias) format.
GetCurrentResolution() - Get the index of the current screen resolution.
GetDoodadAnim() - ???
GetFarclip() - Get the world appearance Terrain Distance.
GetGamma()
GetMultisampleFormats() - Get the available multi-sample (antialias) formats…
GetRefreshRates(x)
GetScreenResolutions()
GetTerrainMip() - Get the world appearance Terrai
n Texture.
GetTexLodBias()
GetVideoCaps()
GetWaterDetail()
GetWorldDetail() - Get the world appearance Environment Detail.
HideFriendNameplates() - Turn off display of nameplates above friendly units. - (添加于 1.12)
HideNameplates() - Turn off display of nameplates.
RegisterCVar(“varname”[, value]) - Registers a variable for use with the GetCVar and SetCVar functions.
ResetPerformanceValues()
ResetTutorials()
SetBaseMip(value) - Set the world appearance Texture Detail (0,1).
SetCVar(“cvar”, value[, “scriptCVar”]) - Set the value of a variable in config.wtf
SetDoodadAnim() - ?.
SetEuropeanNumbers(flag) - Sets the decimal separator to a comma instead of a dot
SetFarclip(value) - Set the world appearance Terrain Distance (177-777).
SetGamma(value)
SetLayoutMode()
SetMultisampleFormat(index) - Set the multi-sample (antialias) format to use.
SetScreenResolution(x)
SetTerrainMip(value) - Set the world appearance Terrain Texture (0,1).
SetTexLodBias()
SetWaterDetail()
SetWorldDetail(value) - Set the world appearance Environment Detail (0,1,2).
ShowCloak(flag) - Set whether player’s cloak is displayed.
ShowFriendNameplates() - Turn on display of nameplates above friendly units. - (添加于 1.12)
ShowHelm(flag) - Set whether player’s helm is displayed.
ShowNameplates() - Turn on display of nameplates.
ShowingCloak() - Return 1 if player’s cloak is displayed, 否則為 nil.
ShowingHelm() - Return 1 if player’s helm is displayed, 否則為 nil.
ToggleCollision()
ToggleCollisionDisplay()
TogglePerformanceDisplay()
TogglePerformanceValues()
TogglePlayerBounds()
TogglePortals()
ToggleTris()
TutorialsEnabled()


技能函數 (Skill Functions)


CollapseSkillHeader(index)
ExpandSkillHeader(index)
GetAdjustedSkillPoints()
GetNumSkillLines() - get the number of lines in the skill window, including headers
GetSelectedSkill()
GetSkillLineInfo(index) - get the information for a selected skill


施法函數 (Spell Functions)spellID is the index of a spell in a spellbook. The indices increase from top to bottom, then left to right, then between categories (e.g.: General -> Discipline). spellIDs will change as players learn new spells and professions.


CastShapeshiftForm(index)
CastSpell(spellID, “bookType”) - Cast the specified spell by ID. spellbookTab is “spell” or “pet”.
CastSpellByName(“name”[, onSelf]) - Cast the specified spell by display name.
GetCraftSpellFocus(index) - ?.
GetNumShapeshiftForms()
GetNumSpellTabs() - Returns the total number of tabs in the user’s spellbook.
GetQuestLogRewardSpell - ?.
GetRewardSpell - ?.
GetShapeshiftFormCoo
ldown(index)
GetShapeshiftFormInfo(index) - Retrieves information about an available ShapeshiftForm or Stance.
GetSpellCooldown(spellID, “bookType”) - Retrieves data on the cooldown of a specific spell within your spellbook…
GetSpellName(spellID, “bookType”) - Returns the spell name and spell rank for a spell in the player’s spellbook.
GetSpellTabInfo(spellbookTabNum) - Returns information about the specified spellbook tab.
GetSpellTexture(spellID, “bookType”) - ?.
GetTrackingTexture() - Return the texture of the current tracking buff, if one is active.
IsCurrentCast(id, “bookType”)
IsSpellPassive(spellID, “bookType”) - Returns whether the icon in your spellbook is a Passive ability.
IsTrainerServiceLearnSpell(index)
PickupSpell(spellID, “bookType”) - Loads an action button onto the cursor to be dropped into a quickbar slot.
PlayerHasSpells() - ?.
SpellCanTargetUnit(“unit”) - Returns true if the spell awaiting target selection can be cast on the specified unit.
SpellIsTargeting() - Returns true if a spell has been cast and is awaiting target selection.
SpellStopCasting() - Stops the current spellcast. (As of 1.10 PTR, this function must be used in direct response to a hardware input event, such as a mouse click or key press.)
SpellStopTargeting() - Cancels the spell awaiting target selection.
SpellTargetUnit(“unit”) - Casts the spell awaiting target selection on the specified unit.
界面 ToggleSpellBook(“bookType”) - Shows the spellbook. Can show your spells or your pet’s.
UpdateSpells() - ?.


系統函數 (System Functions)


ConsoleExec(“command”) - Execute a console command.
GetBuildInfo() - Returns information about current client build.
界面 geterrorhandler()
GetFramerate() - Returns the current framerate (full precision)
GetGameTime - Returns the time in-game.
GetLocale() - 返回客戶端的地區標識符,如 ‘enUS’ 。
GetCursorPosition() - Returns the cursor’s position on the screen.
GetNetStats() - Get bandwidth and latency network information.
GetRealmName() - returns the name of the server a user is logged in to
GetScreenHeight() - Returns the height of the window in pixels.
GetScreenWidth() - Returns the width of the window in pixels.
界面 GetText() - Used to localize some client text.
GetTime() - Returns the system uptime in seconds (millisecond precision).
InCinematic()
IsAltKeyDown() - Returns true if the alt key is currently depressed.
IsControlKeyDown() - Returns true if the control key is currently depressed.
IsLinuxClient() - Boolean - Returns true if WoW is being run on Linux
IsMacClient() - Checks client system
IsShiftKeyDown() - Returns true if the shift key is currently depressed.
IsWindowsClient() - Returns true if WoW is being run on Windows.
OpeningCinematic() - shows the opening movie for a
player’s race
PlayMusic() - Plays the specified mp3.
PlaySound() - Plays the specified built-in sound effect.
PlaySoundFile() - Plays the specified sound file.
ReloadUI() - Reloads the UI from source files
RepopMe() - The “Release Spirit” button. Sends you to the graveyard when dead. -Moof
RequestTimePlayed() - Request a summary of time played from the server.
RestartGx() - Restarts the graphical engine. Needed for things such as resolution changes to take effect.
RunScript(“script”) - Execute “script” as a block of LUA code.
Screenshot() - Takes a screenshot.
界面 SecondsToTime - Converts a number of seconds into a readable days / hours / etc. formatted string.
界面 seterrorhandler(function)
StopCinematic()
StopMusic() - Stops the currently playing mp3.
界面 UIParentLoadAddOn(“AddOnName”) - Loads or Reloads the specified AddOn, and pops up an error message if it fails to load for any reason.
界面 TakeScreenshot() - Takes a screenshot.
界面 _ERRORMESSAGE(value) - Displays the script error dialog with optional text
debuginfo() - Output win32 debug text. Freeware debug message viewer: DebugView (Has no effect on live server)
getglobal(“object”) - Given an object name will return the object itself.
界面 message(“text”) - Displays a message box with your text message and an “Okay” button.
setglobal(“object”, value) - set the global “object” to the given value.


天賦函數 (Talent Functions)


BuyTrainerService(index) - Used for buying new/upgrading professions, profession items and class skills.
CheckTalentMasterDist()
ConfirmTalentWipe()
GetNumTalentTabs() - return number of talent trees (usually 3)
GetNumTalents(tabIndex) - return number of talents in tree
GetTalentInfo(tabIndex,talentIndex) - return name, iconTexture, tier, column, rank, maxRank, isExceptional, meetsPrereq
GetTalentPrereqs(tabIndex,talentIndex) - return tier, column, isLearnable
GetTalentTabInfo(tabIndex) - return name, iconTexture, pointsSpent, background
IsTalentTrainer - ?.
LearnTalent(tabIndex,talentIndex)


目標函數 (Targetting Functions)


AssistByName(“playername”) - 協助指定名字玩家
AssistUnit(“unit”) - 協助指定的UnitId
AttackTarget() - - 攻擊選中的目標
ClearTarget() - 清除已經選中的目標
ClickTargetTradeButton(index)
TargetByName(“name”[, exactMatch]) - 選中特定的單位為當前目標
TargetLastEnemy() - 選中上一次選中的敵人為當前目標
TargetLastTarget() - 選中上一次選中的目標為當前目標
TargetNearestEnemy([reverseFlag]) - 選中最近的敵人為當前目標
TargetNearestFriend() - 選中最
近的盟友為當前目標
TargetNearestPartyMember() - 選中最近的小隊成員
TargetNearestRaidMember - 選中最近的團隊成員
TargetUnit(“unit”) -選中指定的UnitId為當前目標

補充

這些目標函數都是 受保護的函數(PROTECTED)僅能在安全代碼(secure code)中才能調用他們


Taxi Functions


CloseTaxiMap() - Closes the Flightpath Map.
DrawRouteLine(texture, canvas, startx, starty, endx, endy, width, relPoint) - Draws a line.
GetNumRoutes(slot) &nbsp - Gets the number of hops between current-slot and slot.
NumTaxiNodes() - Returns the number of nodes (flight paths) on an open taxi map.
SetTaxiMap(frame) - ?.
TakeTaxiNode(slot) - Takes the named taxi node.
TaxiNodeCost(slot) - Returns the cost in copper of a node.
TaxiNodeGetType(slot) - Returns the status of a node.
TaxiGetSrcX(slot, hop) - ?.
TaxiGetSrcY(slot, hop) - ?.
TaxiGetDestX(slot, hop) - ?.
TaxiGetDestY(slot, hop) - ?.
TaxiNodeSetCurrent(slot) - Renumbers slots based on new current slot.
TaxiNodeName(slot) - Returns the name of a node.
TaxiNodePosition(slot) - Returns position (x,y) of node on the map.
UnitOnTaxi(“unit”) - Returns 1 if unit is on a taxi.


系統界面函數 (Toggle Functions)


界面 ToggleBackpack() - Toggles your backpack open/closed.
界面 ToggleBag(bagID) - Opens or closes the specified bag.
界面 ToggleCharacter(index) - Toggles the character pane to the specified frame.
界面 ToggleCombatLog - Opens/closes the combat log.
界面 ToggleFramerate - Show/Hide the FPS.
界面 ToggleFriendsFrame([tabNumber]) - Opens/closes the friends pane (possibly on a specific tab).
界面 ToggleGameMenu - Opens/closes the game menu.
界面 ToggleHelpFrame - Opens the Help Request frame.
界面 ToggleKeyRing - Opens/closes the key ring.
界面 ToggleMinimap - Turns the minimap display on/off.
界面 ToggleQuestLog - Opens/closes the quest log.
界面 ToggleSpellBook(“bookType”) - Shows the spellbook. Can show your spells or your pet’s.
界面 ToggleTalentFrame - Opens the Talent frame.
界面 ToggleWorldMap - Turns the world map on/off.


商業技能函數 (TradeSkill Functions)


CloseTradeSkill() - 關閉商業技能窗口.
CollapseTradeSkillSubClass(index) - 折疊某可制造物品列表.
DoTradeSkill(index[, repeatTimes]) - 使用某號商業技能若干次.
ExpandTradeSkillSubClass(index) - 展開某可制造物品列表.
GetFirstTradeSkill() - 返
回第一商業技能.
GetNumTradeSkills() -返回商業技能的數量(含條目).
GetTradeSkillCooldown(index) - 取得某商業技能的cd時間.
GetTradeSkillIcon(index) - 取得某商業技能的圖標信息.
GetTradeSkillInfo(index) - 取得某商業技能的詳細信息.
GetTradeSkillInvSlotFilter(slotIndex) - Returns 1 if items corresponding to slotIndex are currently visible, otherwise nil.
GetTradeSkillInvSlots() - Returns a list of the available inventory slot types.
GetTradeSkillItemLink(index) - 取得某商業技能可以生產的物品連接.
GetTradeSkillItemStats(index) - Returns information about the item produced.
GetTradeSkillLine() - Returns information about the selected skill line.
GetTradeSkillNumMade(index) - 返回某商業技能可以制造的物品數量.
GetTradeSkillNumReagents(tradeSkillRecipeId) - 獲得某號商業技能需要的原料種類.
GetTradeSkillReagentInfo(tradeSkillRecipeId, reagentId) - 返回某號商業技能的某個原料的數據信息(含玩家擁有該材料的數據)
GetTradeSkillReagentItemLink(index, reagentId) - Returns the itemLink for one of the reagents needed to craft the given item
GetTradeSkillSelectionIndex() - Returns the Id of the currently selected trade skill, 0 if none selected.
GetTradeSkillSubClassFilter(filterIndex) - Returns 1 if items corresponding to filterIndex are currently visible, otherwise nil.
GetTradeSkillSubClasses() - Returns a list of the valid subclasses.
GetTradeSkillTools(index) - Returns information about the tools needed for a tradeskill.
GetTradeskillRepeatCount() - ?.
IsTradeskillTrainer() - Returns 1 if trainer is for a tradeskill.
IsTrainerServiceTradeSkill() - ?.
SelectTradeSkill(index) - Select a specific trade skill in the list.
SetTradeSkillInvSlotFilter(slotIndex, onOff[, exclusive] ) - Set the inventory slot type filter.
SetTradeSkillSubClassFilter(slotIndex, onOff[,exclusive] ) - Set the subclass filter.


交易函數 (Trading Functions)


AcceptTrade() - A pending trade will be accepted.
AddTradeMoney() - Adds the money dropped into the player’s trade frame.
BeginTrade() - Begins the trade with the target.
CancelTrade() - Declines the offer to trade with the other player.
CancelTradeAccept - Cancels the trade attempt which required an accept.
ClickTargetTradeButton(index)
ClickTradeButton(index) - Equivalent of a mouseclick on the trade window buttons [1-7]
CloseTrade() - Closes the trade.
GetPlayerTradeMoney - Returns the amount of money the player has in the trade window.
GetTargetTradeMoney - Returns the amount of money in the trade frame of the target player.
GetTradePlayerItemInfo(id) - Returns information about a trade item.
GetTradePlayerItemLink(id) - Returns an itemLink for the given item in your side of the trade
window (if open)
GetTradeTargetItemInfo(id) - Returns information about a trade item.
GetTradeTargetItemLink(id) - Returns an itemLink for the given item in the other player’s side of the trade window (if open)
InitiateTrade(UnitId) - Asks the specified unit to trade.
PickupPlayerMoney - Picks up an amount of money from the player.
PickupTradeMoney(amount)
ReplaceTradeEnchant() - Confirm the replacement of an enchantment via trade.
SetTradeMoney(amount)


訓練函數 (Training Functions)


BuyTrainerService(index) - Used for buying new/upgrading professions, profession items and class skills.
CloseTrainer() - Closes the trainer window.
CollapseTrainerSkillLine(index) - Collapses a header, hiding all spells below it.
ExpandTrainerSkillLine(index) - Expands a header, showing all spells below it.
GetNumTrainerServices() - Get the number of the trainer services.
GetTrainerGreetingText() - Get the trainer’s greeting text.
GetTrainerSelectionIndex() - Get the index of the selected trainer service.
GetTrainerServiceAbilityReq(trainerIndex,reqIndex) - Used for displaying the requirements to learn a new profession, profession skill or class skill.
GetTrainerServiceCost(index) - Returns the cost of a specific trainer service.
GetTrainerServiceDescription(index) - Returns the description of a specific trainer service.
GetTrainerServiceIcon(index) - Returns icon texture for a trainer service.
GetTrainerServiceInfo(index) - Returns information about a trainer service.
GetTrainerServiceLevelReq(index) - Get the required level to learn the skill.
GetTrainerServiceNumAbilityReq - Get the maximum number of requirements that GetTrainerServiceAbilityReq() has.
GetTrainerServiceSkillLine - ?.
GetTrainerServiceSkillReq(index) - Returns a String and Variable for the requirements of a specific trainer service.
GetTrainerServiceStepIncrease() - ?.
GetTrainerServiceStepReq - ?.
GetTrainerServiceTypeFilter(“filter”) - Returns the status of a skill filter in the trainer window.
GetTrainerSkillLineFilter() - ?;
GetTrainerSkillLines() - ?;
IsTalentTrainer - ?.
IsTradeskillTrainer() - Returns 1 if trainer is for a tradeskill.
IsTrainerServiceLearnSpell(index)
IsTrainerServiceSkillStep() - ?.
IsTrainerServiceTradeSkill() - ?.
OpenTrainer() - ?.
SelectTrainerService - ?.
SetTrainerServiceTypeFilter(“filter”,state) - Sets the status of a skill filter in the trainer window.
SetTrainerSkillLineFilter() - ?.


Uncategorized FunctionsAdd functions whose group is not clear to this section, please remember to follow the Example Function template!


PartialPlayTime()
NoPlayTime()
GetBilli
ngTimeRested()
GetMinigameState()
GetMinigameType()


對象函數 (Unit Functions)These are functions which act on one or more units. Units are identified by UnitIds. 這些是某個或某些單位(對象)行為的函數.Unit跟UnitId是不同的.


AssistUnit(“unit”) - Instructs your character to assist the specified unit. --協助指定單位
CheckInteractDistance(“unit”,distIndex) --測試與指定單位的距離
DropItemOnUnit(“unit”) - Drops an item from the cursor onto a unit. --對指定單位使用選定物品
FollowUnit(“unit”) - Follow an ally with the specified UnitID --跟隨指定單位
InviteToParty(“unit”) - Invite a unit to a party by its unit id (likely “target”) --邀請指定單位加入小隊
IsUnitOnQuest(questIndex, “unit”) - Determine if the specified unit is on the given quest. --判斷指定單位是否有此任務
SpellCanTargetUnit(“unit”) - Returns true if the spell awaiting target selection can be cast on the specified unit. --判斷是否能對指定單位使用技能
SpellTargetUnit(“unit”) - Casts the spell awaiting target selection on the specified unit. --對指定單位使用選定技能
StartDuelUnit(“unit”) - Challenge a unit to a duel. --對指定單位發出決斗邀請
TargetUnit(“unit”) - Selects the specified unit as the current target. --選擇指定單位作為當前目標
UnitAffectingCombat(“unit”) - Determine if the unit is in combat or has aggro. (returns nil if “false” and 1 if “true”) --判斷指定單位是否在戰斗狀態
UnitArmor(“unit”) - Returns the armor statistics relevant to the specified unit. --返回指定單位的護甲值
UnitAttackBothHands(“unit”) - Returns information about the unit’s melee attacks. --返回指定單位的近戰攻擊技能等級
UnitAttackPower(“unit”) - Returns the unit’s melee attack power and modifiers. --返回指定單位的近戰攻擊強度
UnitAttackSpeed(“unit”) - Returns the unit’s melee attack speed for each hand. --返回指定單位主副手的近戰攻擊速度
UnitBuff(“unit”, index[, showCastable]) - Retrieves info about a buff of a certain unit. --返回指定單位身上指定編號的Buff信息( [, showCastable]可以不填,填0或者1.為1那么只返回玩家可以釋放的Buff的信息)
UnitCanAssist(“unit”, “otherUnit”) - Returns true if the first unit can assist the second, false otherwise. --指定兩個單位,判斷第一單位能否協助第二單位
UnitCanAttack(“unit”, “otherUnit”) - Returns true if the first unit can attack the second, false otherwise. --指定兩個單位,判斷第一單位能否攻擊第二單位
UnitCanCooperate(“unit”, “otherUnit”) - Returns true if the first unit can cooperate with the second, false otherwise. --指定兩個單位,判斷兩個單位能否組隊
UnitCharacterPoints(“unit”) - Returns the numbe
r of unspent talent points for the specified unit – usually 0. --返回指定單位的剩余天賦點數
UnitClass(“unit”) - Returns the class name of the specified unit (e.g., “Warrior” or “Shaman”). --返回指定單位的職業(例如:圣騎士,薩滿祭祀)
UnitClassification(“unit”) - Returns the classification of the specified unit (e.g., “elite” or “worldboss”). --返回指定單位的厲害程度(例如:精英,世界BOSS)
UnitCreatureFamily(“unit”) - Returns the type of creature of the specified unit (e.g., “Crab”). --返回指定單位的物種(例如:螃蟹)
UnitCreatureType(“unit”) - Returns the classification type of creature of the specified unit (e.g., “Beast”). --返回指定單位的物種分類(例如:野獸)
UnitDamage(“unit”) - Returns the damage statistics relevant to the specified unit. --返回指定單位的傷害值
UnitDebuff(“unit”, index[, showDispellable]) - Retrieves info about a debuff of a certain unit. --返回指定單位身上指定編號的DeBuff信息( [, showDispellable]可以不填,填0或者1.為1則只返回玩家可以清除的DeBuff的信息)
UnitDefense(“unit”) - Returns the base defense skill of the specified unit. --返回指定單位的基礎防御技能等級
UnitExists(“unit”) - Returns true if the specified unit exists, false otherwise. --判斷指定單位是否在游戲中
UnitFactionGroup(“unit”) - Returns the faction group id and name of the specified unit. (eg. “Alliance”) - string returned is localization-independent (used in filepath) --返回指定單位的陣營(例如:聯盟)
UnitHealth(“unit”) - Returns the current health, in points, of the specified unit. --返回指定單位的當前生命值
UnitHealthMax(“unit”) - Returns the maximum health, in points, of the specified unit. --返回指定單位的最大生命值
UnitInParty(“unit”) - Returns true if the unit is a member of your party. --判斷指定單位是否在隊伍中
UnitInRaid(“unit”) - Returns 1 if unit is in your raid, nil if not. --判斷指定單位是否在團隊中
UnitIsCharmed(“unit”) - Returns true if the specified unit is charmed, false otherwise. --判斷指定單位是否同一個陣營
UnitIsCivilian(“unit”) - Returns true if the unit is a civilian NPC. --判斷指定單位是否平民
UnitIsConnected(“unit”) - Returns 1 if the specified unit is connected or npc, nil if offline or not a valid unit. --判斷指定單位是否在線
UnitIsCorpse(“unit”) - Returns true if the specified unit is a corpse, false otherwise. --判斷指定單位是否尸體
UnitIsDead(“unit”) - Returns true if the specified unit is dead, nil if not. --判斷指定單位是否死亡
UnitIsDeadOrGhost(“unit”) - Returns true if the specified unit is dead or a ghost, nil if not. --判斷指定單位是否死亡或靈魂狀態
UnitIsEnemy(“unit”, “otherUnit”) - Returns true if the specified units are enemies, false otherwise. --指定兩個單位,判斷兩個單位是否敵對
UnitIsFriend(“unit”, “otherUnit”) - Returns
true if the specified units are friends (PC of same faction or friendly NPC), false otherwise. --指定兩個單位,判斷兩個單位是否友好
UnitIsGhost(“unit”) - Returns true if the specified unit is a ghost, false otherwise. --判斷指定單位是否靈魂狀態
UnitIsPVP(“unit”) - Returns true if the specified unit is flagged for PVP, false otherwise. --判斷指定單位是否PVP狀態
UnitIsPVPFreeForAll(“unit”) - Returns true if the specified unit is flagged for free-for-all PVP, false otherwise. --判斷指定單位是否自由PVP狀態
UnitIsPartyLeader(“unit”) - Returns true if the unit is the leader of its party. --判斷指定單位是否隊長
UnitIsPlayer(“unit”) - Returns true if the specified unit is a player character, false otherwise. --判斷指定單位是否玩家
UnitIsPlusMob(“unit”) - Returns true if the specified unit is a mob, more powerful than its nominal level, false otherwise (e.g., “elite” mobs) --判斷指定單位是否比普通怪厲害(例如:精英)
UnitIsTapped(“unit”) - Returns true if the specified unit is tapped, false otherwise. --判斷指定單位是否已被攻擊
UnitIsTappedByPlayer(“unit”) - Returns true if the specified unit is tapped by the player himself, otherwise false. --判斷指定單位是否已被其他玩家攻擊
UnitIsTrivial(“unit”) - Returns true if the specified unit is trivial (Trivial means the unit is “grey” to the player. false otherwise. --判斷指定單位是否無價值(灰色物品)
UnitIsUnit(“unit”, “otherUnit”) - Determine if two units are the same unit. --指定兩個單位,判斷兩個單位是否相同單位
UnitIsVisible(“unit”) - 1 if visible, nil if not --判斷指定單位是否能被看見(潛行,隱形)
UnitLevel(“unit”) - Returns the level of a unit. --返回指定單位等級
UnitMana(“unit”) - Returns the current mana (or energy,rage,etc), in points, of the specified unit. --返回指定單位能量值(包括魔法值,怒氣值,能量值)
UnitManaMax(“unit”) - Returns the maximum mana (or energy,rage,etc), in points, of the specified unit. --返回指定單位最大能量值
UnitName(“unit”) - Returns the name (and realm name) of a unit. --返回指定單位名字
UnitOnTaxi(“unit”) - Returns 1 if unit is on a taxi. --判斷指定單位是否騎乘狀態
UnitPlayerControlled(“unit”) - Returns true if the specified unit is controlled by a player, false otherwise. --判斷指定單位是否被玩家控制中
UnitPlayerOrPetInParty(“unit”) - Returns 1 if the specified unit/pet is a member of the player’s party, nil if not (returns 1 for “player” and “pet”) - Added in 1.12 --判斷指定單位是否同一隊伍中的玩家或玩家寵物
UnitPlayerOrPetInRaid(“unit”) - Returns 1 if the specified unit/pet is a member of the player’s raid, nil if not (returns 1 for “player” and “pet”) - Added in 1.12 --判斷指定單位是否同一團隊中的玩家或玩家寵物
UnitPVPName(“unit”) - Returns unit’s name with PvP rank prefix (e.g., “Corpor
al Allianceguy”). --返回指定單位軍銜(例如:聯盟元帥)
UnitPVPRank(“unit”) - Get PvP rank information for requested unit. --返回指定單位軍銜等級
UnitPowerType(“unit”) - Returns a number corresponding to the power type (e.g., mana, rage or energy) of the specified unit. --返回指定單位的能量類別(例如:魔法,怒氣,能量)
UnitRace(“unit”) - Returns the race name of the specified unit (e.g., “Human” or “Troll”). --返回指定單位的種族(例如:人類,巨魔)
UnitRangedAttack(“unit”) - Returns the ranged attack number of the unit. --返回指定單位的遠程攻擊技能等級
UnitRangedAttackPower(“unit”) - Returns the ranged attack power of the unit. --返回指定單位的遠程攻擊強度
UnitRangedDamage(“unit”) - Returns the ranged attack speed and damage of the unit. --返回指定單位的遠程傷害值
UnitReaction(“unit”, “otherUnit”) - Returns a number corresponding to the reaction (aggressive, neutral or friendly) of the first unit towards the second unit. --指定兩個單位,判斷兩個單位的關系(例如:中立,友好,敵對)
UnitResistance(“unit”, “resistanceIndex”) - Returns the resistance statistics relevant to the specified unit and resistance type. --返回指定單位指定魔法抗性的抗性值
UnitSex(“unit”) - Returns a code indicating the gender of the specified unit, if known. (1=unknown, 2=male, 3=female) ← changed in 1.11! --返回指定單位的性別
UnitStat(“unit”, statIndex) - Returns the statistics relevant to the specified unit and basic attribute (e.g., strength or intellect). --返回指定單位指定基礎屬性的屬性值
UnitXP(“unit”) - Returns the number of experience points the specified unit has in their current level. (only works on your player) --返回指定單位的當前經驗值(只能作用于你自己)
UnitXPMax(“unit”) - Returns the number of experience points the specified unit needs to reach their next level. (only works on your player) --返回指定單位到下個等級需要的經驗值(只能作用于你自己)
SetPortraitTexture(texture,“unit”) - Paint a Texture object with the specified unit’s portrait. --為指定單位設置一個紋理
SetPortraitToTexture(“texture”, icon) - Paint a Texture object with the given Texture ? --為指定紋理設置一個紋理?


查詢函數 (Who Functions)


GetNumWhoResults() - Return the number of entries resulting from your most recent /who query.
GetWhoInfo(index)
SendWho(“filter”) - Send a who request to the server.
SetWhoToUI(toUIFlag) - Indicate that who request results should be delivered as WHO_LIST_UPDATE instead of to chat.
SortWho(sortType) - Sorts an existing /who list; displays the Who List frame if not visible.

總結

以上是生活随笔為你收集整理的魔兽世界API魔兽世界全局函数的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: av私库在线观看 | 刘亦菲毛片一区二区三区 | 日本免费黄色网址 | 国产片淫乱18一级毛片动态图 | 30一40一50女人毛片 | 精品视频免费在线观看 | 男人的天堂黄色 | 国产乱强伦一区二区三区 | 日韩精品激情 | 欧美激情一区二区三区免费观看 | 国产精品99久久久久久久 | 欧美日韩免费做爰视频 | 蜜臀麻豆 | 欧美人与禽猛交乱配 | 啪啪小视频网站 | 亚洲一区视频网站 | 欧美色人阁| 国产夫妻在线视频 | 樱花电影最新免费观看国语版 | 国产亚洲精品一区二区三区 | 91色拍| 一二三四国产精品 | 色片网站在线观看 | 国产69视频在线观看 | 成人在线a | 日本少妇毛茸茸高潮 | 91久久精品国产 | 亚洲AV无码一区二区三区蜜桃 | 在线观看www. | 四虎影院一区二区 | 日韩在线第三页 | 日韩少妇诱惑 | 一级空姐毛片 | 偷拍一区二区 | 精品九九九九 | 免费一级欧美 | 草草影院网址 | 无限资源日本好片 | 色老板av | 丰满人妻一区二区 | 福利视频三区 | 亚洲淫| 亚洲色精品三区二区一区 | 狠狠操夜夜 | 成年人视频在线 | 手机在线看片1024 | 丝袜美腿亚洲一区二区图片 | 亚洲一二三| 国产农村妇女毛片精品 | 少妇无套高潮一二三区 | 在线日韩一区 | 日本黄大片在线观看 | 色妞视频| 中国女人一级一次看片 | 超碰97人人干| 亚洲中文一区二区 | 免费毛片一区二区三区 | 精品国产精品国产偷麻豆 | 播金莲一级淫片aaaaaaa | 夜夜爽夜夜 | 久久亚洲天堂网 | 91精品国产91 | 亚洲无码一区二区三区 | 性感美女av在线 | 中字av在线 | 久久97精品久久久久久久不卡 | 天天综合在线视频 | 2017狠狠干 | 另类视频在线观看+1080p | 丁香花电影免费播放电影 | 超碰免费在线播放 | 欧美久草 | 女生脱裤子让男生捅 | 青青草免费在线视频 | 视频三区在线 | 日本美女久久久 | 天天射综合网站 | 风流少妇 | 国产91在线观看丝袜 | 四虎在线观看视频 | 国语一区 | 国产馆在线观看 | 色五婷婷 | 午夜老湿机| 亚洲国产剧情 | 国产精品一区二区在线 | 成人国产视频在线观看 | 91欧美一区二区三区 | 91av在线免费视频 | 四虎一级片 | 狠狠干免费视频 | 一级丰满大乳hd高清 | 中文一区在线观看 | 五月激情开心网 | 制服丝袜在线一区 | 992在线观看| 久久久久国产一区二区三区 | 中文字幕23| 亚洲特黄毛片 |