Download
(13 Kb)
Download
Updated: 07/03/20 04:23 PM
Compatibility:
Greymoor (6.0.5)
Updated:07/03/20 04:23 PM
Created:03/30/19 04:05 PM
Monthly downloads:2,156
Total downloads:452,934
Favorites:258
MD5:
LibRunebox  Popular! (More than 5000 hits)
Version: 5
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.
v5
- Updated for Greymoor
- Now scans for new collectibles upon api increases.
- Added support for the new collectible fragments which are actual inventory items (e.g. not collectibles-only like the Indrik Berries)

v4
- Updated for Harrowstorm

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 (4)
File Name
Version
Size
Uploader
Date
4
9kB
Kyoma
03/09/20 05:20 AM
3
9kB
Kyoma
11/01/19 05:29 AM
2
7kB
Kyoma
05/19/19 05:51 PM
1
5kB
03/30/19 04:05 PM


Post A Reply Comment Options
Unread 08/06/20, 12:57 PM  
Magnus

Forum posts: 0
File comments: 3
Uploads: 0
From some weeks now i've got this error everytime I log:
bad argument #1 to 'pairs' (table/struct expected, got nil)
stack traceback:
[C]: in function 'pairs'
user:/AddOns/kyoRuneboxTT/code.lua:129: in function 'Addon:Initialize'
user:/AddOns/kyoRuneboxTT/code.lua:174: in function 'OnAddonLoaded'
Can someone help me pls?
Ty
Report comment to moderator  
Reply With Quote
Unread 03/09/20, 02:39 AM  
Octopuss
 
Octopuss's Avatar

Forum posts: 171
File comments: 809
Uploads: 0
Hi.
This addon needs updating.


Skaal explorer collectibles are also affected, and possibly more than that.
Report comment to moderator  
Reply With Quote
Unread 09/25/19, 10:44 AM  
Marazota
AddOn Author - Click to view AddOns

Forum posts: 257
File comments: 1517
Uploads: 2
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: 125
File comments: 328
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: 66
File comments: 384
Uploads: 17
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: