Note - x = room width (left=0 to right), y = room height (bottom=0 to top), z = room length (front=0 to back). You can work out coordinates using the editor by selecting a single square tile and moving it around the room and reading off the coordinates displayed.

Code:

-- asimov is frozen, effect plays on his head, he wakes up, hel tells him to get to work,
-- player gets control

-- definitions - these are unchanging "names" for the different states this room can get in
INTRO_EFFECT = 0
START_CONV = 1
WAIT_CONV_FINISH = 2
DOWNLOAD = 3

-- globabls - these values will be set when we enter the room and then we'll change
-- them as things happen, if we leave the room and walk back in they'll reset to these values again
g_timer = 0
g_state = DOWNLOAD

--a function called sequence is always called if we're new to the room
--it will keep being called over and over while we are in the room
function sequence()

if( g_state == DOWNLOAD ) then

--stop him and wait a tiny bit
closeDoor( 0, true ) -- close the door straight away, do it instantly
overrideAsimov( true ) -- stop the player moving around
-- grab a dummy robot in the room and make it walk from xz1->xz2->xz3 and back again
sendMessage( "h1r1dummy", "SYSTEM", "WANDER", "2,0,7,0,7,8" )
g_state = INTRO_EFFECT -- switch to the next state next time this function runs
g_timer = getTime() -- setup a timer

-- when sequence returns true the game remembers and then starts calling
-- completed instead, use this to keep things tidy after the room is finished with
function completed()

if( g_state == DOWNLOAD ) then -- remember our state variable will reset when we leave and come back
-- getKeyVal and saveKeyVal are a way for scripts to save bits of text permanently
-- and let other scripts check them later. In this case we are checking for some major event happening
-- later in the game that means all the robots should have gone
if( getKeyVal( "z1r17" ) == "main_objective" ) then
sendMessage( "h1r1dummy", "SYSTEM", "DISABLE", "" ) -- stop that dummy robot doing stuff
sendMessage( "h1r1dummy", "SYSTEM", "SHOW", "FALSE" ) -- make it vanish
else
sendMessage( "h1r1dummy", "SYSTEM", "WANDER", "2,0,7,0,7,8" ) -- otherwise make sure it keeps wandering about
end
openDoor( 0, true ) -- make sur ethe door stays open, do it fast
-- put us into any other state just so we stop running this bit of code
g_state = INTRO_EFFECT