/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 12)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
walked
)
/******************************************************************************/
(instance public rm012 of Rm
	(properties
		picture scriptNumber
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(315 139)
					loop(1)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
     = oxLev 0
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)

 (method (handleEvent pEvent)
        (super:handleEvent(pEvent))
           (if(Said('talk/alien'))
           Print("Hey! Mr.Alien?")
           Print("Guess no response from that creature.")
           )
           (if(Said('climb/tree'))
   Print("What would you accomplish by climbing the tree? It's too high anyway.")
   )
 (if(Said('look>'))

             (if(Said('/ground'))
            Print("It looks like grass, but I might be wrong.")
             )
            (if(Said('/sign'))
            Print("It's in some strange language. You can't understand it.")
             )
            (if(Said('/mountain'))
            Print("It's far away from here.")
            )
            (if(Said('/bush'))
            Print("You don't see much. Mostly leaves.")
            )
            (if(Said('/tree'))
            Print("It sure is a big tree.")
            )
            (if(Said('/man'))
            (if(walked)
            Print("It's an alien. It's moving towards you.")
            return
            )
            Print("Where?")
            )
            (if(Said('/sky'))
            Print("It looks like the sky back on earth.")
            )
            (if(Said('/grass'))
            Print("I'm not really sure it's called grass around here.")
            )
            (if(Said('/'))
            Print("Now the environment is different than back there. There's a huge tree and a bush.")

        )
        )
        )
     (method(doit)
   (if(== (send gEgo:onControl()) ctlRED)
   (if(not(walked))
   ProgramControl()
   = walked TRUE
  (aMan: init() setCycle(Walk) setMotion(MoveTo 87 75 RoomScript))

  )
  )
  )
   (method (changeState newState)
  = state newState
  (switch (state)
    (case 0

 = cycles 1
    )
    (case 1
     (aMan:setMotion(MoveTo 118 (send gEgo:y) RoomScript))
      Print("(I'm in deep trouble now!)" #title"Dr Jummybummy:" #at 95 40)
     
    )
    (case 2
     (aMan:setMotion(MoveTo 125 (send gEgo:y) RoomScript) loop(4))

     )
     (case 3
Print("Halt! Who are you?" #at 25 50 #title "Alien:" #icon 777 0 1)
Print("I'm Dr.Jummybummy. What is this place?" #title "Dr.Jummybummy:" #icon 777 0 19 #at 95 40)
Print("You're an intruder! Don't move!" #title "Alien:" #icon 777 0 1 #at 25 50)
Print("Take it easy! I'm not harmful." #title "Dr.Jummybummy:" #icon 777 0 19 #at 95 40)
Print("Shut up and move!" #title "Alien:" #icon 777 0 1 #at 25 50 )
     (aMan:setMotion(MoveTo 120 140 RoomScript))
     (send gEgo:setMotion(MoveTo 119 136 RoomScript))
     )
     (case 4
     Print("The alien takes you away...")
     (send gRoom: newRoom(13))

    )
  )
)

)
(instance aMan of Act
(properties
view 32
x 30
y 73
))
/******************************************************************************/
