魔獸世界API魔獸世界全局函數_第1頁
魔獸世界API魔獸世界全局函數_第2頁
魔獸世界API魔獸世界全局函數_第3頁
魔獸世界API魔獸世界全局函數_第4頁
魔獸世界API魔獸世界全局函數_第5頁
已閱讀5頁,還剩99頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、魔獸世界api_魔獸世界全局函數 魔獸世界api魔獸世界全局函數帳號游戲時間范圍函數 (account playtime limit functions)此類api函數是專門為防沉迷系統而設計的,能計算出當前玩家游戲時間等內容,當前只在亞洲地區有效。 getbillingtimerested() - 返回當前帳戶已登陸時間。 partialplaytime() - 如果用戶狀態為“疲勞(tired)”則返回1:降低經驗及掉落。 noplaytime() - 如果用戶狀態為“不健康的(unhealthy)”則返回1:無經驗及掉落。 -動作函數 (action functions)這些函數對動作按

2、鈕進行操作(通常玩家的動作有可能通過下面列表中的函數執行)。保護 界面 actionbuttondown(id) - 按下指定動作按鈕。保護 界面 actionbuttonup(id) - 釋放指定動作按鈕。actionhasrange(slot) - 檢測指定動作按鈕是否受距離限制 (是則返回 1,否則返回 nil) 。界面 bonusactionbuttondown - 觸發指定額外動作按鈕 (寵物或仆從)。界面 bonusactionbuttonup - 釋放指定額外動作按鈕 (寵物或仆從)。保護 cameraorselectormovestart() - 在 3d 界面開始 "

3、;左鍵單擊" 動作。 (1.10 - 保護)保護 cameraorselectormovestop(stickyflag) - 在 3d 界面結束 "左鍵單擊" 動作。 (1.10 - 保護)changeactionbarpage() - 更改系統動作按鈕頁面為系統變量 current_actionbar_page 指定頁。getactionbartoggles() - 獲取系統動作條顯示狀況。getactioncooldown(slot) - 獲取指定動作按鈕冷卻狀況。getactioncount(slot) - 獲取動作按鈕所需物品剩余量 (繃帶/毒藥/等),

4、無物品或不可用時返回 0。getactiontext(slot) - 獲取動作按鈕文本標簽 (宏, 等),不存在則返回 nil。getactiontexture(slot) - 獲取指定動作按鈕材質路徑。getbonusbaroffset() - 檢測何種額外動作條已顯示。hasaction(slot) - 假如指定動作條按鈕有技能執行,則返回 1,其他情況返回 nil。isactioninrange(slot) - 測試技能是否在施展距離內 (1=是, 0=否, nil=不可用)。isattackaction(slot) - 技能為“攻擊”動作則返回 1 (戰斗中閃光), 其他情況返回 ni

5、l。isautorepeataction(slot) - 技能可自動重復時返回 1,其他情況返回 nil。iscurrentaction(slot) - 技能動作正在執行時返回 1,其他情況返回 nil。isusableaction(slot) - 技能可立即執行時返回 1,其他情況返回 nil。isconsumableaction(slot) - 技能有施展次數時返回 1 (例如:施法物品),其他情況返回 nil。isequippedaction(slot) - 必須裝備才能施展的技能返回 1 (例如:鏈接到必須裝備的物品),其他情況返回 nil。pethasactionbar() - 檢測

6、玩家寵物是否有動作條。pickupaction(slot) - 將指定動作按鈕的技能提取并放置于光標上。pickuppetaction(slot) - 將指定的寵物動作按鈕的 技能提取并放置于光標上。placeaction(slot) - 將鼠標上的技能放置于指定動作按鈕。setactionbartoggles(show1,show2,show3,show4, alwaysshow) - 設置指定系統動作條顯示。 - 1.12 版本添加 alwaysshow。保護 turnoractionstart() - 在 3d 界面開始 "右鍵單擊" 動作。(1.10 - 保護)保護

7、 turnoractionstop() - 在 3d 界面結束 "右鍵單擊" 動作。 (1.10 - 保護)保護 useaction(slot, checkcursor, onself) - 執行綁定到指定 id 的動作按鈕技能,可定向玩家 (與目標無關)。-行為函數 (activity functions)這個部分的函數會引發玩家角色的動作(未在別處加以保護, 非簡單確認步驟) acceptduel() - 玩家同意接受決斗挑戰.保護 attacktarget() - 攻擊選定目標.cancelduel() - 拒絕決斗挑戰.cancellogout()cancelmee

8、tingstonerequest() - 將角色從集合石隊列中移除cleartutorials()confirmsummon()保護 descendstop() -增加于2.1dismount() -增加于2.0.3flagtutorial("tutotial")保護 forcelogout()forcequit()getsummonconfirmareaname()getsummonconfirmsummoner()getsummonconfirmtimeleft()logout - 注銷當前玩家角色.quit - 退出應用程序(游戲), 而非 lua 腳本.random

9、roll(low, high) - 隨機產生在兩個(正整數)數值閉區間的整數.保護 sitstandordescendstart() - 切換玩家坐下/站立姿勢.保護 startduel("name") - 向玩家發出決斗邀請(根據名字)togglepvp() - 切換 pvp 狀態togglesheath() - 拔出/收起武器.usesoulstone() - 使用激活的靈魂石復活自己.-插件函數 (addon functions)disableaddon(index or "addonname") - 禁止某插件下次載入.disablealladd

10、ons() - 禁止所有插件下次被載入.enableaddon(index or "addonname") - 在下次進程開啟指定插件.enablealladdons() - 在下次進程開啟全部插件.getaddondependencies(index or "addonname") - 取得插件依賴列表.getaddoninfo(index or "addonname") - 取得插件相關信息.getaddonmetadata(index or "name", "variable") - 從插

11、件的toc文件中獲取標簽內容(值)。getnumaddons() - 取得用戶插件數量.isaddonloaded(index or "addonname") - 指定插件已讀取則返回 true.isaddonloadondemand(index or "addonname") - 測試插件是否可動態載入.loadaddon(index or "addonname") - 發出動態載入插件讀取請求.resetdisabledaddons() -競技場函數(arena functions)arenateaminvitebyname(te

12、amindex, 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. arenateamuninvite

13、byname(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() - g

14、ets 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,

15、 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

16、 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

17、second argument if its a registered match. isarenateamcaptain(teamindex) - returns a value based on whether the player is the arena team captain. isbattlefieldarena() - returns true if the battlemaster youre talking to can queue you for arenas -拍賣函數 (auction functions)calculateauctiondeposit(runtime

18、) - 返回當前指定持續時間拍賣物品的堆放信息 (單位:分鐘).cansendauctionquery() - 拍賣行搜索按鈕可用時返回 1, 否則為 nil.cancelauction(index) - 取消指定拍賣 (在物主列表).clickauctionsellitembutton() - 將當前 揀起 的物品放到 拍賣 欄.closeauctionhouse() - 關閉 (打開的) 拍賣窗口.getauctionhousedepositrate() - 返回當前開啟的拍賣窗口內物品 含未顯示 存放比例 (百分率) (可能根據 calculateauctiondeposit).geta

19、uctioninvtypes(classindex, subclassindex) - 返回物品的子類.getauctionitemclasses() - 返回拍賣物品的主分類.getauctioniteminfo("type", index) - 返回指定拍賣物品細節.getauctionitemlink("type", index) - 返回指定拍賣物品的 itemlink.getauctionitemsubclasses(classindex) - 返回拍賣物品種類次序的子類.getauctionitemtimeleft("type&qu

20、ot;, index) - 返回指定拍賣物品剩余時間狀態.getauctionselliteminfo() - 返回當前拍賣物品相關信息 (未選擇為 nil).getbidderauctionitems(page) - (取得競標人信息).getnumauctionitems("type") - 返回指定拍賣物品列表大小.getownerauctionitems(page) - (取得拍賣人信息).getselectedauctionitem("type") - 返回選擇的拍賣物品索引 (1- 50), 未選擇返回 0.isauctionsortreve

21、rsed("type", "sort") - 指定拍賣物品的排列類型逆序排列時返回 1, 否則為 nil.placeauctionbid("type", index, bid) - 對選擇拍賣物品投標.queryauctionitems("name", minlevel, maxlevel, invtypeindex, classindex, subclassindex, page, isusable, qualityindex) - (請求檢索符合條件的物品).setselectedauctionitem(&qu

22、ot;type", index) - ?.sortauctionitems("type", "sort") - 根據指定分欄對指定拍賣列表進行排序.startauction(minbid, buyoutprice, runtime) - 開始拍賣 創建拍賣 面板內物品.界面 auctionframeauctions.duration - 設置拍賣持續總計時間.-銀行函數 (bank functions)bankbuttonidtoinvslotid(buttonid) - 以背包位置 id 方式返回銀行包裹位置 id.closebankfram

23、e() - 關閉 (打開的) 銀行窗口. -ramblegetbankslotcost(numslots) - 返回購買下個銀行包裹位置的價格. -ramblegetnumbankslots() - 返回已購買銀行包裹位置數量, 如果已購完返回特定標志.purchaseslot() - 購買一個空余的銀行包裹位置.-戰場函數 (battlefield functions)acceptareaspiritheal() - 接受靈魂治療.cancelareaspiritheal() - 取消靈魂治療.canjoinbattlefieldasgroup() - 玩家不能加入戰場團隊則返回 nil.a

24、cceptbattlefieldport(index, acceptflag) - 接受或拒絕一個傳送至戰場的請求.checkspirithealerdist() - 死亡時如果你在精神醫者復活的范圍內,返回true.closebattlefield() - 關閉候列戰場窗口.gethonorcurrency() - 獲取當前榮譽值getareaspirithealertime() - 返回距精神醫者下一次釋放復活的時間.getbattlefieldestimatedwaittime(index) - 返回戰場隊列估算的排隊時間.getbattlefieldflagposition(index

25、) - 獲得戰場旗幟的位置.getbattlefieldinfo(index) - 返回你最近打開隊列窗口的戰場的詳細信息.getbattlefieldinstanceexpiration() - 獲取戰場即將關閉的時間.getbattlefieldinstanceinfo(index) - 獲得戰場的副本id.getbattlefieldinstanceruntime() - 單位:毫秒, 返回本次戰場已運行的時間. (似乎是從服務器上獲取數據,因為它和time()函數并不同步)getbattlefieldmapiconscale() - 調整在戰場小地圖上標記圖標的比例.getbattle

26、fieldportexpiration(index) - 獲得對應戰場傳送的剩余時間.getbattlefieldposition(index) - 獲取戰場中與你不在同一小隊或團隊的玩家姓名與位置 .getbattlefieldscore(index) - 獲得一個玩家的戰場分數.getbattlefieldstatdata(playerindex, slotindex) - 獲取戰場中某一個玩家某一分欄的詳細信息 . (例如戰歌峽谷的奪旗數)getbattlefieldstatinfo(index) - 從戰場記分板的指定分欄獲取信息 .getbattlefieldstatus(index

27、) - 返回玩家所在或正 在隊列中的戰場的狀態 .getbattlefieldtimewaited(index) - 獲取玩家在戰場隊列中的時間 .getbattlefieldwinner() - 獲得戰場中獲勝者 .getnumbattlefieldflagpositions() - get the number of flag positions available from getbattlefieldflagposition().getnumbattlefieldpositions() - get the number of positions available from getba

28、ttlefieldposition().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 y

29、ou 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") - 獲取當前戰場

30、中的一玩家是否afkrequestbattlefieldpositions() - 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 ba

31、ttlefield 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)移除 getact

32、ionselfcastkey() - 移除 getautoloottogglekey() - getbinding(index) - 獲取索引的動作和快捷鍵. getbindingaction("key" ,checkoverride) - 獲取綁定該鍵的動作. getbindingkey("command") - 獲取該動作綁定的鍵. 界面 getbindingtext("key", "prefix", returnabbr) - 獲取鍵值字串. getcurrentbindingset() - 查詢當前快捷鍵設

33、置是否為指定帳號/角色.getnumbindings() - 獲取總快捷鍵數與標題. loadbindings(which) - 讀取默認/帳號/角色的特定快捷鍵配置. runbinding("command", "up") - 運行名為 "command" 的快捷鍵移除 setactionselfcastkey("shift" or "ctrl" or "alt") - 移除 setautoloottogglekey("shift" or "c

34、trl" or "alt") - savebindings(which) - 保存帳號或角色鍵配置. setbinding("key", "command") - 設置或取消鍵綁定. (2.0 - 不能在戰斗中使用.) setbindingspell("key", "spell name") - 設置綁定鍵到技能, 與 /cast 使用技能一樣. setbindingclick("key", "buttonname" ,"mousebu

35、tton") - 設置綁定鍵到按鈕對象. 綁定鼠標時, 按鍵按下時發生鼠標點擊事件, 釋放時發生鼠標 up. setbindingitem("key", "itemname") - setbindingmacro("key", "macroname"|macroid) - setconsolekey("key" ) - 設置控制臺鍵 (通常 ""). setoverridebinding(owner, ispriority, "key" ,&qu

36、ot;command") - 設置/清除重復綁定鍵. setoverridebindingspell(owner, ispriority, "key", "spellname") - setoverridebindingclick(owner, ispriority, "key", "buttoname","mousebutton") - setoverridebindingitem(owner, ispriority, "key", "itemname&

37、quot;) - setoverridebindingmacro(owner, ispriority, "key", "macroname"|macroid) - clearoverridebindings(owner) - 重置全部重復值. setmouselookoverridebinding("key" ,"command") - ismodifierkeydown() - 等價于 (isshiftkeydown() 或 iscontrolkeydown() 或 isaltkeydown(). ismodif

38、iedclick("action") - 綁定該動作按鈕按下返回 1, 否則 nil. ismousebuttondown(button or "button") - -增減益函數 (buff/debuff functions)請勿混淆 buffid 和 buffindex, 這是不同概念! cancelplayerbuff(buffindex) - 從玩家身上移除特定增益.canceltrackingbuff() - 取消當前追蹤增益 (追蹤礦物等.)getplayerbuff(buffid, bufffilter) - 獲取特定效果信息 (有益, 有

39、害或被動)getplayerbuffapplications(buffindex) - 獲取特定增益/減益的疊加數.getplayerbuffdispeltype(buffindex) - 獲取玩家身上指定減益類型 ("魔法", "詛咒", "疾病", 或 "毒藥")getplayerbufftexture(buffindex) - 獲取特定增益圖標標識getplayerbufftimeleft(buffindex) - 獲取增益持續剩余時間getweaponenchantinfo() - 返回主手和副手武器附魔信

40、息.unitbuff("unit", index, showcastable) - 獲取特定單位的增益信息.unitdebuff("unit", index, showdispellable) - 獲取特定單位的減益信息.-視角函數 (camera functions)下列 api 僅對鼠標觀察模式提供的按下右鍵和控制移動方向功能. 不支持按下鼠標左鍵切換視角. 保護 cameraorselectormovestart() - begin "left click" in the 3d world. (1.10 - 保護)保護 came

41、raorselectormovestop(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 軸旋轉指定角度.ismouselookin

42、g() - 鼠標觀察激活時返回 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 ro

43、tating 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 t

44、o 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()

45、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(ind

46、ex) - resets the specified (1-5) predefined camera position to its 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

47、position.-頻道函數 (channel functions)這些是針對聊天頻道的函數. 同時參看聊天窗口函數 (chat window functions) 和通信函數 (communication functions) 部分. addchatwindowchannel(chatframeindex, "channel") - 在指定窗口打開頻道.channelban("channel", "name") - 在指定頻道屏蔽一名玩家.channelinvite("channel", "name&q

48、uot;) - 邀請指定玩家到頻道中.channelkick("channel", "name") - 從頻道中剔除指定玩家.channelmoderate("channel") - 開啟頻道管理指令, 如 channelkick/ban 等.channelmoderator("channel", "name") - 設置指定玩家為頻道管理員.channelmute("channel", "name") - 禁止指定玩家在頻道中發言.channeltogg

49、leannouncements("channel") - 切換頻道顯示/隱藏叫喊.channelunban("channel", "name") - 解除屏蔽玩家.channelunmoderator("channel", "name") - 解除頻道管理員.channelunmute("channel", "name") - 允許指定玩家發言.displaychannelowner("channel") - 在默認聊天中顯示特殊頻道主

50、人.enumerateserverchannels() - 獲取全部有效的服務頻道 (區域依賴).getchannellist() - 獲取已加入的頻道列表.getchannelname("channel" or index) - 獲取指定頻道名稱.getchatwindowchannels(index) - 獲取聊天窗口的頻道名稱列表.joinchannelbyname("channel", "password", frameid) - 加入指定頻道 (可選密碼和框架標識) (更新于 1.9)leavechannelbyname(&

51、quot;channel") - 離開指定頻道.listchannelbyname(channelmatch) - 在聊天窗口顯示指定頻道的成員.listchannels() - 在聊天窗口中列出全部頻道.removechatwindowchannel(chatframeindex, "channel") - 創建隱藏頻道 (不可見).sendchatmessage("text", "type", language, targetplayer, .) - 發送聊天信息.setchannelowner("channe

52、l", "name") - 設置頻道主人.setc hannelpassword("channel", "password") - 更改當前頻道密碼.-角色函數 (character functions)abandonskill(index) - 玩家忘卻技能.acceptresurrect() - 接受他人復活.acceptskillups()acceptxploss() - 接受靈魂使者復活時的損失.addskillup(index)buyskilltier(index)cancelskillups()checkbinderdist() - 檢測玩家是否在爐石綁定指令距離.confirmbinder() - 確認爐石綁定請求.declineresurrect() - 拒絕他人復活.getbindlocation() - 獲取爐石綁定區域名稱.getblockchance() -

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論