Quantcast
Download
(9 Kb)
Download
Updated: 11/01/19 05:29 AM
Compatibility:
Dragonhold (5.2.5)
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Updated:11/01/19 05:29 AM
Created:03/30/19 04:05 PM
Monthly downloads:10,526
Total downloads:117,236
Favorites:179
MD5:
5.2.5
LibRunebox  Popular! (More than 5000 hits)
Version: 3
by: Kyoma [More]
Description
A simple library to map runeboxes (and the new style pages) to their respective collectible. The list is hardcoded but has an easy way to keep it updated. And more importantly, addons can just depend on this and won't have to worry about all of these new things that might be added.

Note: this library is intended to only be used as a stand-alone. Including it in your addon defeats some of the purpose of having it in the first place.

API

The first two work for runeboxes, style pages (including bound/event versions) and runebox fragments.
Code:
LibRunebox:IsRuneboxCollected(runeboxItemId)
Returns true or false depending on the matching collectible state

Code:
LibRunebox:GetRuneboxCollectibleId(runeboxItemId)
Returns the collectible id belonging to the item


These two are for runeboxes and runebox fragments respectively
Code:
LibRunebox:GetRuneboxFragments(runeboxItemId)
Returns a table (not an array) with all seven fragments' item ids

Code:
LibRunebox:GetRuneboxForFragment(fragmentItemId)
Returns the runebox's item id for the fragment

Updating
If you, or your users, come across a runebox or similar item which is not supported by this library please post the exact item link (and as many relevant item links as possible) in the comments section so I can update it.
v3
- Updated for Dragonhold
- Finally added the IsLibrary flag (sorry folks!)

v2
- API Updated for Elsweyr.
- Added fragments that aren't in the standard "7-pieces" format.

v1 - Initial release
Archived Files (2)
File Name
Version
Size
Uploader
Date
2
7kB
Kyoma
05/19/19 05:51 PM
1
5kB
03/30/19 04:05 PM


Post A Reply Comment Options
Unread 09/25/19, 10:44 AM  
Marazota

Forum posts: 145
File comments: 1127
Uploads: 0
hey
## IsLibrary: true
need to be added to the manifest of this one
Report comment to moderator  
Reply With Quote
Unread 09/13/19, 10:19 AM  
yojimba

Forum posts: 0
File comments: 1
Uploads: 0
librunebox problem

librunebox does not work dear me
Report comment to moderator  
Reply With Quote
Unread 04/25/19, 05:54 PM  
Kyoma
AddOn Author - Click to view AddOns

Forum posts: 97
File comments: 244
Uploads: 10
Yea I somehow missed it when I scourged the API page before writing it. Contemplating if I should use it in combination with saved vars and scanning items upon APIVersion change (ala LibZone/LibSets) but only if it'll work with fragments.
Report comment to moderator  
Reply With Quote
Unread 04/25/19, 05:03 PM  
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view AddOns

Forum posts: 58
File comments: 264
Uploads: 14
FYI, since update 21, we've had this:

Lua Code:
  1. * GetItemLinkContainerCollectibleId(*string* _itemLink_)
  2. ** _Returns:_ *integer* _containerCollectibleId_

I don't think it works for fragments, but it should simplify maintaining the collectible ids a bit.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: