Actually, I take back what I said - it won't fix it. There is no workaround, short of modifying the code. There's a more insidious problem with AllKeysAvailable, and it's due to a quirk in Quest (unless it's been changed?).
The code is this:
<function name="AllKeysAvailable" parameters="object" type="boolean">
if (not HasInt(object,"keycount") and HasObject(object, "key")) {
object.keycount = 1
object.key1 = object.key
}
for (x, 1, object.keycount) {
keyname = "key" + ToString(x)
if (HasObject(object, keyname)) {
if (not ListContains(ScopeInventory(), GetAttribute(object, keyname))) {
return (false)
}
}
}
return (true)
</function>
The problem is that "return" sets the return value but *does not change program flow*. This has been a problem for those used to other languages for a while. So in the above code, the return(false) in the if may get executed, but the return(true) at the end will *always* be executed, even if the "if" is - because the code doesn't jump out of the function when it hits that return.