/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 129)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm129 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(106 101)
					loop(2)
				)
			)
		)
        ProgramControl()
		SetUpEgo()
		(send gEgo:init())
        (aMan: init() setCycle(Walk) setMotion(MoveTo 199 135 RoomScript))
          (send gTheMusic:
			prevSignal(0)
			stop()
			number(2) //2
			loop(-1)
			play()
		)
     ProgramControl()
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
	(properties)
  (method (changeState newState)
  = state newState
  (switch (state)
    (case 1
    
    (aMan: loop(1))
    Print("I'm Jonny. I was in the storage room and heard you asking about me." #title "Jonny:" #icon 777 0 6)
    (send gEgo: setMotion(MoveTo 155 121 RoomScript))
    )
    (case 2

Print("Yeah, the rebels suggested that I find you. They said that you could find me a weapon." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("The rebels, then you must be Dr.Jummybummy. They contacted me and said you were coming." #title "Jonny:" #icon 777 0 6)
Print("You need a sniper eh?" #title "Jonny:" #icon 777 0 6)
Print("Yeah. Or something like that. I don't much about this weapon stuff." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("I should have one here somewhere. Let me go and find it." #title "Jonny:" #icon 777 0 6)
(aMan: setCycle(Walk) setMotion(MoveTo 320 140 RoomScript))
        ProgramControl()
)
(case 3
(aMan: hide())
(aE: init() setMotion(MoveTo 250 180 RoomScript))
)
(case 4
(aMan: show() setMotion(MoveTo 199 135 RoomScript))
)
(case 5
Print("I heard you need it to eliminate Lord Bather." #title "Jonny:" #icon 777 0 6)
Print("Yes, I have to save my home planet." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("But have you seen Lord Bather. Do you know how he looks like? Not many have seen him." #title "Jonny:" #icon 777 0 6)
Print("I think I have, when I was captivated, he spoke to me and accused me of trying to stop him, in somekind of a throne room." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("Then you must've seen his Artificial Body Robot. He can't risk his life showing himself in public places." #title "Jonny:" #icon 777 0 6)
Print("Oh! But don't worry about that. I'll reconise him." #title "Dr.Jummybummy:" #icon 777 0 0)
Print("Ok, here's the sniper. Good luck! I'll call the rebels that you have the weapon." #title "Jonny:" #icon 777 0 6)
+= gScore 4
(send gEgo: get(INV_SNIPER))
Print("You got the sniper and decide to leave.")
(send gRoom: newRoom(126))
  )
    )
    )
)
(instance aMan of Act
(properties
view 155
x 117
y 108
))
 (instance aE of Act
 (properties
 view 300
 x 1
 y 180
 ))
/******************************************************************************/
