/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 145)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
/******************************************************************************/
(instance public rm145 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(105 105)
					loop(2)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
 (if(not(send gEgo: has(INV_CAR_KEY)))
 (aKey: init())
 )
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
 	(method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if(Said('clean/window'))
       Print("You're not somekind of a cleaning service to clean windows.")
        )
          (if(Said('look>'))
(if(Said('/tile,wall,floor'))
Print("You see nothing special.")
)
(if(Said('/head,(moose<head)'))
Print("Something like that would fit perfectly to your house.")
)
(if(Said('/window'))
Print("It's too dusty and messy to see outside.")
)
(if(Said('/door'))
Print("This is the front door of this house. It even doesn't look that crappy.")
Print("Like everything else here.")
)
(if(Said('/wall,tapet'))
Print("The wallpaper on the walls looks old. A old moose head in on the wall too.")
Print("I don't want to look at it anymore.")
)
(if(Said('/key,(car<key)'))
 (if(send gEgo: has(INV_CAR_KEY))
 Print("These keys are in your inventory. Press TAB to see those.")
 return
 )
 Print("These keys seem to belong to the car outside.")
)
(if(Said('/table'))
(if(send gEgo: has(INV_CAR_KEY))
Print("This table looks empty as a baby's butt.")
return
)
Print("There seem to be some keys on the table.")
)
(if(Said('/'))
Print("This seems to be the hut of the timber-guys. It doesn't look very nice from the inside.")
Print("A table is in middle of the room. An ugly carpet is lying on the floor. The wallpaper is loose all over the place.")
        )
        )
        
(if(Said('open/door'))
(if(== (send gEgo:onControl()) ctlBLUE)
Print("Ok")
(send gRoom: newRoom(75))
)
)
(if(Said('take>'))
(if(Said('/key,(car<key)'))
(if(== (send gEgo:onControl()) ctlNAVY)
(if(send gEgo: has(INV_CAR_KEY))
Print("There isn't any key to take.")
return
)
Print("You grab the car keys from the table.")
+= gScore 2
(send gEgo: get(INV_CAR_KEY))
(aKey: hide())
return
)
Print("Move closer to the table which holds the key of the car.")
)
(if(Said('/head,(moose<head)'))
Print("You're not a thief.")
)
(if(Said('/'))
Print("You don't want to take that.")
)
)
)
)
(instance aKey of Act
(properties
view 207
x 155
y 138
cel 0
))
/******************************************************************************/
