OK, So I've changed course slightly... Now I want to make a book that will dispense the soul gems when you open it (that way you can take it with you!

). I used the code I had been trying on the crate and stuck it in a book instead. Just about every thing's handy dandy, except the fact that the *take* option to pick up the book doesn't appear (thus you can't keep the book, which defeats the whole point). Any ideas on why its not showing? Furthermore (I just found out), you can not open the book a second time (which is even worse). Help?! PLEASE?!! Here's the code I'm using...
CODE
Begin u-m_soul_dispencer_script
Short controlvar
Short button
If (OnActivate == 1); Ask if the player wants any filled soulgems, and how many.
If (controlvar == 0)
MessageBox "Would you like an Ulte-Mati Soul?", "No", "One", "Five", "Ten"
Set controlvar to 1
endif
endif
if (controlvar == 1);Find out how many the player wants
set button to GetButtonPressed
if (button == -1)
return
elseif (button == 1);Add one filled soulgem
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
MessageBox "The Ulte-Mati Soul has been added to your inventory."
Activate
set controlvar to 2
elseif (button == 2);Add five filled soulgems
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
MessageBox "Five Ulte-Mati Souls have been added to your inventory."
Activate
set controlvar to 2
elseif (button == 3);Add ten filled soulgems
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
Player -> AddSoulGem ulte-mati_soul, misc_SoulGem_Grand
MessageBox "Ten Ulte-Mati Souls have been added to your inventory."
Activate
set controlvar to 2
else; Add no filled soulgems
Activate
set controlvar to 2
endif
elseif (controlvar == 2); Reset
if (MenuMode == 0)
set controlvar to 0
endif
endif
End