# city_hotel

if $ARGS[0] = 'start' or $ARGS[0] = '':
	*clr & cla
	nom_o[1] = 100
	nom_o[2] = 1000
	nom_o[3] = 10000
	nom_o[4] = 100000
	$loc = 'city_hotel'
	$menu_loc = 'city_hotel'
	$loc_arg = 'start'
	$menu_arg = 'start'
	menu_off = 0
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/lobby.jpg"></center>'

	if tobiQW < 2000:'The hotel lobby is deserted and you only notice an alone bored girl standing at the reception desk.'
	if tobiQW >= 2000 and tobiQW < 2100:'The hotel lobby is very crowded. You notice there''s a swarm of comely old men dressed in scanty jackets with elbow patches.'

	if tobiQW = 2001:
		'One of the visitors of the hotel, grabs your attention as he''s sitting in a chair, reading a book. It''s written in squiggles, which reminds you to the scroll you read earlier.'
		act 'Excuse me':
			*clr & cla
			minut += 5
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/city/industrial/casino/oldman.jpg"></center>'
			'"I didn''t mean to disturb you, but what language is the book written in?" you ask the man.'
			'The man stops, looks up to you and cheerfully answers, "This book right here is written in old Japanese language. Why do you ask?" the man asks curiously.'
			'"Well, I was handed this book, in which the characters are very similarly written." you answer.'
			'The man gasps, "By the gods! Can I take a look?"'
			'"I don''t really know if it''s okay..." you hesitantly answer.'
			'The man is taken aback a little by your answer, "Oh yes, it''s no wonder you''re being careful, where are my manners, I should introduce myself. My name is Plato Aristarkhovich, and you are?"'
			'"My name is <<$pcs_firstname>> <<$pcs_lastname>>." you answer.'
			'"I hope this doesn''t sound too creepy but would you please follow me to my room?" Plato asks you.'

			act 'Go with Plato': minut += 1 & gt 'mqroom'
		end
	end

	act 'Leave': minut += 5 & gt 'city_center'

	if hotelRoom['city_hotel'] ! 0:
		act 'Go to your room':
			$hotel = 'city_hotel'
			if hotelRoom['city_hotel'] = 1:gt'hotelroom','normal'
			if hotelRoom['city_hotel'] = 2:gt'hotelroom','better'
			if hotelRoom['city_hotel'] = 3:gt'hotelroom','best'
		end

	end

	act 'Go to the reception desk': gt 'city_hotel', 'reception'

end

if $ARGS[0] = 'reception':
	*clr & cla
	menu_off = 1
	minut += 1
	gs 'stat'
	'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/receptionist.jpg"></center>'
	'You walk up to the front reception and get greeted by a smiling young woman behind the counter.'
	'"How can I help you?" she asks.'

	act 'Go back to the foyer': minut += 1 & gt 'city_hotel', 'start'

	act 'See the room descriptions':
		cla
		minut += 1
		gs 'stat'
		'There are 4 types of rooms available:'
		'1. Budget rooms, our most simplest rooms for the ones that just want a bed to sleep the night. There''s a public bathroom shared with the rest of the floor.'
		'2. Standard rooms, our reasonably priced rooms. Every room has a private bathroom and a TV.'
		'3. Suites, our luxurious room. Beside a private bathroom there''s also an extra livingroom.'

		act 'Continue': gt 'city_hotel', 'reception'
	end

	if tobiQW = 2000:
		act 'Why is the hotel so crowded?':
			cla
			tobiQW = 2001
			minut += 1
			'"Why so the hotel so crowded today?" you ask.'
			'"There''s a conference on indigenous languages, they meet every year and complain about their disappearing languages." she says laughing.'
				act 'Move away': gt 'city_hotel', 'start'
		end
	end

	act 'Rent a room':
		menu_off = 1
		*clr & cla
		gs'stat'
		'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/receptionist.jpg"></center>'
		'The girl behind the desk smiles at you and asks: "Hello miss! Would you like to rent a room?"'

		if hotelRoom['city_hotel'] > 0:
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/receptionist.jpg"></center>'
			'She looks in the computer: "I see you already have a room here. As it is already booked and paid for the only way to change it to a different room, would be to cancel your existing booking. To do so without notice would forfeit your payment, I would advise against this, but you may do so if you wish."'
			act'Yes, cancel your booking':hotelRoom['city_hotel'] = 0 & gt'city_hotel'
			act'No':gt'city_hotel'
		elseif hotelRoom['city_hotel'] = 0:
			act 'Yes':
				*clr & cla
				'<center><img <<$set_imgh>> src="images/locations/city/citycenter/hotel/receptionist.jpg"></center>'
				'She smiles at you happily: "Excellent! We have the following rooms available right now:"'
				'Standard room - 500 <b>₽</b> / night;'
				'Luxury room - 1500 <b>₽</b> / night;'
				'and the Royal Suite - 10000 <b>₽</b> / night.'
				*nl
				act'Standard room':
					cla
					hotelRoomDays['city_hotel'] = input ("For how long would you like to stay?")
					if hotelRoomDays['city_hotel'] > 0 : 
						totalCost = hotelRoomDays['city_hotel'] * 500
						'"A standard room for <<hotelRoomDays[''city_hotel'']>> days, that will be <<totalCost>><b>₽</b>" says the receptionist, "would you like to pay with cash or with card?"'
						gs 'city_hotel', 'pay_the_room', 1
					else
						gt'city_hotel'					
					end
				end
				act 'Luxury room':
					cla
					hotelRoomDays['city_hotel'] = input ("For how long would you like to stay?")
					if hotelRoomDays['city_hotel'] > 0:
						totalCost = hotelRoomDays['city_hotel'] * 1500
						'"A luxury room for <<hotelRoomDays[''city_hotel'']>> days, that would be <<totalCost>><b>₽</b>" says the receptionist, "would you like to pay with cash or with card?"'
						$temp_nomoney = '"You can''t afford to stay in a luxury room at this hotel for that long.'
						gs 'city_hotel', 'pay_the_room', 2
					else
						gt'city_hotel'
					end
				end

				act'Royal Suite':
					cla
					hotelRoomDays['city_hotel'] = input ("For how long would you like to stay?")
					if hotelRoomDays['city_hotel'] > 0: 
						totalCost = hotelRoomDays['city_hotel'] * 10000
						'"The royal suite for <<hotelRoomDays[''city_hotel'']>> days, that would be <<totalCost>><b>₽</b>" says the receptionist, "would you like to pay with cash or with card?"'
						gs 'city_hotel', 'pay_the_room', 3
					else	
						gt'city_hotel'
					end
				end

				act 'Step away from the reception desk':gt'city_hotel'
			end
			act'No, thank you':gt'city_hotel'
		end
	end
end

if $ARGS[0] = 'pay_the_room':
	hotel_room_id = ARGS[1]
	if totalCost<=money:		
		act 'Pay with cash':
			cla
			money-=totalCost
			hotelRoom['city_hotel'] = hotel_room_id
			hotelRoomDays['city_hotel'] = daystart + hotelRoomDays['city_hotel']
			'You count the money and give it to her. She gives you the key to your room in return. She says happily: "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!"'
			act 'Step away from the reception desk': gt 'city_hotel'
			killvar 'totalCost'
			killvar 'hotel_room_id'
		end
	end
	if totalCost<=karta+bankDebtLimit:
		act 'Pay with card':
			cla
			karta-=totalCost
			'hotel_room_id: <<hotel_room_id>>'
			hotelRoom['city_hotel'] = hotel_room_id
			hotelRoomDays['city_hotel'] = daystart + hotelRoomDays['city_hotel']
			'You swipe your card and wait a moment for ''APPROVED'' to appear on the tiny screen. As soon as the receipt is printed, she hands it to you with the key to your room. "Thank you ' + iif(pavHotelMaid = 0, 'miss', $pcs_nickname) +', I hope you enjoy your stay!" she says with a smile.'
			act 'Step away from the reception desk': gt 'city_hotel'
			killvar 'totalCost'
			killvar 'hotel_room_id'
		end
	end

	if totalCost > karta+bankDebtLimit and totalCost > money:
		if ARGS[1] = 1: act 'You can''t afford to stay in the hotel for that long.': gt 'city_hotel'
		if ARGS[1] = 2: act 'You can''t afford to stay in a luxury room at this hotel for that long.': gt 'city_hotel'
		if ARGS[1] = 3: act 'You can''t afford to stay in the Royal Suite at this hotel for that long.': gt 'city_hotel'
		killvar 'totalCost'
		killvar 'hotel_room_id'
	end

	act 'You change your mind': 
		killvar 'totalCost' 
		killvar 'hotel_room_id'
		gt 'city_hotel'
	end
end

--- city_hotel ---------------------------------

