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

		(switch(gPreviousRoomNumber)
			(case 5
				(send gEgo:
					posn(173 151)
					loop(3)
				)
              (send gTheMusic:
			prevSignal(0)
			stop()
			number(3)
			loop(-1)
			play())
			)
   		(case 130
				(send gEgo:
					posn(241 109)
					loop(2)
				)
			)
		)
		SetUpEgo()
		(send gEgo:init())
  (Al: init())
  (Teller2: init())
  (Chief: init())

	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
     (method (handleEvent pEvent)
     (super:handleEvent(pEvent))
           (if(Said('search/mailbox'))
           Print("You wouldn't accomplish anything by doing that.")
           )
           
           (if(Said('cue,wait/(line)'))
           Print("You *just* love queuing but not today - you have important things to do.")
           )
           
     (if(Said('give,show>'))
     (if(Said('/note,paper,letter'))
   (if(> (send gEgo:distanceTo(Teller2)) 50)
  Print("You're too far away to give it to her.")
  return
  )
    Print("Hello! I have this note here that shows I have a package here." #title "Dr.Jummybummy:" #icon 777 0 19)
   Print("Yes. Your package is right here. But you have to take your position in the line."#title"Man:" #icon 777 0 13)
     )
            (if(Said('/'))
      (if(> (send gEgo:distanceTo(Teller2)) 50)
  Print("You're too far away to give it to her.")
  return
  )
      = ans Random(1 4)
      (if(== ans 1)Print("I don't think that it would interest her."))
      (if(== ans 2)Print("You don't have to give that to her."))
      (if(== ans 3)Print("She wouldn't be interested in it."))
      (if(== ans 4)Print("What would she do with that?"))

          )
     
      )
     (if(Said('kiss/woman'))
     Print("You know, you're not a chick magnet, so kissing her would only make her unhappy.")
     Print("You don't want that.")
     )
       (if(Said('talk,ask/package,woman'))
        (if(< (send gEgo:distanceTo(Teller2)) 46)
        (if(postman)
 Print("You must be the new guy. What took you so long today?" #title"Woman:" #icon 777 0 13)
 Print(".. umm ... ee ... my car ... umm ... broke down." #title "Dr.Jummybummy:" #icon 777 0 19)
 Print("Get to the back-room. There are some new packages waiting." #title"Woman:" #icon 777 0 13)
 return
        )
Print("I should have a package here. Can I get it?" #title "Dr.Jummybummy:" #icon 777 0 19)
Print("Can't you see that there are other people here besides you? So you have to wait."#title"Woman:" #icon 777 0 13)
(if(not(postman))
Print("Isn't there supposed to be another employee too?" #title "Dr.Jummybummy:" #icon 777 0 19)
Print("He hasn't arrived yet." #title"Woman:" #icon 777 0 13)
)
return
     )
     Print("Move closer to her.")
     )

              (if(Said('open,unlock/door'))
            (if(== (send gEgo:onControl()) ctlNAVY)
            (if(postman)
            Print("You use your employee ID card to open the door. And you step in.")
         (send gRoom: newRoom(130))
            return
            )
             = carIsParked TRUE
           Print("You have to be an employee around here, or at least have the ID card to open this door.")
           return
           )
           Print("You should move closer to the door.")
           )
       (if(Said('open,unlock/locker'))
       Print("You don't have to open any of these lockers since none of them are yours.")
       )
       (if(Said('talk/chief'))
         (if(chief)
         Print("You already talked to him.")
         return
         )
     Print("Hi! I'm Dr Jummybummy." #title "Dr.Jummybummy:" #icon 777 0 19)
     Print("So?"#title"Chief:")
        = chief TRUE
       
       )
       (if(Said('talk/al,man,(al<pond)'))
        (if(< (send gEgo:distanceTo(Al)) 40)
       (if(al)
       Print("You already talked to him. And the other man is not worth talking to.")
       return
       )
       += gScore 1
       Print("Hi Al! I'm Dr Jummybummy." #title "Dr.Jummybummy:" #icon 777 0 19)
        Print("So Eigen's making another game?"#title"Al:" #icon 777 0 12)
       Print("And I'm the main character." #title "Dr.Jummybummy:" #icon 777 0 19)
          Print("You know I didn't get my cash for acting in the game."#title"Al:" #icon 777 0 12)
        Print("I'll try to talk to Eigen about that." #title "Dr.Jummybummy:" #icon 777 0 19)
      Print("Tell him that I want my cash or no next Al Pond game!"#title"Al:" #icon 777 0 12)
        Print("You got it!" #title "Dr.Jummybummy:" #icon 777 0 19)
        = al TRUE
        return
        )
        (if(Said('ask/autograph'))
        Print("Hey Al, can I get an autograph?" #title "Dr.Jummybummy:" #icon 777 0 19)
        Print("Later on dude. Stop by when the game's over."#title" Al: " #icon 777 0 12)
       return
       )
       Print("You should move closer to him.")
       )
       
       (if(Said('look>'))
                        (if(Said('/card,id'))
            (if(postman)
             Print("New Yerk Post Office: \n\n Name: Mike Haley \n\n ID: 4587B2D" #icon 778 0 5)
            return
            )Print("You're losing it man. :P"))
           (if(Said('/wall'))
            Print("There are some lockers inside the wall.")
            )
             (if(Said('/locker'))
            Print("This is where people keep their stuff.")
                        )
             (if(Said('/window'))
            Print("You can see a pretty woman behind one of the windows.")
            )
            (if(Said('/woman'))
            Print("She's pretty. I have a feeling that I have seen her before.")
            )
            (if(Said('/man,crowd,people,line'))
            Print("There is Al Pond standing in the line! The other man is Chief.")
             )
             (if(Said('/counter,desk'))
            Print("A woman is standing behind the counter.")
            )
            (if(Said('/al'))
            Print("It's the star of Al Pond games, Al Pond himself. Go and ask an autograph.")
            )
            (if(Said('/chief'))
            Print("This is The Chief from Al Pond 2.")
            )
            (if(Said('/door'))
            Print("It leads to the back-room.")
                        )
            (if(Said('/floor'))
            Print("It's just dark and all. They have a good cleaner around here.")
            )
            (if(Said('/mailbox'))
            Print("You can bring your mail here, to get it delivered.")
            )
            (if(Said('/'))
            Print("You're inside the post office. You can see a line of two people waiting and a mailbox. A door is leading to the back-room.")

        )
        )
     )
     
      (method(doit)
 (if(==(send gEgo: onControl()) ctlRED)
 (send gRoom: newRoom(5))
 )

 )
 )
 (instance Al of Act
 (properties
 view 100
 x 118
 y 105
 loop 4
 cel 0
 ))
  (instance Teller2  of Prop
 (properties
 view 28
 x 113
 y 76
 loop 2
 cel 0

 ))
  (instance Chief  of Act
 (properties
 view 34
 x 123
 y 111
 loop 3
 cel 0

 ))
/******************************************************************************/
