<command name="unlockwith">
<pattern>unlock #text# with #text2#</pattern>
<script>
obj = GetObject(text)
key = GetObject(text2)
if (obj = null) {
msg (Template("UnresolvedObject") + " (" + text + ")")
}
else if (key = null) {
msg (Template("UnresolvedObject") + " (" + text2 + ")")
}
else if (HasAttribute (obj, "key")) {
if (obj.key=key) {
HandleSingleCommand ("unlock "+ text)
}
}
else {
msg(Template(NoKey))
}
</script>
</command>
obj = GetObject(text)
key = GetObject(text2)
if (obj = null) {
msg (Template("UnresolvedObject") + " (" + text + ")")
}
else if (key = null) {
msg (Template("UnresolvedObject") + " (" + text2 + ")")
}
else if (HasAttribute (obj, "key")) {
if (obj.key=key) {
HandleSingleCommand ("unlock "+ text)
}
}
else {
msg(Template(NoKey))
}