Just wanted to offer some tips/suggested changes to the file to support accuracy:
You'll need to add checks for the required items (empty runebook, recall runes, and mark scrolls).
You'll likely want to verify the number of entries in the targeted runebook and then check the mobile's pack for...