Wowpedia

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

READ MORE

Wowpedia
Line 996: Line 996:
   
 
=== Unit Functions ===
 
=== Unit Functions ===
: [[API UnitArmor|UnitArmor]] - ?.
+
: [[API UnitArmor|UnitArmor]] - Returns the armor statistics relevant to the specified target.
   
 
: [[API UnitAttackBothHands|UnitAttackBothHands]] - ?.
 
: [[API UnitAttackBothHands|UnitAttackBothHands]] - ?.

Revision as of 21:44, 20 November 2004

The World of Warcraft API doc is currently at http://www.cosmosui.org/texts/BlizzardCommands.xml (outdated). It should hopefully be ported here soon.

Global Function Groups

Template:Dynamic list

Here is a list of all potential global functions: Global Function List.

Action Functions

AcceptDuel - The player accepts the challenge to duel.
ActionButtonDown - Press the specified action button.
ActionButtonUp - Release the specified action button.
AddTradeMoney - Adds the money dropped into the player's trade frame.
AssistByName - Assists the player whose name is entered.
AssistUnit - Instructs your character to assist the target player.
AttackTarget - Attacks the targetted unit.
BeginTrade - Begins the trade with the target.
BonusActionButtonDown - Trigger the specified bonus(pet or minion) action button.
BonusActionButtonUp - Release the specified bonus(pet or minion) action button.
CancelDuel - Refuse the invitation to fight a duel.
ChangeActionBarPage - ?.
Duel - Duels a specified user by name.
GetActionCooldown - ?.
GetActionCount - ?.
GetActionText - ?.
GetActionTexture - ?.
GetBindingAction - ?.
HasAction - ?.
IsActionInRange - ?.
IsAttackAction - ?.
IsAutoRepeatAction - ?.
IsCurrentAction - ?.
IsUsableAction - ?.
Jump - The player jumps.
PickupAction - ?.
PlaceAction - ?.
SitOrStand - The player sits or stands.
StartDuelUnit - Challenge a unit to a duel.
ToggleSheath - Toggles sheathed or unsheathed weapons.
TurnOrActionStart - ?.
TurnOrActionStop - ?.
UseAction - ?.

Auction Functions

CalculateAuctionDeposit - ?.
CancelAuction - ?.
CanSendAuctionQuery - ?.
ClickAuctionSellItemButton - ?.
CloseAuctionHouse - ?.
GetAuctionInvTypes - ?.
GetAuctionItemClasses - ?.
GetAuctionItemInfo - ?.
GetAuctionItemLink - ?.
GetAuctionItemSubClasses - ?.
GetAuctionItemTimeLeft - ?.
GetAuctionSellItemInfo - ?.
GetBidderAuctionItems - ?.
GetNumAuctionItems - ?.
GetOwnerAuctionItems - ?.
GetSelectedAuctionItem - ?.
IsAuctionSortReversed - ?.
PlaceAuctionBid - ?.
QueryAuctionItems - ?.
SetSelectedAuctionItem - ?.
SortAuctionItems - ?.
StartAuction - ?.

Battlefield Functions

CloseBattlefield - ?.
GetBattlefieldInfo - ?.
GetNumBattlefields - ?.
GetSelectedBattlefield - ?.
JoinBattlefield - ?.
SetSelectedBattlefield - ?.

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

ChannelBan - Bans a player from the specified channel.
ChannelInvite - Invites the specified user to the channel.
ChannelKick - Kicks the specified user from the channel.
ChannelModerate - ?.
ChannelModerator - Sets the specified player as the channel moderator.
ChannelMute - Turns off the specified player's ability to speak in a channel.
ChannelToggleAnnouncements - Toggles the channel to display announcements either on or off.
ChannelUnban - Unbans a player from a channel.
ChannelUnmoderator - Takes the specified user away from the moderator status.
ChannelUnmute - Unmutes the specified user from the channel.
DisplayChannelOwner - ?.
EnumerateServerChannels - ?.
GetChannelList - ?.
GetChannelName - ?.
GetChatWindowChannels - ?.
JoinChannelByName - ?.
LeaveChannelByName - Leaves the channel with the specified name.
ListChannelByName - Lists all of the channels that match the specified regular expression.
ListChannels - Lists all of the channels.
RemoveChatWindowChannel - ?.
SetChannelOwner - ?.
SetChannelPassword - 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.
AcceptXPLoss - Accept the XP loss to be reborn where you stand.
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.

Frame Functions

Group Functions

AcceptGroup - Accept the invitation to party.
DeclineGroup - Decline the invitation to a party.
GetPartyMember - Returns the name of the party member at the specified index.
InviteByName - Invites the specified player to the group sender is currently in.
InviteToParty - Invite a unit to a party.
IsPartyLeader - Returns true if the player is the party leader.
LeaveParty - Quit the party.
PromoteByName - Promotes by name the target.
PromoteToPartyLeader - Promote a unit to party leader.
UnitInParty - Returns true if the unit is a member of your party.
UnitIsPartyLeader - Returns true if the unit is its partyleader.
UninviteByName - Uninvites (kicks) the target from the current group if group leader.
UninviteFromParty - Kick a unit from the party.

Guild Functions

AcceptGuild - The player accepts the invitation to join a guild.
BuyGuildCharter - ?.
CanEditMOTD - ?.
CanEditOfficerNote - ?.
CanEditPublicNote - ?.
CanGuildDemote - ?.
CanGuildInvite - ?.
CanGuildPromote - ?.
CanGuildRemove - ?.
CanViewOfficerNote - ?.
CloseGuildRegistrar - ?.
DeclineGuild - ?.
GetGuildCharterCost - ?.
GetGuildInfo - ?.
GetGuildRosterInfo - ?.
GetGuildRosterLastOnline - ?.
GetGuildRosterMOTD - ?.
GetGuildRosterSelection - ?.
GetGuildRosterShowOffline - ?.
GetNumGuildMembers - ?.
GuildControlAddRank - ?.
GuildControlDelRank - ?.
GuildControlGetNumRanks - ?.
GuildControlGetRankFlags - ?.
GuildControlGetRankName - ?.
GuildControlSaveRank - ?.
GuildControlSetRankFlag - ?.
GuildControlSetRank - ?.
GuildDemoteByName - ?.
GuildDisband - ?.
GuildInfo - ?.
GuildInviteByName - ?.
GuildLeave - ?.
GuildPromoteByName - ?.
GuildRosterSetOfficerNote - ?.
GuildRosterSetPublicNote - ?.
GuildRoster - ?.
GuildSetLeaderByName - ?.
GuildSetMOTD - ?.
GuildUninviteByName - ?.
IsGuildLeader - ?.
IsInGuild - ?.
SetGuildRosterSelection - ?.
SetGuildRosterShowOffline - ?.
SortGuildRoster - ?.
TurnInGuildCharter - ?.

Item Functions

AutoEquipCursorItem - Causes the equipment on the cursor to be equipped.

Inventory Functions

BankButtonIDToInvSlotID - Returns the ID number of a bank button in terms of inventory slot ID.

Macro Functions

CreateMacro - ?.
DeleteMacro - ?.
EditMacro - ?.
GetMacroIconInfo - ?.
GetMacroIndexByName - ?.
GetMacroInfo - ?.
GetNumMacroIcons - ?.
GetNumMacros - ?.
PickupMacro - ?.
RunMacro - ?.
SaveMacros - ?.

Mail Functions

AddSendMailCOD - ?.
AddSendMailMoney - ?.
CheckInbox - ?.
ClickSendMailItemButton - ?.
CloseMail - ?.
DeleteInboxItem - ?.
GetInboxHeaderInfo - ?.
GetInboxItem - ?.
GetInboxNumItems - ?.
GetInboxText - ?.
GetSendMailCOD - ?.
GetSendMailItem - ?.
GetSendMailMoney - ?.
GetSendMailPrice - ?.
HasNewMail - ?.
InboxItemCanDelete - ?.
PickupSendMailCOD - ?.
PickupSendMailMoney - ?.
ReturnInboxItem - ?.
SendMail - ?.
SetSendMailCOD - ?.
SetSendMailMoney - ?.
TakeInboxItem - ?.
TakeInboxMoney - ?.
TakeInboxTextItem - ?.

Mapping Functions

GetCorpseMapPosition - Returns the postion off the corpse on the current 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 - ?.
GetMapInfo - ?.
GetMapLandmarkInfo - ?.
GetMapOverlayInfo - ?.
GetMapZones - ?.
GetMinimapZoneText - ?.
GetNumMapLandmarks - ?.
GetNumMapOverlays - ?.
GetPlayerMapPosition - ?.
GetRealZoneText - ?.
GetSubZoneText - ?.
GetZonePVPInfo - ?.
GetZoneText - ?.
ProcessMapClick - ?.
SetMapToCurrentZone - ?.
SetMapZoom - ?.
SetupWorldMapScale - ?.
UpdateMapHighlight - ?.

Math Functions

abs - Returns the absolute value of the number.
acos - Returns the value of the arc cosine of the value in degrees.
asin - Returns the value of the arc sine of the value in degrees.
atan - Returns the value of the arc tan of the value in degrees.
atan2 - Returns the value of the arc tangent of X/Y in degrees.

Merchant Functions

BuyMerchantItem - ?.
CanMerchantRepair - ?.
CloseMerchant - ?.
GetMerchantItemInfo - ?.
GetMerchantItemLink - ?.
GetMerchantItemMaxStack - ?.
GetMerchantNumItems - ?.
PickupMerchantItem - ?.
ShowMerchantSellCursor - ?.

Miscellaneous Functions

AddChatWindowChannel - Adds a chat channel to a chat window.
AddChatWindowMessage - Adds a messaging group to the specified chat window.
GetScreenHeight - Returns the height of the window in pixels.
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.
NotWhileDeadError - Generates an error message saying you cannot do that while dead.
Screenshot - Takes a screenshot.
SendChatMessage - Sends a chat message.
TakeScreenshot - Takes a screenshot.

Movement Functions

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 starts 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 - ?.
ClickStablePet - ?.
ClosePetStables - ?.
GetNumStablePets - ?.
GetPetActionCooldown - ?.
GetPetActionInfo - ?.
GetPetActionsUsable - ?.
GetPetExperience - ?.
GetPetFoodTypes - ?.
GetPetHappiness - ?.
GetPetIcon - ?.
GetPetLoyalty - ?.
GetPetTimeRemaining - ?.
GetPetTrainingPoints - ?.
GetSelectedStablePet - ?.
GetStablePetFoodTypes - ?.
GetStablePetInfo - ?.
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 - Retuns true if the pet is abandonable.
PetCanBeRenamed - Retuns 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 - ?.
PetWait - Instruct your pet to remain still.
PickupPetAction - ?.
PickupStablePet - ?.
SetPetStablePaperdoll - ?.
TargetUnitsPet - ?.
TogglePetAutocast - ?.

Petition Functions

CanSignPetition - ?.
ClosePetition - ?.
GetNumPetitionNames - ?.
GetPetitionInfo - ?.
GetPetitionNameInfo - ?.
OfferPetition - ?.
SignPetition - ?.

Quest Functions

AbandonQuest - Abandon the specified quest.
AcceptQuest - Accept the specified quest.
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 - ?.
GetNumQuestLogChoices - Returns the number of options someone has when getting a quest item.
GetNumQuestLogEntries - ?.
GetNumQuestLogRewards - Returns the count of the rewards for a particular quest.
GetNumQuestRewards - ?.
GetQuestBackgroundMaterial - Returns the material string associated with the particular quest.
GetQuestGreenRange - ?.
GetQuestIndexForTimer - ?.
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 - ?.
GetQuestLogPushable - ?.
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.
QuestChooseRewardError - Throws an error when the quest choose reward method doesn't work.
QuestLogPushQuest - ?.
SelectActiveQuest - ?.
SelectAvailableQuest - ?.
SelectGossipActiveQuest - ?.
SelectGossipAvailableQuest - ?.
SelectQuestLogEntry - ?.
SetAbandonQuest - Called before AbandonQuest.

Raid Functions

ConvertToRaid - ?.
GetNumRaidMembers - ?.
GetRaidRosterInfo - ?.
GetRaidRosterSelection - ?.
IsRaidLeader - ?.
IsRaidOfficer - ?.
SetRaidRosterSelection - ?.
SetRaidSubgroup - ?.
SwapRaidSubgroup - ?.
UninviteFromRaid - ?.

Spell Functions

CastSpell - ?.
CastSpellByName - ?.
GetCraftSpellFocus - ?.
GetNumSpellTabs - ?.
GetSpellCooldown - ?.
GetSpellName - ?.
GetSpellTabInfo - ?.
GetSpellTexture - ?.
IsSpellPassive - ?.
PickupSpell - ?.
PlayerHasSpells - ?.
SpellCanTargetUnit - ?.
SpellIsTargeting - ?.
SpellStopCasting - ?.
SpellStopTargeting - ?.
SpellTargetUnit - ?.
UpdateSpells - ?.

Targetting Functions

ClearTarget - Clears the selected target.
TargetLastEnemy - Selects the last targetted enemy as the current target.
TargetNearestEnemy - Selects the nearest enemy as the current target.
TargetUnit - Selects the specified id as the current target.

Taxi Functions

CloseTaxiMap - ?.
NumTaxiNodes - ?.
SetTaxiMap - ?.
TakeTaxiNode - ?.
TaxiNodeCost - ?.
TaxiNodeGetType - ?.
TaxiNodeName - ?.
TaxiNodePosition - ?.
UnitOnTaxi - ?.

Toggle Functions

ToggleBackpack - Toggles your backpage open/closed.
ToggleBag - Opens or closes the specified bag.
ToggleCharacter - Toggles the character pane to the specified frame.
ToggleCombatLog - Opens/closes the combat log.
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.
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.
GetTradeTargetItemInfo - Returns information about a trade item.
InitiateTrade - 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 - ?.
CollapseTradeSkillSubClass - ?.
DoTradeSkill - ?.
ExpandTradeSkillSubClass - ?.
GetFirstTradeSkill - ?.
GetNumTradeSkills - ?.
GetTradeSkillCooldown - ?.
GetTradeSkillIcon - ?.
GetTradeSkillInfo - ?.
GetTradeSkillInvSlotFilter - ?.
GetTradeSkillInvSlots - ?.
GetTradeSkillItemLink - ?.
GetTradeSkillLine - ?.
GetTradeSkillNumMade - ?.
GetTradeSkillNumReagents - ?.
GetTradeSkillReagentInfo - ?.
GetTradeSkillReagentItemLink - ?.
GetTradeSkillSelectionIndex - ?.
GetTradeSkillSubClassFilter - ?.
GetTradeSkillSubClasses - ?.
GetTradeSkillTools - ?.
GetTradeskillRepeatCount - ?.
SelectTradeSkill - ?.
SetTradeSkillInvSlotFilter - ?.
SetTradeSkillSubClassFilter - ?.

Training Functions

AddSendMailCOD - ?.
BuyTrainerService - ?.
CloseTrainer - ?.
CollapseTrainerSkillLine - ?.
ExpandTrainerSkillLine - ?.
GetNumTrainerServices - ?.
GetTrainerGreetingText - ?.
GetTrainerSelectionIndex - ?.
GetTrainerServiceAbilityReq - ?.
GetTrainerServiceCost - ?.
GetTrainerServiceDescription - ?.
GetTrainerServiceIcon - ?.
GetTrainerServiceInfo - ?.
GetTrainerServiceLevelReq - ?.
GetTrainerServiceNumAbilityReq - ?.
GetTrainerServiceSkillLine - ?.
GetTrainerServiceSkillReq - ?.
GetTrainerServiceStepReq - ?.
GetTrainerServiceTypeFilter - ?.
IsTalentTrainer - ?.
IsTradeskillTrainer - ?.
IsTrainerServiceLearnSpell - ?.
SelectTrainerService - ?.
SetTrainerServiceTypeFilter - ?.

Unit Functions

UnitArmor - Returns the armor statistics relevant to the specified target.
UnitAttackBothHands - ?.
UnitAttackPower - ?.
UnitAttackSpeed - ?.
UnitBuff - ?.
UnitCanAttack - ?.
UnitCanCooperate - ?.
UnitCharacterPoints - ?.
UnitClass - ?.
UnitClassification - ?.
UnitCreatureFamily - ?.
UnitDamage - ?.
UnitDebuff - ?.
UnitDefense - ?.
UnitExists - ?.
UnitFactionGroup - ?.
UnitHealth - ?.
UnitHealthMax - ?.
UnitInParty - ?.
UnitIsConnected - ?.
UnitIsCorpse - ?.
UnitIsDead - ?.
UnitIsDeadOrGhost - ?.
UnitIsEnemy - ?.
UnitIsFriend - ?.
UnitIsGhost - ?.
UnitIsPVP - ?.
UnitIsPVPFreeForAll - ?.
UnitIsPartyLeader - ?.
UnitIsPlayer - ?.
UnitIsPlusMob - ?.
UnitIsTapped - ?.
UnitIsTappedByPlayer - ?.
UnitIsUnit - ?.
UnitLevel - ?.
UnitMana - ?.
UnitManaMax - ?.
UnitName - ?.
UnitPVPName - ?.
UnitPlayerControlled - ?.
UnitPowerType - ?.
UnitRace - ?.
UnitRangedAttack - ?.
UnitRangedAttackPower - ?.
UnitRangedDamage - ?.
UnitReaction - ?.
UnitResistance - ?.
UnitSex - ?.
UnitStat - ?.
UnitXP - ?.
UnitXPMax - ?.

New Functions

add functions whose group is not clear here


Example Function

Widget Specific Functions

Here is a complete list of potential widget specific functions: Widget_Function_List.

This section needs to be filled in...

Button

GameTooltip

Example of the sort of functions that belong here:

SetOwner - Attach the tooltip to another object.

Frame

SetPoint - Position the frame relative to another object.