for (i, 1, LengthOf(s)) {
msg("The next character is " + Mid(s, i, 1))
}
north_exit = GetExitByName (room, "north")
if (not north_exit = null) {
if (RandomChance(100)) {
CloneObjectAndMove (north_door, room)
north_exit.lockmessage = "You need a key to unlock this door!"
LockExit (north_exit)
}
}
east_exit = GetExitByName (room, "east")
if (not east_exit = null) {
if (RandomChance(100)) {
CloneObjectAndMove (east_door, room)
east_exit.lockmessage = "You need a key to unlock this door!"
LockExit (east_exit)
}
}
south_exit = GetExitByName (room, "south")
if (not south_exit = null) {
if (RandomChance(100)) {
CloneObjectAndMove (south_door, room)
south_exit.lockmessage = "You need a key to unlock this door!"
LockExit (south_exit)
}
}
west_exit = GetExitByName (room, "west")
if (not west_exit = null) {
if (RandomChance(100)) {
CloneObjectAndMove (west_door, room)
west_exit.lockmessage = "You need a key to unlock this door!"
LockExit (west_exit)
}
}
CloneObjectAndMove (north_door, room)
north_exit = GetExitByName (room, "north")
msg(north_exit)
if (not north_exit = null) {
if (RandomChance(100)) {
new_door = CloneObjectAndMove (north_door, room)
msg(new_door)
north_exit.lockmessage = "You need a key to unlock this door!"
LockExit (north_exit)
}
}
north_exit_name = GetExitByName (room, "north")
if (not north_exit_name = null) {
if (RandomChance(100)) {
north_exit = GetObject(north_exit_name)
CloneObjectAndMove (north_door, room)
north_exit.lockmessage = "You need a key to unlock this door!"
LockExit (north_exit)
}
}