I created the following parallel script and assigned it to command called "test":
if (not Got(apple)) {
firsttime {
msg ("The apple looks good enough to eat.")
}
otherwise {
msg ("You really want to take the apple.")
}
}
else {
msg ("The apple splits open, and a worm comes out.")
}
and I get this output when run:
> test
The apple looks good enough to eat.
> test
You really want to take the apple.
> take apple
You pick it up.
> test
The apple splits open, and a worm comes out.
I'm not really sure where your script is being called, so I don't know if you have any odd side effects. Since you're moving the player to a room directly, I'm also not sure what the exit locking and unlocking is doing, but I'm sure you have a reason for it!
Random thing to check: be sure you don't have more than one "sleutel" (e.g. "sleutel" and "sleutel1", both with alias "sleutel" or something like that).