Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
m (added debuginfo() api and fixed typo)
(added a bunch of functions)
Line 150: Line 150:
 
: [[API GetBattlefieldWorldStateUIInfo|GetBattlefieldWorldStateUIInfo(i)]] - Get score and flag status within a battlefield
 
: [[API GetBattlefieldWorldStateUIInfo|GetBattlefieldWorldStateUIInfo(i)]] - Get score and flag status within a battlefield
 
: [[API GetNumBattlefields|GetNumBattlefields()]] - ?.
 
: [[API GetNumBattlefields|GetNumBattlefields()]] - ?.
  +
: [[API GetNumBattlefieldPositions|GetNumBattlefieldPositions()]] - ?.
 
: [[API GetNumBattlefieldScores|GetNumBattlefieldScores()]] - ?.
 
: [[API GetNumBattlefieldScores|GetNumBattlefieldScores()]] - ?.
  +
: [[API GetNumBattlefieldStats|GetNumBattlefieldStats()]] - ?
  +
: [[API GetNumBattlefieldWorldStateUI|GetNumBattlefieldStateUI()]] - ?
  +
: [[API GetNumWorldStateUI|GetNumWorldStateUI()]] - ?
 
: [[API GetSelectedBattlefield|GetSelectedBattlefield()]] - ?.
 
: [[API GetSelectedBattlefield|GetSelectedBattlefield()]] - ?.
 
: [[API GetWorldStateUIInfo|GetWorldStateUIInfo(i)]] - Get score and flag status within a battlefield
 
: [[API GetWorldStateUIInfo|GetWorldStateUIInfo(i)]] - Get score and flag status within a battlefield
 
: [[API JoinBattlefield|JoinBattlefield(index)]] - ?.
 
: [[API JoinBattlefield|JoinBattlefield(index)]] - ?.
  +
: [[API LeaveBattlefield|LeaveBattlefield()]] - ?.
  +
: [[API RequestBattlefieldPositions|RequestBattlefieldPositions()]] - ?.
  +
: [[API RequestBattlefieldScoreData|RequestBattlefieldScoreData()]] - ?.
  +
: [[API SetBattlefieldScoreFaction|SetBattlefieldScoreFaction()]] - ?.
 
: [[API SetSelectedBattlefield|SetSelectedBattlefield(index)]] - ?.
 
: [[API SetSelectedBattlefield|SetSelectedBattlefield(index)]] - ?.
 
: [[API ShowBattlefieldList|ShowBattlefieldList()]] - Request list of available battlefields.
 
: [[API ShowBattlefieldList|ShowBattlefieldList()]] - Request list of available battlefields.
Line 225: Line 233:
 
: [[API CastShapeshiftForm|CastShapeshiftForm(index)]]
 
: [[API CastShapeshiftForm|CastShapeshiftForm(index)]]
 
: [[API DeclineResurrect|DeclineResurrect()]] - Decline the request from another player to resurect him/herself.
 
: [[API DeclineResurrect|DeclineResurrect()]] - Decline the request from another player to resurect him/herself.
  +
: [[API GetDamageBonusStat|GetDamageBonusStat()]] - returns index of which stat a player receives a damage bonus from increasing
 
: [[API GetPlayerBuff|GetPlayerBuff]] - Retrieves info about a certain effect (beneficial, harmful or passive)
 
: [[API GetPlayerBuff|GetPlayerBuff]] - Retrieves info about a certain effect (beneficial, harmful or passive)
 
: [[API GetPlayerBuffTexture|GetPlayerBuffTexture]] - Retrieves the texture identifier for a certain buff
 
: [[API GetPlayerBuffTexture|GetPlayerBuffTexture]] - Retrieves the texture identifier for a certain buff
Line 269: Line 278:
 
: [[API GetCraftReagentItemLink|GetCraftReagentItemLink(index,reagentIndex)]]
 
: [[API GetCraftReagentItemLink|GetCraftReagentItemLink(index,reagentIndex)]]
 
: [[API GetCraftSelectionIndex|GetCraftSelectionIndex()]]
 
: [[API GetCraftSelectionIndex|GetCraftSelectionIndex()]]
  +
: [[API GetCraftSkillLine|GetCraftSkillLine()]]
 
: [[API GetNumCrafts|GetNumCrafts()]]
 
: [[API GetNumCrafts|GetNumCrafts()]]
 
: [[API SelectCraft|SelectCraft(index)]]
 
: [[API SelectCraft|SelectCraft(index)]]
Line 449: Line 459:
 
: [[API PutItemInBackpack|PutItemInBackpack()]]
 
: [[API PutItemInBackpack|PutItemInBackpack()]]
 
: [[API PutItemInBag|PutItemInBag(inventoryId)]]
 
: [[API PutItemInBag|PutItemInBag(inventoryId)]]
  +
: [[API SetInventoryPortraitTexture|SetInventoryPortraitTexture()]]
 
: [[API UpdateInventoryAlertStatus|UpdateInventoryAlertStatus()]]
 
: [[API UpdateInventoryAlertStatus|UpdateInventoryAlertStatus()]]
 
: [[API UseContainerItem|UseContainerItem(index,slot)]]
 
: [[API UseContainerItem|UseContainerItem(index,slot)]]
Line 543: Line 554:
 
: [[API GetNumMapOverlays|GetNumMapOverlays()]] - Returns the number of overlays on the current world map.
 
: [[API GetNumMapOverlays|GetNumMapOverlays()]] - Returns the number of overlays on the current world map.
 
: [[API GetPlayerMapPosition|GetPlayerMapPosition]]("[[API TYPE UnitId|unit]]") - Returns the postion of a unit on the current world map.
 
: [[API GetPlayerMapPosition|GetPlayerMapPosition]]("[[API TYPE UnitId|unit]]") - Returns the postion of a unit on the current world map.
  +
: [[API GetRealmName|GetRealmName()]] - returns the name of the server a user is logged in to
  +
: [[API GetWorldLocMapPosition|GetWorldLocMapPosition()]]
 
: [[API ProcessMapClick|ProcessMapClick(x,y)]] - Passes a click to the client, which then calculates if the zone has to be changed.
 
: [[API ProcessMapClick|ProcessMapClick(x,y)]] - Passes a click to the client, which then calculates if the zone has to be changed.
 
: [[API SetMapToCurrentZone|SetMapToCurrentZone()]] - Sets the current world map to the zone the player is presently in.
 
: [[API SetMapToCurrentZone|SetMapToCurrentZone()]] - Sets the current world map to the zone the player is presently in.
Line 553: Line 566:
 
These math functions are compatability references to the LUA math library (which is available via math.), some with conversion wrappers.
 
These math functions are compatability references to the LUA math library (which is available via math.), some with conversion wrappers.
   
: [[API __pow|__pow( x, y)]] - returns x to the power of y
+
: [[API __pow|__pow(x, y)]] - returns x to the power of y
 
: [[API abs|abs(value)]] - Returns the absolute value of the number.
 
: [[API abs|abs(value)]] - Returns the absolute value of the number.
 
: [[API acos|acos(value)]] - Returns the arc cosine of the value in degrees.
 
: [[API acos|acos(value)]] - Returns the arc cosine of the value in degrees.
Line 677: Line 690:
 
: [[API SetPetAction|SetPetAction(index)]] - ?
 
: [[API SetPetAction|SetPetAction(index)]] - ?
 
: [[API SetPetStablePaperdoll|SetPetStablePaperdoll("modelFrame")]] - ?.
 
: [[API SetPetStablePaperdoll|SetPetStablePaperdoll("modelFrame")]] - ?.
  +
: [[API StablePet|StablePet(index)]] - ?.
 
: [[API TargetUnitsPet|TargetUnitsPet]]("[[API TYPE UnitId|unit]]") - Targets the specified unit's pet, if one exists.
 
: [[API TargetUnitsPet|TargetUnitsPet]]("[[API TYPE UnitId|unit]]") - Targets the specified unit's pet, if one exists.
 
: [[API TogglePetAutocast|TogglePetAutocast(index)]] - Toggles whether the specified pet ability should autocast or not.
 
: [[API TogglePetAutocast|TogglePetAutocast(index)]] - Toggles whether the specified pet ability should autocast or not.
Line 942: Line 956:
 
: [[API GetTradeSkillInvSlots|GetTradeSkillInvSlots()]] - Returns a list of the available inventory slot types.
 
: [[API GetTradeSkillInvSlots|GetTradeSkillInvSlots()]] - Returns a list of the available inventory slot types.
 
: [[API GetTradeSkillItemLink|GetTradeSkillItemLink(index)]] - Gets the link string for a trade skill item.
 
: [[API GetTradeSkillItemLink|GetTradeSkillItemLink(index)]] - Gets the link string for a trade skill item.
  +
: [[API GetTradeSkillItemStats|GetTradeSkillItemStats()]] - ?
 
: [[API GetTradeSkillLine|GetTradeSkillLine()]] - Returns information about the selected skill line.
 
: [[API GetTradeSkillLine|GetTradeSkillLine()]] - Returns information about the selected skill line.
 
: [[API GetTradeSkillNumMade|GetTradeSkillNumMade(index)]] - Gets the number of items made in a single use of a skill.
 
: [[API GetTradeSkillNumMade|GetTradeSkillNumMade(index)]] - Gets the number of items made in a single use of a skill.
Line 974: Line 989:
 
: [[API GetTrainerServiceSkillLine|GetTrainerServiceSkillLine]] - ?.
 
: [[API GetTrainerServiceSkillLine|GetTrainerServiceSkillLine]] - ?.
 
: [[API GetTrainerServiceSkillReq|GetTrainerServiceSkillReq]] - ?.
 
: [[API GetTrainerServiceSkillReq|GetTrainerServiceSkillReq]] - ?.
  +
: [[API GetTrainerServiceStepIncrease|GetTrainerServiceStepIncrease()]] - ?.
 
: [[API GetTrainerServiceStepReq|GetTrainerServiceStepReq]] - ?.
 
: [[API GetTrainerServiceStepReq|GetTrainerServiceStepReq]] - ?.
 
: [[API GetTrainerServiceTypeFilter|GetTrainerServiceTypeFilter]] - Returns the status of a skill filter in the trainer window.
 
: [[API GetTrainerServiceTypeFilter|GetTrainerServiceTypeFilter]] - Returns the status of a skill filter in the trainer window.
  +
: [[API GetTrainerSkillLineFilter|GetTrainerSkillLineFilter()]] - ?;
  +
: [[API GetTrainerSkillLines|GetTrainerSkillLines()]] - ?;
 
: [[API IsTalentTrainer|IsTalentTrainer]] - ?.
 
: [[API IsTalentTrainer|IsTalentTrainer]] - ?.
 
: [[API IsTradeskillTrainer|IsTradeskillTrainer]] - ?.
 
: [[API IsTradeskillTrainer|IsTradeskillTrainer]] - ?.
 
: [[API IsTrainerServiceLearnSpell|IsTrainerServiceLearnSpell]] - ?.
 
: [[API IsTrainerServiceLearnSpell|IsTrainerServiceLearnSpell]] - ?.
  +
: [[API IsTrainerServiceSkillStep|IsTrainerServiceSkillStep()]] - ?.
  +
: [[API IsTrainerServiceTradeSkill|IsTrainerServiceTradeSkill()]] - ?.
  +
: [[API OpenTrainer|OpenTrainer()]] - ?.
 
: [[API SelectTrainerService|SelectTrainerService]] - ?.
 
: [[API SelectTrainerService|SelectTrainerService]] - ?.
 
: [[API SetTrainerServiceTypeFilter|SetTrainerServiceTypeFilter]] - ?.
 
: [[API SetTrainerServiceTypeFilter|SetTrainerServiceTypeFilter]] - ?.
  +
: [[API SetTrainerSkillLineFilter|SetTrainerSkillLineFilter()]] - ?.
   
 
=== Unit Functions ===
 
=== Unit Functions ===
Line 1,034: Line 1,056:
 
: [[API UnitIsTrivial|UnitIsTrivial("unit")]] - Returns true if the specified unit is trivial (Trivial means the unit is "grey" to the player. --[[User:Antiarc|Antiarc]] 16:02, 30 Jan 2005 (EST)), false otherwise.
 
: [[API UnitIsTrivial|UnitIsTrivial("unit")]] - Returns true if the specified unit is trivial (Trivial means the unit is "grey" to the player. --[[User:Antiarc|Antiarc]] 16:02, 30 Jan 2005 (EST)), false otherwise.
 
: [[API UnitIsUnit|UnitIsUnit("unit", "otherUnit")]] - Returns true if the two specified units refer to the same unit (e.g., "player" and "target" can refer to the same unit), false otherwise.
 
: [[API UnitIsUnit|UnitIsUnit("unit", "otherUnit")]] - Returns true if the two specified units refer to the same unit (e.g., "player" and "target" can refer to the same unit), false otherwise.
  +
: [[API UnitIsVisible|UnitIsVisible("unit")]] - true/false
 
: [[API UnitLevel|UnitLevel("unit")]] - Returns the level of the unit referred to by the local naming schema.
 
: [[API UnitLevel|UnitLevel("unit")]] - Returns the level of the unit referred to by the local naming schema.
 
: [[API UnitMana|UnitMana("unit")]] - Returns the current mana (or energy,rage,etc), in points, of the specified unit.
 
: [[API UnitMana|UnitMana("unit")]] - Returns the current mana (or energy,rage,etc), in points, of the specified unit.
Line 1,079: Line 1,102:
 
: [[API GetBuildVersion|GetBuildVersion()]] - Return the build version of the game (e.g. "1.2.1") - Seems to be removed in 1.5.0
 
: [[API GetBuildVersion|GetBuildVersion()]] - Return the build version of the game (e.g. "1.2.1") - Seems to be removed in 1.5.0
 
: [[API GetDodgeChance|GetDodgeChance()]] - Return's the player's percentage dodge chance.
 
: [[API GetDodgeChance|GetDodgeChance()]] - Return's the player's percentage dodge chance.
  +
: [[API GetDoodadAnim|GetDoodadAnim()]] - ???
 
: [[API GetParryChance|GetParryChance()]] - Return's the player's percentage parry chance.
 
: [[API GetParryChance|GetParryChance()]] - Return's the player's percentage parry chance.
 
: [[API CheckSpiritHealerDist|CheckSpiritHealerDist()]]
 
: [[API CheckSpiritHealerDist|CheckSpiritHealerDist()]]
Line 1,125: Line 1,149:
 
: [[API GetMeetingStoneStatusText|GetMeetingStoneStatusText()]]
 
: [[API GetMeetingStoneStatusText|GetMeetingStoneStatusText()]]
 
: [[API GetMoney|GetMoney()]]
 
: [[API GetMoney|GetMoney()]]
  +
: [[API GetMouseFocus|GetMouseFocus()]] ???
 
: [[API GetNetStats|GetNetStats()]] - Get bandwidth and latency network information.
 
: [[API GetNetStats|GetNetStats()]] - Get bandwidth and latency network information.
 
: [[API GetNextStableSlotCost|GetNextStableSlotCost()]]
 
: [[API GetNextStableSlotCost|GetNextStableSlotCost()]]
Line 1,133: Line 1,158:
 
: [[API GetNumWhoResults|GetNumWhoResults()]]
 
: [[API GetNumWhoResults|GetNumWhoResults()]]
 
: [[API GetObjectiveText|GetObjectiveText()]]
 
: [[API GetObjectiveText|GetObjectiveText()]]
  +
: [[API GetPluralIndex|GetPluralIndex()]]
 
: [[API GetProgressText|GetProgressText()]]
 
: [[API GetProgressText|GetProgressText()]]
 
: [[API GetReleaseTimeRemaining|GetReleaseTimeRemaining()]] - Returns the amount of time left before your ghost is pulled from your body.
 
: [[API GetReleaseTimeRemaining|GetReleaseTimeRemaining()]] - Returns the amount of time left before your ghost is pulled from your body.
Line 1,144: Line 1,170:
 
: [[API GetSummonConfirmSummoner|GetSummonConfirmSummoner()]]
 
: [[API GetSummonConfirmSummoner|GetSummonConfirmSummoner()]]
 
: [[API GetSummonConfirmTimeLeft|GetSummonConfirmTimeLeft()]]
 
: [[API GetSummonConfirmTimeLeft|GetSummonConfirmTimeLeft()]]
  +
: [[API GetTexLodBias|GetTexLodBias()]]
  +
: [[API GetText|GetText()]]
 
: [[API GetTimeToWellRested|GetTimeToWellRested()]]
 
: [[API GetTimeToWellRested|GetTimeToWellRested()]]
 
: [[API GetTitleText|GetTitleText()]]
 
: [[API GetTitleText|GetTitleText()]]
 
: [[API GetTrackingTexture|GetTrackingTexture()]]
 
: [[API GetTrackingTexture|GetTrackingTexture()]]
  +
: [[API GetWaterDetail|GetWaterDetail()]]
 
: [[API GetWhoInfo|GetWhoInfo(index)]]
 
: [[API GetWhoInfo|GetWhoInfo(index)]]
 
: [[API GetXPExhaustion|GetXPExhaustion()]]
 
: [[API GetXPExhaustion|GetXPExhaustion()]]
  +
: [[API GMRequestPlayerInfo|GMRequestPlayerInfo()]] - access denied (darn)
 
: [[API HasFullControl|HasFullControl()]]
 
: [[API HasFullControl|HasFullControl()]]
 
: [[API HasSoulstone|HasSoulstone()]]
 
: [[API HasSoulstone|HasSoulstone()]]
Line 1,158: Line 1,188:
 
: [[API NotifyInspect|NotifyInspect("unit")]]
 
: [[API NotifyInspect|NotifyInspect("unit")]]
 
: [[API OffhandHasWeapon|OffhandHasWeapon()]] - Determine if your offhand carries a weapon.
 
: [[API OffhandHasWeapon|OffhandHasWeapon()]] - Determine if your offhand carries a weapon.
  +
: [[API OpeningCinematic|OpeningCinematic()]] - shows the opening movie for a player's race
 
: [[API PickupTradeMoney|PickupTradeMoney(amount)]]
 
: [[API PickupTradeMoney|PickupTradeMoney(amount)]]
 
: [[API PlayVocalCategory|PlayVocalCategory("category")]] - REMOVED IN 1300 -- [[User:Flickering|Flickering]] 16:43, 22 Mar 2005 (EST)
 
: [[API PlayVocalCategory|PlayVocalCategory("category")]] - REMOVED IN 1300 -- [[User:Flickering|Flickering]] 16:43, 22 Mar 2005 (EST)
 
: [[API PromoteToAssistant|PromoteToAssistant("name")]]
 
: [[API PromoteToAssistant|PromoteToAssistant("name")]]
 
: [[API PurchaseSlot|PurchaseSlot()]]
 
: [[API PurchaseSlot|PurchaseSlot()]]
  +
: [[API ReadFile|ReadFile()]] - ?.
 
: [[API ReplaceEnchant|ReplaceEnchant()]]
 
: [[API ReplaceEnchant|ReplaceEnchant()]]
 
: [[API RepopMe|RepopMe()]] - The "Release Spirit" button. Sends you to the graveyard when dead. -[[User:Moof|Moof]]
 
: [[API RepopMe|RepopMe()]] - The "Release Spirit" button. Sends you to the graveyard when dead. -[[User:Moof|Moof]]
Line 1,174: Line 1,206:
 
: [[API SendWho|SendWho("filter")]] - Send a who request to the server.
 
: [[API SendWho|SendWho("filter")]] - Send a who request to the server.
 
: [[API SetBagPortaitTexture|SetBagPortaitTexture(texture,slot)]]
 
: [[API SetBagPortaitTexture|SetBagPortaitTexture(texture,slot)]]
  +
: [[API SetConsoleKey|SetConsoleKey]] - ?.
  +
: [[API SetDoodadAnim|SetDoodadAnim()]] - ?.
 
: [[API SetEuropeanNumbers|SetEuropeanNumbers]] - Unknown
 
: [[API SetEuropeanNumbers|SetEuropeanNumbers]] - Unknown
  +
: [[API SetLayoutMode|SetLayoutMode()]]
  +
: [[API SetLootPortrait|SetLootPortrait()]]
 
: [[API SetPortraitTexture|SetPortraitTexture(texture,"unit")]] - Paint a Texture object with the specified unit's portrait.
 
: [[API SetPortraitTexture|SetPortraitTexture(texture,"unit")]] - Paint a Texture object with the specified unit's portrait.
 
: [[API SetPortraitToTexture|SetPortraitToTexture(x,x)]]
 
: [[API SetPortraitToTexture|SetPortraitToTexture(x,x)]]
  +
: [[API SetTexLodBias|SetTexLodBias()]]
 
: [[API SetTradeMoney|SetTradeMoney(amount)]]
 
: [[API SetTradeMoney|SetTradeMoney(amount)]]
  +
: [[API SetWaterDetail|SetWaterDetail()]]
 
: [[API SetWhoToUI|SetWhoToUI(toUIFlag)]] - Indicate that who request results should be delivered as WHO_LIST_UPDATE instead of to chat.
 
: [[API SetWhoToUI|SetWhoToUI(toUIFlag)]] - Indicate that who request results should be delivered as WHO_LIST_UPDATE instead of to chat.
 
: [[API ShowContainerSellCursor|ShowContainerSellCursor(index,slot)]]
 
: [[API ShowContainerSellCursor|ShowContainerSellCursor(index,slot)]]
 
: [[API ShowInspectCursor|ShowInspectCursor()]] - Change the cursor to the magnifying glass inventory inspection cursor
 
: [[API ShowInspectCursor|ShowInspectCursor()]] - Change the cursor to the magnifying glass inventory inspection cursor
  +
: [[API ShowInventorySellCursor|ShowInventorySellCursor()]] - ?.
 
: [[API ShowNameplates|ShowNameplates()]] - Turn on display of nameplates.
 
: [[API ShowNameplates|ShowNameplates()]] - Turn on display of nameplates.
 
: [[API SortWho|SortWho(sortType)]]
 
: [[API SortWho|SortWho(sortType)]]
Line 1,187: Line 1,226:
 
: [[API StartDuel|StartDuel("name")]] - Challenge someone to a duel (by name)
 
: [[API StartDuel|StartDuel("name")]] - Challenge someone to a duel (by name)
 
: [[API StopCinematic|StopCinematic()]]
 
: [[API StopCinematic|StopCinematic()]]
  +
: [[API ToggleMouseMove|ToggleMouseMove()]]
 
: [[API TutorialsEnabled|TutorialsEnabled()]]
 
: [[API TutorialsEnabled|TutorialsEnabled()]]
 
: [[API UpdateGMTicket|UpdateGMTicket(type,"text")]]
 
: [[API UpdateGMTicket|UpdateGMTicket(type,"text")]]

Revision as of 04:57, 2 July 2005

(This page needs an introduction/summary!)
(This intro is a stub. You can help expand it [[1]] by clicking the Edit tab at the top of the page.)

Notation and Conventions

The function names on this page also include usage information (where known), the convention for argument lists is derived from the World of Warcraft Usage format, with a slight change to make them Wiki link friendly. It's probably easiest to show the conventions by example:

SetMapZoom(continentIndex{,zoneIndex}) - Sets the current world map to a specific continent and optionally zone.

This function takes up to two arguments, the curly braces indicate that the second argument is optional (The standard format is to use square brackets, but these interfere with the Wiki link, so if including the function arguments in a link description we use curly braces).

TargetUnit("unit") - Selects the specified id as the current target.

The quotes around the unit argument on this function indicates that the parameter is a string. It does not mean that the argument is always (and in many cases, ever) the literal value "unit".

FrameLayout:GetHeight() - Returns the height of the frame layout object.

This example shows that the GetHeight() function is called as a method function on a FrameLayout object (and that it takes no arguments).

When adding new entries to this page, please follow this convention for consistency, since the actual page names are the word API followed by a space and the function name (with no argument information), links are written as follows:

: [[API SetMapZoom|SetMapZoom(continentIndex{,zoneIndex})]]

For object methods, the name includes the object type:

: [[API FrameLayout GetHeight|FrameLayout:GetHeight()]]

Play around yourself

You can easily play with these by typing /script FunctionName(arg1,arg2,etc) into the chat thingy in WoW

Data and Argument Types

The API uses special values for some function arguments, the commonly used types are:

AuctionSortId - An identifier for sorting columns in the auction house.
AuctionTypeId - An identifier specifying which type of auction to operate on.
ChatTypeId - An identifier for the different chat destination types.
InventorySlotName - Names of inventory slots.
LootRuleId - An identifier for the different looting rule types.
PlayerName - The name of a player.
UnitId - An identifier which specifies one of the units the API may reference.

Global Function Groups

Template:Dynamic list

Here is a complete list of all global functions: Global Function List. If a function on that list is missing from this page, it's because no-one has added it yet. If you add a new entry, please base it on the Empty Template.

The old World of Warcraft API doc is currently at http://www.cosmosui.org/texts/BlizzardCommands.xml (outdated).

Action Functions

These functions are those which operate with the action buttons (General player actions are likely in the Activity Functions section below).

ActionButtonDown(id) - Press the specified action button (Part of UI API, not core).
ActionButtonUp(id) - Release the specified action button (Part of UI API, not core)..
BonusActionButtonDown - Trigger the specified bonus(pet or minion) action button. (Part of UI API, not core).
BonusActionButtonUp - Release the specified bonus(pet or minion) action button. (Part of UI API, not core).
ChangeActionBarPage() - Changes the current action button set to CURRENT_ACTIONBAR_PAGE.
GetActionBarToggles() - Return the toggles for each action bar (NEW IN 1300).
GetActionCooldown(slot) - This returns the cooldown values of the specified action..
GetActionCount(slot) - Get the count (bandage/potion/etc) for an action, returns 0 if none or not applicable.
GetActionText(slot) - Get the text label (macros, etc) for an action, returns nil if none.
GetActionTexture(slot) - Gets the texture path for the specified action.
GetBindingAction("key") - Return the name of the binding action associated with a key.
HasAction(slot) - Returns 1 if the player has an action in the specified slot, nil otherwise.
IsActionInRange(slot) - Test if an action is in range (1=yes, 0=no, nil=not applicable).
IsAttackAction(slot) - Return 1 if an action is an 'attack' action (flashes during combat), nil otherwise.
IsAutoRepeatAction(slot) - Return 1 if an action is auto-repeating, nil otherwise.
IsCurrentAction(slot) - Return 1 if an action is the one currently underway, nil otherwise.
IsUsableAction(slot) - Return 1 if an action can be used at present, nil otherwise.
PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.
SetActionBarToggles(show1,show2,show3,show4) - Set show toggle for each action bar (NEW IN 1300)
TurnOrActionStart - ?.
TurnOrActionStop - ?.
UseAction(slot, {checkCursor {,onSelf} } - This instructs the interface to use the action associated with the specified ID, optionally on the player (regardless of target).

Activity Functions

This section is for functions which make the player do something (and which aren't covered elsewhere).

API AcceptAreaSpiritHeal:AcceptAreaSpiritHeal() - The player accepts the spirit heal
AcceptDuel() - The player accepts the challenge to duel.
AcceptTrade() - A pending trade will be accepted.
AddTradeMoney() - Adds the money dropped into the player's trade frame.
AssistByName("name") - Assists the player whose name is entered.
AssistUnit("unit") - Instructs your character to assist the specified unit.
AttackTarget() - Attacks the targetted unit.
BeginTrade() - Begins the trade with the target.
BuyStableSlot()
CancelDuel() - Refuse the invitation to fight a duel.
CancelLogout()
CancelMeetingStoneRequest()
CancelPendingEquip(index)
Duel - Duels a specified user by name. (No longer valid -- Flickering 14:38, 1 Jan 2005 (EST))
EnablePVP() - Enable PVP Status (Removed in 1.4.0 patch -- Flickering 23:12, 19 Apr 2005 (EDT))
Jump() - The player jumps.
SitOrStand() - The player sits or stands.
StartDuelUnit("unit") - Challenge a unit to a duel.
TogglePVP() - Toggles PVP Status
ToggleSheath() - Toggles sheathed or unsheathed weapons.

Auction Functions

CalculateAuctionDeposit(runTime) - Returns the required deposit for the current selling item given the specified duration (minutes).
CanSendAuctionQuery() - Return 1 if auction search button would be active, nil otherwise.
CancelAuction(index) - Cancel the specified auction (on the "owner" list).
ClickAuctionSellItemButton() - Puts the currently 'picked up' item into the 'create auction' slot.
CloseAuctionHouse() - Will close the AuctionFrame if opened.
GetAuctionHouseDepositRate() - Returns the deposit rate (percentage) for the currently open auction house (Possibly out-dated by CalculateAuctionDeposit).
GetAuctionInvTypes(classIndex, subclassIndex) - Returns types of subcategories items.
GetAuctionItemClasses() - Returns major auction item categories.
GetAuctionItemInfo("type", index) - Returns details about the specified auction item.
GetAuctionItemLink("type", index) - Returns a link string for the specified auction item.
GetAuctionItemSubClasses(classIndex) - Returns subcategories in the nth auction category.
GetAuctionItemTimeLeft("type", index) - Returns the time left status of the specified auction item.
GetAuctionSellItemInfo() - Returns information about the current selling item (or nil if none selected).
GetBidderAuctionItems({page}) - ?.
GetNumAuctionItems("type") - Returns the size of the specified auction item list.
GetOwnerAuctionItems({page}) - ?.
GetSelectedAuctionItem("type") - Returns the index (1-50) of the selected auction item or 0 if none is selected.
IsAuctionSortReversed("type", "sort") - Returns 1 if the specified auction list and sort is reversed, nil otherwise.
PlaceAuctionBid("type", index, bid) - Place a bid on the selected auction item.
QueryAuctionItems("name", minLevel, maxLevel, invTypeIndex, classIndex, subclassIndex, page, isUsable, qualityIndex) - ?.
SetSelectedAuctionItem("type", index) - ?.
SortAuctionItems("type", "sort") - Request that the specified auction list be sorted by a specific column.
StartAuction(minBid, buyoutPrice, runTime) - Starts the auction you have created in the Create Auction panel.

Bank Functions

CloseBankFrame() - Close the bank frame if it's open. --Ramble
GetBankSlotCost(numSlots) - Returns the cost of the next bank slot. --Ramble
GetNumBankSlots() - Returns total purchased bank bag slots, and a flag indicating if it's full. --Ramble

Battlefield Functions

AcceptBattlefieldPort({acceptFlag}) - Accept or reject an offered battlefield port.
CloseBattlefield() - ?.
GetAreaSpiritHealerTime() - Returns the time left until the next resurrection by the Sprit Guide.
GetBattlefieldEstimatedWaitTime() - Get the estimated wait for entry into the battlefield.
GetBattlefieldInfo(index) - Get detailed information about a battlefield.
GetBattlefieldInstanceExpiration() - Get shutdown timer for the battlefield instance.
GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield
GetBattlefieldPortExpiration() - Get the remaining milliseconds before the battlefield port expires.
GetBattlefieldPosition() -
GetBattlefieldScore(index) - Get information about a player
GetBattlefieldStatData() -
GetBattlefieldStatInfo() -
GetBattlefieldStatus() - Get the battlefield's current status.
GetBattlefieldTimeWaited() - Get time waited in queue in milliseconds.
GetBattlefieldWinner() -
GetBattlefieldWorldStateUIInfo(i) - Get score and flag status within a battlefield
GetNumBattlefields() - ?.
GetNumBattlefieldPositions() - ?.
GetNumBattlefieldScores() - ?.
GetNumBattlefieldStats() - ?
GetNumBattlefieldStateUI() - ?
GetNumWorldStateUI() - ?
GetSelectedBattlefield() - ?.
GetWorldStateUIInfo(i) - Get score and flag status within a battlefield
JoinBattlefield(index) - ?.
LeaveBattlefield() - ?.
RequestBattlefieldPositions() - ?.
RequestBattlefieldScoreData() - ?.
SetBattlefieldScoreFaction() - ?.
SetSelectedBattlefield(index) - ?.
ShowBattlefieldList() - Request list of available battlefields.

Camera Functions

CameraOrSelectOrMoveStart - ?.
CameraOrSelectOrMoveStop - ?.
CameraZoomIn - ?.
CameraZoomOut - ?.
FlipCameraYaw - ?.
MoveViewDownStart - ?.
MoveViewDownStop - ?.
MoveViewInStart - ?.
MoveViewInStop - ?.
MoveViewLeftStart - ?.
MoveViewLeftStop - ?.
MoveViewOutStart - ?.
MoveViewOutStop - ?.
MoveViewRightStart - ?.
MoveViewRightStop - ?.
MoveViewUpStart - ?.
MoveViewUpStop - ?.
NextView - ?.
PitchDownStart - ?.
PitchDownStop - ?.
PitchUpStart - ?.
PitchUpStop - ?.
PrevView - ?.
ResetView - ?.
SaveView - ?.
SetView - ?.

Channel Functions

AddChatWindowChannel(index, "channel")
ChannelBan("channel", "name") - Bans a player from the specified channel.
ChannelInvite("channel", "name") - Invites the specified user to the channel.
ChannelKick("channel", "name") - Kicks the specified user from the channel.
ChannelModerate("channel") - ?.
ChannelModerator("channel", "name") - Sets the specified player as the channel moderator.
ChannelMute("channel", "name") - Turns off the specified player's ability to speak in a channel.
ChannelToggleAnnouncements("channel") - Toggles the channel to display announcements either on or off.
ChannelUnban("channel", "name") - Unbans a player from a channel.
ChannelUnmoderator("channel", "name") - Takes the specified user away from the moderator status.
ChannelUnmute("channel", "name") - Unmutes the specified user from the channel.
DisplayChannelOwner("channel") - Displays the owner of the specified channel in the default chat.
EnumerateServerChannels() - ?.
GetChannelList() - ?.
GetChannelName("channel" or index) - Retrieves the name from a specific channel.
GetChatWindowChannels(index) - ?.
JoinChannelByName("channel"{,"password"{,frameId}}) - Join the specified chat channel (with optional password, and register for specified frame)
LeaveChannelByName("channel") - Leaves the channel with the specified name.
ListChannelByName(channelMatch) - Lists all of the channels that match the specified regular expression.
ListChannels() - Lists all of the channels into the chat window.
RemoveChatWindowChannel(index, "channel") - ?.
SetChannelOwner("channel", "name") - ?.
SetChannelPassword("channel", "password") - Changes the password of the current channel.

Character Functions

AbandonSkill - The player abandons a skill.
AcceptResurrect - The player accepts the request from another player to resurrect him/herself.
AcceptSkillUps()
AcceptXPLoss - Accept the XP loss to be reborn where you stand (The name is somewhat of an anachronism, since it's now durability rather than XP that is lost).
AddFriend - Add a friend to your friend list.
AddIgnore - Add a player to your ignore list.
AddOrDelIgnore - Toggles the ignore state of the specified user.
AddSkillUp(index)
BuySkillTier(index)
CancelPlayerBuff(buffIndex)
CancelSkillUps()
CancelTrackingBuff()
CastShapeshiftForm(index)
DeclineResurrect() - Decline the request from another player to resurect him/herself.
GetDamageBonusStat() - returns index of which stat a player receives a damage bonus from increasing
GetPlayerBuff - Retrieves info about a certain effect (beneficial, harmful or passive)
GetPlayerBuffTexture - Retrieves the texture identifier for a certain buff
GetPlayerBuffTimeLeft - Retrieves how long a buff will last before expiring
RessurectHasTimes() - ? (NEW IN 1300)

Chat Functions

ChangeChatColor(chatType,r,g,b) - Update the color for a type of chat message.
ChatFrameLog() - ?
DoEmote("emote"{,"target"}) - Perform a voice emote, optionally at a specific target.
GetChatTypeIndex(type) - Get the numeric ID of a type of chat message.
GetChatWindowInfo(index) - Get setup information about a chat window.
GetChatWindowMessages(index) - Get the chat message types received by a chat window.
GetChatWindowChannels(index) - Get the chat channels received by a chat window.
PlayVocalCategory("Category") - Removed in 1.3.0
RemoveChatWindowMessages(index,"messageGroup") - Remove a set of chat messages from this window.
SendChatMessage("message","system","language","channel") - Send a chat message
SetChatWindowAlpha(index,alpha) - Sets the Alpha value(transparency) of ChatFrame<index>
SetChatWindowColor(index,r,g,b) - Sets the background color of a a chat window.
SetChatWindowDocked(index,docked) - Set whether a chat window is docked.
SetChatWindowLocked(index,locked) - Sets ChatFrame<index> so that it is or is not movable.
SetChatWindowName(index,"name") - Sets the name of ChatFrame<index> to <"name">.
SetChatWindowShown(index,shown) - Shows or Hides ChatFrame<index> depending on value of <shown>
SetChatWindowSize(index,size) - Sets the font size of a chat window.

Crafting Functions

See TradeSkill Functions - these superseded the old crafting functions for most (but not all - Enchanting) skills.
CloseCraft()
CollapseCraftSkillLine(index)
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()
GetNumCrafts()
SelectCraft(index)

Faction Functions

CollapseFactionHeader(index)
ExpandFactionHeader(index)
FactionToggleAtWar(index)
GetFactionInfo(index)
GetNumFactions()

Friend Functions

GetFriendInfo(index)
GetNumFriends()
GetSelectedFriend()
RemoveFriend("name" or index)
SetSelectedFriend(index)
ShowFriends()

Gossip Functions

CloseGossip()
GetGossipOptions()
GetGossipText()
SelectGossipOption(index)

/script /say "honghong go go "

Group Functions

AcceptGroup() - Accept the invitation to party.
DeclineGroup() - Decline the invitation to a party.
GetLookingForGroup()
GetLootMethod() - Return the currently active loot method
GetLootRollItemInfo(rollId)
GetLootRollTimeLeft(rollid)
GetLootThreshold() - Return the current loot threshold (for group loot)
GetMasterLootCandidate() - Return the player who receives loot in master mode
GetNumPartyMembers() - Returns the number of party members
GetPartyLeaderIndex()
GetPartyMember(id) - Returns the index of the party member at the given index if that party slot is filled, otherwise nil.
GiveMasterLoot(slot,index)
InviteByName("name") - Invites the specified player to the group sender is currently in.
InviteToParty("unit") - Invite a unit to a party.
IsPartyLeader() - Returns true if the player is the party leader.
LeaveParty() - Quit the party.
PromoteByName("name") - Promotes by name the target.
PromoteToPartyLeader("unit") - Promote a unit to party leader.
RollOnLoot(rollId{,roll}) - Roll or pass on a loot started by the game itself.
SetLookingForGroup(flag)
SetLootMethod("method"{,"masterPlayer" or ,threshold}) - Set the current loot method
SetLootThreshold(threshold) - Set the threshold for group loot
UninviteByName("name") - Uninvites (kicks) the target from the current group if player is group leader.
UninviteFromParty("unit") - Kick a unit from the party if player is group leader.
UnitInParty("unit") - Returns true if the unit is a member of your party.
UnitIsPartyLeader("unit") - Returns true if the unit is its partyleader.

Guild Functions

AcceptGuild() - The player accepts the invitation to join a guild.
BuyGuildCharter("guildName") - Purchases a guild charter for guildName.
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() - Returns the cost of purchasing a guild charter.
GetGuildInfo("unit") - This function returns the name of the guild unit belongs to.
GetGuildRosterInfo(index) - ?.
GetGuildRosterLastOnline(index) - ?.
GetGuildRosterMOTD() - ?.
GetGuildRosterSelection() - ?.
GetGuildRosterShowOffline() - Returns true if showing offline members of the guild.
GetNumGuildMembers() - ?.
GetTabardCreationCost()
GetTabardInfo() -?.
GuildControlAddRank("name") - ?.
GuildControlDelRank - ?.
GuildControlGetNumRanks() - ?.
GuildControlGetRankFlags() - ?.
GuildControlGetRankName(index) - ?.
GuildControlSaveRank("name") - ?.
GuildControlSetRank(rank) - ?.
GuildControlSetRankFlag(index, enabled) - ?.
GuildDemoteByName("name") - ?.
GuildDisband() - ?.
GuildInfo() - Displays information about the guild you are a member of.
GuildInviteByName("name") - ?.
GuildLeave() - ?.
GuildPromoteByName("name") - ?.
GuildRoster() - Fetches the guild list and fires a GUILD_ROSTER_SHOW event.
GuildRosterSetOfficerNote(index, "note") - ?.
GuildRosterSetPublicNote(index, "note") - ?.
GuildSetLeaderByName("name") - ?.
GuildSetMOTD("note") - ?.
GuildUninviteByName("name") - ?.
IsGuildLeader() - ?.
IsInGuild() - Lets you know whether you are in a guild.
SetGuildRosterSelection(index) - ?.
SetGuildRosterShowOffline(enabled) - Sets/Resets the show offline members flag.
SortGuildRoster("sort") - ?.
TurnInGuildCharter() - ?.

Honor Functions

GetInspectHonorData() - Return honor info for the inspected unit (if available).
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.
GetPVPSessionStats() - Get your PvP/Honor statistics for this session.
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.
UnitPVPRank("unit") - Get PvP rank information for requested unit.

Ignore Functions

DelIgnore("name")
GetIgnoreName(index)
GetNumIgnores()
GetSelectedIgnore()
SetSelectedIgnore(index)

Item Functions

AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
ConfirmBindOnUse()
DeleteCursorItem()
CursorHasItem() - Returns true if the cursor currently holds an item
GetBuybackItemInfo()
GetRepairAllCost()
HideRepairCursor()
InRepairMode()
RepairAllItems()
ShowRepairCursor()

Item Text Functions

These functions relate to item text (books, etc)

CloseItemText() - Close an open item text (book, plaque, etc).
ItemTextGetCreator() - Get the creator of the current text (if player-created).
ItemTextGetItem() - Get the name of the text.
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.

Inventory Functions

BankButtonIDToInvSlotID - Returns the ID number of a bank button in terms of inventory slot ID.
ContainerIDToInventoryID(containedID)
CursorCanGoInSlot(slot)
EquipPendingItem(slot)
GetBagName(index) - Get the name of one of the player's bags.
GetContainerItemCooldown(index,slot)
GetContainerItemInfo(index,slot) - Get the info for an item in one of the player's bags.
GetContainerItemLink(index,slot)
GetContainerNumSlots(index)
GetInventoryAlertStatus(index)
GetInventoryItemBroken("unit",slot) - Determine if an inventory item is broken (no durability).
GetInventoryItemCooldown("unit",slot) - Get cooldown information for an inventory item.
GetInventoryItemCount("unit",slot) - Determine the quantity of an item in an inventory slot.
GetInventoryItemLink("unit",slot) - Get a link string for an inventory item.
GetInventoryItemQuality("unit",slot) - Return the quality of an inventory item.
GetInventoryItemTexture("unit",slot) - Return the texture for an inventory item.
GetInventorySlotInfo(slot) - Get the info for a named inventory slot (slot ID and texture)
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
PickupBagFromSlot(slot)
PickupContainerItem(index,slot)
PickupInventoryItem(index)
PutItemInBackpack()
PutItemInBag(inventoryId)
SetInventoryPortraitTexture()
UpdateInventoryAlertStatus()
UseContainerItem(index,slot)
UseInventoryItem(id) - Use an item in a specific inventory slot.

Loot Functions

CloseLoot({uiFailedFlag})
ConfirmLootRoll(slot) - Confirm a loot roll (NEW IN 1300)
GetLootSlotInfo(slot) - Returns icon path, item name, and item quantity.
GetLootSlotLink(slot)
GetNumLootItems() - Returns amount of objects to loot (number)
IsFishingLoot()
LootSlot(slot) - Broken or Disabled Efil 20:06, 3 Jun 2005
LootSlotIsCoin(slot)
LootSlotIsItem(slot)

Macro Functions

CreateMacro("name", icon, "body", local) - Create a new macro.
DeleteMacro(index) - Deletes a macro.
EditMacro(index, "name", iconIndex, "body", local) - Saves a macro.
GetMacroIconInfo(index) - Returns texture of the icons provided by Blizzard.
GetMacroIndexByName("name") - Returns macro index.
GetMacroInfo(index) - Returns "name", iconTextureID, "body", local.
GetNumMacroIcons() - Returns the number of usable icons provided by Blizzard.
GetNumMacros() - Returns the number of macros the user has.
PickupMacro(index) - Pickup a macro button icon.
RunMacro - This does not appear to exist anymore Flickering 18:41, 1 Jan 2005 (EST).
SaveMacros() - Save all macros to WTF/Account/user/macros-local.txt.

Mail Functions

Globals associated with Mail. Events associated with Mail.

AddSendMailCOD() - This does not appear to exist any longer. --Bug 18:43, 4 Feb 2005 (EST)
AddSendMailMoney() - This does not appear to exist any longer. --Bug 18:54, 4 Feb 2005 (EST)
CheckInbox() - ?.
ClearSendMail() - This clears the text in the send mail tab and places the COD item in the inventory. --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() - Closes the mail window. --Bug 19:04, 4 Feb 2005 (EST)
DeleteInboxItem(index) - ?.
GetInboxHeaderInfo(index) - Returns information about a message in the inbox.
GetInboxItem(index) - Returns description of the attachment attached to message at (index).
GetInboxNumItems() - Returns the number of messages in your inbox.
GetInboxText(index) - Returns the message text of message at (index).
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 2. --Bug 16:28, 6 Feb 2005 (EST)
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 implemented. Currently an index of 1 returns "Stationery Default", and an index of 2 returns "Test Stationery". --Bug
HasNewMail() - Returns nil if there is no new mail. --Bug 19:14, 4 Feb 2005 (EST)
InboxItemCanDelete(index) - ?.
PickupSendMailCOD(amount) - This does not appear to exist any longer. --Bug 15:45, 6 Feb 2005 (EST)
PickupSendMailMoney(amount) - This does not appear to exist any longer. --Bug 15:45, 6 Feb 2005 (EST)
ReturnInboxItem(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) - ?.
SetSendMailMoney(amount) - ?.
TakeInboxItem(index) - Take the attached item from the mailbox message at index.
TakeInboxMoney(index) - ?.
TakeInboxTextItem(index) - ?.

Location Functions

These functions are related to the current location of the player and how it is displayed.

Globals associated with Location. Events associated with Location.

GetMinimapZoneText() - Returns the zone text, that is displayed over the minimap.
GetRealZoneText() - Returns either instance name or zone name
GetSubZoneText() - Returns the subzone text (e.g. "The Canals").
GetZonePVPInfo() - Returns PVP info for the current zone.
GetZoneText() - Returns the zone text (e.g. "Stormwind City").

Mapping Functions

These functions are related to display of the world map.

GetCorpseMapPosition() - Returns the postion off the corpse on the current world map.
GetCurrentMapContinent() - Returns the number of the continent the world map is currently showing.
GetCurrentMapZone() - Returns the number of the zone the world map is currently showing.
GetMapContinents() - Returns the continent names.
GetMapInfo() - Returns the name and size of the current world map.
GetMapLandmarkInfo(landmarkIndex) - Returns information about a landmark on the current world map.
GetMapOverlayInfo(overlayIndex) - Returns information about an overlay on the current world map.
GetMapZones(continentIndex) - Returns the zone names of a continent.
GetNumMapLandmarks() - Returns the number of landmarks on the current world map.
GetNumMapOverlays() - Returns the number of overlays on the current world map.
GetPlayerMapPosition("unit") - Returns the postion of a unit on the current world map.
GetRealmName() - returns the name of the server a user is logged in to
GetWorldLocMapPosition()
ProcessMapClick(x,y) - Passes a click to the client, which then calculates if the zone has to be changed.
SetMapToCurrentZone() - Sets the current world map to the zone the player is presently in.
SetMapZoom(continentIndex{,zoneIndex}) - Sets the current world map to a specific continent and optionally zone.
SetupWorldMapScale() - Configures scale of world map to best fill screen.
UpdateMapHighlight(x,y) - Provides map rollover information for highlighting.

Math Functions

These math functions are compatability references to the LUA math library (which is available via math.), some with conversion wrappers.

__pow(x, y) - returns x to the power of y
abs(value) - Returns the absolute value of the number.
acos(value) - Returns the arc cosine of the value in degrees.
asin(value) - Returns the arc sine of the value in degrees.
atan(value) - Returns the arc tangent of the value in degrees.
atan2(x,y) - Returns the arc tangent of X/Y in degrees.
ceil(value) - Returns the ceiling of value.
acos(degrees) - Returns the cosine of the degree value.
deg(radians) - Returns the degree equivalent of the radian value.
floor(value) - Returns the floor of value.
frexp(num) - Extract mantissa and exponent from a floating point number.
ldexp(value, exponent) - Load exponent of a floating point number.
exp(value) - Returns the exponent of value.
log(value) - Returns the logarithm of value.
log10(value) - Returns the base-10 logarithm of value.
min(value{,values...}) - Returns the numeric minimum of the input values.
max(value{,values...}) - Returns the numeric maximum of the input values.
mod(value,modulus) - Returns floating point modulus of value.
rad(degrees) - Returns the radian equivalent of the degree value.
random({{lower,}upper}) - Returns a random number (optionally bounded integer value)
randomseed(seed) - Seed the pseudo random number generator
sin(degrees) - Returns the sine of the degree value.
sqrt(value) - Return the square root of value.
tan(degrees) - Returns the tangent of the degree value.


Merchant Functions

BuybackItem() - Buys the last sold item back.
BuyMerchantItem(index {,qty}) - Buys an item from a merchant.
CanMerchantRepair() - Returns true if the merchant can repair items.
CloseMerchant() - Closes the merchant window.
GetMerchantItemInfo(index) - Returns information about an item.
GetMerchantItemLink(index) - Returns a link to an item.
GetMerchantItemMaxStack(index) - Returns the maximum number of items in a stack.
GetMerchantNumItems() - Returns the number of items the merchant sells.
PickupMerchantItem(index) - Places the item on the cursor.
Tooltip:SetMerchantItem("slot")
Tooltip:SetMerchantCompareItem("slot"{,offset})
ShowMerchantSellCursor(index) - Changes the cursor to the merchant sell cursor.

Miscellaneous Functions

AddChatWindowChannel - Adds a chat channel to a chat window.
AddChatWindowMessages - Adds a messaging group to the specified chat window.
date - Returns the current date according to the user's machine.
GetDate - Returns date of last (major) patch to World of Warcraft as a string. - Removed in 1.3.0..
GetDefaultLanguage - Gets the Default language for the indicated player.
GetGameTime - Returns the time in-game.
GetScreenHeight - Returns the height of the window in pixels.
GetTime - Returns a number that represents the elapsed time since the last patch date.
IsAltKeyDown - Returns true if the alt key is currently depressed.
IsControlKeyDown - Returns true if the control key is currently depressed.
IsShiftKeyDown - Returns true if the shift key is currently depressed.
Logout - Logs the user out of the game.
MouseIsOver - Determines whether or not the mouse is over the specified frame.
NotWhileDeadError - Generates an error message saying you cannot do that while dead.
PlayMusic - Plays the specified mp3.
PlaySound - Plays the specified built-in sound effect.
PlaySoundFile - Plays the specified sound file.
Quit - Quits the application, NOT the LUA script.
RandomRoll - Does a random roll between the two values.
RegisterForSave("variable") - Register a variable for saving between sessions.
Screenshot - Takes a screenshot.
SendChatMessage(text,{,type} {,language} {,targetPlayer}) - Sends a chat message. (removed answered question)
SetItemRef(itemLink) - Displays an item link box.
StopMusic - Stops the currently playing mp3.
Stuck - Informs the game engine that the player is Stuck.
TakeScreenshot - Takes a screenshot.
time - Returns time in seconds since epoch (00:00:00 Jan 1 1970)

Movement Functions

Use with caution - movement started by a script must be stopped by script. Keys/Mouse will not stop movement.

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.
StrafeRightStop - The player stops strafing right at the specified time.
ToggleAutoRun - Turns auto-run on or off
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.
TurnRightStart - The player starts turning right at the specified time.
TurnRightStop - The player stops turning right at the specified time.

Pet Functions

CastPetAction(index) - Cast the corresponding pet skill.
ClickStablePet(index) - ?.
ClosePetStables() - ?.
DropItemOnUnit("unit") - Drops an item from the cursor onto your target.
GetNumStablePets() - ?.
GetPetActionCooldown(index) - Returns cooldown information for the pet action at the specificed pet action bar slot.
GetPetActionInfo(index) - Returns information on the pet action at the specified pet action bar slot.
GetPetActionsUsable() - Returns a value indicating if the player's pet's actions can be used at this time.
GetPetExperience() - Returns the pet's current xp, and total xp required for next level.
GetPetFoodTypes() - Returns a list of the food types the player's pet can eat.
GetPetHappiness() - Returns the pet's happiness, damage percentage, and loyalty gain rate.
GetPetIcon() - Returns the path to the texture to use as the icon for the player's pet.
GetPetLoyalty() - Returns the name of the pet's current loyalty level.
GetPetTimeRemaining() - ?.
GetPetTrainingPoints() - Returns the pet's current total and used training points.
GetSelectedStablePet() - ?.
GetStablePetFoodTypes(index) - Returns a list of the food types a specific stabled pet can eat.
GetStablePetInfo(index) - Returns information about a specific stabled pet.
HasPetSpells() - Returns true if the player has pet spells.
HasPetUI() - Returns true if the player has a pet User Interface.
PetAbandon() - Permanently abandon's your pet.
PetAggressiveMode() - Set your pet in aggressive mode.
PetAttack() - Instruct your pet to attack your target.
PetCanBeAbandoned() - Returns true if the pet is abandonable.
PetCanBeRenamed() - Returns true if the pet can be renamed.
PetDefensiveMode() - Set your pet in defensive mode.
PetDismiss() - Dismiss your pet.
PetFollow() - Instruct your pet to follow you.
PetHasActionBar() - ?.
PetPassiveMode() - Set your pet into passive mode.
PetRename("name") - Renames the pet.
PetWait() - Instruct your pet to remain still.
PickupPetAction(index) - ?.
PickupStablePet(index) - ?.
SetPetAction(index) - ?
SetPetStablePaperdoll("modelFrame") - ?.
StablePet(index) - ?.
TargetUnitsPet("unit") - Targets the specified unit's pet, if one exists.
TogglePetAutocast(index) - Toggles whether the specified pet ability should autocast or not.
UnstablePet(index) - ?

Petition Functions

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

Quest Functions

AbandonQuest - Abandon the specified quest.
AcceptQuest - Accept the specified quest.
AddQuestWatch(x) - Add a quest to the watch list (NEW IN 1300).
CloseQuest - ?.
CollapseQuestHeader - Collapses a quest header.
CompleteQuest - Complete the specified quest.
ConfirmAcceptQuest - Accept the quest. Yes. Really accept it.
DeclineQuest - Declines the currently offered quest.
ExpandQuestHeader - Expands a quest header.
GetAbandonQuestName - ?.
GetGossipActiveQuests - ?.
GetGossipAvailableQuests - ?.
GetNumActiveQuests - ?.
GetNumAvailableQuests - ?.
GetNumQuestChoices - ?.
GetNumQuestItems - Returns the number of items nessecary to complete a particular quest.
GetNumQuestLeaderBoards({questIndex}) - ? (UPDATED IN 1300).
GetNumQuestLogChoices - Returns the number of options someone has when getting a quest item.
GetNumQuestLogEntries - Returns the number of entries in the quest log.
GetNumQuestLogRewards - Returns the count of the rewards for a particular quest.
GetNumQuestRewards - ?.
GetNumQuestWatches() - Returns the number of quest watches active (NEW IN 1300).
GetQuestBackgroundMaterial - Returns the material string associated with the particular quest.
GetQuestGreenRange - ?.
GetQuestIndexForTimer - ?.
GetQuestIndexForWatch(watchIndx) - Return the quest index for the specified watch (NEW IN 1300)
GetQuestItemInfo - Returns basic information about the quest items.
GetQuestItemLink - ?.
GetQuestLogChoiceInfo - Returns a bunch of data about a quest reward choice from the quest log.
GetQuestLogItemLink - ?.
GetQuestLogLeaderBoard(ldrIndex{,questIndex}) - ? (UPDATED IN 1300).
GetQuestLogPushable - Returns true if the currently loaded quest in the quest window can be shared.
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 - ?.
IsCurrentQuestFailed - ?.
IsQuestCompletable - Returns true if a quest is possible to complete.
IsQuestWatched(questIndex) - Determine if the specified quest is watched (NEW IN 1300).
IsUnotOnQuest(questIndex, "unit") - Determine if the a specific unit is on a given quest (NEW IN 1300).
QuestChooseRewardError - Throws an error when the quest choose reward method doesn't work.
QuestLogPushQuest - Initiates the sharing of the currently viewed quest in the quest log.
RemoveQuestWatch(index) - Remove a quest watch (NEW IN 1300) {Is the index a quest or watch index?).
SelectActiveQuest - ?.
SelectAvailableQuest - ?.
SelectGossipActiveQuest - ?.
SelectGossipAvailableQuest - ?.
SelectQuestLogEntry - ?.
SetAbandonQuest - Called before AbandonQuest.

Raid Functions

ConvertToRaid() - ?.
GetNumRaidMembers() - ?.
GetRaidRosterInfo(index) - ?.
GetRaidRosterSelection - ?.
IsRaidLeader() - ?.
IsRaidOfficer() - ?.
RequestRaidInfo() - ? (NEW IN 1300).
SetRaidRosterSelection(index) - ?.
SetRaidSubgroup(index, subgroup) - ?.
SortRaidRoster("type") - Not called, but has usage - REMOVED IN 1300 -- Flickering 17:04, 22 Mar 2005 (EST)
SwapRaidSubgroup(index1, index2 - ?.
UninviteFromRaid(index) - ?.

Settings Functions

DefaultBindings() - Loads default WoW key bindings into memory.
ForceQuit()
GetBinding(index) - Get key bindings for that index.
GetBindingKey("command") Get key bindings for that command.
GetCVar("varname")
GetCVarDefault("varname")
GetGamma()
GetLocale()
GetNumBindings() - Get total key bindings and headers.
GetRefreshRates(x)
GetScreenResolutions()
GetScreenWidth()
GetVideoCaps()
IsMacClient() - Checks client system
ReloadUI() - Reloads the UI from source files
ResetBindings() - Loads key bindings into memory from disk
ResetCursor()
ResetPerformanceValues()
RestartGx()
RunBinding("command")
SaveBindings() - Saves key bindings from memory to disk
SetBinding("key"{,"command"}) - Sets or unsets key bindings.
SetCursor("cursor")
SetCVar("cvar",value{,"scriptCVar"})
SetGamma(value)
SetScreenResolution(x)
ToggleCollision()
ToggleCollisionDisplay()
TogglePerformanceDisplay()
TogglePerformanceValues()
TogglePlayerBounds()
TogglePortals()
ToggleTris()

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
RemoveSkillUp(index)
SetSelectedSkill(index)

Spell Functions

CastSpell(spellID, spellbookTabNum) - Cast the specified spell by ID. Currently ignores spellbookTabNum (but can cast spells in all tabs)
CastSpellByName("name") - Cast the specified spell by display name. *UPDATE* - Works! - (6/14/05 by nubious)
GetCraftSpellFocus - ?.
GetNumSpellTabs() - Returns the total number of tabs in the user's spellbook.
GetQuestLogRewardSpell()
GetRewardSpell()
GetSpellCooldown(spellID, spellbookTabNum) - ?.
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, spellbookTabNum) - ?.
IsSpellPassive(spellID, spellbookTabNum) - ?.
IsTrainerServiceLearnSpell(index)
PickupSpell(spellID, spellbookTabNum) - 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() - ?.
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() - ?.

String Functions

These string functions are compatability references to the LUA string library (which is available via string., see StringLibraryTutorial for more info),

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.
format(formatstring{,value,...}) - Return a formatted string using values passed in.
gsub(string,pattern,replacement{,limitCount}) - Globally substitute pattern for replacement in string.
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.

Table Functions

These table functions are compatability references to the LUA string library (which is available via table., see 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.
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

CheckTalentMasterDist()
ConfirmTalentWipe()
GetNumTalentTabs()
GetNumTalents(tabIndex)
GetTalentInfo(tabIndex,talentIndex)
GetTalentPrereqs(tabIndex,talentIndex)
GetTalentTabInfo(tabIndex)
LearnTalent(tabIndex,talentIndex)

Targetting Functions

ClearTarget() - Clears the selected target.
TargetByName("name") - Selects the specified player as the current target.
TargetLastEnemy() - Selects the last targetted enemy as the current target.
TargetNearestEnemy({reverse}) - Selects the nearest enemy as the current target.
TargetNearestFriend() - Selects the nearest member of your party.
TargetUnit("unit") - Selects the specified id as the current target.
TargetUnitsPet("unit") - Selects the specified unit's pet as the current target.
TargetNearestPartyMember() - Added Patch 1500 Efil 11:20, 6 Jun 2005

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

ToggleBackpack - Toggles your backpack open/closed.
ToggleBag - Opens or closes the specified bag.
ToggleCharacter - Toggles the character pane to the specified frame.
ToggleCombatLog - Opens/closes the combat log.
ToggleFramerate - Show/Hide the FPS.
ToggleFriendsFrame - Opens/closes the friends pane.
ToggleGameMenu - Opens/closes the game menu.
ToggleMinimap - Turns the minimap display on/off.
ToggleQuestLog - Opens/closes the quest log.
ToggleWorldMap - Turns the world map on/off.

Trading Functions

AddTradeMoney() - Adds the money dropped into the players 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)
CloseTrade - Closes the trade.
DropCursorMoney - Drops the amount of money held by the cursor.
GetCursorMoney - Returns the amount of money held by the cursor.
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 link to a trade item.
GetTradeTargetItemInfo(id) - Returns information about a trade item.
GetTradeTargetItemLink(id) - Returns link to a trade item.
InitiateTrade(UnitId) - Asks the specified unit to trade.
PickupPlayerMoney - Picks up an amount of money from the player.
ReplaceTradeEnchant - Confirm the replacement of an enchantment via trade.

TradeSkill Functions

CloseTradeSkill() - Closes an open trade skill window.
CollapseTradeSkillSubClass(index) - Collapses the specified subclass header row.
DoTradeSkill(index{,repeat}) - Performs the tradeskill a specified # of times.
ExpandTradeSkillSubClass(index) - Expands the specified subclass header row.
GetFirstTradeSkill() - Returns the index of the first non-header trade skill entry.
GetNumTradeSkills() - Get the number of trade skill entries (including headers).
GetTradeSkillCooldown(index) - Returns the number of seconds left for a skill to cooldown.
GetTradeSkillIcon(index) - Returns the texture name of a tradeskill's icon.
GetTradeSkillInfo(index) - Retrieves information about a specific trade skill.
GetTradeSkillInvSlotFilter(slotIndex) - ?.
GetTradeSkillInvSlots() - Returns a list of the available inventory slot types.
GetTradeSkillItemLink(index) - Gets the link string for a trade skill item.
GetTradeSkillItemStats() - ?
GetTradeSkillLine() - Returns information about the selected skill line.
GetTradeSkillNumMade(index) - Gets the number of items made in a single use of a skill.
GetTradeSkillNumReagents(tradeSkillRecipeId) - Returns the number of different reagents required.
GetTradeSkillReagentInfo(tradeSkillRecipeId, reagentId) - Returns data on the reagent, including a count of the player's inventory.
GetTradeSkillReagentItemLink(index, reagentId) - Gets the link string for a trade skill reagent.
GetTradeskillRepeatCount() - ?.
GetTradeSkillSelectionIndex() - Returns the Id of the currently selected trade skill, 0 if none selected.
GetTradeSkillSubClasses() - Returns a list of the valid subclasses.
GetTradeSkillSubClassFilter - ?.
GetTradeSkillTools(index) - Returns information about the tools needed for a tradeskill.
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.

Training Functions

AddSendMailCOD - ?.
BuyTrainerService - ?.
CloseTrainer - ?.
CollapseTrainerSkillLine - ?.
ExpandTrainerSkillLine - ?.
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 - ?.
GetTrainerServiceCost(index) - Returns the cost of a specific trainer service.
GetTrainerServiceDescription(index) - Returns the description of a specific trainer service.
GetTrainerServiceIcon - ?.
GetTrainerServiceInfo - ?.
GetTrainerServiceLevelReq - ?.
GetTrainerServiceNumAbilityReq - ?.
GetTrainerServiceSkillLine - ?.
GetTrainerServiceSkillReq - ?.
GetTrainerServiceStepIncrease() - ?.
GetTrainerServiceStepReq - ?.
GetTrainerServiceTypeFilter - Returns the status of a skill filter in the trainer window.
GetTrainerSkillLineFilter() - ?;
GetTrainerSkillLines() - ?;
IsTalentTrainer - ?.
IsTradeskillTrainer - ?.
IsTrainerServiceLearnSpell - ?.
IsTrainerServiceSkillStep() - ?.
IsTrainerServiceTradeSkill() - ?.
OpenTrainer() - ?.
SelectTrainerService - ?.
SetTrainerServiceTypeFilter - ?.
SetTrainerSkillLineFilter() - ?.

Unit Functions

World of Warcraft API Unit IDs

AssistUnit("unit") - Instructs your character to assist the specified unit.
CheckInteractDistance("unit",distIndex)
DropItemOnUnit("unit") - Drops an item from the cursor onto a unitt.
FollowUnit("unit")
SpellCanTargetUnit("unit")
SpellTargetUnit("unit")
StartDuelUnit("unit") - Challenge a unit to a duel.
TargetUnit("unit") - Selects the specified id as the current target.
TargetUnitsPet("unit") - Targets the specified unit's pet, if one exists.
UnitAffectingCombat("unit") - Returns true if unit is in combat or has aggro. Turns false otherwise or on death.
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) - Retrieves info about a buff of a certain unit.
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") - ?.
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").
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) - Retrieves info about a debuff of a certain unit.
UnitDefense("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) -~~
UnitFacing("unit") - Returns the direction in which the unit is facing (Counterclockwise radians, from North) - REMOVED IN 1300 -- Flickering 16:51, 22 Mar 2005 (EST)
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 specified unit is in the same party as the player, false otherwise.
UnitIsCharmed("unit") - Returns true if the specified unit is charmed, false otherwise.
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, false otherwise.
UnitIsDeadOrGhost("unit") - Returns true if the specified unit is dead or a ghost, false otherwise.
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.
UnitIsPartyLeader("unit") - Returns true if the specified unit is the leader of the player's party, false otherwise.
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)
UnitIsPVP("unit") - Returns true if the specified unit is flagged for PVP, false otherwise.
UnitIsPVPFreeForAll("unit") - Returns true if the specified unit is flagged for free-for-all PVP, false otherwise.
UnitIsTapped("unit") - Returns true if the specified unit is tapped, false otherwise.
UnitIsTappedByPlayer("unit") - Returns true if the specified unit is tapped by a player, false otherwise.
UnitIsTrivial("unit") - Returns true if the specified unit is trivial (Trivial means the unit is "grey" to the player. --Antiarc 16:02, 30 Jan 2005 (EST)), false otherwise.
UnitIsUnit("unit", "otherUnit") - Returns true if the two specified units refer to the same unit (e.g., "player" and "target" can refer to the same unit), false otherwise.
UnitIsVisible("unit") - true/false
UnitLevel("unit") - Returns the level of the unit referred to by the local naming schema.
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 of the unit referred to by the local naming schema.
UnitPVPName("unit") - ?.
UnitPVPRank("unit") - Get PvP rank information for requested unit.
UnitPlayerControlled("unit") - Returns true if the specified unit is controlled by a player, false otherwise.
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.
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.
UnitXPMax("unit") - Returns the number of experience points the specified unit needs to reach their next level.

New Functions

add functions whose group is not clear here

Example Function

assert(value) - asserts a value is non-nil, otherwise shows dialog and outputs debug diagnostic information if you have a debugger attached to wow.exe
_ERRORMESSAGE(value) - Displays the script error dialog with optional text
GetFarclip() - Get the world appearance Terrain Distance.
SetFarclip(value) - Set the world appearance Terrain Distance (177-777).
GetWorldDetail() - Get the world appearance Environment Detail.
SetWorldDetail(value) - Set the world appearance Environment Detail (0,1,2).
GetBaseMip() - Get the world appearance Texture Detail.
SetBaseMip(value) - Set the world appearance Texture Detail (0,1).
GetTerrainMip() - Get the world appearance Terrain Texture.
SetTerrainMip(value) - Set the world appearance Terrain Texture (0,1).
GetCurrentMultisampleFormat() - Get the current in-use multi-sample (antialias) format.
GetMultisampleFormats() - Get the available multi-sample (antialias) formats..
SetMultisampleFormat(index) - Set the multi-sample (antialias) format to use.
ShowingCloak() - Return 1 if player's cloak is displayed, nil otherwise.
ShowingHelm() - Return 1 if player's helm is displayed, nil otherwise.
ShowCloak(flag) - Set whether player's cloak is displayed.
ShowHelm(flag) - Set whether player's helm is displayed.
GetBuildVersion() - Return the build version of the game (e.g. "1.2.1") - Seems to be removed in 1.5.0
GetDodgeChance() - Return's the player's percentage dodge chance.
GetDoodadAnim() - ???
GetParryChance() - Return's the player's percentage parry chance.
CheckSpiritHealerDist()
ClearInspectPlayer() - Reset inspect data once finished with it (Called on inspect window hide)
ClearTutorials()
ConfirmSummon()
ConsoleExec("command") - Execute a console command.
CursorHasMoney() - true/false
CursorHasSpell() - true/false
debuginfo() - output debug text. Freeware debug message viewer: DebugView
DeleteFile() - ?
DeleteGMTicket()
DemoteAssistant(x)
EquipCursorItem(x)
FlagTutorial("tutotial")
ForceLogout()
InCinematic()
IsResting()
LaunchURL("URL")
ResetTutorials()
FollowByName("name")
FrameXML_Debug(flag)
GetActiveLevel(index)
GetActiveTitle(index)
GetAreaSpiritHealerTime(index)
GetAvailableLevel(index)
GetAvailableTitle(index)
GetBindLocation() - Get the name of the location for your Hearthstone.
GetBlockChance() -
GetBonusBarOffset()
GetBoundMapPosition() -
GetCoinIcon(amount)
GetComboPoints() - Get the current number of combo points.
GetCorpseRecoveryDelay()
GetCurrentPosition() - REMOVED IN 1300 -- Flickering 16:43, 22 Mar 2005 (EST)
GetCurrentResolution() - Get the index of the current screen resolution.
GetCursorPosition() - Get the cursor location on the screen
GetDebugStats()
GetFramerate() - Returns the current framerate (full precision)
GetGMStatus()
GetGMTicket()
GetGMTicketCategories()
GetGreetingText()
GetInstanceBootTimeRemaining()
GetLanguageByIndex(index)
GetMeetingStoneStatusText()
GetMoney()
GetMouseFocus() ???
GetNetStats() - Get bandwidth and latency network information.
GetNextStableSlotCost()
GetNumLaguages()
GetNumShapeshiftForms()
GetNumStableSlots()
GetNumStationeries()
GetNumWhoResults()
GetObjectiveText()
GetPluralIndex()
GetProgressText()
GetReleaseTimeRemaining() - Returns the amount of time left before your ghost is pulled from your body.
GetResSicknessDuration()
GetRestState()
GetSelectedStationeryTexture()
GetShapeshiftFormCooldown(index)
GetShapeshiftFormInfo(index) - Retrieves information about an available ShapeshiftForm or Stance.
GetStationeryInfo(index)
GetSummonConfirmAreaName()
GetSummonConfirmSummoner()
GetSummonConfirmTimeLeft()
GetTexLodBias()
GetText()
GetTimeToWellRested()
GetTitleText()
GetTrackingTexture()
GetWaterDetail()
GetWhoInfo(index)
GetXPExhaustion()
GMRequestPlayerInfo() - access denied (darn)
HasFullControl()
HasSoulstone()
HideNameplates() - Turn off display of nameplates.
IsCurrentCast(id,bookType)
IsInMeetingStoneQueue()
IsInventoryItemLocked(id)
NewGMTicket(type,"text")
NotifyInspect("unit")
OffhandHasWeapon() - Determine if your offhand carries a weapon.
OpeningCinematic() - shows the opening movie for a player's race
PickupTradeMoney(amount)
PlayVocalCategory("category") - REMOVED IN 1300 -- Flickering 16:43, 22 Mar 2005 (EST)
PromoteToAssistant("name")
PurchaseSlot()
ReadFile() - ?.
ReplaceEnchant()
RepopMe() - The "Release Spirit" button. Sends you to the graveyard when dead. -Moof
ReportBug("text") - REMOVED IN 1300 -- Flickering
ReportNote("text") - REMOVED IN 1300 -- Flickering
ReportSuggestion("text","category") - REMOVED IN 1300 -- Flickering
RequestTimePlayed() - Request a summary of time played from the server.
ResurrectHasSickness()
RetrieveCorpse()
RunScript("script") - Execute "script" as a block of LUA code.
SelectStationery(index)
SendWho("filter") - Send a who request to the server.
SetBagPortaitTexture(texture,slot)
SetConsoleKey - ?.
SetDoodadAnim() - ?.
SetEuropeanNumbers - Unknown
SetLayoutMode()
SetLootPortrait()
SetPortraitTexture(texture,"unit") - Paint a Texture object with the specified unit's portrait.
SetPortraitToTexture(x,x)
SetTexLodBias()
SetTradeMoney(amount)
SetWaterDetail()
SetWhoToUI(toUIFlag) - Indicate that who request results should be delivered as WHO_LIST_UPDATE instead of to chat.
ShowContainerSellCursor(index,slot)
ShowInspectCursor() - Change the cursor to the magnifying glass inventory inspection cursor
ShowInventorySellCursor() - ?.
ShowNameplates() - Turn on display of nameplates.
SortWho(sortType)
SplitContainerItem(index,slot,amount)
SplitMoney("goldsilvercopper")
StartDuel("name") - Challenge someone to a duel (by name)
StopCinematic()
ToggleMouseMove()
TutorialsEnabled()
UpdateGMTicket(type,"text")
UseSoulstone()

Widget Specific Functions

The Widget API has been moved onto its own page. All of the documentation that was linked from here is now linked from there (Verified -- Flickering 23:43, 6 Feb 2005 (EST)).