# transport_functions
if $ARGS[0] = 'init_all':
gs 'transport_functions', 'init_train_prices'
gs 'transport_functions', 'init_train_timecosts'
gs 'transport_functions', 'init_bus_prices'
gs 'transport_functions', 'init_bus_timecosts'
end
!!=======================================!!
!! !!
!! Trains !!
!! !!
!!=======================================!!
if $ARGS[0] = 'buy_train_pass':
if transportVars['trainpass_day'] <= daystart:
if money >= 250:
dynamic 'act ''Buy a daily pass (1 day - 250 ₽)'':
cla
money -= 250
transportVars[''trainpass_day''] = daystart + 1
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 1500:
dynamic 'act ''Buy a weekly pass (7 days - 1500 ₽)'':
cla
money -= 1500
transportVars[''trainpass_day''] = daystart + 7
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 5500:
dynamic 'act ''Buy a monthly pass (30 days - 5500 ₽)'':
cla
money -= 5500
transportVars[''trainpass_day''] = daystart + 30
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 75000:
dynamic 'act ''Buy a yearly pass (365 days - 75000 ₽)'':
cla
money -= 75000
transportVars[''trainpass_day''] = daystart + 365
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
end
end
if $ARGS[0] = 'buy_train_ticket':
if $ARGS[2] = 'pc':
if $ARGS[1] ! 'pavlovsk': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'pavlovsk', 'Pavlovsk'
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
if $ARGS[1] ! 'communal': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'communal', 'the communal village'
if $ARGS[1] ! 'ind': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'ind', 'St. Petersburg city industrial area'
if $ARGS[1] ! 'center': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'center', 'St. Petersburg city center'
else
if $ARGS[1] ! 'center': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'center', 'St. Petersburg city center'
if $ARGS[1] ! 'ind': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'ind', 'St. Petersburg city industrial area'
if $ARGS[1] ! 'communal': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'communal', 'the communal village'
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
if $ARGS[1] ! 'pavlovsk': gs 'transport_functions', 'set_train_ticket', $ARGS[1], 'pavlovsk', 'Pavlovsk'
end
end
! $ARGS[1] = origin loc_arg
! $ARGS[2] = destination loc_arg
! $ARGS[3] = destination name
if $ARGS[0] = 'set_train_ticket':
temp_price = transportVars['train_price_<<$ARGS[1]>>_<<$ARGS[2]>>']
$temp_time = func('transport_functions', 'display_train_timecost', $ARGS[1], $ARGS[2])
if mid($temp_time, 1, 1) < 2:
if money < ARGS[1]:
dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <> ₽)'': ''
You don''t have enough money for a ticket to <<$ARGS[3]>>'' '
else
dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <> ₽)'':
money -= <>
menu_off = 1
gt ''train'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
end'
end
end
killvar 'temp_price'
killvar 'temp_time'
end
! Time Table:
! Train departs every 15 minutes (between 4:00 and 22:00), 30 minutes (between 22:00 and 01:00) and 60 minute (betweeen 01:00 and 04:00)
! pavlovsk (07) -> gadukino (22) -> communal (32) -> ind (42) -> center
! center (02) -> ind (07) -> communal (17) -> gadukino (27) -> pavlovsk
if $ARGS[0] = 'set_train_wait_time':
if $ARGS[1] = 'pavlovsk':
if hour = 0:
transportVars['train_wait_center'] = (67 - minut) mod 30
elseif hour <= 3:
transportVars['train_wait_center'] = (67 - minut) mod 60
elseif hour <= 21:
transportVars['train_wait_center'] = (67 - minut) mod 15
else
transportVars['train_wait_center'] = (67 - minut) mod 30
end
elseif $ARGS[1] = 'gadukino':
if hour = 0:
transportVars['train_wait_center'] = (82 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 30
elseif hour <= 3 or hour = 4 and minut <= 22:
transportVars['train_wait_center'] = (82 - minut) mod 60
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 60
elseif hour = 4 and minut <= 27:
transportVars['train_wait_center'] = (82 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 60
elseif hour <= 21 or hour = 22 and minut <= 7:
transportVars['train_wait_center'] = (82 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 15
elseif hour = 22 and minut <= 12:
transportVars['train_wait_center'] = (82 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 15
else
transportVars['train_wait_center'] = (82 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (87 - minut) mod 30
end
elseif $ARGS[1] = 'communal':
if hour = 0 or hour = 1 and minut <= 2:
transportVars['train_wait_center'] = (92 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 30
elseif hour <= 3 or hour = 4 and minut <= 17:
transportVars['train_wait_center'] = (92 - minut) mod 60
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 60
elseif hour = 4 and minut <= 32:
transportVars['train_wait_center'] = (92 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 60
elseif hour <= 21 or hour = 22 and minut <= 2:
transportVars['train_wait_center'] = (92 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 15
elseif hour = 22 and minut <= 17:
transportVars['train_wait_center'] = (92 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 30
else
transportVars['train_wait_center'] = (92 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (77 - minut) mod 30
end
elseif $ARGS[1] = 'ind':
if hour = 0:
transportVars['train_wait_center'] = (102 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 30
elseif hour = 1 and minut <= 12:
transportVars['train_wait_center'] = (102 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 60
elseif hour <= 3:
transportVars['train_wait_center'] = (102 - minut) mod 60
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 60
elseif hour = 4 and minut <= 42:
transportVars['train_wait_center'] = (102 - minut) mod 60
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 15
elseif hour <= 21:
transportVars['train_wait_center'] = (102 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 15
elseif hour = 22 and minut <= 27:
transportVars['train_wait_center'] = (102 - minut) mod 15
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 30
else
transportVars['train_wait_center'] = (102 - minut) mod 30
transportVars['train_wait_pavlovsk'] = (67 - minut) mod 30
end
elseif $ARGS[1] = 'center':
if hour = 0:
transportVars['train_wait_pavlovsk'] = (62 - minut) mod 30
elseif hour <= 3:
transportVars['train_wait_pavlovsk'] = (62 - minut) mod 60
elseif hour <= 21:
transportVars['train_wait_pavlovsk'] = (62 - minut) mod 15
else
transportVars['train_wait_pavlovsk'] = (62 - minut) mod 30
end
end
end
if $ARGS[0] = 'display_trainpass_time':
$result = 'You have <> days left on your train pass.'
end
if $ARGS[0] = 'display_train_timecost':
temp_mins = transportVars['train_time_<<$ARGS[1]>>_<<$ARGS[2]>>']
if $ARGS[1] = 'pavlovsk' or $ARGS[2] = 'center 'or ($ARGS[1] = 'gadukino' and $ARGS[2] ! 'pavlovsk') or ($ARGS[1] = 'communal' and $ARGS[2] = 'ind'):
temp_mins += transportVars['train_wait_center']
else
temp_mins += transportVars['train_wait_pavlovsk']
end
temp_hours = temp_mins / 60
temp_mins = temp_mins mod 60
$result = '<>:<<$mid(100 + temp_mins, 2, 2)>>'
killvar 'temp_mins'
killvar 'temp_hours'
end
if $ARGS[0] = 'display_train_schedule':
if $ARGS[1] = 'pc':
$train_schedule += 'Pavlovsk - St. Petersburg
'
$train_schedule += '
'
$train_schedule += ' | | Communal | St. Petersburg | St. Petersburg | | | | Communal | St. Petersburg | St. Petersburg |
'
$train_schedule += 'Pavlovsk | Gadukino | Village | Industrial | Center | | Pavlovsk | Gadukino | Village | Industrial | Center |
'
$train_schedule += ' |
'
th[0] = 0
:train_schedule_loop1
$th[1] = mid(100 + th[0], 2, 2)
$th[2] = mid(100 + th[0] + 1, 2, 2)
th[3] = th[0] + 12
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$train_schedule += ''
$train_schedule += '<<$th[1]>>:07 | <<$th[1]>>:22 | <<$th[1]>>:32 | <<$th[1]>>:42 | <<$th[1]>>:47 | '
$train_schedule += ' | '
$train_schedule += '<<$th[4]>>:07 | <<$th[4]>>:22 | <<$th[4]>>:32 | <<$th[4]>>:42 | <<$th[4]>>:47 | '
$train_schedule += '
'
if th[0] >= 4 or th[3] <= 21:
$train_schedule += ''
if th[0] >= 4:
$train_schedule += '<<$th[1]>>:22 | <<$th[1]>>:37 | <<$th[1]>>:47 | <<$th[1]>>:57 | <<$th[2]>>:02 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
if th[3] <= 21:
$train_schedule += '<<$th[4]>>:22 | <<$th[4]>>:37 | <<$th[4]>>:47 | <<$th[4]>>:57 | <<$th[5]>>:02 | '
else
$train_schedule += ' | '
end
$train_schedule += '
'
end
$train_schedule += ''
if th[0] = 0 or th[0] >= 4:
$train_schedule += '<<$th[1]>>:37 | <<$th[1]>>:52 | <<$th[2]>>:02 | <<$th[2]>>:12 | <<$th[2]>>:17 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
$train_schedule += '<<$th[4]>>:37 | <<$th[4]>>:52 | <<$th[5]>>:02 | <<$th[5]>>:12 | <<$th[5]>>:17 |
'
if th[0] >= 4 or th[3] <= 21:
$train_schedule += ''
if th[0] >= 4:
$train_schedule += '<<$th[1]>>:52 | <<$th[2]>>:07 | <<$th[2]>>:17 | <<$th[2]>>:27 | <<$th[2]>>:32 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
if th[3] <= 21:
$train_schedule += '<<$th[4]>>:52 | <<$th[5]>>:07 | <<$th[5]>>:17 | <<$th[5]>>:27 | <<$th[5]>>:32 | '
else
$train_schedule += ' | '
end
$train_schedule += '
'
end
$train_schedule += ' |
'
th[0] += 1
if th[0] < 12: jump 'train_schedule_loop1'
else
$train_schedule += 'St. Petersburg - Pavlovsk
'
$train_schedule += '
'
$train_schedule += 'St. Petersburg | St. Petersburg | Communal | | | | St. Petersburg | St. Petersburg | Communal | | |
'
$train_schedule += 'Center | Industrial | Village | Gadukino | Pavlovsk | | Center | Industrial | Village | Gadukino | Pavlovsk |
'
$train_schedule += ' |
'
th[0] = 0
:train_schedule_loop2
$th[1] = mid(100 + th[0], 2, 2)
$th[2] = mid(100 + th[0] + 1, 2, 2)
th[3] = th[0] + 12
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$train_schedule += ''
$train_schedule += '<<$th[1]>>:02 | <<$th[1]>>:07 | <<$th[1]>>:17 | <<$th[1]>>:27 | <<$th[1]>>:42 | '
$train_schedule += ' | '
$train_schedule += '<<$th[4]>>:02 | <<$th[4]>>:07 | <<$th[4]>>:17 | <<$th[4]>>:27 | <<$th[4]>>:42 | '
$train_schedule += '
'
if th[0] >= 4 or th[3] <= 21:
$train_schedule += ''
if th[0] >= 4:
$train_schedule += '<<$th[1]>>:17 | <<$th[1]>>:22 | <<$th[1]>>:32 | <<$th[1]>>:42 | <<$th[1]>>:57 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
if th[3] <= 21:
$train_schedule += '<<$th[4]>>:17 | <<$th[4]>>:22 | <<$th[4]>>:32 | <<$th[4]>>:42 | <<$th[4]>>:57 | '
else
$train_schedule += ' | '
end
$train_schedule += '
'
end
$train_schedule += ''
if th[0] = 0 or th[0] >= 4:
$train_schedule += '<<$th[1]>>:32 | <<$th[1]>>:37 | <<$th[1]>>:47 | <<$th[1]>>:57 | <<$th[2]>>:12 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
$train_schedule += '<<$th[4]>>:32 | <<$th[4]>>:37 | <<$th[4]>>:47 | <<$th[4]>>:57 | <<$th[5]>>:12 |
'
if th[0] >= 4 or th[3] <= 21:
$train_schedule += ''
if th[0] >= 4:
$train_schedule += '<<$th[1]>>:47 | <<$th[1]>>:52 | <<$th[2]>>:02 | <<$th[2]>>:12 | <<$th[2]>>:27 | '
else
$train_schedule += ' | '
end
$train_schedule += ' | '
if th[3] <= 21:
$train_schedule += '<<$th[4]>>:47 | <<$th[4]>>:52 | <<$th[5]>>:02 | <<$th[5]>>:12 | <<$th[5]>>:27 | '
else
$train_schedule += ' | '
end
$train_schedule += '
'
end
$train_schedule += ' |
'
th[0] += 1
if th[0] < 12: jump 'train_schedule_loop2'
end
$train_schedule += '
'
'<<$train_schedule>>'
killvar 'train_schedule'
killvar 'th'
end
if $ARGS[0] = 'init_train_prices':
transportVars['train_price_pavlovsk_gadukino'] = func('transport_functions', 'get_train_price', 'pavlovsk', 'gadukino')
transportVars['train_price_pavlovsk_communal'] = func('transport_functions', 'get_train_price', 'pavlovsk', 'communal')
transportVars['train_price_pavlovsk_ind'] = func('transport_functions', 'get_train_price', 'pavlovsk', 'ind')
transportVars['train_price_pavlovsk_center'] = func('transport_functions', 'get_train_price', 'pavlovsk', 'center')
transportVars['train_price_gadukino_pavlovsk'] = transportVars['train_price_pavlovsk_gadukino']
transportVars['train_price_gadukino_communal'] = func('transport_functions', 'get_train_price', 'gadukino', 'communal')
transportVars['train_price_gadukino_ind'] = func('transport_functions', 'get_train_price', 'gadukino', 'ind')
transportVars['train_price_gadukino_center'] = func('transport_functions', 'get_train_price', 'gadukino', 'center')
transportVars['train_price_communal_pavlovsk'] = transportVars['train_price_pavlovsk_communal']
transportVars['train_price_communal_gadukino'] = transportVars['train_price_gadukino_communal']
transportVars['train_price_communal_ind'] = func('transport_functions', 'get_train_price', 'communal', 'ind')
transportVars['train_price_communal_center'] = func('transport_functions', 'get_train_price', 'communal', 'center')
transportVars['train_price_ind_pavlovsk'] = transportVars['train_price_pavlovsk_ind']
transportVars['train_price_ind_gadukino'] = transportVars['train_price_gadukino_ind']
transportVars['train_price_ind_communal'] = transportVars['train_price_communal_ind']
transportVars['train_price_ind_center'] = func('transport_functions', 'get_train_price', 'ind', 'center')
transportVars['train_price_center_pavlovsk'] = transportVars['train_price_pavlovsk_center']
transportVars['train_price_center_gadukino'] = transportVars['train_price_gadukino_center']
transportVars['train_price_center_communal'] = transportVars['train_price_communal_center']
transportVars['train_price_center_ind'] = transportVars['train_price_ind_center']
end
if $ARGS[0] = 'init_train_timecosts':
transportVars['train_time_pavlovsk_gadukino'] = func('transport_functions', 'get_train_timecost', 'pavlovsk', 'gadukino')
transportVars['train_time_pavlovsk_communal'] = func('transport_functions', 'get_train_timecost', 'pavlovsk', 'communal')
transportVars['train_time_pavlovsk_ind'] = func('transport_functions', 'get_train_timecost', 'pavlovsk', 'ind')
transportVars['train_time_pavlovsk_center'] = func('transport_functions', 'get_train_timecost', 'pavlovsk', 'center')
transportVars['train_time_gadukino_pavlovsk'] = transportVars['train_time_pavlovsk_gadukino']
transportVars['train_time_gadukino_communal'] = func('transport_functions', 'get_train_timecost', 'gadukino', 'communal')
transportVars['train_time_gadukino_ind'] = func('transport_functions', 'get_train_timecost', 'gadukino', 'ind')
transportVars['train_time_gadukino_center'] = func('transport_functions', 'get_train_timecost', 'gadukino', 'center')
transportVars['train_time_communal_pavlovsk'] = transportVars['train_time_pavlovsk_communal']
transportVars['train_time_communal_gadukino'] = transportVars['train_time_gadukino_communal']
transportVars['train_time_communal_ind'] = func('transport_functions', 'get_train_timecost', 'communal', 'ind')
transportVars['train_time_communal_center'] = func('transport_functions', 'get_train_timecost', 'communal', 'center')
transportVars['train_time_ind_pavlovsk'] = transportVars['train_time_pavlovsk_ind']
transportVars['train_time_ind_gadukino'] = transportVars['train_time_gadukino_ind']
transportVars['train_time_ind_communal'] = transportVars['train_time_communal_ind']
transportVars['train_time_ind_center'] = func('transport_functions', 'get_train_timecost', 'ind', 'center')
transportVars['train_time_center_pavlovsk'] = transportVars['train_time_pavlovsk_center']
transportVars['train_time_center_gadukino'] = transportVars['train_time_gadukino_center']
transportVars['train_time_center_communal'] = transportVars['train_time_communal_center']
transportVars['train_time_center_ind'] = transportVars['train_time_ind_center']
end
if $ARGS[0] = 'get_train_price':
result = func('transport_functions', '_private_train_price', $ARGS[2]) - func('transport_functions', '_private_train_price', $ARGS[1])
if result < 0: result *= -1
result += 25
end
if $ARGS[0] = '_private_train_price':
if $ARGS[1] = 'pavlovsk':
result = 0
elseif $ARGS[1] = 'gadukino':
result = 50
elseif $ARGS[1] = 'communal':
result = 75
elseif $ARGS[1] = 'ind':
result = 100
elseif $ARGS[1] = 'center':
result = 125
end
end
if $ARGS[0] = 'get_train_timecost':
result = func('transport_functions', '_private_train_time', $ARGS[2]) - func('transport_functions', '_private_train_time', $ARGS[1])
if result < 0: result *= -1
end
if $ARGS[0] = '_private_train_time':
if $ARGS[1] = 'pavlovsk':
result = 0
elseif $ARGS[1] = 'gadukino':
result = 15
elseif $ARGS[1] = 'communal':
result = 25
elseif $ARGS[1] = 'ind':
result = 35
elseif $ARGS[1] = 'center':
result = 40
end
end
!!=======================================!!
!! !!
!! Busses !!
!! !!
!!=======================================!!
if $ARGS[0] = 'buy_bus_pass':
if transportVars['buspass_day'] <= daystart:
if money >= 100:
dynamic 'act ''Buy a daily bus pass (1 day - 100 ₽)'':
cla
money -= 250
transportVars[''buspass_day''] = daystart + 1
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 500:
dynamic 'act ''Buy a weekly bus pass (7 days - 500 ₽)'':
cla
money -= 1500
transportVars[''buspass_day''] = daystart + 7
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 1500:
dynamic 'act ''Buy a monthly bus pass (30 days - 1500 ₽)'':
cla
money -= 5500
transportVars[''buspass_day''] = daystart + 30
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
if money >= 13000:
dynamic 'act ''Buy a yearly bus pass (365 days - 13000 ₽)'':
cla
money -= 75000
transportVars[''buspass_day''] = daystart + 365
act ''Return'': gt ''<<$loc>>'', ''<<$loc_arg>>''
end'
end
end
end
if $ARGS[0] = 'buy_bus_ticket':
if $ARGS[2] = 'pg':
if $ARGS[1] ! 'community': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'community', 'the Pavlovsk community center'
if $ARGS[1] ! 'pavstation': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'pavstation', 'the Pavlovsk train station'
if $ARGS[1] ! 'pushkin': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'pushkin', 'the old town of Pushkin'
if $ARGS[1] ! 'construction': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'construction', 'the construction site'
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
elseif $ARGS[2] = 'gp':
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
if $ARGS[1] ! 'construction': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'construction', 'the construction site'
if $ARGS[1] ! 'pushkin': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'pushkin', 'the old town of Pushkin'
if $ARGS[1] ! 'pavstation': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'pavstation', 'the Pavlovsk train station'
if $ARGS[1] ! 'community': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'community', 'the Pavlovsk community center'
elseif $ARGS[2] = 'gs':
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
if $ARGS[1] ! 'communal': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'communal', 'the communal village'
if $ARGS[1] ! 'graveyard': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'graveyard', 'the graveyard'
if $ARGS[1] ! 'suburbs': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'suburbs', 'the expensive suburb of St. Petersburg'
else
if $ARGS[1] ! 'suburbs': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'suburbs', 'the expensive suburb of St. Petersburg'
if $ARGS[1] ! 'graveyard': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'graveyard', 'the graveyard'
if $ARGS[1] ! 'communal': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'communal', 'the communal village'
if $ARGS[1] ! 'gadukino': gs 'transport_functions', 'set_bus_ticket', $ARGS[1], 'gadukino', 'the village of Gadukino'
end
end
! $ARGS[1] = origin loc_arg
! $ARGS[2] = destination loc_arg
! $ARGS[3] = destination name
if $ARGS[0] = 'set_bus_ticket':
temp_price = func('transport_functions', 'get_bus_price', $ARGS[1], $ARGS[2])
$temp_time = func('transport_functions', 'display_bus_timecost', $ARGS[1], $ARGS[2])
if money < ARGS[1]:
dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <> ₽)'': ''
You don''t have enough money for a ticket to <<$ARGS[3]>>'' '
else
dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <> ₽)'':
money -= <>
menu_off = 1
gt ''bus'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
end'
end
killvar 'temp_price'
end
! Time Table:
! Bus departs every 20 minutes
! community (13) -> pavstation (15) -> pushkin (23) -> construction (38) -> gadukino
! gadukino (13) -> construction (38) -> pushkin (53) -> pavstation (01) -> community
! gadukino (15) -> communal (35) -> graveyard (45) -> suburbs
! suburbs (05) -> graveyard (15) -> communal (25) -> gadukino
if $ARGS[0] = 'set_bus_wait_time':
if $ARGS[1] = 'community':
if hour <= 4:
transportVars['bus_wait_gadukino'] = (313 - minut - hour * 60)
elseif hour >= 5 and hour <= 22 or hour = 22 and minut <= 53:
transportVars['bus_wait_gadukino'] = (73 - minut) mod 20
else
transportVars['bus_wait_gadukino'] = (433 - minut - (hour-22) * 60)
end
elseif $ARGS[1] = 'pavstation':
if hour <= 4:
transportVars['bus_wait_gadukino'] = (315 - minut - hour * 60)
transportVars['bus_wait_pavlovsk'] = (361 - minut - hour * 60)
elseif hour = 5:
transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (61 - minut)
elseif hour >= 6 and hour <= 22 or hour = 22 and minut <= 55:
transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (61 - minut) mod 20
elseif hour = 22 or hour = 23 and minut <= 41:
transportVars['bus_wait_gadukino'] = (435 - minut - (hour-22) * 60)
transportVars['bus_wait_pavlovsk'] = (61 - minut) mod 20
else
transportVars['bus_wait_gadukino'] = (375 - minut)
transportVars['bus_wait_pavlovsk'] = (421 - minut)
end
elseif $ARGS[1] = 'pushkin':
if hour <= 4:
transportVars['bus_wait_gadukino'] = (323 - minut - hour * 60)
transportVars['bus_wait_pavlovsk'] = (353 - minut - hour * 60)
elseif hour = 5 and minut <= 53:
transportVars['bus_wait_gadukino'] = (63 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (53 - minut)
elseif hour >= 5 and hour <= 22 or hour = 22 and minut <= 55:
transportVars['bus_wait_gadukino'] = (63 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (73 - minut) mod 20
elseif hour = 22 or hour = 23 and minut <= 3:
transportVars['bus_wait_gadukino'] = (3 - minut)
transportVars['bus_wait_pavlovsk'] = (73 - minut) mod 20
elseif hour = 22 or hour = 23 and minut <= 33:
transportVars['bus_wait_gadukino'] = (435 - minut - (hour-22) * 60)
transportVars['bus_wait_pavlovsk'] = (73 - minut) mod 20
else
transportVars['bus_wait_gadukino'] = (383 - minut)
transportVars['bus_wait_pavlovsk'] = (413 - minut)
end
elseif $ARGS[1] = 'construction':
if hour <= 4:
transportVars['bus_wait_gadukino'] = (338 - minut - hour * 60)
transportVars['bus_wait_pavlovsk'] = (338 - minut - hour * 60)
elseif hour = 5 and minut <= 38:
transportVars['bus_wait_gadukino'] = (38 - minut)
transportVars['bus_wait_pavlovsk'] = (38 - minut)
elseif hour >= 5 and hour <= 22:
transportVars['bus_wait_gadukino'] = (78 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (78 - minut) mod 20
elseif hour <= 23 and minut <= 18:
transportVars['bus_wait_gadukino'] = (18 - minut)
transportVars['bus_wait_pavlovsk'] = (18 - minut)
else
transportVars['bus_wait_gadukino'] = (398 - minut)
transportVars['bus_wait_pavlovsk'] = (398 - minut)
end
elseif $ARGS[1] = 'gadukino':
if hour <= 4:
transportVars['bus_wait_suburbs'] = (315 - minut - hour * 60)
transportVars['bus_wait_pavlovsk'] = (313 - minut - hour * 60)
elseif hour >= 5 and hour <= 22 or hour = 22 and minut <= 53:
transportVars['bus_wait_suburbs'] = (75 - minut) mod 20
transportVars['bus_wait_pavlovsk'] = (73 - minut) mod 20
elseif hour = 22 and minut <= 55:
transportVars['bus_wait_suburbs'] = (55 - minut)
transportVars['bus_wait_pavlovsk'] = (433 - minut - (hour-22) * 60)
else
transportVars['bus_wait_suburbs'] = (435 - minut - (hour-22) * 60)
transportVars['bus_wait_pavlovsk'] = (433 - minut - (hour-22) * 60)
end
elseif $ARGS[1] = 'communal':
if hour <= 4:
transportVars['bus_wait_suburbs'] = (335 - minut - hour * 60)
transportVars['bus_wait_gadukino'] = (325 - minut - hour * 60)
elseif hour = 5 and minut <= 25:
transportVars['bus_wait_suburbs'] = (35 - minut)
transportVars['bus_wait_gadukino'] = (25 - minut)
elseif hour = 5 and minut <= 35:
transportVars['bus_wait_suburbs'] = (75 - minut) mod 20
transportVars['bus_wait_gadukino'] = (65 - minut) mod 20
elseif hour >= 5 and hour <= 22:
transportVars['bus_wait_suburbs'] = (75 - minut) mod 20
transportVars['bus_wait_gadukino'] = (65 - minut) mod 20
elseif hour = 23 and minut <= 05:
transportVars['bus_wait_suburbs'] = (15 - minut)
transportVars['bus_wait_gadukino'] = (05 - minut)
elseif hour = 23 and minut <= 15:
transportVars['bus_wait_suburbs'] = (15 - minut)
transportVars['bus_wait_gadukino'] = (385 - minut)
else
transportVars['bus_wait_suburbs'] = (395 - minut)
transportVars['bus_wait_gadukino'] = (385 - minut)
end
elseif $ARGS[1] = 'graveyard':
if hour <= 4:
transportVars['bus_wait_suburbs'] = (345 - minut - hour * 60)
transportVars['bus_wait_gadukino'] = (315 - minut - hour * 60)
elseif hour = 5 and minut <= 15:
transportVars['bus_wait_suburbs'] = (45 - minut)
transportVars['bus_wait_gadukino'] = (15 - minut)
elseif hour = 5 and minut <= 45:
transportVars['bus_wait_suburbs'] = (45 - minut)
transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
elseif hour >= 5 and hour <= 21 or hour = 22 and minut <= 55:
transportVars['bus_wait_suburbs'] = (65 - minut) mod 20
transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
elseif hour = 22 or hour = 23 and minut <= 25:
transportVars['bus_wait_suburbs'] = (65 - minut) mod 20
transportVars['bus_wait_gadukino'] = (435 - minut - (hour-22) * 60)
else
transportVars['bus_wait_suburbs'] = (405 - minut)
transportVars['bus_wait_gadukino'] = (375 - minut)
end
elseif $ARGS[1] = 'suburbs':
if hour <= 4:
transportVars['bus_wait_gadukino'] = (305 - minut - hour * 60)
elseif hour >= 5 and hour <= 22 or hour = 22 and minut <= 45:
transportVars['bus_wait_gadukino'] = (65 - minut) mod 20
else
transportVars['bus_wait_gadukino'] = (425 - minut - (hour-22) * 60)
end
transportVars['bus_wait_gadukino'] = (65 - minut) mod 20
end
end
if $ARGS[0] = 'display_buspass_time':
$result = 'You have <> days left on your train pass.'
end
if $ARGS[0] = 'display_bus_timecost':
temp_mins = transportVars['bus_time_<<$ARGS[1]>>_<<$ARGS[2]>>']
if $ARGS[1] = 'community' or ($ARGS[1] = 'pavstation' and $ARGS[2] ! 'community') or ($ARGS[1] = 'pushkin' and ($ARGS[2] = 'construction' or $ARGS[2] = 'gadukino')) or $ARGS[1] = 'construction' and $ARGS[2] = 'gadukino':
temp_mins += transportVars['bus_wait_gadukino']
elseif ($ARGS[1] = 'pavstation' and $ARGS[2] = 'community') or ($ARGS[1] = 'pushkin' and ($ARGS[2] = 'community' or $ARGS[2] = 'pavstation')) or ($ARGS[1] = 'construction' and $ARGS[2] ! 'gadukino') or ($ARGS[1] = 'gadukino' and ($ARGS[2] ! 'communal' and $ARGS[2] ! 'graveyard' and $ARGS[2] ! 'suburbs')):
temp_mins += transportVars['bus_wait_pavlovsk']
elseif $ARSG[1] = 'suburbs' or ($ARGS[1] = 'graveyard' and $ARGS[2] ! 'suburbs') or $ARGS[1] = 'communal' and $ARGS[2] = 'gadukino':
temp_mins += transportVars['bus_wait_gadukino']
else
temp_mins += transportVars['bus_wait_suburbs']
end
temp_hours = temp_mins / 60
temp_mins = temp_mins mod 60
$result = '<>:<<$mid(100 + temp_mins, 2, 2)>>'
killvar 'temp_mins'
killvar 'temp_hours'
end
if $ARGS[0] = 'display_bus_schedule':
$bus_schedule = 'Bus schedule
'
if $ARGS[1] = 'pg':
$bus_schedule += 'Pavlovsk - Gadukino
'
$bus_schedule += '
'
$bus_schedule += 'Pavlovsk | Pavlovsk | | | Construction | | Pavlovsk | Pavlovsk | | Construction | |
'
$bus_schedule += 'Community Center | Train Station | Pushkin | Site | Gadukino | | Community Center | Train Station | Pushkin | Site | Gadukino |
'
$bus_schedule += ' |
'
th[0] = 4
:bus_schedule_loop1
$th[1] = mid(100 + th[0], 2, 2)
$th[2] = mid(100 + th[0] + 1, 2, 2)
th[3] = th[0] + 10
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:13 | <<$th[1]>>:15 | <<$th[1]>>:23 | <<$th[1]>>:38 | <<$th[2]>>:03 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:13 | <<$th[4]>>:15 | <<$th[4]>>:23 | <<$th[4]>>:38 | <<$th[5]>>:03 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:33 | <<$th[1]>>:35 | <<$th[1]>>:43 | <<$th[1]>>:58 | <<$th[2]>>:23 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:33 | <<$th[4]>>:35 | <<$th[4]>>:43 | <<$th[4]>>:58 | <<$th[5]>>:23 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:53 | <<$th[1]>>:55 | <<$th[2]>>:03 | <<$th[2]>>:18 | <<$th[2]>>:43 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:53 | <<$th[4]>>:55 | <<$th[5]>>:03 | <<$th[5]>>:18 | <<$th[5]>>:43 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ' |
'
th[0] += 1
if th[0] < 14: jump 'bus_schedule_loop1'
elseif $ARGS[1] = 'gp':
$bus_schedule += 'Gadukino - Pavlovsk
'
$bus_schedule += '
'
$bus_schedule += ' | Construction | | Pavlovsk | Pavlovsk | | | Construction | | Pavlovsk | Pavlovsk |
'
$bus_schedule += 'Gadukino | Site | Pushkin | Train Station | Community center | | Gadukino | Site | Pushkin | Train Station | Community center |
'
$bus_schedule += ' |
'
th[0] = 4
:bus_schedule_loop2
$th[1] = mid(100 + th[0], 2, 2)
$th[2] = mid(100 + th[0] + 1, 2, 2)
th[3] = th[0] + 10
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:13 | <<$th[1]>>:38 | <<$th[1]>>:53 | <<$th[2]>>:01 | <<$th[2]>>:03 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:13 | <<$th[4]>>:38 | <<$th[4]>>:53 | <<$th[5]>>:01 | <<$th[5]>>:03 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '
<<$th[1]>>:33 | <<$th[1]>>:58 | <<$th[2]>>:13 | <<$th[2]>>:21 | <<$th[2]>>:23 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:33 | <<$th[4]>>:58 | <<$th[5]>>:13 | <<$th[5]>>:21 | <<$th[5]>>:23 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:53 | <<$th[2]>>:18 | <<$th[2]>>:33 | <<$th[2]>>:41 | <<$th[2]>>:43 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:53 | <<$th[5]>>:18 | <<$th[5]>>:33 | <<$th[5]>>:41 | <<$th[5]>>:43 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ' |
'
th[0] += 1
if th[0] < 14: jump 'bus_schedule_loop2'
elseif $ARGS[1] = 'gs':
$bus_schedule += 'Gadukino - Suburbs
'
$bus_schedule += '
'
$bus_schedule += ' | Communal | | St. Petersburg | | | Communal | | St. Petersburg |
'
$bus_schedule += 'Gadukino | Village | Cemetary | Suburbs | | Gadukino | Village | Cemetary | Suburbs |
'
$bus_schedule += ' |
'
th[0] = 4
:bus_schedule_loop3
$th[1] = mid(100 + th[0], 2, 2)
$th[2] = mid(100 + th[0] + 1, 2, 2)
th[3] = th[0] + 10
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:15 | <<$th[1]>>:35 | <<$th[1]>>:45 | <<$th[1]>>:55 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:15 | <<$th[4]>>:35 | <<$th[4]>>:45 | <<$th[4]>>:55 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:35 | <<$th[1]>>:55 | <<$th[2]>>:05 | <<$th[2]>>:15 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:35 | <<$th[4]>>:55 | <<$th[5]>>:05 | <<$th[5]>>:15 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[4]>>:55 | <<$th[5]>>:15 | <<$th[5]>>:25 | <<$th[5]>>:35 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:55 | <<$th[5]>>:15 | <<$th[5]>>:25 | <<$th[5]>>:35 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ' |
'
th[0] += 1
if th[0] < 14: jump 'bus_schedule_loop3'
else
$bus_schedule += 'Suburbs - Gadukino
'
$bus_schedule += '
'
$bus_schedule += 'St. Petersburg | | Communal | | | St. Petersburg | | Communal | |
'
$bus_schedule += 'Suburbs | Cemetary | Village | Gadukino | | Suburbs | Cemetary | Village | Gadukino |
'
$bus_schedule += ' |
'
th[0] = 4
:bus_schedule_loop4
$th[1] = mid(100 + th, 2, 2)
$th[2] = mid(100 + th + 1, 2, 2)
th[3] = th[0] + 10
$th[4] = mid(100 + th[3], 2, 2)
$th[5] = mid(100 + th[3] + 1, 2, 2)
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:05 | <<$th[1]>>:15 | <<$th[1]>>:25 | <<$th[1]>>:45 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:05 | <<$th[4]>>:15 | <<$th[4]>>:25 | <<$th[4]>>:45 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:25 | <<$th[1]>>:35 | <<$th[1]>>:45 | <<$th[2]>>:05 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:25 | <<$th[4]>>:35 | <<$th[4]>>:45 | <<$th[5]>>:05 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ''
$bus_schedule += '<<$th[1]>>:45 | <<$th[1]>>:55 | <<$th[2]>>:05 | <<$th[2]>>:25 | '
$bus_schedule += ' | '
if th[3] <= 22:
$bus_schedule += '<<$th[4]>>:45 | <<$th[4]>>:55 | <<$th[5]>>:05 | <<$th[5]>>:25 | '
else
$bus_schedule += ' | '
end
$bus_schedule += '
'
$bus_schedule += ' |
'
th[0] += 1
if th[0] < 14: jump 'bus_schedule_loop4'
end
$bus_schedule += '
'
'<<$bus_schedule>>'
killvar 'bus_schedule'
killvar 'th'
end
if $ARGS[0] = 'init_bus_prices':
transportVars['bus_price_community_pavstation'] = func('transport_functions', 'get_bus_price', 'community', 'pavstation')
transportVars['bus_price_community_pushkin'] = func('transport_functions', 'get_bus_price', 'community', 'pushkin')
transportVars['bus_price_community_construction'] = func('transport_functions', 'get_bus_price', 'community', 'construction')
transportVars['bus_price_community_gadukino'] = func('transport_functions', 'get_bus_price', 'community', 'gadukino')
transportVars['bus_price_pavstation_community'] = transportVars['bus_price_community_pavstation']
transportVars['bus_price_pavstation_pushkin'] = func('transport_functions', 'get_bus_price', 'pavstation', 'pushkin')
transportVars['bus_price_pavstation_construction'] = func('transport_functions', 'get_bus_price', 'pavstation', 'construction')
transportVars['bus_price_pavstation_gadukino'] = func('transport_functions', 'get_bus_price', 'pavstation', 'gadukino')
transportVars['bus_price_pushkin_community'] = transportVars['bus_price_community_pushkin']
transportVars['bus_price_pushkin_pavstation'] = transportVars['bus_price_pavstation_pushkin']
transportVars['bus_price_pushkin_construction'] = func('transport_functions', 'get_bus_price', 'pushkin', 'construction')
transportVars['bus_price_pushkin_gadukino'] = func('transport_functions', 'get_bus_price', 'pushkin', 'gadukino')
transportVars['bus_price_construction_community'] = transportVars['bus_price_community_construction']
transportVars['bus_price_construction_pavstation'] = transportVars['bus_price_pavstation_construction']
transportVars['bus_price_construction_pushkin'] = transportVars['bus_price_pushkin_construction']
transportVars['bus_price_construction_gadukino'] = func('transport_functions', 'get_bus_price', 'construction', 'gadukino')
transportVars['bus_price_gadukino_community'] = transportVars['bus_price_community_gadukino']
transportVars['bus_price_gadukino_pavstation'] = transportVars['bus_price_pavstation_gadukino']
transportVars['bus_price_gadukino_pushkin'] = transportVars['bus_price_pushkin_gadukino']
transportVars['bus_price_gadukino_construction'] = transportVars['bus_price_gadukino_construction']
transportVars['bus_price_gadukino_communal'] = func('transport_functions', 'get_bus_price', 'gadukino', 'communal')
transportVars['bus_price_gadukino_graveyard'] = func('transport_functions', 'get_bus_price', 'gadukino', 'graveyard')
transportVars['bus_price_gadukino_suburbs'] = func('transport_functions', 'get_bus_price', 'gadukino', 'suburbs')
transportVars['bus_price_communal_gadukino'] = transportVars['bus_price_gadukino_communal']
transportVars['bus_price_communal_graveyard'] = func('transport_functions', 'get_bus_price', 'communal', 'graveyard')
transportVars['bus_price_communal_suburbs'] = func('transport_functions', 'get_bus_price', 'communal', 'suburbs')
transportVars['bus_price_graveyard_gadukino'] = transportVars['bus_price_gadukino_communal']
transportVars['bus_price_graveyard_communal'] = transportVars['bus_price_communal_graveyard']
transportVars['bus_price_graveyard_suburbs'] = func('transport_functions', 'get_bus_price', 'communal', 'suburbs')
transportVars['bus_price_suburbs_gadukino'] = transportVars['bus_price_gadukino_communal']
transportVars['bus_price_suburbs_communal'] = transportVars['bus_price_communal_graveyard']
transportVars['bus_price_suburbs_graveyard'] = transportVars['bus_price_graveyard_suburbs']
end
if $ARGS[0] = 'init_bus_timecosts':
transportVars['bus_time_community_pavstation'] = func('transport_functions', 'get_bus_timecost', 'community', 'pavstation')
transportVars['bus_time_community_pushkin'] = func('transport_functions', 'get_bus_timecost', 'community', 'pushkin')
transportVars['bus_time_community_construction'] = func('transport_functions', 'get_bus_timecost', 'community', 'construction')
transportVars['bus_time_community_gadukino'] = func('transport_functions', 'get_bus_timecost', 'community', 'gadukino')
transportVars['bus_time_pavstation_community'] = transportVars['bus_time_community_pavstation']
transportVars['bus_time_pavstation_pushkin'] = func('transport_functions', 'get_bus_timecost', 'pavstation', 'pushkin')
transportVars['bus_time_pavstation_construction'] = func('transport_functions', 'get_bus_timecost', 'pavstation', 'construction')
transportVars['bus_time_pavstation_gadukino'] = func('transport_functions', 'get_bus_timecost', 'pavstation', 'gadukino')
transportVars['bus_time_pushkin_community'] = transportVars['bus_time_community_pushkin']
transportVars['bus_time_pushkin_pavstation'] = transportVars['bus_time_pavstation_pushkin']
transportVars['bus_time_pushkin_construction'] = func('transport_functions', 'get_bus_timecost', 'pushkin', 'construction')
transportVars['bus_time_pushkin_gadukino'] = func('transport_functions', 'get_bus_timecost', 'pushkin', 'gadukino')
transportVars['bus_time_construction_community'] = transportVars['bus_time_community_construction']
transportVars['bus_time_construction_pavstation'] = transportVars['bus_time_pavstation_construction']
transportVars['bus_time_construction_pushkin'] = transportVars['bus_time_pushkin_construction']
transportVars['bus_time_construction_gadukino'] = func('transport_functions', 'get_bus_timecost', 'construction', 'gadukino')
transportVars['bus_time_gadukino_community'] = transportVars['bus_time_community_gadukino']
transportVars['bus_time_gadukino_pavstation'] = transportVars['bus_time_pavstation_gadukino']
transportVars['bus_time_gadukino_pushkin'] = transportVars['bus_time_pushkin_gadukino']
transportVars['bus_time_gadukino_construction'] = transportVars['bus_time_gadukino_construction']
transportVars['bus_time_gadukino_communal'] = func('transport_functions', 'get_bus_timecost', 'gadukino', 'communal')
transportVars['bus_time_gadukino_graveyard'] = func('transport_functions', 'get_bus_timecost', 'gadukino', 'graveyard')
transportVars['bus_time_gadukino_suburbs'] = func('transport_functions', 'get_bus_timecost', 'gadukino', 'suburbs')
transportVars['bus_time_communal_gadukino'] = transportVars['bus_time_gadukino_communal']
transportVars['bus_time_communal_graveyard'] = func('transport_functions', 'get_bus_timecost', 'communal', 'graveyard')
transportVars['bus_time_communal_suburbs'] = func('transport_functions', 'get_bus_timecost', 'communal', 'suburbs')
transportVars['bus_time_graveyard_gadukino'] = transportVars['bus_time_gadukino_communal']
transportVars['bus_time_graveyard_communal'] = transportVars['bus_time_communal_graveyard']
transportVars['bus_time_graveyard_suburbs'] = func('transport_functions', 'get_bus_timecost', 'communal', 'suburbs')
transportVars['bus_time_suburbs_gadukino'] = transportVars['bus_time_gadukino_communal']
transportVars['bus_time_suburbs_communal'] = transportVars['bus_time_communal_graveyard']
transportVars['bus_time_suburbs_graveyard'] = transportVars['bus_time_graveyard_suburbs']
end
if $ARGS[0] = 'get_bus_price':
result = func('transport_functions', '_private_bus_price', $ARGS[2]) - func('transport_functions', '_private_bus_price', $ARGS[1])
if result < 0: result *= -1
result += 10
end
if $ARGS[0] = '_private_bus_price':
if $ARGS[1] = 'community':
result = 0
elseif $ARGS[1] = 'pavstation':
result = 5
elseif $ARGS[1] = 'pushkin':
result = 15
elseif $ARGS[1] = 'construction':
result = 25
elseif $ARGS[1] = 'gadukino':
result = 35
elseif $ARGS[1] = 'communal':
result = 45
elseif $ARGS[1] = 'graveyard':
result = 55
elseif $ARGS[1] = 'suburbs':
result = 65
end
end
if $ARGS[0] = 'get_bus_timecost':
result = func('transport_functions', '_private_bus_time', $ARGS[2]) - func('transport_functions', '_private_bus_time', $ARGS[1])
if result < 0: result *= -1
end
if $ARGS[0] = '_private_bus_time':
if $ARGS[1] = 'community':
result = 0
elseif $ARGS[1] = 'pavstation':
result = 2
elseif $ARGS[1] = 'pushkin':
result = 10
elseif $ARGS[1] = 'construction':
result = 25
elseif $ARGS[1] = 'gadukino':
result = 50
elseif $ARGS[1] = 'communal':
result = 70
elseif $ARGS[1] = 'graveyard':
result = 80
elseif $ARGS[1] = 'suburbs':
result = 90
end
end
!!=======================================!!
!! !!
!! Metro !!
!! !!
!!=======================================!!
if $ARGS[0] = 'get_metro_price':
result = 16
end
if $ARGS[0] = 'get_metro_timecost':
result = 10
end
--- transport_functions ---------------------------------