I've managed to do it, but man is it convoluted! It should all give you a good laugh anyway.
I created the object: ePad
I then created four different rooms; lounge, login, wrongpassword, correctpassword.
Lounge is where the player and ePad are. When the payer uses the ePad I run the following script
msg ("Enter password")
get input {
if (result="1234") {
MoveObject (player, login)
}
else {
msg ("Incorrect password")
SetObjectFlagOn (player, "wrongpass")
MoveObject (player, correctpassword)
}
}
The room called 'login' will basically serve as the ePad interface when accessed with the correct password.
An incorrect password here sets the flag 'wrongpass' and moves the player to the room 'correctroom'
In the room 'correctroom' I run the following script
msg ("Enter password")
get input {
if (result="1234") {
MoveObject (player, login)
}
else if (GetBoolean(player, "wrongpass")) {
msg ("Incorrect password")
MoveObject (player, wrongpassword)
}
}
An incorrect password here sets the flag 'wrongpass' again, but this time moves the player to the room 'wrongpassword'
I then run the same script as in the lounge. This has the effect of bouncing the player between 'wrongpassword' and 'correctpassword' until they get the password correct.
All I have to do now is add a command for 'use address book' so that they can still call this if needs be, and also create a 'log out' link to return them to the game.
I've no idea how to do this last one (create a 'log out' link that returns them to the game) so if anyone can explain how, that would be appreciated.