I give up. I can't figure it out. How can you make it so that the player can take back an item. I created a cage item the player can use on a page and the variable %TRAPSET is set to $PAGEID. On the page script of every page, if it detects TRAPSET is equal to the page number of the page you are on, then a new link will appear, "Check trap". Going into that page it'll tell you if you caught something but if it's empty, the player has the option to pick up the trap. I made a link where it takes you to the original page where you got your trap because I read that setting $ITEMSTATE# to 0 will return the item to that page. However, I also read that you can't change those variables in the link scripts so I went with the page script of the page where you get your cage to check if you want the cage back. When you click on the link "Take back trap", it sets TRAPSET to 999 in the link script and when it reaches the page where you get your trap, that page script has the following code:
IF %TRAPSET = 999 THEN
BEGIN
$ITEMSTATE1 := 0
%TRAPSET := 0
END
However, while TRAPSET goes to 0, the cage does not reappear as an item to pick up. At first I accidentally set $ITEMSTATE# to 1 thinking that was the problem, but by that logic I should've gotten the cage again automatically, which is what I should probably do, but neither work.