*Left Justify
I had a similar problem in my Dungeon Stompage game, where Using an Item had to have a Pervious Page Link on it because you could use it anywhere (Potion of Healing for example).
I also had 1 or 2 Items that you could also use anywhere, but were multi-paged (XP/Stat Boost Page & The Magic Whisk).
As long as you always opened either from the page you want to go back to, it worked fine. But if you opened the XP Item from inside the Potion, you got stuck in a loop. Basically you heal yourself, but don’t immediately go back to the Previous Page, rather Opening the XP Item first – page through that and then hit the ‘Return to Game’ Link (a %LASTPAGE Link) and it takes you to the place you opened the Item from – right after you healed. Now you’ve screwed the pooch, because the Previous Page Link is now set to go back to your last page – the XP Item page.
You shouldn’t ‘double-nest’ your %LASTPAGE Links, but there may still be a way to do it. I avoided having to though because it was too much work compared to folks just not doing it in the first place.
Here’s a spitball idea that might help…
For the sake of reference, let’s say using your Notebook takes you to Page 10.
Do not allow players to open the Notebook off Note Pages. Instead:
1. Allow players to open Notes from the Notebook (page 10), but using Note Items from that page loops you to Page 10 again, Deletes the Note Item, and adds the Item’s text to the Notebook Page.
2. Allow players to open Notes from other Pages, which takes you to a page you can read the note text (say page 201, 202, 203, etc) – but – make the Link off that page say: 'Add Note to Notebook' and direct it to page 10 as if the Note had been used like the Above.
Then, remove this from the Global Script:
IF $PAGEID != 10 THEN
%LASTPAGE := $PAGEID
Go to your Items and in ITEM Scripts, add:
TO NOTEBOOK Item:
%LASTPAGE := $PAGEID
TO all NOTE Items:
IF $PAGEID != 10 THEN
%LASTPAGE := $PAGEID
On Notebook Page 10, and all Item Pages (201, 202, 203, etc) Previous Page Link, add:
$DEST := "@P" + %LASTPAGE
This should work – I’m 75% sure of it… (Good Luck)