< 魔兽世界百科 >
您尚未注册/登录
搜索帮助
搜索提示已开启 输入搜索关键词时将自动出现其他玩家的同类搜索词 开启搜索提示 搜索关键词时仍按普通搜索提交框方式输入 什么是智能搜索提示
职业技能 (1199)专业技能 (423)
武器 (2209)防具 (15620)药品 (0)任务道具 (1677)材料 (0)其它 (10399)
商人NPC (981)任务NPC (952)怪物 (7220)其他NPC (10639)
1-10级11-20级21-30级31-40级41-50级50级以上
全部地图 (10091)
WOW动态 (267)WOW学院 (778)职业研究 (27080)副本心得 (1319)天赋交流 (559)任务攻略 (1869)专业技能心得 (740)战场PVP (803)宏与插件交流 (222)
游戏百科 > 魔兽世界 > WOW手册 > 宏与插件交流 > 宏函数大全 > 百科资料
资源苗 基于游戏百科共建计划 - 了解 | 加入
在魔兽世界中已有97,639项百科条目,如果你有任何可以分享的请
魔兽世界API函数汇总-天赋,目标锁定,切换等
好东西!投票支持(1)
匿名投票,确认投票给dailytoy
资料版本 1.0,更新时间:2005年8月28日 来源地址

(编者注:魔兽世界的API接口函数库相当庞大,本类的整理将是一个长期的编辑过程,逐步汉化,同时欢迎对魔兽世界宏与UI有兴趣的各路高手加入本项百科计划!)

编译自:WOWWIKI

魔兽世界API

魔兽世界API是一整套由暴雪提供的,允许玩家通过插件与宏改善魔兽世界游戏用户界面的函数接口功能.
以下是几近完整的函数接口列表,由暴雪开放提供,您可以使用它们创建你自己的插件或者宏.
我们欢迎您将自己了解的更多知识与我们共享,将自己的心得发布上来

String Functions

These string functions are compatability references to the LUA string library (which is available via string., see StringLibraryTutorial (http://lua-users.org/wiki/StringLibraryTutorial) for more info),

format(formatstring{,value,...}) - Return a formatted string using values passed in.
gsub(string,pattern,replacement{,limitCount}) - Globally substitute pattern for replacement in string.
strbyte(string{,index}) - Returns the internal numeric code of the i-th character of string
strchar({intval,...}) - Returns a string with length equal to number of arguments, with each character assigned the internal code for that argument.
strfind(string,pattern{,init{,plain}}) - Look for match of pattern in string, optionally from specific location or using plain substring.
strlen(string) - Return length of the string.
strlower(string) - Return string with all upper case changed to lower case.
strrep(seed,count) - Return a string which is count copies of seed.
strsub(string,index{,endIndex}) - Return a substring of string starting at index
strupper(string) - Return string with all lower case changed to upper case.
tonumber - ?.
tostring - ?.
发现不支持的代码:

System Functions (系统函数)

ConsoleExec("command") - Execute a console command.
REMOVED GetDate - Returns date of last (major) patch to World of Warcraft as a string. - Removed in 1.3.0..
GetFramerate() - Returns the current framerate (full precision)
GetGameTime - Returns the time in-game.
GetLocale()
GetMouseFocus() - Returns the frame that currently has the mouse focus.
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()
GetTime - Returns a number that represents the elapsed time since the last patch date.
InCinematic()
IsAltKeyDown - Returns true if the alt key is currently depressed.
IsControlKeyDown() - Returns true if the control key is currently depressed.
IsLinuxClient - ?.
IsMacClient() - Checks client system
IsShiftKeyDown - Returns true if the shift key is currently depressed.
IsWindowsClient - ?.
LaunchURL("URL")
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.
RegisterForSave("variable") - Register a variable for saving between sessions.
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()
发现不支持的代码:RunScript("script") - Execute "script" as a block of LUA code.
Screenshot - Takes a screenshot.
StopCinematic()
StopMusic - Stops the currently playing mp3.
UI TakeScreenshot - Takes a screenshot.
UI _ERRORMESSAGE(value) - Displays the script error dialog with optional text
debuginfo() - output debug text. Freeware debug message viewer: DebugView (http://www.sysinternals.com/Utilities/DebugView.html)
getglobal - ?.
setglobal - ?.
发现不支持的代码:

Table Functions

These table functions are compatability references to the LUA string library (which is available via table., see TableLibraryTutorial (http://lua-users.org/wiki/TableLibraryTutorial) for more info),

foreach(table,function) - Execute function for each element in table.
foreachi(table,function) - Execute function for each element in table, indices are visited in sequential order.
getn(table) - Return the size of the table when seen as a list.
ipairs - ?.
pairs - ?.
setn(table, n) - Sets the size of the table to t.
sort(table{,comp}) - Sort the elements in the table in-place, optionally using a custom comparator.
tinsert(table,{pos,},value) - Insert value into the table at position pos (defaults to end of table)
tremove(table{,pos} - Remove and return the table element at position pos (defaults to last entry in table)
发现不支持的代码:

Talent Functions (天赋功能函数)

BuyTrainerService - ?.
CheckTalentMasterDist()
ConfirmTalentWipe()
GetNumTalentTabs()
GetNumTalents(tabIndex)
GetTalentInfo(tabIndex,talentIndex)
GetTalentPrereqs(tabIndex,talentIndex)
GetTalentTabInfo(tabIndex)
IsTalentTrainer - ?.
LearnTalent(tabIndex,talentIndex)
发现不支持的代码:

Targetting Functions (目标锁定函数)

AssistByName("name") - Assists the player whose name is entered.
AssistUnit("unit") - Instructs your character to assist the specified unit.
AttackTarget() - Attacks the targetted unit.
ClearTarget() - Clears the selected target.
ClickTargetTradeButton(index)
TargetByName("name") - Selects the specified player as the current target.
TargetLastEnemy() - Selects the last targetted enemy as the current target.
TargetLastTarget() - Selects the last target as the current target.
TargetNearestEnemy({reverse}) - Selects the nearest enemy as the current target.
TargetNearestFriend() - Selects the nearest member of your party.
TargetNearestPartyMember() - Added Patch 1500 Efil 11:20, 6 Jun 2005
TargetNearestRaidMember - ?.
TargetUnit("unit") - Selects the specified id as the current target.
REMOVED TargetUnitsPet("unit") - Targets the specified unit’s pet, if one exists. (Removed in 1.6 -- Flickering 14:12, 17 Jul 2005 (EDT))
发现不支持的代码:

Taxi Functions (飞行路线功能函数)

CloseTaxiMap() - Closes the Flightpath Map.
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.
TaxiNodeName(slot) - Returns the name of a node.
TaxiNodePosition(slot) - ?.
UnitOnTaxi("unit") - Returns 1 if unit is on a taxi.
发现不支持的代码:

Toggle Functions (切换/激活功能函数)

UI ToggleBackpack - Toggles your backpack open/closed.
UI ToggleBag - Opens or closes the specified bag.
UI ToggleCharacter - Toggles the character pane to the specified frame.
UI ToggleCombatLog - Opens/closes the combat log.
UI ToggleFramerate - Show/Hide the FPS.
UI ToggleFriendsFrame - Opens/closes the friends pane.
UI ToggleGameMenu - Opens/closes the game menu.
UI ToggleMinimap - Turns the minimap display on/off.
UI ToggleQuestLog - Opens/closes the quest log.
UI ToggleSpellBook("bookType") - Shows the spellbook. Can show your spells or your pet’s.
UI ToggleWorldMap - Turns the world map on/off.
发现不支持的代码:发现不支持的代码:

暂时没有补充内容 您可以第一个补充内容


引用百科资源:多种方式引用本页 | 浏览引用了本页的网站/网页(2155)
关闭
百科引用链使您能方便地在其他网页插入本资源的引用链接,让优秀的百科资源通过引用链对更多玩家造成帮助。
越多的玩家通过您的引用链访问百科将为您带来更多的百科威望!

引用本页地址(点击复制到粘贴板) 粘贴到你想引用的网页。
HTML形式的传播:

论坛形式的传播:

关闭
本页有下列读者,字体越大、颜色越深的玩家阅读本页的次数越多。
*如果您的玩家名称未刊载于此,因为只有百科成员才能记录阅读体验。
在魔兽世界中已有97,639项百科条目,如果你有任何可以分享的请

本页由 dailytoy 创建,希望能用你我的开放思维帮助下得到不断完善。
共有 0 条评论 浏览全部评论
匿名发表,您可以马上注册/登录成为百科玩家后用属于自己个性名称发表。

《魔兽世界API函数汇总-天赋,目标锁定,切换等》的任何感想和见解请发于此。

请和我们一起建造全球最大的人工游戏百科
在本目录提交一笔资料 - 我们的计划 - 成为目录编辑
搜游的搜索内容将在 游戏百科共建计划 的基础上不断完善与加强。
当前目录下还没有目录编辑负责管理。
 

想把自己的网站也加上搜索功能?来这里获得免费的魔兽世界搜索条

搜游大全 - 免责声明 - 投放广告 - 商务合作

© 2005 - 2007 搜友游戏百科 SOUYO.com