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

		(switch(gPreviousRoomNumber)
			(case 46
				(send gEgo:
					posn(5 94)
					loop(0)
				)
			)
   	        (case 37
				(send gEgo:
					posn(145 180)
					loop(3)
				)
			)
    (case 976
				(send gEgo:
					posn(145 180)
					loop(3)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init())
  (aWoman: init())
  (aMan: init())

	)
)
/******************************************************************************/
(instance RoomScript2 of Script
	(properties)
   (method (changeState newState)
  = newState 0
  = state newState
  (switch (state)
    (case 0
= cycles 1
Wait(10)
Print("  Yes?  " #title "Woman:" #icon 777 0 14)
Print("You aren't in jail. But you are a woman..."#title"Dr.Jummybummy:" #icon 777 0 0)
Print("I was hiding when they captured all the other women." #title "Woman:" #icon 777 0 14)
Print("Do you know where they are held?"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("In the main base of the moon, I think." #title "Woman:" #icon 777 0 14)
Print("Ok. What are you doing here?"#title"Dr.Jummybummy:" #icon 777 0 0)
Print("I wanted a glass of water but the well is dry." #title "Woman:" #icon 777 0 14)
Print("Ok."#title"Dr.Jummybummy:" #icon 777 0 0)
Wait(5)
Print("(Maybe I should help her)"#title"Dr.Jummybummy:" #icon 777 0 0)
= talkedWo TRUE
+= gScore 2
PlayerControl()
Wait(15)
(aWoman: cel(0))
)
)
)
)
(instance RoomScript of Script
(properties)
    (method (handleEvent pEvent)
   (super:handleEvent(pEvent))
   (if(Said('spin,pull,use/crank'))
   (if(talkedWo)
  Print("The woman alien told you that the well is dry. So there's no use.")
  return
  )
  Print("You don't have to.")
   )
        (if(Said('look>'))
(if(Said('/man'))
(if(talkRebel)
Print("He must be the agent to get the radio from.")
return
)
Print("He's just some guy reading some posters.")
)
(if(Said('/well'))
Print("A well? In middle of all this sand?")
)
(if(Said('/board'))
Print("Some useless papers on it.")
)
(if(Said('/woman'))
(if(gaveWater)
Print("She looks a lot happier now. Thanks to you.")
return
)
Print("She looks sad. Go and talk to her.")
)
(if(Said('/paper'))
Print("The man is concentrated on reading those. Even if you'd like to read those, you couldn't understand them.")
)
(if(Said('/mountain'))
Print("They are in the distance.")
)
(if(Said('/sand'))
Print("Pretty same boring sand as everywhere else.")
)
 (if(Said('/sky'))
Print("You look, but there's not much to see.")
)
(if(Said('/'))
Print("You're down at the well. There's a woman at the well and a man reading some papers.")
        )
        )
   
   (if(Said('talk/man'))
   (if(< (send gEgo:distanceTo(aMan)) 30)
   (if(talkRebel)
   (if(send gEgo: has(INV_RADIO))
   Print("You already talked to him.")
   return
   )
   Print("Hi! The leader of Rebels sent me, he told me that you can give me a radio." #title "Dr.Jummybummy:" #icon 777 0 0)
   Print("Take it and go. I can't let anyone see you talking to me. I'm undercover!" #title "Rebel:" #icon 777 0 15)
   Print("Ok!" #title "Dr.Jummybummy:" #icon 777 0 0)
   (send gEgo: get(INV_RADIO))
    += gScore 3
   return
   )
   Print("Don't disturb me!" #title"Angry man:" #icon 777 0 15)
   return
   )
   Print("Move closer to him.")
   )
(if(Said('give>'))
(if(Said('/water,bottle,(bottle<water)'))
(if(talkedWo)
(if(gaveWater)
Print("You don't have it since you gave it to her.")
return
)
(if(< (send gEgo:distanceTo(aWoman)) 29)
(if(send gEgo: has(INV_WATER))
Print("Here, take this bottle of water." #title"Dr.Jummybummy:" #icon 777 0 0)
Print("Thank you very much! Here, for your generosity, take this diamond." #title"Woman" #icon 777 0 14)
Print("Alright! Thanks!" #title"Dr.Jummybummy:" #icon 777 0 0)
(send gEgo: get(INV_DIAMOND))
(send gEgo: put(INV_WATER))
(send gEgo: get(INV_EMPTY_BOTTLE))
= gaveWater TRUE
+= gScore 4
return
)
Print("Move closer to her.")
 return
)
Print("You don't have any water to give.")
return
)
Print("Why should you do that?")
return
 )

  (if(Said('/'))
  Print("She wouldn't be interested in it. Trust me.")
  )
 )
(if(Said('talk/woman'))
(if(< (send gEgo:distanceTo(aWoman)) 29)
(if(talkedWo)
Print("You already talked to her.")
return
)
ProgramControl()
Print("Excuse me..."#title"Dr.Jummybummy:" #icon 777 0 0)
(aWoman: setCycle(End RoomScript2))
return
 )
 Print("Move closer to her.")
)

)
)

(instance aWoman of Act
(properties
view 59
x 95
y 128
cel 0
))
(instance aMan of Act
(properties
view 70
x 263
y 74
))
/******************************************************************************/
