# agentned
if $ARGS[0] = 'start':
CLOSE ALL
*clr & cla
$loc = $curloc
$metka = $ARGS[0]
$location_type = 'indoors'
$menu_loc = 'agentned'
$menu_arg = 'start'
menu_off = 0
gs'stat'
gs'dina'
gs 'housing', 'rent'
'
Kirsanova Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
'The head office of the largest real estate agency in the area.'
*nl
'At the reception you notice a banner, which is written in large print:'
'"Please note, that all transactions of purchases and sales are made exclusively through your bank account. Rent payments excluded."'
if home_owned[1] = 1 and ArendHouseSL > 0:
*nl
'You have <> days rental on your St. Petersburg apartment remaining. '+iif(money >= home_rent[1],'You can make a rent payment in cash.','You can''t afford to pay rent at the moment')+''
end
if home_owned[4] > 0 and ArendHouseSL4 > 0:
*nl
'You have <> days rental on your Pushkin apartment. '+iif(money >= home_rent[4],'You can make a rent payment in cash.','You can''t afford to pay rent at the moment')+''
end
if home_owned[1] = 2 or home_owned[3] > 0 or home_owned[5] = 1:
*nl
'You own the follwing property:'
*nl
if home_owned[1] = 2: 'An apartment in St. Petersburg residential area'
if home_owned[1] = 3: 'An apartment in St. Petersburg residential area, that is currently occupied by your tenants'
if home_owned[3] > 0: 'An cottage located in the cooperative village'
if home_owned[5] = 1: 'A plot of land in the St. Petersburg suburbs'
*nl
'We are at your service if you decide to sell.'
end
act 'Leave':
minut += 5
gt'down'
end
act 'View rentals': gt 'agentned', 'rent'
act 'View properties for sale': gt 'agentned', 'buy'
end
if $ARGS[0] = 'buy':
*clr & cla
$loc = $curloc
$metka = $ARGS[0]
$location_type = 'indoors'
$menu_loc = 'agentned'
$menu_arg = 'buy'
menu_off = 0
gs 'housing', 'sale'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
minut += 5
gs 'stat'
act 'Return':gt'agentned', 'start'
if home_owned[1] = 0 or home_owned[3] = 0 or home_owned[4] = 0 or home_owned[5] = 0:
if home_owned[1] = 0:
'There is an apartment in the city residential area available for <<$home_value_txt[1]>> ₽.'
*nl
if karta + bankDebtLimit >= home_value[1]:act 'Buy the city residential apartment': gt 'agentned', 'buy_cityres'
elseif home_owned[1] = 1:
'You could buy your current rental apartment for <<$home_value_txt[1]>> ₽.'
*nl
if karta + bankDebtLimit >= home_value[1]:act 'Buy the city residential apartment': gt 'agentned', 'buy_cityres'
end
if home_owned[3] = 0:
'There is a holiday cottage with an adjacent allotment in the village, for <<$home_value_txt[3]>> ₽.'
*nl
if karta + bankDebtLimit >= home_value[3]:act 'Buy the cottage in the village': gt 'agentned','buy_dacha'
end
if home_owned[5] = 0:
'There is a plot in the suburbs with planning permission for a mansion for <<$home_value_txt[5]>> ₽.'
*nl
if karta + bankDebtLimit >= home_value[5]:act 'Buy the plot in the suburbs': gt 'agentned','buy_Mansion'
end
else
'We currently have no properties listed for sale.'
end
end
if $ARGS[0] = 'sell':
*clr & cla
$loc = $curloc
$metka = $ARGS[0]
$location_type = 'indoors'
$menu_loc = 'agentned'
$menu_arg = 'sell'
menu_off = 0
gs 'housing', 'sale'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
act 'Return':gt'agentned', 'start'
if home_owned[1] = 2 and rembedr = 1 and remsitr = 1 and remkorr = 1 and remvanr = 1 and remkuhr = 1:
!Renovated city residential apartment
home_value1 = ((home_value[1] + 250000) + rand(-100000, 100000))
'We have found a buyer for your renovated apartment in the city residential area. They will offer <> ₽, minus 5% for fees and taxes, bringing the total to <>'
act 'Sell the renovated apartment':
*clr
menu_off = 1
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
minut += 30
'You spend half an hour filling in the paperwork for the sale of your renovated apartment, with a loss of around 5% for fees and taxes. <> ₽ has been paid into your bank account.'
home_owned[1] = 0
ArendHouseSL = 0
if bankaccount = 1:
karta += home_value1/100*95
else
money += home_value1/100*95
end
delact 'Sell the renovated apartment'
gs 'stat'
end
end
if home_owned[1] = 2:
!City residential apartment
home_value1 = (home_value[1] + rand(-100000, 100000))
'We have found a buyer for your apartment in the city residential area. They will offer <> ₽, minus 5% for fees and taxes, bringing the total to <>'
act 'Sell the city apartment':
*clr
menu_off = 1
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
minut += 30
'You spend half an hour filling in the paperwork for the sale of your apartment, with a loss of around 5% for fees and taxes. <> ₽ has been paid into your bank account.'
home_owned[1] = 0
ArendHouseSL = 0
if bankaccount = 1:
karta += home_value1/100*95
else
money += home_value1/100*95
end
delact 'Sell the city apartment'
gs 'stat'
end
end
if home_owned[3] = 1:
!Communal cottage
home_value3 = (home_value[3] + rand(-5000, 5000))
'We have found a buyer for your small communal cottage. They will offer <> ₽, minus 5% for fees and taxes, bringing the total to <>'
act 'Sell the holiday cottage':
*clr
menu_off = 1
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
minut += 30
'You spend half an hour filling in the paperwork for the sale of your small cottage, with a loss of around 5% for fees and taxes. <> ₽ has been paid into your bank account.'
home_owned[3] = 0
if bankaccount = 1:
karta += home_value3/100*95
else
money += home_value3/100*95
end
delact 'Sell the holiday cottage'
gs 'stat'
end
end
if home_owned[3] = 2:
!Renovated communal cottage
home_value3 = ((home_value[3] + 200000) + rand(-10000, 10000))
'We have found a buyer for your small renovated communal cottage. They will offer <> ₽, minus 5% for fees and taxes, bringing the total to <>'
act 'Sell the renovated cottage':
*clr
menu_off = 1
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
minut += 30
'You spend half an hour filling in the paperwork for the sale of the renovated cottage, with a loss of 1around 5% for fees and taxes. <> ₽ has been paid into your bank account.'
home_owned[3] = 0
if bankaccount = 1:
karta += home_value3/100*95
else
money += home_value3/100*95
end
delact 'Sell the renovated cottage'
gs 'stat'
end
end
if home_owned[5] = 1:
!Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
home_value5 = (home_value[5] + rand(-50000, 50000))
'We have found a buyer for your vacant plot of land in the suburbs. They will offer <> ₽, minus 5% for fees and taxes, bringing the total to <>'
act 'Sell the vacant plot':
*clr
menu_off = 1
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
minut += 30
'You spend half an hour filling in the paperwork for the vacant plot, with a loss of around 5% for fees and taxes. <> ₽ has been paid into your bank account.'
home_owned[5] = 0
if bankaccount = 1:
karta += home_value5/100*95
else
money += home_value5/100*95
end
delact 'Sell the vacant plot'
gs 'stat'
end
end
if home_owned[5] = 2:
!Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
'Sorry, we are unable to find a buyer for your property at this time.'
end
if home_owned[5] = 3:
!Suburban land only - currently too many variables for selling upgraded mansion - might do later - 3xpurt.
'Sorry, we are unable to find a buyer for your property at this time.'
end
if home_owned[1] = 0 and home_owned[3] = 0 and home_owned[4] = 0 and home_owned[5] = 0:
'You don''t currently own any property.'
end
end
if $ARGS[0] = 'rent':
*clr & cla
$loc = $curloc
$metka = $ARGS[0]
$location_type = 'indoors'
$menu_loc = 'agentned'
$menu_arg = 'rent'
menu_off = 0
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
minut += 5
gs 'stat'
act 'Return':gt'agentned', 'start'
if home_owned[1] > 0 and home_owned[4] > 0:
'We currently have no properties for rent.'
elseif home_owned[1] = 0 and home_owned[4] = 0:
''
'There are two properties available for rent.'
*nl
'There is an apartment in the city residential area, and an apartment in Pushkin available'
act 'View the city apartment details': gt 'agentned', 'rent_cityres'
act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
elseif home_owned[1] = 0:
'There is a property for rent in the city residential area'
act 'View the city apartment details': gt 'agentned', 'rent_cityres'
elseif home_owned[4] = 0:
'There is a property for rent in the old town of Pushkin'
act 'View the Pushkin apartment details': gt 'agentned', 'rent_pushkin'
end
end
if $ARGS[0] = 'rent_cityres':
*clr & cla
menu_off = 1
gs 'housing', 'rent'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
'“We have a flat available right now in the residential area of St. Petersburg.” The receptionist says as he starts pulling out the paperwork. “Rent is <<$home_rent_txt[1]>> ₽ and leases have to be renewed every 30 days, which can be taken automatically from your account or you can come in and pay directly. Last but not least, you have to make your first payment up front at signing.”'
'
He pulls out a pen and slides the paperwork onto the counter. “Interested? We can get you moved in right away.”'
if money >= home_rent[1] or karta >= home_rent[1]:
act 'Agree and pay':
*clr & cla
cls
minut += 30
if money >= home_rent[1]:
money -= home_rent[1]
else
karta -= home_rent[1]
end
home_owned[1] = 1
if ARRSIZE('home_owned') = 0: gs 'set_home', 1
ArendHouseSL += ArendHouseSL_due
gs'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
*nl
'You take the pen and start filling out the paperwork. Half an hour later, you’re handing over the money and getting the keys to your new apartment.'
act 'Return':gt'agentned', 'start'
end
else
*nl
'You do not have enough money with you or in your bank account to rent this.'
end
act 'Decline':
*clr & cla
minut += 5
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
'You shake your head, “Actually, I need more time to think about this.”'
'
The receptionist seems a bit miffed, but says nothing as he grabs the paperwork and stuffs it back in a drawer.'
act 'Return':gt'agentned', 'start'
end
end
if $ARGS[0] = 'rent_pushkin':
*clr & cla
menu_off = 1
gs 'housing', 'rent'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
'“We have a small apartment available right now in Pushkin’s city center. It’s a little bit pricey, but it’s been recently renovated to be more modern, and it looks quite nice. You won’t find a place like that outside of Pushkin.” The receptionist says as he starts pulling out the paperwork. “Rent is <<$home_rent_txt[4]>> ₽ and leases have to be renewed every 30 days, which can be taken automatically from your account or you can come in and pay directly. Last but not least, you have to make your first payment up front at signing.”'
'
He pulls out a pen and slides the paperwork onto the counter. “Interested? We can get you moved in right away.”'
if money >= home_rent[4] or karta >= home_rent[4]:
act 'Agree and pay':
*clr & cla
minut += 30
if money >= home_rent[4]:
money -= home_rent[4]
else
karta -= home_rent[4]
end
home_owned[4] = 1
if ARRSIZE('home_owned') = 0: gs 'set_home', 4
ArendHouseSL4 += ArendHouseSL_due
gs'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
*nl
'You take the pen and start filling out the paperwork. An hour later, you’re handing over the money and getting the keys to your new apartment.'
act 'Return':gt'agentned', 'start'
end
else
*nl
'You do not have enough money with you or in your bank account to rent this.'
end
act 'Decline':
*clr & cla
minut += 5
gs 'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo.jpg">'
*nl
'You shake your head, “Actually, I need more time to think about this.”'
'
The receptionist seems a bit miffed, but says nothing as he grabs the paperwork and stuffs it back in a drawer.'
act 'Return':gt'agentned', 'start'
end
end
if $ARGS[0] = 'buy_cityres':
*clr & cla
menu_off = 1
gs 'housing', 'sale'
minut += 30
karta -= home_value[1]
home_owned[1] = 2
if ARRSIZE('home_owned') = 0: gs 'set_home', 1
gs'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
*nl
'You spend half an hour filling in the paperwork to buy an apartment in the residential area. <<$home_value_txt[1]>> ₽ has been removed from your bank account.'
act 'Return':gt'agentned', 'start'
end
if $ARGS[0] = 'buy_dacha':
*clr & cla
menu_off = 1
gs 'housing', 'sale'
minut += 30
karta -= home_value[3]
home_owned[3] = 1
if ARRSIZE('home_owned') = 0: gs 'set_home', 3
etoexhib = 0
gs'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
*nl
'You spend half an hour filling in the paperwork for the purchase of a cottage with a garden on the co-op 5km up the north road. <<$home_value_txt[3]>> ₽ has been removed from your bank account.'
act 'Return':gt'agentned', 'start'
end
if $ARGS[0] = 'buy_Mansion':
*clr & cla
menu_off = 1
gs 'housing', 'sale'
minut += 30
karta -= home_value[5]
home_owned[5] = 1
if ARRSIZE('home_owned') = 0: gs 'set_home', 5
gs'stat'
'Real Estate Agency'
'> src="images/locations/city/citycenter/realestate/agenstvo_paperwork.jpg">'
*nl
'You spend half an hour filling in the paperwork for the purchase of a lot for building a mansion 1km up the north road. <<$home_value_txt[5]>> ₽ has been removed from your bank account.'
act 'Return':gt'agentned', 'start'
end
--- agentned ---------------------------------