I'm trying to write a script that will prevent the player from reading a book if his/her speechcraft skill is less than 25. It looks like this and is attached to the book object in the CS:
begin onActivate
if ( player.GetAV Speechcraft < 25 ) && ( IsActionRef player == 1 )
Messagebox "You are not sufficiently skilled in Speechcraft to read this book"
endif
end
begin onEquip
if ( player.GetAV Speechcraft < 25 ) && ( IsActionRef player == 1 )
Messagebox "You are not sufficiently skilled in Speechcraft to read this book"
endif
end
This works fine when the book is a reference in the world, but when it's already in the player's inventory it doesn't seem to do anything. Is this because clicking a book in the inventory doesn't really 'equip' it as such? Is it possible to write a script that prevents the book from 'opening' from the inventory menu?
Thanks!
