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

		(switch(gPreviousRoomNumber)
			(default
   (send gEgo:
					posn(124 165)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  ProgramControl()
  (send gEgo: setMotion(MoveTo 180 128 RoomScript))
          (aBart: init())
  (aMan1: posn(249 127) cel(1) init())
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)

 (method(changeState newState)
 = state newState
 (switch(state)
  (case 1
   (send gEgo: setMotion(MoveTo 180 125 RoomScript))
   )
 (case 2
Print("Hello!"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("Hi! What can I get you?"#title"Bartender:" #icon 777 0 11)
Print("Some information maybe. You happen to know anything about Lord Bather?"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("Yes, some."#title"Bartender:" #icon 777 0 11)
Print("You know where he is located?"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("In Lost Angle."#title"Bartender:" #icon 777 0 11)
Print("How can I get there?"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("Go talk to the bum behind the bar. Maybe he can take you there."#title"Bartender:" #icon 777 0 11)
Print("Thanks!"#title"Dr.Jummybummy:" #icon 777 0 0)
Wait(35)
Print("Hey, do you happen to know anything about repairing slot machines?"#title"Bartender:" #icon 777 0 11)
Print("I think I do. Want me to fix it?" #title "Dr.Jummybummy:" #icon 777 0 0)
Print("Yeah, I'd give you 10 dakos (local currency). The tools should be around here somewhere."#title"Bartender:" #icon 777 0 11)
Print("I'll give it a shot!"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("Thanks man!"#title"Bartender:" #icon 777 0 11)
Print("I'll go now and find to that bum." #title"Dr.Jummybummy:" #icon 777 0 0)
+= gScore 3
= bartender TRUE
  (send gEgo: setMotion(MoveTo 124 166 RoomScript))
 )
    (case 3
  (send gRoom: newRoom(98))
    )
))
)

(instance aBart of Prop
(properties
view 119
x 191
y 87
cel 0
))
(instance aMan1 of Act
(properties
view 150
x 78
y 112
loop 3
cel 2
))
/******************************************************************************/
