Im not done at all with this thread, but your now allowed to post.
PROTECTED - This function can only be called from secure code. See the Protected Functions category.
NOCOMBAT - This function cannot be called from insecure code while in combat.
UI - This function is implemented in Lua (in FrameXML) but was considered important enough to appear here.
REMOVED - This function has been removed from the World of Warcraft API (and should also be removed from this list). For historical purposes, see the Removed Functions category.
Account PlayTime Limit Functions
Those functions only return meaningful values on Asian realms; all three relate to the play time limitation system.
Code:
GetBillingTimeRested() - returns the time spent logged in in current billing unit.
PartialPlayTime() - returns 1 if the player is currently "tired": reduced XP, loot.
NoPlayTime() - returns 1 if the player is currently "unhealthy": no XP, loot.
Achievement Functions
These functions are only available in Patch 3.0.
Code:
CanShowAchievementUI() - Returns if the AchievementUI can be displayed
ClearAchievementComparisonUnit() - Remove the unit being compared.
GetAchievementCategory(achievementID) - Return the category number the requested achievement belongs to.
GetAchievementComparisonInfo(achievementID, comparisonNum) - Return the status of the achievement for the comparison player.
GetAchievementCriteriaInfo(achievementID, criteriaNum) - Return information about the requested criteria.
GetAchievementInfo((achievementID) or (category, offset) - Return information about the requested Achievement.
GetAchievementInfoFromCriteria(id) - Return information about the requested Achievement.
GetAchievementLink(achievementID) - Returns a achievementLink for the specified Achievement.
GetAchievementNumCriteria(achievementID) - Return the number of criteria the requested Achievement has.
GetAchievementNumRewards(achievementID) - Return the number of rewards the requested Achievement has.
GetCategoryInfo(category) - Return information about the requested category
GetCategoryList() - Returns the list of Achievement categories.
GetCategoryNumAchievements(category) - Return the number of Achievements, and number completed for the specific category.
GetComparisonAchievementPoints() - Return the total number of achievement points the comparison unit has earned.
GetComparisonCategoryNumAchievements(achievementID)
GetComparisonStatistic(achievementID) - Return the value of the requested statistic for the comparison player.
GetLatestCompletedAchievements() - Return the ID's of the last 5 completed Achievements.
GetLatestCompletedComparisonAchievements()
GetLatestUpdatedComparisonStats()
GetLatestUpdatedStats() - Return the ID's of the last 5 updated Statistics.
GetNextAchievement(achievementID)
GetNumComparisonCompletedAchievements()
GetNumCompletedAchievements() - Return the total number of Achievements, and number completed.
GetPreviousAchievement(achievementID) - Return previous related achievements.
GetStatistic(achievementID) - Return the value of the requested statistic.
GetStatisticsCategoryList() - Returns the list of Statistic categories.
GetTotalAchievementPoints() - Return the total number of achievement points earned.
GetTrackedAchievements() - Return the AchievementID of the currently tracked achievements
GetNumTrackedAchievements() - Return the total number of the currently tracked achievements
RemoveTrackedAchievement(achievementID) - Stops an achievement from being tracked
SetAchievementComparisonUnit(unitId) - Set the unit to be compared to.
AddTrackedAchievement(achievementId) - Add an achievement to tracking.
Action Functions
These functions are those which operate with the action buttons (General player actions are likely in the Activity Functions section below).
Code:
PROTECTED UI ActionButtonDown(id) - Press the specified action button. (2.0 Protected)
PROTECTED UI ActionButtonUp(id) - Release the specified action button. (2.0 Protected)
ActionHasRange(slot) - Determine if the specified action is a range restriction (1 if yes, nil if no)
UI BonusActionButtonDown - Trigger the specified bonus(pet or minion) action button.
UI BonusActionButtonUp - Release the specified bonus(pet or minion) action button.
PROTECTED CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - Protected)
PROTECTED CameraOrSelectOrMoveStop([stickyFlag]) - End "Left click" in the 3D world. (1.10 - Protected)
NOCOMBAT ChangeActionBarPage() - Changes the current action bar page.
GetActionBarPage() - Return the current action bar page. CURRENT_ACTIONBAR_PAGE is obsolete.
GetActionBarToggles() - Return the toggles for each action bar.
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.
GetActionInfo(slot) - Returns type, id, subtype.
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.
GetBonusBarOffset() - Determine which page of bonus actions to show.
GetMouseButtonClicked() -Returns the name of the button that triggered a mouse down/up/click/doubleclick event. (NEW 2.0.3)
GetMultiCastBarOffset() - Returns the page offset of the multicast action IDs (NEW in 3.2)
GetPossessInfo(index) - Returns texture, name, enabled.
HasAction(slot) - Returns 1 if the player has an action in the specified slot, nil otherwise.
IsActionInRange(slot,[unit]) - 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.
IsConsumableAction(slot) - Return 1 if an action is consumable (i.e. has a count), nil otherwise.
IsEquippedAction(slot) - Return 1 if an action is equipped (i.e. connected to an item that must be equipped), nil otherwise.
IsUsableAction(slot) - Return 1 if an action can be used at present, nil otherwise.
PetHasActionBar() - Determine if player has a pet with an action bar.
PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
PickupPetAction(slot) - Drags an action from the specified pet action bar slot into the cursor.
PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.
SetActionBarToggles(show1,show2,show3,show4[, alwaysShow]) - Set show toggle for each action bar - 'alwaysShow' added in 1.12
StopAttack() - Turns off auto-attack, if currently active. Has no effect is the player does not currently have auto-attack active.
PROTECTED TurnOrActionStart() - Begin "Right Click" in the 3D world. (1.10 - Protected)
PROTECTED TurnOrActionStop() - End "Right Click" in the 3D world. (1.10 - Protected)
PROTECTED UseAction(slot[, checkCursor[, onSelf]]) - This instructs the interface to use the action associated with the specified ID, optionally on the player (regardless of target)(2.0 - Protected).
Activity Functions
This section is for functions which make the player do something (and which aren't covered elsewhere, and which aren't simply confirmation steps)
Code:
AcceptDuel() - The player accepts the challenge to duel.
PROTECTED AttackTarget() - Attacks the targetted unit.
CancelDuel() - Refuse the invitation to fight a duel.
CancelLogout() - Cancels the logout timer (from camping or quitting).
ClearTutorials()
ConfirmSummon() - Accepts a summon request.
PROTECTED DescendStop() - The player stops descending (while swimming or flying) -- added in 2.1
Dismount() - The player dismounts the current mount. -- added in 2.0.3
FlagTutorial("tutorial")
PROTECTED ForceLogout()
ForceQuit() - Instantly quits the game, bypassing the timer.
GetSummonConfirmAreaName()
GetSummonConfirmSummoner()
GetSummonConfirmTimeLeft()
Logout - Logs the user out of the game.
Quit - Quits the game, not the Lua script.
RandomRoll(low, high) - Does a random roll between the two values.
SetPVP(arg1) - Sets the players PVP mode (1 to enable, nil to toggle off eventually)
PROTECTED SitStandOrDescendStart() - The player sits, stands, or descends -- added in 2.1
PROTECTED StartDuel("name") - Challenge someone to a duel (by name) -- protected in 2.0
TogglePVP() - Toggles PVP status
ToggleSheath() - Toggles sheathed or unsheathed weapons.
UseSoulstone() - Use an active soulstone to resurrect yourself after death.
AddOn Functions
Code:
DisableAddOn(index or "AddOnName") - Disable the specified AddOn for subsequent sessions.
DisableAllAddOns() - Disable all AddOns for subsequent sessions.
EnableAddOn(index or "AddOnName") - Enable the specified AddOn for subsequent sessions.
EnableAllAddOns() - Enable all AddOns for subsequent sessions.
GetAddOnDependencies(index or "AddOnName") - Get dependency list for an AddOn.
GetAddOnInfo(index or "AddOnName") - Get information about an AddOn.
GetAddOnMetadata(index or "name", "variable") - Retrieve metadata from addon's TOC file.
GetNumAddOns() - Get the number of user supplied AddOns.
IsAddOnLoaded(index or "AddOnName") - Returns true if the specified AddOn is loaded.
IsAddOnLoadOnDemand(index or "AddOnName") - Test whether an AddOn is load-on-demand.
LoadAddOn(index or "AddOnName") - Request loading of a Load-On-Demand AddOn.
ResetDisabledAddOns() -
Arena Functions
Code:
AcceptArenaTeam() - Accepts a pending Arena team invitation.
ArenaTeamInviteByName(teamIndex, playerName) - Invites the specified player to the specified arena team.
ArenaTeamSetLeaderByName(teamIndex, playerName) - Sets new Team Leader to the specified arena team.
ArenaTeamLeave(teamIndex) - Leaves the specified arena team.
ArenaTeamRoster(teamIndex) - Sends a request to the server to request the most recent information on a specific Arena Team that you are in.
ArenaTeamUninviteByName(teamIndex, playerName) - Removes the specified played from the specified arena team.
ArenaTeamDisband(teamIndex) - Disbands the arena team without any warning! Requires you to be the leader of the team. (Known to be implemented as of 2.1.3, but may have existed before).
DeclineArenaTeam() - Declines a pending Arena team invitation.
GetArenaCurrency() - Gets the amount of arena points a player currently has to spend.
GetArenaTeam(teamIndex) - Returns information regarding the players arena team, nil if the player is not in the passed team
GetArenaTeamGdfInfo() - ? New in 3.0.8
GetArenaTeamRosterInfo(teamIndex, playerIndex) - Returns information regarding a player from the specified team. This requires a call to ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.
GetBattlefieldTeamInfo(index) - Gets info about a registered Arena Team at the end of an arena match.
GetCurrentArenaSeason() - Gets the current Arena season.
GetInspectArenaTeamData(index) - Retrieves all the data associated with the inspected player's arena team located at index.
GetNumArenaTeamMembers(teamIndex[, showOffline]) - Gets the number of arena team members. This requires a call to ArenaTeamRoster you only need to do this when the player logins in, UI reloads will not effect the return.
GetPreviousArenaSeason() - Gets the previous Arena season.
IsActiveBattlefieldArena() - Returns true if in an Arena Match, also Returns true for the second argument if it's a registered match.
IsArenaTeamCaptain(teamIndex) - Returns a value based on whether the player is the arena team captain.
IsBattlefieldArena() - Returns true if the battlemaster you're talking to can queue you for arenas
IsInArenaTeam() - Returns true if you are a member of an arena team.
Auction Functions
Code:
CalculateAuctionDeposit(runTime) - Returns the required deposit for the current selling item given the specified duration (minutes).
CanCancelAuction(index) - Returns 1 if auction can be canceled.
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 an itemLink 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]) - Returns details about an auction item on which the user is bidding (possibly out-dated by GetAuctionItemInfo("bidder", item))
GetNumAuctionItems("type") - Returns the size of the specified auction item list.
GetOwnerAuctionItems([page]) - Returns details about an auction item of which the user is the owner (possibly out-dated by GetAuctionItemInfo("owner", item))
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) - Performs a search of the auction house with the specified characteristics.
SetSelectedAuctionItem("type", index) - Selects a specific item in the auction house.
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.
UI AuctionFrameAuctions.duration - Set the amount of time the auction will run for in minutes.
Bank Functions
Code:
BankButtonIDToInvSlotID(buttonID, isBag) - Returns the ID number of a bank button or bag in terms of inventory slot ID.
CloseBankFrame() - Close the bank frame if it's open.
GetBankSlotCost(numSlots) - Returns the cost of the next bank slot.
GetNumBankSlots() - Returns total purchased bank bag slots, and a flag indicating if it's full.
PurchaseSlot() - Buys another bank slot if available.
Barber Shop Functions
These functions were introduced in Patch 3.0.2.
Code:
ApplyBarberShopStyle() - Purchase and apply the cosmetic changes.
BarberShopReset() - Reset any changes made in the Barber Shop.
CancelBarberShop() - Exit the Barber Shop chair.
GetBarberShopStyleInfo()
GetBarberShopTotalCost() - Returns the total costs of the cosmetic changes.
GetFacialHairCustomization()
GetHairCustomization()
SetNextBarberShopStyle()
Battlefield Functions
Code:
AcceptAreaSpiritHeal() - Accept a spirit heal.
AcceptBattlefieldPort(index[, acceptFlag]) - Accept or reject an offered battlefield port.
CancelAreaSpiritHeal() - Cancel a spirit heal.
CanJoinBattlefieldAsGroup() - returns nil if the player can not do a group join for a battlefield.
CheckSpiritHealerDist() - Return true if you are in range with spirit healer while dead.
CloseBattlefield() - Closes the queue for battlefield window.
GetAreaSpiritHealerTime() - Returns the time left until the next resurrection by the Sprit Guide.
GetBattlefieldEstimatedWaitTime(index) - Get the estimated wait for entry into the battlefield.
GetBattlefieldFlagPosition(index) - Get the map position and texture of the flag.
GetBattlefieldInfo(index) - Returns detailed information on the Battlefield you last opened a queue window for.
GetBattlefieldInstanceExpiration() - Get shutdown timer for the battlefield instance.
GetBattlefieldInstanceInfo(index) - Get the instance ID for a battlefield.
GetBattlefieldInstanceRunTime() - In milliseconds, the time since battleground started (seems to be queried from server because it is not in sync with time()).
GetBattlefieldMapIconScale() - Scale of the landmark icons on the battlefield minimap.
GetBattlefieldPortExpiration(index) - Get the remaining seconds before the battlefield port expires.
GetBattlefieldPosition(index) - Get the map position and name of a player in the battleground not in your raid.
GetBattlefieldScore(index) - Get score information about a player.
GetBattlefieldStatData(playerIndex, slotIndex) - Get information for a player from a column thats specific to a battleground (like Warsong Gulch flag captures).
GetBattlefieldStatInfo(index) - Get the battleground specific column for the score board.
GetBattlefieldStatus(index) - Get the battlefield's current status.
GetBattlefieldTimeWaited(index) - Get time waited in queue in milliseconds.
GetBattlefieldWinner() - Get the battlefields winner.
GetBattlegroundInfo() - Returns information about a battleground type.
GetHonorCurrency() - Gets the amount of honor points the player currently has to spend.
GetNumBattlefieldFlagPositions() - Get the number of flag positions available from GetBattlefieldFlagPosition().
GetNumBattlefieldPositions() - Get the number of positions available from GetBattlefieldPosition().
GetNumBattlefields() - Get the number of running battlefields for the last battleground queue window you opened.
GetNumBattlefieldScores() - Returns the number of scores(players) listed in the battlefield scoreboard.
GetNumBattlefieldStats() - Get the number of battleground specific columns.
GetNumWorldStateUI() - Get the number of WorldState UI's.
GetSelectedBattlefield() - Get the selected battlefield to join first.
GetWintergraspWaitTime() - Get the number of seconds until the next Wintergrasp battle. Returns nil if battle is in progress.
GetWorldStateUIInfo(i) - Get score and flag status within a battlefield.
IsPVPTimerRunning()
JoinBattlefield(index[, joinAs]) - Queue for a battleground either solo or as a group.
LeaveBattlefield() - Leave the current battlefield
ReportPlayerIsPVPAFK("unit") - Reports the specified player as AFK in a battleground.
RequestBattlefieldPositions() - Request new data for GetBattlefieldPosition().
RequestBattlefieldScoreData() - Request new data for GetBattlefieldScore().
RequestBattlegroundInstanceInfo(index) - Requests data about the available instances of a battleground.
SetBattlefieldScoreFaction([faction]) - Set the faction to show on the battlefield scoreboard.
SetSelectedBattlefield(index) - Select the battlefield instance you want to join or the first one that becomes available.
ShowBattlefieldList(index) - Displays a queue window for the specified battlefield. Only works if you are already in a queue for the battlefield. Index corresponds to location in queue array.
Binding Functions
Code:
GetBinding(index) - Get action and key bindings for that index.
GetBindingAction("KEY" [,checkOverride]) - Get the action bound to that key.
GetBindingKey("command") - Get the key(s) bound to that action.
UI GetBindingText("key", "prefix", returnAbbr) - Gets the string value for the key.
GetCurrentBindingSet() - Queries if current set of key bindings is character or account specific
GetNumBindings() - Get total number key bindings and headers.
LoadBindings(which) - Loads default, account or character specific key binding set into memory from disk.
RunBinding("command"[, "up"]) - Executes the key binding named "command"
SaveBindings(which) - Saves account or character specific key bindings from memory to disk.
SetBinding("key"[, "command"]) - Sets or unsets key bindings. (2.0 - Can not be used in combat.)
SetBindingSpell("KEY", "Spell Name") - Set a key binding directly to a spell, uses the same spell name syntax as /cast.
SetBindingClick("KEY", "ButtonName" [,"mouseButton"]) - Set a key binding directly to a Button object. The click sends a mouse down when the key is pressed, and a mouse up when it is released.
SetBindingItem("KEY", "itemname") -
SetBindingMacro("KEY", "macroname"|macroid) -
SetConsoleKey("key") - Sets the console key (normally ~ ).
SetOverrideBinding(owner, isPriority, "KEY" [,"COMMAND"]) - Set (or clear) an override key binding.
SetOverrideBindingSpell(owner, isPriority, "KEY", "spellname") -
SetOverrideBindingClick(owner, isPriority, "key", "buttonName" [, "mouseClick"]) - Sets an override binding that acts like a mouse click on a button.
SetOverrideBindingItem(owner, isPriority, "KEY", "itemname") -
SetOverrideBindingMacro(owner, isPriority, "KEY", "macroname"|macroid) -
ClearOverrideBindings(owner) - Reset all overrides belonging to an owner.
SetMouselookOverrideBinding("KEY" [,"COMMAND"]) -
IsModifierKeyDown() - equivalent to (IsShiftKeyDown() or IsControlKeyDown() or IsAltKeyDown()).
IsModifiedClick("action") - Returns 1 if the keys for the specified action are down, nil otherwise.
IsMouseButtonDown([button or "button"]) -
Buff/Debuff Functions
Code:
CancelUnitBuff("unit", index or "spell" [,"filter" or "rank"]) - Removes a specific buff from the player.
CancelItemTempEnchantment(weaponHand) - Cancels a temporary weapon enchant on weaponHand (1 for Main hand, 2 for Off hand).
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
UnitAura("unit", index or "buffName" [,filter]) - Returns information about a buff/debuff of a certain unit.
UnitBuff("unit", index or "buffName" [,castable]) - Retrieves info about a buff of a certain unit.
UnitDebuff("unit", index or "buffName" [,removable]) - Retrieves info about a debuff of a certain unit.
Calendar Functions
Code:
CalendarAddEvent() - Saves the selected event (new events only, requires hardware input to call)
CalendarCanAddEvent() - Returns true if player can add an event
CalendarCanSendInvite() - Returns true if player can send invites
CalendarCloseEvent() - Closes the selected event without saving it
CalendarContextDeselectEvent() - New in 3.0.8
CalendarContextEventCanComplain(monthOffset, day, eventIndex) - Returns true if player can report the event as spam
CalendarContextEventCanEdit(monthOffset, day, eventIndex) - Returns true if player can edit the event
CalendarContextEventClipboard()
CalendarContextEventComplain(monthOffset, day, eventIndex) - Reports the event as spam
CalendarContextEventCopy(monthOffset, day, eventIndex) - Copies the event to the clipboard
CalendarContextEventPaste(monthOffset, day) - Pastes the clipboard event to the date
CalendarContextEventRemove(monthOffset, day, eventIndex) - Deletes the event
CalendarContextGetEventIndex() - New in 3.0.8
CalendarContextInviteAvailable(monthOffset, day, eventIndex) - Accepts the invitation to the event
CalendarContextInviteDecline(monthOffset, day, eventIndex) - Declines the invitation to the event
CalendarContextInviteIsPending(monthOffset, day, eventIndex) - Returns true if the player hasn't responded to the event invite
CalendarContextInviteModeratorStatus(monthOffset, day, eventIndex) - ?
CalendarContextInviteRemove(monthOffset, day, eventIndex) - Removes the event from the calendar
CalendarContextInviteStatus(monthOffset, day, eventIndex) - returns inviteStatus
CalendarContextSelectEvent(monthOffset, day, eventIndex) - New in 3.0.8
CalendarDefaultGuildFilter() - returns minLevel, maxLevel
CalendarEventAvailable() - Accepts the inviation to the currently open event
CalendarEventCanEdit() - Returns true if the event can be edited
CalendarEventClearAutoApprove() - Turns off automatic confirmations
CalendarEventClearLocked() - Unlocks the event
CalendarEventClearModerator()
CalendarEventDecline() - Declines the invitation to the currently open event
CalendarEventGetInvite(inviteeIndex) - Returns status information for an invitee for the currently opened event
CalendarEventGetInviteSortCriterion() - returns criterion, reverse
CalendarEventGetNumInvites() - Returns the number of invitees for the currently opened event
CalendarEventGetRepeatOptions() - Returns opt1, opt2
CalendarEventGetSelectedInvite() - returns inviteIndex
CalendarEventGetStatusOptions() - Returns ??
CalendarEventGetTextures(eventType) - Returns title1, tex1, expLvl1, title2, tex2, expLvl2, ...
CalendarEventGetTypes() - Returns name1, name2, ...
CalendarEventHasPendingInvite() - Returns true if the player has an unanswered invitation to the currently selected event
CalendarEventHaveSettingsChanged() - Returns true if the currently open event has been modified
CalendarEventInvite("Player") - Invite player to currently selected event
CalendarEventIsModerator() - ?
CalendarEventRemoveInvite(inviteIndex)
CalendarEventSelectInvite(inviteIndex)
CalendarEventSetAutoApprove()
CalendarEventSetDate(month, day, year)
CalendarEventSetDescription(description)
CalendarEventSetLocked()
CalendarEventSetLockoutDate(lockoutDate) - ??
CalendarEventSetLockoutTime(lockoutTime) - ??
CalendarEventSetModerator(index)
CalendarEventSetRepeatOption(repeatoption)
CalendarEventSetSize - ??
CalendarEventSetStatus(index, status) - Sets the invitation status of a player to the current event
CalendarEventSetTextureID(textureIndex)
CalendarEventSetTime(hour, minute)
CalendarEventSetTitle(title)
CalendarEventSetType(type)
CalendarEventSortInvites(criterion)
CalendarGetAbsMonth() - returns month, year
CalendarGetDate() - Call this only after PLAYER_ENTERING_WORLD event
CalendarGetDayEvent(monthOffset, day, eventIndex)
CalendarGetEventIndex() - returns monthOffset, day, index
CalendarGetEventInfo() - Returns detailed information about an event selected with CalendarOpenEvent()
CalendarGetFirstPendingInvite(monthOffset, day) - returns eventIndex
CalendarGetHolidayInfo(monthOffset, day, eventIndex)
CalendarGetMaxCreateDate() - returns maxWeekday, maxMonth, maxDay, maxYear
CalendarGetMaxDate() - returns maxWeekday, maxMonth, maxDay, maxYear
CalendarGetMinDate() - returns minWeekday, minMonth, minDay, minYear
CalendarGetMinHistoryDate() - returns minWeekday, minMonth, minDay, minYear
CalendarGetMonth([monthOffset]) - returns month, year
CalendarGetMonthNames() - returns a list of the month names
CalendarGetNumDayEvents(monthOffset[, day])
CalendarGetNumPendingInvites() - returns count
CalendarGetRaidInfo (monthOffset, day, eventIndex) - returns name, calendarType, raidID, hour, minute, difficulty
CalendarGetWeekdayNames() - returns a list of the weekday names
CalendarIsActionPending() - returns isPending
CalendarNewEvent() - Creates and selected a new event
CalendarNewGuildEvent(minLevel, maxLevel, minRank) - Replaces the invite list of the selected new event with the specified guild members
CalendarOpenEvent(monthOffset, day, eventIndex) - Selects an existing event
CalendarRemoveEvent() - Removes the selected event from the calendar (invitees only)
CalendarSetAbsMonth(month, year) - Sets the reference month and year for functions which use a month offset
CalendarSetMonth(monthOffset)
CalendarUpdateEvent() - Saves the selected event (existing events only, requires hardware input to call)
OpenCalendar() - New in 3.0.8
Camera Functions
Mouse Look refers to holding down the right mouse button and controlling the movement direction. Shifting the view by holding down the left mouse button is not covered by these APIs.
Code:
PROTECTED CameraOrSelectOrMoveStart() - Begin "Left click" in the 3D world. (1.10 - Protected)
PROTECTED CameraOrSelectOrMoveStop([stickyFlag]) - End "Left click" in the 3D world. (1.10 - Protected)
CameraZoomIn(increment) - Zooms the camera into the viewplane by increment.
CameraZoomOut(increment) - Zooms the camera out of the viewplane by increment.
FlipCameraYaw(degrees) - Rotates the camera about the Z-axis by the angle amount specified in degrees.
IsMouselooking() - Returns 1 if mouselook is currently active, nil otherwise.
MouselookStart()
MouselookStop()
MoveViewDownStart() - Begins rotating the camera downward.
MoveViewDownStop() - Stops rotating the camera after MoveViewDownStart() is called.
MoveViewInStart() - Begins zooming the camera in.
MoveViewInStop() - Stops zooming the camera in after MoveViewInStart() is called.
MoveViewLeftStart() - Begins rotating the camera to the Left.
MoveViewLeftStop() - Stops rotating the camera after MoveViewLeftStart() is called.
MoveViewOutStart() - Begins zooming the camera out.
MoveViewOutStop() - Stops zooming the camera out after MoveViewOutStart() is called.
MoveViewRightStart() - Begins rotating the camera to the Right.
MoveViewRightStop() - Stops rotating the camera after MoveViewRightStart() is called.
MoveViewUpStart() - Begins rotating the camera upward.
MoveViewUpStop() - Stops rotating the camera after MoveViewUpStart() is called.
PROTECTED PitchDownStart() - Begins pitching the camera Downward.
PROTECTED PitchDownStop() - Stops pitching the camera after PitchDownStart() is called.
PROTECTED PitchUpStart() - Begins pitching the camera Upward.
PROTECTED PitchUpStop() - Stops pitching the camera after PitchUpStart() is called.
NextView() - Cycles forward through the five predefined camera positions.
PrevView() - Cycles backward through the five predefined camera positions.
ResetView(index) - Resets the specified (1-5) predefined camera position to it's default if it was changed using SaveView(index).
SaveView(index) - Replaces the specified (1-5) predefined camera positions with the current camera position.
SetView(index) - Sets camera position to a specified (1-5) predefined camera position.
Channel Functions
These are chat functions which are specific to channels. Also see the Chat Window Functions and Communication Functions sections.
Code:
AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
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.
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() - Retrieves all available server channels (zone dependent).
GetChannelList() - Retrieves joined channels.
GetChannelName("channel" or index) - Retrieves the name from a specific channel.
GetChatWindowChannels(index) - Get the chat channels received by a chat window.
JoinChannelByName("channel"[, "password"[, frameId]]) - Join the specified chat channel (with optional password, and register for specified frame) (updated in 1.9).
LeaveChannelByName("channel") - Leaves the channel with the specified name.
ListChannelByName(channelMatch) - Lists members in the given channel to the chat window.
ListChannels() - Lists all of the channels into the chat window.
RemoveChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel invisible (hidden) in a specific ChatFrame.
SendChatMessage("msg",[ "chatType",[ "language",[ "channel"]]]) - Sends a chat message.
SetChannelOwner("channel", "name") - Sets the channel owner.
SetChannelPassword("channel", "password") - Changes the password of the current channel.
Character Functions
Code:
AbandonSkill(index) - The player abandons a skill.
AcceptResurrect() - The player accepts the request from another player to resurrect him/herself.
AcceptSkillUps()
AcceptXPLoss() - Accept the durability loss to be reborn by a spirit healer. (The name is a remnant from when sprit res was an XP loss instead.)
AddSkillUp(index)
BuySkillTier(index)
CancelSkillUps()
CheckBinderDist() - Check whether the player is close enough to interact with the Hearthstone binder.
ConfirmBinder() - Confirm the request to set the binding of the player's Hearthstone.
DeclineResurrect() - Decline the request from another player to resurrect him/herself.
GetBindLocation() - Get the name of the location for your Hearthstone.
GetBlockChance() - Returns the player's percentage block chance.
GetCombatRating() - Returns the player's combat rating for a particular combat rating. New as of TBC patch
GetCombatRatingBonus() - Returns the player's combat rating bonus for a particular combat rating. New as of TBC patch
GetComboPoints() - Get the current number of combo points.
GetCorpseRecoveryDelay() - Time left before a player can accept a resurrection
GetCritChance() - Returns the player's melee critical hit chance
GetCurrentTitle() - Returns the player's current titleId
GetDamageBonusStat() - returns index of which stat a player receives a damage bonus from increasing
GetDodgeChance() - Returns the player's percentage dodge chance.
GetManaRegen() - Returns the player's mana regeneration rates.
GetMaxCombatRatingBonus(lowestRating)
GetMoney() - Returns an integer value of your held money in copper.
GetNumTitles() - Returns the maximum titleId
GetParryChance() - Returns the player's percentage parry chance.
GetPowerRegen() - Returns normal and combat power regeneration rates
GetRangedCritChance() - Returns the players ranged critical strike chance.
GetReleaseTimeRemaining() - Returns the amount of time left before your ghost is pulled from your body.
GetResSicknessDuration()
GetRestState()
GetRuneCooldown(id) - Returns cooldown information about a given rune.
GetRuneCount(slot) - ?
GetRuneType(id) - Returns the type of rune with the given id.
GetSpellBonusDamage(spellTreeID) - Returns the raw spell damage of the player for a given spell tree.
GetSpellBonusHealing() - Returns the raw bonus healing of the player.
GetSpellCritChance(school) - returns the players critical hit chance with a particular spell school.
GetTimeToWellRested() - Defunct.
GetTitleName(titleId) - Returns the player's current title name
GetXPExhaustion() - Returns your character's current rested XP, nil if character is not rested.
HasFullControl()
HasSoulstone()
IsFlying() - Returns 1 if flying, otherwise nil.
IsIndoors() - Returns 1 if you are indoors, otherwise nil. Returns nil for indoor areas where you can still mount.
IsMounted() - Returns 1 if mounted, otherwise nil
IsOutdoors() - Returns 1 if you are outdoors, otherwise nil. Returns 1 for indoor areas where you can still mount.
IsResting()
IsStealthed() - Returns 1 if stealthed or shadowmeld, otherwise nil
IsSwimming() -
IsTitleKnown(index) - Returns 1 if the title is valid for the player, otherwise 0.
NotWhileDeadError() - Generates an error message saying you cannot do that while dead.
RemoveSkillUp(index)
ResurrectHasSickness() - Appears to be used when accepting a resurrection will give you resurrection sickessness.
ResurrectHasTimer() - Does the player have to wait before accepting a resurrection
RetrieveCorpse() - Resurrects when near corpse. e.g., The "Accept" button one sees after running back to your body.
SetCurrentTitle(titleId) - Sets the player's current title id
SetSelectedSkill(index)
GetPVPDesired() - is the player permaflagged for PvP.
Chat Window Functions
These are functions which are specific to chat window management. Also see the Channel Functions and Communication Functions sections. (? Mikk's spiel on chat windows)
Code:
AddChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel visible in a specific ChatFrame.
AddChatWindowMessages - Adds a messaging group to the specified chat window.
ChangeChatColor(channelname,r,g,b) - Update the color for a type of chat message.
UI ChatFrame_AddChannel(chatFrame, "channelName") - Activate channel in chatFrame.
UI ChatFrame_AddMessageEventFilter("event", filterFunc) - Add a chat message filtering function (new in 2.4)
UI ChatFrame_GetMessageEventFilters("event") - Retreive the list of chat message filtering functions. (new in 2.4)
UI ChatFrame_OnHyperlinkShow(reference, link, button) - called when the user clicks on a chatlink.
UI ChatFrame_RemoveMessageEventFilter("event", filterFunc) - Unregister a chat message filtering function (new in 2.4)
GetAutoCompleteResults("text", include, exclude, maxResults[, cursorPosition]) - Returns possible player names matching a given prefix string and specified requirements.
GetChatTypeIndex(type) - Get the numeric ID of a type of chat message.
GetChatWindowChannels(index) - Get the chat channels received by a chat window.
GetChatWindowInfo(index) - Get setup information about a chat window.
GetChatWindowMessages(index) - Get the chat message types received by a chat window.
JoinChannelByName("channel"[, "password"[, frameId]]) - Join the specified chat channel (with optional password, and register for specified frame) (updated in 1.9)
LoggingChat(newState) - Gets or sets whether logging chat to Logs\WoWChatLog.txt is enabled.
LoggingCombat(newState) - Gets or sets whether logging combat to Logs\WoWCombatLog.txt is enabled.
RemoveChatWindowChannel(chatFrameIndex, "channel") - Make a chat channel invisible (hidden) in a specific ChatFrame.
RemoveChatWindowMessages(chatFrameIndex,"messageGroup") - Remove a set of chat messages from this window.
These functions get applied after reload ui (index 1 is General and index 2 is Combat Log):
SetChatWindowAlpha(index,alpha) - Sets the Alpha value(transparency) of ChatFrame<index> (alpha - 0-100)
SetChatWindowColor(index,r,g,b) - Sets the background color of a a chat window. (r/g/b - 0-255)
SetChatWindowDocked(index,docked) - Set whether a chat window is docked. (docked - 0/1)
SetChatWindowLocked(index,locked) - Sets ChatFrame<index> so that it is or is not movable. (locked - 0/1)
SetChatWindowName(index,"name") - Sets the name of ChatFrame<index> to <"name">.
SetChatWindowShown(index,shown) - Shows or Hides ChatFrame<index> depending on value of <shown> (shown - 0/1)
SetChatWindowSize(index,size) - Sets the font size of a chat window. (size - default 14)
SetChatWindowUninteractable(id, isUninteractable) - New in 3.0.8
Communication Functions
These are the functions which communicate with other players. Also see the Channel Functions and Chat Window Functions sections.
DoEmote("emote") - Perform a voice emote.
GetDefaultLanguage("unit") - Returns the default language that the unit is speaking after logon.
GetLanguageByIndex(index) - Returns the language specified by the index.
GetNumLanguages() - Returns the number of languages your character can speak (Renamed in 2.4, formerly mistyped GetNumLaguages).
RandomRoll(low, high) - Does a random roll between the two values.
SendAddonMessage("prefix", "text", "type" [, "player"]) - Sends a message to hidden AddOn channels. - Added in 1.12
SendChatMessage("msg",[ "chatType",[ "language",[ "channel"]]]) - Sends a chat message.
Companion Functions
These functions relate to companions -- mounts and non-combat pets. All functions were introduced in Patch 3.0.
Code:
CallCompanion(TypeID, slotid) - Summons a companion.
DismissCompanion(TypeID) - Dismisses an active companion.
GetCompanionInfo(TypeID, slotid) - Returns info about a selected companion.
GetNumCompanions(TypeID) - Get the number of companions of the specified type.
GetCompanionCooldown(TypeID, index) - Returns cooldown information.
PickupCompanion(TypeID, index) - Picks up the indexed companion onto the mouse cursor.
Container/Bag Functions
These functions manage containers (bags, backpack). See also Inventory Functions and Bank Functions.
Code:
ContainerIDToInventoryID(bagID)
GetBagName(bagID) - Get the name of one of the player's bags.
GetContainerItemCooldown(bagID, slot)
GetContainerItemInfo(bagID, slot) - Get the info for an item in one of the player's bags.
GetContainerItemLink(bagID, slot) - Returns the itemLink of the item located in bag#, slot#.
GetContainerNumSlots(bagID) - Returns the total number of slots in the bag specified by the index.
GetContainerNumFreeSlots(bagID) - Returns the number of free slots and type of slots in the bag specified by the index. (New in Patch 2.4)
HasKey() - Returns 1 if the player has a keyring, nil otherwise.
UI OpenAllBags() - Open all bags
UI CloseAllBags() - Close all bags
PickupBagFromSlot(slot) - Picks up the bag from the specified slot, placing it in the cursor. If an item is already picked up, this places the item into the specified slot, swapping the items if needed.
PickupContainerItem(bagID,slot)
PutItemInBackpack() - attempts to place item in backpack (bag slot 0).
PutItemInBag(inventoryId) - attempts to place item in a specific bag.
UI PutKeyInKeyRing() - attempts to place item in your keyring.
SplitContainerItem(bagID,slot,amount)
UI ToggleBackpack() - Toggles your backpack open/closed.
UI ToggleBag(bagID) - Opens or closes the specified bag.
PROTECTED (Situational) UseContainerItem(bagID, slot[, onSelf]) - Uses an item located in bag# and slot#. (Warning: If a vendor window is open, using items in your pack may sell them!) - 'onSelf' added in 1.12