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

		(switch(gPreviousRoomNumber)
			(case 81
				(send gEgo:
					posn(45 118)
					loop(0)
				)
			)
   		(case 976
				(send gEgo:
					posn(45 118)
					loop(0)
				)
			)
   (case 85
				(send gEgo:
					posn(313 Yposn)
					loop(1)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  (aWoman: init())
  (aTan1: init())
    (if(== ladderPlaced 1)
     (aLadder: init() posn(ladderX 88) ignoreControl(ctlWHITE))
     )
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
	(method (handleEvent pEvent)
        (super:handleEvent(pEvent))
            (if(Said('sunbath,tan,(take<sun)'))
   Print("Your skin is sun sensitive. You cannot tan.")
   Print("At least not like the normal people.")
        )
            (if(Said('look>'))
        (if(Said('/wall'))
 Print("In case you want to climb it, you need some help. It's too high to climb otherwise. Some plants grow over it.")
 )
(if(Said('/woman'))
 Print("I wonder, is she pretty?")
)
(if(Said('/hotel,building'))
 Print("A balcony is on this side of the hotel.")
)
(if(Said('/balcony'))
 Print("Does this make the room cost more?")
)
(if(Said('/brick'))
 Print("It's red.")
)
(if(Said('/tree,door'))
 Print("It's not interesting to look at.")
)
(if(Said('/plant'))
 Print("They must be growing on the other side of the wall.")
)
(if(Said('/pool'))
 Print("How you wish to jump in and have a relaxing swim. But our budget doesn't allow such luxury.")
)
(if(Said('/blanket,cloth'))
 Print("It's nailed onto the ground.")
)
(if(Said('/ground'))
 Print("Someone has placed a blanket on the ground.")
)
(if(Said('/ladder'))
    (if(== ladderPlaced 1)
    Print("The ladder is placed against the wall.")
    return
    )
 Print("The ladder goes right on to the bottom of the pool.")
)
(if(Said('/'))
Print("You're at the pool area of the hotel. The water in the pool is come. A wall is built to get some privacy for guests. A woman-alien is sunbathing.")
)
)
        (if(Said('talk/woman'))
        Print("You don't want to disturb her. She is sunbathing.")
        )
        (if(Said('climb,(climb,get<over)/ladder,wall,fence'))
        (if(> ladderPlaced 0)
        (if(< (send gEgo:distanceTo(aLadder)) 20)
        Print("You climb the ladder over the wall. On the other side there are some rebel waiting with a car.")
        += gScore 1
        (send gRoom: newRoom(131))
        return
        )
        Print("You're too far away from the ladder.")
        return
        )
        Print("The wall is too high to climb with just bare hands.")
        return
        )
        (if(Said('(set<up),place/ladder') or (if(Said('(set<up),place/ladder/wall'))))
        (if(> ladderPlaced 0)
        Print("You already did that.")
        return
        )
         (if(send gEgo: has(INV_LADDER))
        (if(==(send gEgo: onControl()) ctlRED)

        Print("Ok")
        Print("That's a good idea!")
        = ladderPlaced 1
        = ladderX (send gEgo: x)
             (aLadder: init() posn(ladderX 88) ignoreControl(ctlWHITE))
             += gScore 3
                 (send gEgo: put(INV_LADDER))
             return
             )
             Print("You're not close enough to anything to place the ladder to.")
             return
             )
             Print("You don't have a ladder.")
             return
             )

        )
 
 (method(doit)
 (if(==(send gEgo: onControl()) ctlNAVY)
 (send gRoom: newRoom(81))
)
)
)
(instance aWoman of Act
(properties
view 161
x 145
y 114
loop 1
cel 0
))
(instance aTan1 of Act
(properties
view 161
x 278
y 117
loop 0
cel 0
))
(instance aLadder of Act
(properties
view 159
y 88
))

/******************************************************************************/
