-
Notifications
You must be signed in to change notification settings - Fork 21
/
wowapi.txt
2011 lines (2002 loc) · 149 KB
/
wowapi.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Patch 3.3.5: Ruby Sanctum
Hate ads? Log in, it's free! • Report bad ads!
alpha is running. We aren't posting information on it - it's under an NDA.
World of Warcraft APIedit this page
Main Menu
WoW API
Widget API
Macro API
Lua functions
Events
XML UI
Changes
HOWTOs
Snippets
UI tech.
Category nav.
→ WoW API
Contents [show]
The World of Warcraft API, or WoW API, is a set of functions provided by Blizzard to interact with and modify the World of Warcraft interface and behavior through the use of addons and macros. The list of functions below is incomplete and kept up to date by user contributions; you may also be interested in an automatically-generated exhaustive list of all API functions present in the latest live client.
If you're considering contributing documentation, please read How to edit API pages. In summary: update this page (and the linked pages) as needed, discuss any large-scale changes on the discussion page, and do not create empty stub pages.
If you need help reading the documentation, see API notation and conventions. You can also examine the existing UI code to find examples of how the various functions are used by the default UI. Function names could be prefixed with the following tags:
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.
HW - This function may only be called in response to a hardware event (from OnClick handlers).
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.
edit Global Function Groups
Account Functions
GetAccountExpansionLevel() - Returns index of registered expansion. (0=WoW, 1=BC, 2=WotLK)
These functions only return meaningful values on Asian realms; all three relate to the play time limitation system.
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.
AddTrackedAchievement(achievementId) - Add an achievement to tracking.
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.
Action Functions
These functions are those which operate with the action buttons (General player actions are likely in the Activity Functions section below).
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(page) - 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.
NOCOMBAT PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
NOCOMBAT 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)
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()
CancelSummon() - Rejects a summon request.
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")
ForceQuit() - Instantly quits the game, bypassing the timer.
GetPVPTimer() - Returns the amount of time until your PvP flag fades.
GetSummonConfirmAreaName() - Returns the name of the area you're being summoned to.
GetSummonConfirmSummoner() - Returns the name of the player summoning you.
GetSummonConfirmTimeLeft() - Returns the amount of time left before the pending summon expires.
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. Also works for Shamans with Reincarnation available.
AddOn Functions
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
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
CalculateAuctionDeposit(runTime, stackSize, numStacks) - Returns the required deposit for the current selling item given the specified duration (1=12h, 2=24h, 3=48h).
CanCancelAuction(index) - Returns 1 if auction can be canceled.
CancelSell() - Clears the auction house listing queue, not creating any additional auctions. (3.3.3)
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.
SetAuctionsTabShowing(showing) - Sets whether auction-related events should be delivered to the client. (3.3.3)
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, stackSize, numStacks) - 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
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.
ApplyBarberShopStyle() - Purchase and apply the cosmetic changes.
BarberShopReset() - Reset any changes made in the Barber Shop.
CancelBarberShop() - Exit the Barber Shop chair.
GetBarberShopStyleInfo(id) - Returns information about the currently selected style.
GetBarberShopTotalCost() - Returns the total costs of the cosmetic changes.
GetFacialHairCustomization() - Returns the type of facial hair customization available to the character.
GetHairCustomization() - Returns the type of haircut customization available to the character.
SetNextBarberShopStyle(id[, reverse]) - Alters style selection in a particular category.
Battlefield Functions
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.
REMOVED (3.3.3) 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
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.
NOCOMBAT SetBinding("key"[, "command"[, mode]]) - Sets or unsets key bindings. (2.0 - Can not be used in combat.)
NOCOMBAT SetBindingSpell("KEY", "Spell Name") - Set a key binding directly to a spell, uses the same spell name syntax as /cast.
NOCOMBAT 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.
NOCOMBAT SetBindingItem("KEY", "itemname") -
NOCOMBAT SetBindingMacro("KEY", "macroname"|macroid) -
SetConsoleKey("key") - Sets the console key (normally ~ ).
NOCOMBAT SetOverrideBinding(owner, isPriority, "KEY" [,"COMMAND"]) - Set (or clear) an override key binding.
NOCOMBAT SetOverrideBindingSpell(owner, isPriority, "KEY", "spellname") -
NOCOMBAT SetOverrideBindingClick(owner, isPriority, "key", "buttonName" [, "mouseClick"]) - Sets an override binding that acts like a mouse click on a button.
NOCOMBAT SetOverrideBindingItem(owner, isPriority, "KEY", "itemname") -
NOCOMBAT SetOverrideBindingMacro(owner, isPriority, "KEY", "macroname"|macroid) -
NOCOMBAT 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
CancelUnitBuff("unit", index or "spell" [,"filter" or "rank"]) - Removes a specific buff from the player.
PROTECTED CancelShapeshiftForm() - Cancels a druid's shapeshift form buff.
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
HW 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
CalendarContextEventGetCalendarType() - ?
CalendarContextEventPaste(monthOffset, day) - Pastes the clipboard event to the date
CalendarContextEventRemove(monthOffset, day, eventIndex) - Deletes the event
CalendarContextEventSignUp() - ?
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
CalendarContextInviteTentative() - ?
CalendarContextInviteType - ?
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
CalendarEventCanModerate - ?
CalendarEventClearAutoApprove() - Turns off automatic confirmations
CalendarEventClearLocked() - Unlocks the event
CalendarEventClearModerator()
CalendarEventDecline() - Declines the invitation to the currently open event
CalendarEventGetCalendarType() - ?
CalendarEventGetInvite(inviteeIndex) - Returns status information for an invitee for the currently opened event
CalendarEventGetInviteResponseTime(inviteIndex) - ?
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)
CalendarEventSignUp() - ?
CalendarEventSortInvites(criterion)
CalendarEventTentative() - ?
CalendarGetAbsMonth() - returns month, year
CalendarGetDate() - Call this only after PLAYER_ENTERING_WORLD event
CalendarGetDayEvent(monthOffset, day, eventIndex)
CalendarGetDayEventSequenceInfo - Retrieve information about the specified event.
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
CalendarMassInviteArenaTeam(teamType) - ?
CalendarMassInviteGuild(minLevel, maxLevel, rank) - ?
CalendarNewEvent() - Creates and selected a new event
CalendarNewGuildAnnouncement() - ?
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.
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() - Enters mouse look mode; mouse movement is used to adjust movement/facing direction.
MouselookStop() - Exits mouse look mode; mouse movement is used to move the mouse cursor.
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.
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.
DeclineInvite("channel") - Declines an invitation to join a chat channel.
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
AbandonSkill(index) - The player abandons a skill.
AcceptResurrect() - The player accepts the request from another player to resurrect him/herself.
AcceptSkillUps() - Accepts changes to skills; unused on live realms.
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) - Spends skill points to improve a skill; unused on live realms.
BuySkillTier(index) - Learns the next tier of a skill; unused on live realms.
CancelSkillUps() - Rejects changes to skills; unused on live realms.
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.
DestroyTotem(slot)
GetBindLocation() - Get the name of the location for your Hearthstone.
GetComboPoints() - Get the current number of combo points.
GetCorpseRecoveryDelay() - Time left before a player can accept a resurrection
GetCurrentTitle() - Returns the player's current titleId.
GetDamageBonusStat() - returns index of which stat a player receives a damage bonus from increasing
GetMirrorTimerInfo(id) - returns information about a mirror timer (exhaustion, breath and feign death timers)
GetMirrorTimerProgress(id) - returns the current value of a mirror timer (exhaustion, breath and feign death timers)
GetMoney() - Returns an integer value of your held money in copper.
GetNumTitles() - Returns the maximum titleId
GetPlayerFacing() - Returns the direction the player is facing in radians ([-π, π] range, 0 is north, π/2 is east). (3.1)
GetPowerRegen() - Returns normal and combat power regeneration rates
GetPVPDesired() - Returns whether the player has permanently turned on their PvP flag.
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() - Returns information about a player's rest state (saved up experience bonus)
GetRuneCooldown(id) - Returns cooldown information about a given rune.
GetRuneCount(slot) - ?
GetRuneType(id) - Returns the type of rune with the given id.
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()
IsFalling() - Returns 1 if your character is currently plummeting to their doom.
IsFlying() - Returns 1 if flying, otherwise nil.
IsFlyableArea() - Returns 1 if it is possible to fly here, nil otherwise.
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.
IsOutOfBounds() - Returns 1 if you fell off the map.
IsResting() - Returns 1 if your character is currently resting.
IsStealthed() - Returns 1 if stealthed or shadowmeld, otherwise nil
IsSwimming() - Returns 1 if your character is currently swimming.
IsTitleKnown(index) - Returns 1 if the title is valid for the player, otherwise 0.
IsXPUserDisabled() - Returns 1 if the character has disabled experience gain.
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
ResurrectGetOfferer() - Returns the name of the person offering to resurrect you.
RetrieveCorpse() - Resurrects when near corpse. e.g., The "Accept" button one sees after running back to your body.
HW SetCurrentTitle(titleId) - Sets the player's current title id
SetSelectedSkill(index)
TargetTotem() - New in 3.0.8
Character Statistics Functions
GetArmorPenetration()
GetAttackPowerForStat(stat, value)
GetBlockChance() - Returns the player's percentage block chance.
GetCombatRating(ratingID) - Returns the player's combat rating for a particular combat rating. (2.0)
GetCombatRatingBonus(ratingID) - Returns the player's combat rating bonus for a particular combat rating. (2.0)
GetCritChance() - Returns the player's melee critical hit chance
GetCritChanceFromAgility("unit") - Returns the amount of your critical hit chance contributed by Agility.
GetDodgeChance() - Returns the player's percentage dodge chance.
GetExpertise()
GetExpertisePercent()
GetManaRegen() - Returns the player's mana regeneration rates.
GetMaxCombatRatingBonus(lowestRating)
GetParryChance() - Returns the player's percentage parry chance.
GetPetSpellBonusDamage
GetSpellBonusDamage(spellTreeID) - Returns the raw spell damage of the player for a given spell tree.
GetRangedCritChance()
GetSpellBonusHealing() - Returns the raw bonus healing of the player.
GetSpellCritChance(school) - returns the players critical hit chance with a particular spell school.
GetShieldBlock()
GetSpellCritChanceFromIntellect("unit")
GetSpellPenetration()
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)
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",["target"]) - 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.
CallCompanion("type", slotid) - Summons a companion.
DismissCompanion("type") - Dismisses an active companion.
GetCompanionInfo("type", slotid) - Returns info about a selected companion.
GetNumCompanions("type") - Get the number of companions of the specified type.
GetCompanionCooldown("type", index) - Returns cooldown information.
PickupCompanion("type", index) - Picks up the indexed companion onto the mouse cursor.
SummonRandomCritter() - Summons a random critter companion. (New: 3.3.3)
Container/Bag Functions
These functions manage containers (bags, backpack). See also Inventory Functions and Bank Functions.
ContainerIDToInventoryID(bagID)
GetBagName(bagID) - Get the name of one of the player's bags.
GetContainerItemCooldown(bagID, slot)
GetContainerItemDurability(bag, slot) - Get current and maximum durability of an item in the character's bags.
GetContainerItemGems(bag, slot) - Returns item IDs of gems inserted into the item in a specified container slot.
GetContainerItemID(bag, slot) - Returns the item ID of the item in a particular container 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.
GetContainerItemQuestInfo(bag, slot) - Returns information about quest and quest-starting items in your bags. (New: 3.3.3)
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.
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
Currency Functions
Most of these functions were added in 3.0.2
GetCoinText(amount, "separator") - Breaks down money and inserts separator strings. Added in 2.4.2.
GetCoinTextureString(amount[, fontHeight]) - Breaks down money and inserts texture strings.
GetCurrencyListSize() - returns the number of elements (both headers and currencies) in the currency list.
GetCurrencyListInfo(index) - return information about an element in the currency list.
ExpandCurrencyList(index, state) - sets the expanded/collapsed state of a currency list header.
SetCurrencyUnused(id, state) - alters whether a currency is marked as unused.
GetNumWatchedTokens() - returns the number of currently watched.
GetBackpackCurrencyInfo(id) - returns information about a watched currency.
SetCurrencyBackpack(id, state) - alters whether a currency is tracked.
Cursor Functions
AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
ClearCursor() - Clears whatever item the cursor is dragging from the cursor. - Added in 1.12
CursorCanGoInSlot(invSlot) - Return true if the item currently held by the cursor can go into the given inventory (equipment) slot.
CursorHasItem() - Returns true if the cursor currently holds an item.
CursorHasMoney() - true/false
CursorHasSpell() - true/false
DeleteCursorItem() - Destroys the item on the cursor.
DropCursorMoney() - Drops the amount of money held by the cursor.
DropItemOnUnit("unit") - Drops an item from the cursor onto a unit.
EquipCursorItem(invSlot)
GetCursorInfo() - Returns information about what the cursor is holding.
GetCursorMoney - Returns the amount of money held by the cursor.
GetCursorPosition() - Returns the cursor's position on the screen.
HideRepairCursor()
InRepairMode() - Returns true if your cursor is in repair mode
NOCOMBAT PickupAction(slot) - Drags an action out of the specified quickbar slot and holds it on the cursor.
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)
PickupInventoryItem(invSlot) - "Picks up" an item from the player's worn inventory.
NOCOMBAT PickupItem(itemId or "itemString" or "itemName" or "itemLink")
PickupMacro("macroName" or index) - Adds the specified macro to the Cursor.
PickupMerchantItem(index) - Places the item on the cursor. If the cursor already has an item, the item in the cursor will be sold.
NOCOMBAT PickupPetAction(slot) - Drags an action from the specified pet action bar slot into the cursor.
PickupPlayerMoney - Picks up an amount of money from the player.
NOCOMBAT PickupSpell("spellName" | spellID, "bookType") - Adds the specified spell to the Cursor.
PickupStablePet(index) - ?.
PickupTradeMoney(amount)
PlaceAction(slot) - Drops an action from the cursor into the specified quickbar slot.
PutItemInBackpack() - attempts to place item in backpack (bag slot 0).
PutItemInBag(inventoryId) - attempts to place item in a specific bag.
ResetCursor()
SetCursor("cursor" or nil)
ShowContainerSellCursor(index,slot)
ShowInspectCursor() - Change the cursor to the magnifying glass inventory inspection cursor
ShowInventorySellCursor() - ?.
ShowMerchantSellCursor(index) - Changes the cursor to the merchant sell cursor.
ShowRepairCursor()
SplitContainerItem(bagID,slot,amount) - Picks up part of a stack.
Debugging Functions
ConsoleAddMessage(message) - New in 3.0.8
debugprofilestart() - starts a timer for profiling during debugging.
debugprofilestop() - return the time in milliseconds since the last call to debugprofilestart()
debugstack(start, count1, count2) - Returns a string representation of the current calling stack (as of 1.9)
FrameXML_Debug(flag) - Sets FrameXML logging state which is output to /WoW Folder/Logs/FrameXML.log
GetDebugStats()
UI getprinthandler() - Returns the function currently handling print() output.
UI print(...) - Calls the current print output handler with the provided values; by default printing the values to the default chat frame.
UI setprinthandler(func) - Changes the function handling print() output.
UI tostringall(...) - Converts and returns the passed arguments to string.
wipe(table) - removes all key/value pairs from a table; also available as table.wipe().
Dressing Room Functions
Functions Controlling the Dressing Room interface. NEW in 1700.
UI DressUpItemLink("itemString" or "itemLink") - Will show the DressingRoom UI with the given item equipped.
UI SetDressUpBackground(isAuctionFrame) - Given an Item shown in the Auction House will show the DressingRoom UI with the item equipped.
Dungeon Finder Functions
Functions hidden behind and supporting the Dungeon Finder UI introduced in 3.3. See also: Raid Browser Functions and Looking For Group Functions
HW AcceptProposal() - Accept an LFD group invite and enter the dungeon.
CanPartyLFGBackfill() - Returns whether the party is eligible to recruit additional members from the LFG pool.
GetLFDChoiceCollapseState(nil or table) - returns LFGCollapseList
GetLFDChoiceEnabledState(nil or table) - returns LFGEnabledList
GetLFDChoiceInfo(nil or table) - Returns a table of all dungeon info keyed by dungeonID
GetLFDChoiceLockedState(nil or table) - Returns a table mapping dungeonID to isLocked (in LFD UI)
GetLFDChoiceOrder(nil or table) - returns LFDDungeonList
GetLFDLockPlayerCount() - returns the number of locks in a dungeon group
GetLFDLockInfo(dungeonID, lockedPlayerNumber) - returns playerName, lockedReason; lockedPlayerNumber is from 1 to GetLFDLockPlayerCount(); lockedReason is found in LFG_INSTANCE_INVALID_CODES
GetLFGDungeonInfo(dungeonId) - Returns information about a particular dungeon in the list: dungeonName, typeID, minLevel, maxLevel, recLevel, minRecLevel, maxRecLevel, expansionLevel, groupID, textureFilename, difficulty, maxPlayers, dungeonDescription, isHoliday
GetLFGDungeonRewards(dungeontype) - dungeontype = 261 (normal) or 262 (heroic), returns doneToday, moneyBase, moneyVar, experienceBase, experienceVar, numRewards
GetLFGDungeonRewardInfo(dungeonID, rewardIndex) - returns name, texturePath, quantity. rewardIndex matches 1 through numRewards from GetLFGDungeonRewards
GetLFGInfoServer - returns inParty, joined, queued, noPartialClear, achievements, lfgComment, slotCount
GetLFGProposal() - Returns information about a LFD group invite.
GetLFGProposalEncounter(encounterNumber) - returns bossName, texture, isKilled. encounterNumber is from 1 to totalEncounters from GetLFGProposal()
GetLFGProposalMember(playerNumber) - returns info about players (numbers 1-5) in the LFG proposal: isLeader, role, level, responded, accepted, name, class
GetLFGRandomDungeonInfo(index) - Returns information about a random dungeon queue: id, name
GetNumRandomDungeons() - returns the number of specific dungeons that can be queued for
GetPartyLFGBackfillInfo() - Returns information about the dungeon for which you may currently recruit additional members from the LFG pool.
GetRandomDungeonBestChoice() - Returns suggested random dungeon ID.
HasLFGRestrictions() - Returns whether the player is in a random party formed by the dungeon finder system.
IsLFGDungeonJoinable(dungeonId) - Returns whether you can queue for a particular dungeon; dungeonId is from GetLFGRandomDungeonInfo
LFGTeleport([toSafety]) - Teleports the player to (toSafety = nil) or from (toSafety = true) a dungeon
RejectProposal() - Reject an LFD group invite and exit the queue.
SetLFGHeaderCollapsed(headerID, isCollapsed)
UnitGroupRolesAssigned(UnitID) - Return's the targeted unit's assigned role.
Enchanting Functions
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
ReplaceEnchant()
ReplaceTradeEnchant() - Confirm the replacement of an enchantment via trade.
BindEnchant() - Confirm the binding of the item when enchanting.
Equipment Manager Functions
Equipment management was added to the UI in Patch 3.1.2.
GetNumEquipmentSets() - Returns the number of saved equipment sets.
GetEquipmentSetInfo(index) - Returns information about an equipment set.
GetEquipmentSetInfoByName("name") - Returns information about an equipment set.
GetEquipmentSetItemIDs("name"[, returnTable]) - Populates and returns a table with the item IDs.
GetEquipmentSetLocations("name"[, returnTable]) - Populates and returns a table with the item locations.
EquipmentManager_UnpackLocation(location) - Unpacks a location integer to determine the actual inventory location.
PickupEquipmentSet(index) - Places an equipment set on the cursor.
PickupEquipmentSetByName("name") - Places an equipment set on the cursor.
EquipmentSetContainsLockedItems("name") - Checks if some of the items in the set are currently locked (pending client/server interaction).
UseEquipmentSet("name") - Equips an equipment set.
EquipmentManagerIgnoreSlotForSave(slot) - flags the slot to be ignored when saving an equipment set.
EquipmentManagerUnignoreSlotForSave(slot) - removes the ignore flag from a slot when saving an equipment set.
EquipmentManagerClearIgnoredSlotsForSave() - removes the ignore flag from all slots when saving an equipment set.
SaveEquipmentSet("name", iconIndex) - Saves the currently equipped items in a set.
RenameEquipmentSet("oldName", "newName") - Renames an equipment set.
DeleteEquipmentSet("name") - Forgets an equipment set.
UI GetEquipmentSetIconInfo(index) - Returns information about available icons.
Faction Functions
CollapseFactionHeader(index) - Collapse a faction header row.
CollapseAllFactionHeaders() - Collapse all faction header rows.
ExpandFactionHeader(index) - Expand a faction header row.
ExpandAllFactionHeaders() - Expand all faction header rows.
FactionToggleAtWar(index) - Toggle the At War flag for a faction.
GetFactionInfo(index) - Gets details for a specific faction/faction header.
GetNumFactions() - Returns the number of lines in the faction display.
GetSelectedFaction() - Returns the row index of the currently selected faction in reputation window. (New in 1.10)
GetWatchedFactionInfo() - Returns information about the currently watched faction. (New in 1.10)
IsFactionInactive(index) - Returns true if the faction is marked inactive. (New in 1.10)
SetFactionActive(index) - Remove a faction from inactive group. (New in 1.10)
SetFactionInactive(index) - Move a faction to inactive group. (New in 1.10)
SetSelectedFaction(index) - Sets the currently selected faction in reputation window. (New in 1.10)
SetWatchedFactionIndex(index) - Sets which faction should be watched in Blizzard reputation bar. (New in 1.10)
UnitFactionGroup("unit") - Returns the faction group id and name of the specified unit. (eg. "Alliance") - string returned is localization-independent (used in filepath)
Frame Management
CreateFrame("frameType"[ ,"name"][, parent][, "inheritFrame"]) - Create a new frame of the specified type
CreateFont("name") - Dynamically create a font object
GetFramesRegisteredForEvent(event) - Returns a list of frames that are registered for the given event. - Added in 2.3
GetNumFrames() - Get the current number of Frame (and derivative) objects
EnumerateFrames(currentFrame) - Get the Frame which follows currentFrame
GetMouseFocus() - Returns the frame that currently has the mouse focus.
UI MouseIsOver - Determines whether or not the mouse is over the specified frame.
UI ToggleDropDownMenu(level, value, dropDownFrame, anchorName, xOffset, yOffset)
UI UIFrameFadeIn(frame, fadeTime, startAlpha, endAlpha)
UI UIFrameFlash(...)
FrameXML API
This is a very limited selection of utility functions provided by Blizzard's FrameXML implementation.
UI EasyMenu(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay)
Friend Functions
AddFriend("playerName") - Add a friend to your friend list.
AddOrRemoveFriend("playerName"[, "note"]) - Toggles a player's presence on your friends list.
GetFriendInfo(index) - Returns name, level, class, location, connected, status, and friend note of a friend.
SetFriendNotes(index, "note") - Sets the note text for a friend.
GetNumFriends() - Returns how many friends are on your friend list.
GetSelectedFriend() - Returns the index of the current selected friend.
RemoveFriend("name" or index) - Removes a friend from your friend list
SetSelectedFriend(index) - Update the current selected friend.
ShowFriends() - Request updated friends information from server.
UI ToggleFriendsFrame([tabNumber]) - Opens/closes the friends pane (possibly on a specific tab).
Glyph Functions
socketID is a number between 1 and GetNumGlyphSockets().
GetNumGlyphSockets() - Returns the number of Glyph Sockets. (Same result as NUM_GLYPH_SLOTS)
GetGlyphSocketInfo(socketID[, talentGroup]) - Returns info on a specific Glyph Socket.
GetGlyphLink(socketID[, talentGroup]) - Returns link text for a Glyph in the desired Socket.
GlyphMatchesSocket(socketID) - See if the Glyph held by the cursor matches the desired Socket.
PlaceGlyphInSocket(socketID) - Places the Glyph held by the cursor into the desired Socket.
RemoveGlyphFromSocket(socketID) - Removes the Glyph from the desired Socket.
SpellCanTargetGlyph()
GM Functions
CanComplainChat(lineID) - determines if we should show the menu for reporting a line of chat spam (lineID comes from the player link in the chat line)
CanComplainInboxItem(index) - determines if we should show the “report spam” button on a mail item
ComplainChat(lineID) - complains about a particular line of chat spam
ComplainInboxItem(index) - complains about a particular mail item
PROTECTED DeleteGMTicket()
GMRequestPlayerInfo() - access denied (darn)
GetGMStatus()
GetGMTicket()
GetGMTicketCategories() - Return all available ticket categories (not as a table)
GMSurveyAnswerSubmit(question, rank, comment) - ?
GMSurveyCommentSubmit(comment) - ?
GMSurveyQuestion ?
GMSurveySubmit ?
HelpReportLag(type) - Uses the Report Lag function on the help screen to report the specified type of lag
PROTECTED NewGMTicket(type,"text")
PROTECTED UI Stuck() - Informs the game engine that the player is Stuck.
PROTECTED UpdateGMTicket(type,"text")
Gossip Functions
CloseGossip() - Dismiss the gossip window.
ForceGossip() - Returns whether the gossip text must be displayed. (New: 3.3.3)
GetGossipActiveQuests() - Retrieves a list of the active (?) quests on the NPC you are talking to.
GetGossipAvailableQuests() - Retrieves a list of the available (!) quests on the NPC you are talking to.
GetGossipOptions() - Retrieves a list of the available gossip items on the NPC you are talking to.
GetGossipText() - Retrieves the gossip text.
GetNumGossipActiveQuests() - Returns the number of active quests that you should eventually turn in to this NPC.
GetNumGossipAvailableQuests() - Returns the number of quests (that you are not already on) offered by this NPC.
GetNumGossipOptions() - Returns the number of conversation options available with this NPC.
SelectGossipActiveQuest(index) - Selects an active quest.
SelectGossipAvailableQuest(index) - Selects an available quest.
SelectGossipOption(index) - Selects on a gossip item.
Group Functions
See also: Raid Functions
AcceptGroup() - Accept the invitation to party.
ConfirmReadyCheck(isReady) - Indicate if you are ready or not.
ConvertToRaid() - Converts party to raid.
DeclineGroup() - Decline the invitation to a party.
DoReadyCheck() - Initiate a ready check.
GetLootMethod() - Return the currently active lootMethod
GetLootThreshold() - Return the current loot threshold (for group/master loot)
GetMasterLootCandidate(index) - Return the name of a player who is eligible to receive loot in master mode
GetNumPartyMembers() - Returns the number of party members
GetPartyLeaderIndex() - Returns the index of the party leader (1-4) if not yourself.
GetPartyMember(index) - Returns 1 if the party member at the given index exists, nil otherwise..
InviteUnit("name" or "unit") - Invites the specified player to the group you are currently in (new for WoW 2.0)
IsPartyLeader() - Returns true if the player is the party leader.
LeaveParty() - Quit the party, often useful to troubleshoot "phantom party" bugs which may list you in a party when you are in fact not.
PromoteToLeader("unit") - Promote a unit to party leader.
SetLootMethod("lootMethod"[, "masterPlayer" or threshold]) - Set the current loot method
SetLootThreshold(itemQuality) - Set the threshold for group/master loot
UninviteUnit("name" [, "reason"]) - Kick a unit from the party if player is group leader; or initiate a kick vote in an LFD group.
UnitInParty("unit") - Returns true if the unit is a member of your party.
UnitIsPartyLeader("unit") - Returns true if the unit is the leader of its party.
Guild Functions
AcceptGuild() - The player accepts the invitation to join a guild.
BuyGuildCharter("guildName") - Purchases a guild charter for guildName.
CanEditGuildEvent() - Returns true if you are allowed to edit guild events (in the calendar),
CanEditGuildInfo() - Returns true if you are allowed to edit the guild info
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() - Returns true if you are allowed to demote a guild member.
CanGuildRemove() - Returns true if you are allowed to remove a guild member.
CanViewOfficerNote() - Returns true if you are allowed to view a Officer Note.
CloseGuildRegistrar() - ?.
CloseGuildRoster() - ?.
CloseTabardCreation() - ?.
DeclineGuild() - The player declines the invitation to join a guild.
GetGuildCharterCost() - Returns the cost of purchasing a guild charter.
GetGuildEventInfo(index) - Returns the event information. (Added in 2.3)
GetGuildInfo("unit") - This function returns the name of the guild unit belongs to.
GetGuildInfoText() - Returns the persistant Guild Information data. (new in 1.9)
GetGuildRosterInfo(index) - This function is used to get info on members in the guild.
GetGuildRosterLastOnline(index) - Returns time since last online for indexth member in current sort order.
GetGuildRosterMOTD() - Returns guild's MOTD.
GetGuildRosterSelection() - Returns the index of the current selected guild member.
GetGuildRosterShowOffline() - Returns true if showing offline members of the guild.
GetNumGuildEvents() - Returns the number of guild events. (Added in 2.3)
GetNumGuildMembers(offline) - Returns the number of guild members total.
GetTabardCreationCost() - Returns cost in coppers.
GetTabardInfo() -?.
GuildControlAddRank("name") - Add another rank called "name". Only Guildmaster.
GuildControlDelRank("name") - Delete rank "name". Only Guildmaster.
GuildControlGetNumRanks() - Returns number of ranks after guild frame open. Any guild member can use this.
GuildControlGetRankFlags() - Returns list of values for each permission for a select rank (default rank 1).
GuildControlGetRankName(index) - Returns name of the rank at index. Any guild member can use this.
GuildControlSaveRank("name") - Saves the permissions for rank "name". Only Guildmaster.
GuildControlSetRank(rank) - Sets the currently selected rank to view.
GuildControlSetRankFlag(index, enabled) - Enable/disable permission for an action at index. Only Guildmaster.
GuildDemote("name") - Demotes a player "name".
GuildDisband() - Disbands at once your guild. You must be the guild's leader to do so. Be careful, no warning is given prior disbanding.
GuildInfo() - Displays information about the guild you are a member of.
GuildInvite("name") - Invites a player to your guild.
GuildLeave() - Removes you from your current guild.
GuildPromote("name") - Promotes a player "name".
GuildRoster() - Fetches the guild list and fires a GUILD_ROSTER_UPDATE event.
GuildRosterSetOfficerNote(index, "note") - Sets the officer note at index to "note".
GuildRosterSetPublicNote(index, "note") - Sets the public note at index to "note".
GuildSetMOTD("note") - Set Guild Message of the Day to "note".
GuildSetLeader("name") - Transfers guild leadership to another character.
GuildUninvite("name") - Removes the member "name".
IsGuildLeader("name") - Determine if player "name" is a guild master.
IsInGuild() - Lets you know whether you are in a guild.
QueryGuildEventLog() - Fetches the guild event list and fires a GUILD_EVENT_LOG_UPDATE event. (Added in 2.3)
SetGuildInfoText() - Sets the persistant Guild Information data. Limit is 500 letters (GuildInfoEditBox is limited to this number). Longer texts are possible, but will be reseted during the day. (new in 1.9)
SetGuildRosterSelection(index) - Selects/deselects a guild member according current sorting order.
SetGuildRosterShowOffline(enabled) - Sets/Resets the show offline members flag.
SortGuildRoster("sort") - Sorts guildroster according "sort". Any unknown values sort on "name".
Guild Bank Functions
All functions were added in Patch 2.3
AutoStoreGuildBankItem(tab, slot) - Withdraws an item from the bank, and automatically stores it in the player's inventory.
BuyGuildBankTab() - Buys a guild bank tab, without confirmation.
CanWithdrawGuildBankMoney() - Boolean, true if player is permitted to withdraw funds. No bank proximity required.
CloseGuildBankFrame() - Closes the guild bank frame
DepositGuildBankMoney(money) - Deposits "money" amount in copper.
GetCurrentGuildBankTab() - Integer of selected tab, >= 1
GetGuildBankItemInfo(tab, slot) - Returns texture, amount and integer 1 or nil depending on locked state
GetGuildBankItemLink(tab, slot) - Returns itemLink
GetGuildBankMoney() - Integer, funds available in copper.
GetGuildBankMoneyTransaction(index) - No bank proximity required, however QueryGuildBankLog function requires proximity.
GetGuildBankTabCost() - Integer OR nil - cost in copper OR no tabs available to buy
GetGuildBankTabInfo(tab) - Returns the name and icon of the guild bank tab queried.
GetGuildBankTabPermissions(tab) - Gets display / player's access info. Limited data available without bank proximity.
GetGuildBankTransaction(tab, index) - Requires Guild Bank Proximity
GetGuildBankWithdrawLimit() - Returns withdraw limit for currently selected rank in guild control
GetGuildTabardFileNames()
GetNumGuildBankMoneyTransactions() - Returns number of money log entries
GetNumGuildBankTabs() - Integer count of bought tabs, >= 0. No bank proximity required.
GetNumGuildBankTransactions(tab) - Returns number of log transactions for tab "tab"
PickupGuildBankItem(tab, slot) - Picks up an item from the guild bank
PickupGuildBankMoney(money) - Picks up "money" copper from the guild bank
QueryGuildBankLog(tab) - Updates bank log data from the server, called before all transaction functions. "Money tab" is MAX_GUILDBANK_TABS+1
QueryGuildBankTab(tab) - Updates bank tab data from the server, called before all item functions.
SetCurrentGuildBankTab(tab) - Select different bank tab in the UI
SetGuildBankTabInfo(tab, name, iconIndex) - Modifies name and icon for tab
SetGuildBankTabPermissions(tab, index, enabled) - Modifies the permissions for the GuildBankTab. Guild Leader Only.
SetGuildBankTabWithdraw(tab, amount) - Modifies the stacks per day withdraw limit for select guild bank tab. Guild Leader Only.
SetGuildBankWithdrawLimit(amount) - Sets the gold withdraw limit from the guild bank. Guild Leader Only.
SplitGuildBankItem(tab, slot, amount) - Picks up part of a stack
WithdrawGuildBankMoney(money) - Withdraws "money" copper from the guild bank
Honor Functions
GetHolidayBGHonorCurrencyBonuses() - Return rewards for participating in a Call to Arms (holiday) battleground. (New: 3.3.3)
GetHonorCurrency() - Return the amount of honor the player has available to purchase items.
GetInspectHonorData() - Return honor info for the inspected unit (if available).
GetPVPLifetimeStats() - Get your PvP/Honor statistics for your lifetime.
GetPVPRankInfo(rank[, unit]) - Get information about a specific PvP rank.
GetPVPRankProgress() - Get information about the PvP rank progress.
GetPVPSessionStats() - Get your PvP/Honor statistics for this session.
GetPVPYesterdayStats() - Get your PvP/Honor statistics for yesterday.
GetRandomBGHonorCurrencyBonuses() - Returns rewards for participating in a random battleground. (New: 3.3.3)
HasInspectHonorData() - Determine if the inspected unit's honor data is available.
RequestInspectHonorData() - Request honor data for inspected unit.
UnitPVPName("unit") - Returns unit's name with PvP rank prefix (e.g., "Corporal Allianceguy").
UnitPVPRank("unit") - Get PvP rank information for requested unit.
Ignore Functions
AddIgnore("name") - Add a player to your ignore list.
AddOrDelIgnore("name") - Toggles the ignore state of the specified name.
DelIgnore("name") - Delete a player from your ignore list.
GetIgnoreName(index) - Get the name of the player on your ignore list at index.
GetNumIgnores() - Get the number of players on your ignore list.
GetSelectedIgnore() - Returns the currently selected index in the ignore listing
SetSelectedIgnore(index) - Sets the currently selected ignore entry
Inspection Functions
CanInspect("unit"[,showError]) - Returns 1 if within inspect range of player, or nil if not able to inspect the target
CheckInteractDistance("unit",distIndex)
ClearInspectPlayer() - Reset inspect data once finished with it (Called on inspect window hide)
GetInspectArenaTeamData(index) - Retrieves all the data associated with the inspected player's arena team located at index.
GetInspectHonorData() - Return honor info for the inspected unit (if available).
HasInspectHonorData() - Determine if the inspected unit's honor data is available.
UI InspectUnit("unit") - Calls NotifyInspect and opens/updates the inspection window.
NotifyInspect("unit") - Inspects the specified / selected "unit".
RequestInspectHonorData() - Request honor data for inspected unit.
Instance Functions
CanShowResetInstances() - Determine if player can reset instances at the moment.
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()).
GetInstanceBootTimeRemaining() - Gets the time in seconds after which the player will be ejected from an instance.
GetInstanceInfo() - Gets informations about the current Instance
GetNumSavedInstances() - Gets the number of instances that the player is saved to.
GetSavedInstanceInfo(index) - Gets information about an instance that the player is saved to.
IsInInstance() - Returns 1 if the player is in an instance, as well as the type of instance (pvp, raid, etc.).
ResetInstances() - Reset instances.
GetDungeonDifficulty() - Returns the player's current Dungeon Difficulty setting (1-3).
SetDungeonDifficulty(difficulty) - Sets the player's Dungeon Difficulty setting (for the 5-man instances).
GetInstanceDifficulty() - Returns the current instance's Dungeon Difficulty (1-4, or 1 if player is not in an instance).
GetInstanceLockTimeRemaining() - Returns information about the instance lock timer for the instance the player is currently entering.
GetInstanceLockTimeRemainingEncounter(id) - Returns information about bosses in the instance the player is about to be saved to.
Inventory Functions
These functions manage your "inventory", that is, equipped items. See also Container/Bag Functions and Bank Functions.
AutoEquipCursorItem() - Causes the equipment on the cursor to be equipped.
BankButtonIDToInvSlotID(buttonID, isBag) - Returns the ID number of a bank button or bag in terms of inventory slot ID.
CancelPendingEquip(index) - This function is used to cancel a pending equip.
ConfirmBindOnUse()
ContainerIDToInventoryID(bagID)
CursorCanGoInSlot(invSlot) - Return true if the item currently held by the cursor can go into the given inventory (equipment) slot
EquipCursorItem(invSlot)
EquipPendingItem(invSlot) - Equips the currently pending Bind-on-Equip or Bind-on-Pickup item from the specified inventory slot. (Internal — do not use.)
GetInventoryAlertStatus(index) - Returns one of several codes describing the "status" of an equipped item.
GetInventoryItemBroken("unit",invSlot) - Determine if an inventory item is broken (no durability).
GetInventoryItemCooldown("unit",invSlot) - Get cooldown information for an inventory item.
GetInventoryItemCount("unit",invSlot) - Determine the quantity of an item in an inventory slot.
GetInventoryItemDurability(invSlot) - Returns the maximum and remaining durability points for an inventory item.
GetInventoryItemGems(invSlot) - Returns item ids of the gems socketed in the item in the specified inventory slot.
GetInventoryItemID(invSlot) - Returns the item id of the item in the specified inventory slot.
GetInventoryItemLink("unit",slotId) - Returns an itemLink for an inventory (equipped) item.
GetInventoryItemQuality("unit",invSlot) - Return the quality of an inventory item.
GetInventoryItemTexture("unit",invSlot) - Return the texture for an inventory item.
GetInventorySlotInfo(invSlotName) - Get the info for a named inventory slot (slot ID and texture)
GetWeaponEnchantInfo() - Return information about main and offhand weapon enchantments.
HasWandEquipped() - Returns 1 if a wand is equipped, false otherwise.
IsInventoryItemLocked(id) - Returns whether an inventory item is locked, usually as it awaits pending action.
KeyRingButtonIDToInvSlotID(buttonID) - Map a keyring button to an inventory slot button for use in inventory functions.
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.
PickupInventoryItem(invSlot) - "Picks up" an item from the player's worn inventory.
UpdateInventoryAlertStatus()
PROTECTED UseInventoryItem(invSlot) - Use an item in a specific inventory slot.
Item Functions
These functions are those which operate on item links or item information directly. See also Container/Bag Functions and Inventory Functions.
EquipItemByName(itemId or "itemName" or "itemLink"[, slot]) - Equips an item, optionally into a specified slot.
GetAuctionItemLink("type", index) - Returns an itemLink for the specified auction item.
GetContainerItemLink(bagID, slot) - Returns the itemLink of the item located in bag#, slot#.
GetItemCooldown(itemId or "itemName" or "itemLink") - Returns startTime, duration, enable.
GetItemCount(itemId or "itemName" or "itemLink"[, includeBank][, includeCharges]) - Returns number of such items in inventory[, or charges instead if it has charges]
GetItemFamily(itemId or "itemName" or "itemLink") - Returns the bag type that an item can go into, or for bags the type of items that it can contain. (New in Patch 2.4)
GetItemIcon(itemId or "itemString" or "itemName" or "itemLink") - Returns the icon for the item. Works for any valid item even if it's not in the cache. (New in Patch 2.4)
GetItemInfo(itemId or "itemString" or "itemName" or "itemLink") - Returns information about an item.
GetItemQualityColor(quality) - Returns the RGB color codes for a quality.
GetItemSpell(item) - Returns name, rank.
GetMerchantItemLink(index) - Returns an itemLink for the given purchasable item
GetQuestItemLink("type", index) - Returns an itemLink for a quest reward item.
GetQuestLogItemLink("type", index) - Returns an itemLink for a quest reward item.
GetTradePlayerItemLink(id) - Returns an itemLink for the given item in your side of the trade window (if open)
GetTradeSkillItemLink(index) - Returns the itemLink for a trade skill item.