I am experiencing the same problems as you are and started looking at the script late lastnight. I noticed that the call to checkinventory seems to be causing the script to crash and end. I admit that I am very new to lavish scripting

, but it looks like the problem might be that the parameters being passed to the checkinventory function are in the incorrect order? Should be string and then int, and looks like the current script is using -- call checkinventory 10 "inventory" -- if I remember correctly ( it was very late lastnight when I looked at the script).
I will try to switch the parameters around this afternoon and see if that fixes the problem.
-- PappaSmurf