# post_master

!!variables used:
!!postjobQW (1 = trial offered but declined, 2 = trial accepted, 3 = job offered, 4 = job accepted, 5 = not working until accepted again, 999 = no longer available)
!!postamountrand = (0-2, whether there is a little, medium or lots of mail to deliver. Affects how much time you have to do other things)
!!postlate = (0-15), how often you come back to the post office after 15:15. You get fired if this counter hits 15)
!!postburn = (0-1, whether hoodlums tampered with your mail. Gets you fired if yes)

if $ARGS[0] = 'start':
	menu_off = 1
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
	'The manager of the post office, also known as the postmaster, has just finished helping a customer and is about to walk back to his office when he spots you.'
	'"You look like you want to ask something. If it''s about our regular services, then you should get in line. I don''t have time to help any more customers," he says.'
	act 'Leave': gt 'post_office', 'start'
	if postjobQW = 0:
		act 'Ask for work':
			*clr & cla
			minut += 2
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'"A job? I haven''t got any jobs," he shrugs.'
			'Just as you''re about to turn around to leave, he stops you. "Actually, Aleksiy has been mentioning he wants to spend more time with his sick daughter on weekends. Maybe... Come back here, girl."'
			'He takes another good look at you and seems to be in deep thought for a moment before humming contently.'
			'"Alright, I''ll give you a chance to prove yourself. You can deliver some urgent letters and packages on Saturday afternoon. You''ll get the same pay Aleksiy gets, assuming you do a good job. 500 <b>₽</b> total, for about three hours of work - from 12:00 to roughly 15:00. If you do well, you can do it every week," he offers.'
			
			act 'Decline':
				cla
				postjobQW = 1
				'"Sorry, but I don''t know. That''s not what I''m looking for," you reply.'
				'The postmaster looks at you in confusion, wondering what kind of job you expected to get here. Nevertheless, he sighs. "Suit yourself. Tough luck for Aleksiy, then. Well, let me know if you change your mind," he says before returning to work.'
				act 'Leave him alone': gt 'post_office', 'start'
			end
			act 'Accept the job':
				cla
				postjobQW = 2
				'"That sounds great, thank you!" you smile.'
				'"<b>Meet me here on Saturday, between 11:00 and 12:00.</b> I''ll talk you through the details then," he grunts. "By the way: any complaints from people not receiving their mail in good shape and you''re out. Our post office has a damn near perfect record for deliveries, and I intend to keep it that way!"'
				'He quickly records your personal information and sends you on your way before returning to work.'
				act 'Leave him alone': gt 'post_office', 'start'
			end	
		end
	elseif postjobQW = 1:
!!intermediate if you refused the job initially
		*clr & cla
		minut += 2
		'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
		'"Wait... Weren''t you here before?" he asks when he sees your face. "Right, you were here about that Saturday job! It''s still available if you want it?"'
		'When you ask him about the details, he reminds you. "You can deliver some urgent letters and packages on Saturday afternoon. You''ll get the same pay Aleksiy gets, assuming you do a good job. 500 <b>₽</b> total, for about three hours of work - from 12:00 to roughly 15:00. If you do well, you can do it every week."'
		
		act 'Decline':
			cla
			'"Sorry, but I don''t know..." you tell him.'
			'He raises a brow. "Still? Okay... If you''re not interested in this job, then there''s no point in visiting me again because I won''t have anything else. Let me know if you change your mind. Until then, stop wasting my time."'
			'He quickly returns to his work.'
			act 'Leave him alone': gt 'post_office', 'start'
		end
		act 'Accept the job':
			cla
			postjobQW = 2
			'"That sounds great, thank you!" you smile'
			'"<b>Meet me here on Saturday, between 11:00 and 12:00.</b> I''ll talk you through the details then," he grunts. "By the way: any complaints from people not receiving their mail in good shape and you''re out! Our post office has a damn near perfect record for deliveries, and I intend to keep it that way!"'
			'He then nods you off, before returning to his work.'
			act 'Leave him alone': gt 'post_office', 'start'
		end	
	elseif postjobQW = 2 and postworkday ! daystart:
!!when you go to work on Saturday, first time
		if week = 6 and hour = 11:
			minut += 60 - minut
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'"Ah good, you''re here!" the postmaster smiles when you enter the post office. "And right on time too! Please follow me."'
			'He guides you to the back room where a number of small packages and letters are packed into a bag.'
			'"The addresses are all fairly nearby. It might look like a lot, but you should be done by 15:00," he reassures you. "It''s simple: bring the mail to where it needs to be, have them sign on this sheet, and bring back the mail you couldn''t deliver for whatever reason."'
			'He continues on for a while longer about the rules, but they seem rather self-explanatory and you don''t pay close attention to what he''s saying.'
			'"Oh, before I forget: you might want to avoid certain streets," he warns you. "I''ve marked them on this map. You wouldn''t be the first to get robbed by hoodlums hoping to find something valuable in the packages. And you wouldn''t be the first to get a beating when there''s nothing of value in your bag. Anyway, avoid these areas and you should be fine."'
			'He hands you a map with a bunch of streets and plazas marked out. He has drawn out the best route to take today too.'
			act 'Start your round':
				*clr & cla
				minut += 60
				postworkday = daystart
				gs 'stat'
				'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postgirl.jpg"></center>'
				'The first hour goes by rather quickly. It''s fairly easy work, but you notice that you''re losing a lot of time by avoiding the ''dangerous'' streets. You could easily save half an hour, if not more, just by cutting through them if needed.'
				'Then again, he wouldn''t warn you and go through the trouble of drawing out a map if it wasn''t important...'
				*nl
				act 'Stick to the ''safe'' streets':
					*clr & cla
					minut += 115
					money += 500
					gs 'stat'
					'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
					'He warned you for a reason, so you think it best to play it safe, especially on your first day.'
					'You stick to the route he suggested and have a fairly uneventful day delivering the rest of your mail. You return to the post office just before 15:00.'
					'"You managed to deliver all of it? That''s great!" the postmaster beams as you put the empty bag back where it belongs.'
					'He hands you your pay right away, with another 50 <b>₽</b> extra. "From Aleksiy. He says thanks for his first Saturday off in months! He and his little girl dropped by earlier and he looked so happy!" he explains. "As far as I''m concerned, you got the job for every weekend. What do you say, same time next Saturday?"'
					
					act 'I''m not sure':
						cla
						postjobQW = 3
						'"I don''t know how next week will look yet. Can I think about it?" you ask.'
						'"I guess, but I''m telling Aleksiy he has to come in next Saturday then. I can''t work with maybes," he shrugs. "If you want the job, let me know before Saturday so I can make the arrangements. If I haven''t heard from you by closing time on Friday, I will assume you''re not coming."'
						'You nod understandingly. "That sounds fair. I''ll come and tell you once I''ve made my decision."'

						act 'Leave the postmaster''s office': gt 'post_office', 'start'
					end
					act 'Accept the job':
						cla
						postjobQW = 4
						'You tell him you want to work again next Saturday.'
						'"That''s great! In that case, I''ll let Aleksiy know he no longer has to come in on weekends. See you next week!" he says while shaking your hand. "And thank you for a job well done!"'
						'You can now deliver mail every Saturday from 12:00 to 15:00.'
						act 'Leave the postmaster''s office': gt 'post_office', 'start'
					end
				end
				gs 'willpower', 'misc', 'self'
				if will_cost <= pcs_willpwr:
					act 'Use the more dangerous shortcuts (<<will_cost>> Willpower)':
						*clr & cla
						gs 'willpower', 'pay', 'self'
						minut += 70
						gs 'stat'
						'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
						'You walk by yet another empty street and look at your map again. Deciding to ignore the risk, you head down one of the streets marked as dangerous.'
						'You sometimes feel a little uncomfortable when small groups of rowdy looking guys are checking you out, but fortunately they leave you alone and your bag is empty in no time at all.'
						'You''re done almost an hour faster than planned, and it''s only 14:10 when you return to the postmaster.'
						'He gives you a suspicious look and shakes his head. "There''s no way you''d be back already if you listened to what I said. You ignored my warning, didn''t you?"'
						
						act 'Be honest':
							*clr & cla
							money += 500
							gs 'stat'
							'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
							'"Yes..." you admit. "But I can take care of myself!"'
							'He lets out an exasperated sigh, but nods. "I drew out that map for your safety, girl, but fine. As long as you do a good job and everyone gets their mail on time, I won''t ask how you do it. Just be careful, okay?"'
							'He hands you the full amount for your work despite you finishing quicker. You even find 50 <b>₽</b> extra. "From Aleksiy. He says thanks for his first Saturday off in months! He and his little girl dropped by earlier, he looked so happy!" he explains. "Anyway, as far as I''m concerned, you got the job for every weekend. What do you say, same time next Saturday?"'
							
							act 'I''m not sure':
								cla
								postjobQW = 3
								minut += 2
								gs 'stat'
								'"I don''t know how next week will look yet. Can I think about it?" you ask.'
								'"I guess, but I''m telling Aleksiy he has to come in next Saturday then. I can''t work with maybes," he shrugs. "If you want the job, let me know before Saturday so I can make the arrangements. If I haven''t heard from you by Friday 18:00, I will assume you''re not coming."'
								'You nod understandingly. "That sounds fair. I''ll come and tell you once I''ve made my decision."'

								act 'Leave the postmaster''s office': gt 'post_office', 'start'
							end
							act 'Accept the job':
								cla
								postjobQW = 4
								minut += 2
								gs 'stat'
								'You tell him you want to work again next Saturday.'
								'"That''s great! I''ll let Aleksiy know he no longer has to come in on weekends, in that case. See you next week!" he says while shaking your hand. "And thank you for a job well done!"'
								'You can now deliver mail every Saturday from 12:00 to 15:00.'
								act 'Leave the postmaster''s office': gt 'post_office', 'start'
							end

						end
						
						act 'Lie':
							*clr & cla
							money += 500
							gs 'stat'
							'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
							'"No, I''m just a fast worker," you lie.'
							'He sees right through you, but can''t help but laugh. "You kids and your youthful hubris! I drew out that map for your safety, but fine. As long as you do a good job and everyone gets their mail on time, I won''t ask how you do it. Just be careful, okay?"'
							'He hands you the full amount for your work despite you finishing quicker. You even find 50 <b>₽</b> extra. "From Aleksiy. He says thanks for his first Saturday off in months! He and his little girl dropped by earlier, he looked so happy!" he explains. "Anyway, as far as I''m concerned, you got the job for every weekend. What do you say, same time next Saturday?"'
							
							act 'You''re not sure':
								cla
								postjobQW = 3
								minut += 2
								gs 'stat'
								'"I don''t know how next week will look yet. Can I think about it?" you ask.'
								'"I guess, but I''m telling Aleksiy he has to come in next Saturday then. I can''t work with maybes," he shrugs. "If you want the job, let me know before Saturday so I can make the arrangements. If I haven''t heard from you by Friday 18:00, I will assume you''re not coming."'
								'You nod understandingly. "That sounds fair. I''ll come and tell you once I''ve made my decision."'

								act 'Leave the postmaster''s office': gt 'post_office', 'start'
							end
							act 'Accept the job':
								cla
								postjobQW = 4
								minut += 2
								gs 'stat'
								'You tell him you want to work again next Saturday.'
								'"That''s great! I''ll let Aleksiy know he no longer has to come in on weekends, in that case. See you next week!" he says while shaking your hand. "And thank you for a job well done!"'
								'You can now deliver mail every Saturday from 12:00 to 15:00.'

								act 'Leave the postmaster''s office': gt 'post_office', 'start'
							end
						end
					end
				else
					act 'Use the more dangerous shortcuts (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
				end	
			end
!!if you''re at the post office when it''s not working time
		else
			*clr & cla
			minut += 2
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'The postmaster looks at you in confusion, wondering why you''re here. "Yes? More questions? You look like you want to ask something..."'
			'"Could you tell me about the job again?" you ask.'
			'He nods. "Of course. As you probably know, Russian Post doesn''t deliver regular mail on Saturdays, only priority mail. That''s what you will be delivering. Not a lot of mail, but if people choose to have it delivered on Saturdays, it must be important! It''s a big responsibility, but I trust you to get the job done. It''ll take you roughly three hours, going on past experience. Some days we have more, some days we have less. <b>Make sure you''re here between 11:00 and 12:00 on Saturday, so I can talk you through what exactly it is you have to do.</b>"'
			'He watches you for a second while you try to memorize it all. "Was that all? I really need to get back to work..." he says somewhat impatiently.'

			act 'Leave him alone': gt 'post_office', 'start'
		end
	elseif postjobQW = 3:
!!if you said you''re not sure about taking the regular job and refused it the first time
		*clr & cla
		minut += 2
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
		'The postmaster looks at you expectantly when he sees you. "Hello, <<$pcs_firstname>>. I hope you''re here with good news?"'
		
		act 'Decline the job':
			cla
			postjobQW = 5
			'"I''ve given it some thought, but no. You''ll have to find someone else," you tell him.'
			'"That''s too bad. You could''ve been a great post girl! Well, thanks for letting me know," he mutters, clearly disappointed. "My door is always open for you if you change your mind."'
	
			act 'Leave the postmaster''s office': gt 'post_office', 'start'
		end
		act 'Accept the job':
			cla
			postjobQW = 4
			'"I''ve given it some thought and I''d like to take the job," you tell him.'
			'"That''s great! In that case, I''ll let Aleksiy know he no longer has to come in on weekends. See you on Saturday!" he says while shaking your hand.'
			'You can now deliver mail every Saturday from 12:00 to 15:00.'
			act 'Leave the postmaster''s office': gt 'post_office', 'start'
		end
	elseif postjobQW = 4:
		if week ! 6:
!!if you don''t want to work next Saturday
			act 'Tell him you can''t work this coming Saturday':
				*clr & cla
				postjobQW = 5
				minut += 2
				gs 'stat'
				'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
				'The postmaster looks like he''s swamped with work right now. His desk is completely covered with mail.'
				'"Excuse me?" you say, trying to get his attention. "I won''t be able to make it next Saturday after all."'
				'The postmaster looks up at you somewhat disappointedly."Oh, okay. No problem. I''ll let Aleksiy know he has to come in on Saturday. Thanks for letting me know, I guess."'
				'He scribbles something down on a piece of paper and focuses on his work again.'

				act 'Leave him alone': gt 'post_office', 'start'
			end
		elseif hour < 11:
!!if it''s Saturday but you''re early
			*clr & cla
			minut += 2
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'"You''re a bit early, <<$pcs_firstname>>!" the postmaster says when he sees you enter his office. "I don''t have your mail yet, but I like the enthusiasm. Come see me between 11:00 and 12:00. I should have it ready then."'

			act 'Leave him alone': gt 'post_office', 'start'
		elseif hour > 11 and postworkday ! daystart:
!!if it''s Saturday but you''re late	
			*clr & cla
			minut += 2
			postworkday = daystart
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'"You''re late, <<$pcs_firstname>>!" the postmaster scoffs when he sees you enter his office. "I already called Aleksiy in to cover your shift. He wasn''t happy, and neither am I. Don''t make this a habit..."'
			'You try to apologize, but he''s not interested and tells you to leave him alone.'

			act 'Leave his office': gt 'post_office', 'start'
		elseif hour = 11 and postworkday ! daystart:
!!if it''s Saturday and you''re ready to work
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'"Hey there, <<$pcs_firstname>>!" the postmaster smiles when you enter the post office. "Right on time. Please follow me."'
		
			act 'Follow him': gt 'post_deliveries', 'start'
		end
	elseif postjobQW = 5:
!!if you want to work after all next Saturday
		act 'Tell him you can work this coming Saturday after all':
			*clr & cla
			postjobQW = 4
			minut += 2
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/shared/postoffice/postmaster.jpg"></center>'
			'You enter the postmaster''s office at an opportune time. It like he''s not doing anything right now.'
			'"<<$pcs_firstname>>, can I help you?" he asks as soon as he sees you.'
			'"I came to say that I can make it after all this Saturday!" you reply.'
			'"Ah, excellent news! I''ll tell Aleksiy he can stay at home with his daughter," he says while quickly making a note. "Is there anything else I can do for you?"'
			'"No, that was it," you tell him. "See you on Saturday!"'

			act 'Leave him alone': gt 'post_office', 'start'
		end
	elseif postjobQW = 999:
!!you were fired, the postmaster won''t see you again
		*clr & cla
		'"You?! Get out of here!" he shouts angrily when you enter his office. "There''s no job for you! Not now, not ever! That screw-up of yours ruined our perfect record!"'
		'You try to explain what happened, but he''s simply not interested in whatever it is you have to say. It seems very unlikely that he''d consider hiring you again.'

		act 'Leave him alone': gt 'post_office', 'start'
	end
end

--- post_master ---------------------------------

