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

		(switch(gPreviousRoomNumber)
			(default
  (send gEgo:
					posn(135 67)
					loop(2)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
   (aFlag: init())
  (aMan1: init() cel(1))
  (aMan2: init())
  (aMan3: init())
 = firstTime TRUE
 ProgramControl()
 (send gEgo: cycleSpeed(1) moveSpeed(1) setMotion(MoveTo 147 74 RoomScript))

  (if(not(musicRe))
 = musicRe TRUE
            (send gTheMusic:
			prevSignal(0)
			stop()
			number(602) //2
			loop(-1)
			play()
		)
 )
  = beenToTheRebels TRUE


	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
(method(changeState newState)
 = state newState
 (switch(state)
 (case 1
 = cycles 1
  (send gEgo: setMotion(MoveTo 155 74 RoomScript))
  )
  (case 2
  (send gEgo: setMotion(MoveTo 155 75 RoomScript))
  )
  (case 3
  Print("Hi! Could I have a word with you guys?"#title"Dr Jummybummy:")
  Wait(25)
  Print("Of course if you're here already. Come down here! "#title"Leader of the Rebels:")
  (send gEgo: setMotion(MoveTo 205 73 RoomScript))
    )
  (case 4
  (send gEgo: setMotion(MoveTo 240 91 RoomScript))
      )
  (case 5
  (send gEgo: setMotion(MoveTo 238 99 RoomScript))
        )
  (case 6
  (send gEgo: setMotion(MoveTo 234 112 RoomScript))
      )
  (case 7
  (send gEgo: setMotion(MoveTo 75 114 RoomScript))
  )
    (case 8
        = talkRebel TRUE
Print("How can we help?" #title"Leader of the Rebels:" #icon 777 0 6)
Print("I would like to save my home planet from Lord Bather destroying it. I need to get into the town." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("Then we can help you. But what will you do then, when you're in?" #title"Leader of the Rebels:" #icon 777 0 6)
Print("Try to find Lord Bather and stop him." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("I've heard about the plan to destroy your planet. They will use a big laser attached to a spaceship. But the laser isn't operational yet. They are only missing some part." #title"Leader of the Rebels:" #icon 777 0 6)
Print("You know what part that is?" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("It's supposed to be some stone with some great power. But they haven't found it yet. It's somewhere on this moon." #title"Leader of the Rebels:" #icon 777 0 6)
Print("Then I have to find it!" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("And then what?" #title"Leader of the Rebels:" #icon 777 0 6)
Print("I'll stop Lord Bather!" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("Ok! Maybe we can help you. We have one of our agents at Lord Bather's base. His name is Krap. I'm sure he can help. We'll contact him." #title"Leader of the Rebels:" #icon 777 0 6)
Print("But how can I get into the town?" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("See the tunnel in the left wall? This goes under the city wall. You can use this." #title"Leader of the Rebels:" #icon 777 0 6)
Print("Ok thanks! I have to be going now!" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("And go talk to our guy, down at the well. He can give you the radio, so we can contact you." #title"Leader of the Rebels:" #icon 777 0 6)
+= gScore 5
(send gEgo: setMotion(MoveTo 110 111 RoomScript))
          )
  (case 9
  Print("You go back to the bar.")
  (send gRoom: newRoom(47))
  )

  ))
)
(instance aFlag of Prop
(properties
view 24
x 200
y 40
))
(instance aMan1 of Prop
(properties
view 75
x 76
y 101
))
(instance aMan2 of Prop
(properties
view 76
x 30
y 124
cel 0
))
(instance aMan3 of Prop
(properties
view 76
x 140
y 106
cel 1
))
 (instance aE of Act
 (properties
 view 300
 x 1
 y 1
 ))
/******************************************************************************/
