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

		(switch(gPreviousRoomNumber)
  (case 79
   (send gEgo:
					posn(314 120)
					loop(1)
				)
  )
  (default
   (send gEgo:
					posn(310 187)
					loop(3)
				)
  )
   	(case 75
            (if(== side 1)
            (send gEgo:
					posn(22 139)
					loop(0)
				)
    )       (if(== side 2)
    (send gEgo:
					posn(275 65)
					loop(0)
				)
			))
		)

		SetUpEgo()
		(send gEgo:init())
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
 	(method (handleEvent pEvent)
        (super:handleEvent(pEvent))
        (if(Said('open/door'))
        Print("This door is protected with Thief Keeper Mark V. This means it can't be opened, even by the owner. You need to find another way to >under<take this.")
        )
       (if(Said('look>'))
        (if(Said('/roof'))
 Print("It doesn't hold your intrest for long.")
 )
  (if(Said('/tree'))
 Print("Haven't you seen one before? Go out and see then!")
 )
  (if(Said('/forest'))
 Print("I can't see, the trees are blocking the view. Haahaa ... very funny!")
 )
  (if(Said('/car'))
 Print("It's in front of the house.")
 )
  (if(Said('/window'))
 Print("The windows are curtained from the inside.")
 )
 (if(Said('/house'))
 Print("The house looks pretty nice from the outside.")
 )
 (if(Said('/lock,picklock'))
 Print("It's the Thief Keeper Mark V. No way to open it.")
 )
  (if(Said('/door'))
 Print("It's only few boards but won't be open that easily. Meaning, it stays closed.")
 )
 (if(Said('/fence'))
 Print("It goes around the house. Looks like it's been built a long time ago.")
 )
   (if(Said('/ground,grass'))
 Print("Hmm, from this aspect  ... maybe I can enter the shed under it. Got to try!")
 )
  (if(Said('/shed'))
 Print("Looks like a regular fireplace wood keeping place. A nice dusty shed. The door of the shed is locked with a picklock.")
 )
(if(Said('/'))
Print("You're in back of a house. There's a shed along the back wall of the house.")

         ))
          (if(Said('use/shovel') or (if(Said('use/shovel/ground,hole,tunnel') or (if(Said('dig/ground/shovel')or(if(Said('dig/ground,hole,tunnel'))))))))
        (if(not(send gEgo: has(INV_SHOVEL)))
        Print("With your bare hands?")
        return
        )
        (if(==(send gEgo: onControl()) ctlGREEN)
        Print("After few moments of digging, you discover that this part is too rocky.")
        return
        )
        (if(==(send gEgo: onControl()) ctlBLUE)
        Print("You dig for a moment, but then discover that it's too rocky and stony.")
        return
        )
        (if(==(send gEgo: onControl()) ctlYELLOW)
        Print("After some time digging, you hit a stone with your shovel, and decide not to dig more on this spot.")
        return
        )
        (if(==(send gEgo: onControl()) ctlCYAN)
        Print("Now this is a good spot!")
        += gScore 2
        = dug TRUE
              (send gTheMusic:
			prevSignal(0)
			stop()
			number(668) //668
			loop(-1)
			play()
		)
        Print("After 1 hour and 34 minutes of digging you have a tunnel under the shed.")
        (send gEgo: put(INV_SHOVEL))
        (send gRoom: newRoom(77))
        return
        )
        Print("This is not a good spot to dig. Try elsewhere.")
        return

        )
                (if(Said('dig'))
        Print("What do you want to dig?")
        )
        )
 (method(doit)
 (if(==(send gEgo: onControl()) ctlSILVER)
 = side 2
 (send gRoom: newRoom(75))
 )
 (if(==(send gEgo: onControl()) ctlNAVY)
 = side 1
 (send gRoom: newRoom(75))
 )
 )
)
/******************************************************************************/
