|
@@ -80,48 +80,111 @@ 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 money < ARGS[1]:
|
|
|
- dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<font color="red"><<$temp_time>> - <<temp_price>> <b>₽</b></font>)'': ''<br><font color="red">You don''t have enough money for a ticket to <<$ARGS[3]>>'' '
|
|
|
- else
|
|
|
- dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <<temp_price>> <b>₽</b>)'':
|
|
|
- money -= <<temp_price>>
|
|
|
- menu_off = 1
|
|
|
- gt ''train'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
|
|
|
- end'
|
|
|
+ if mid($temp_time, 1, 1) < 2:
|
|
|
+ if money < ARGS[1]:
|
|
|
+ dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<font color="red"><<$temp_time>> - <<temp_price>> <b>₽</b></font>)'': ''<br><font color="red">You don''t have enough money for a ticket to <<$ARGS[3]>>'' '
|
|
|
+ else
|
|
|
+ dynamic 'act ''Buy a ticket to <<$ARGS[3]>> (<<$temp_time>> - <<temp_price>> <b>₽</b>)'':
|
|
|
+ money -= <<temp_price>>
|
|
|
+ menu_off = 1
|
|
|
+ gt ''train'', ''<<$ARGS[1]>>_<<$ARGS[2]>>''
|
|
|
+ end'
|
|
|
+ end
|
|
|
end
|
|
|
killvar 'temp_price'
|
|
|
+ killvar 'temp_time'
|
|
|
end
|
|
|
|
|
|
|
|
|
! Time Table:
|
|
|
-! Bus departs every 20 minutes
|
|
|
+! 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 hour = 0:
|
|
|
- time_mod = 30
|
|
|
- elseif hour <= 3:
|
|
|
- time_mod = 60
|
|
|
- elseif hour <= 21:
|
|
|
- time_mod = 15
|
|
|
- else
|
|
|
- time_mod = 30
|
|
|
- end
|
|
|
-
|
|
|
if $ARGS[1] = 'pavlovsk':
|
|
|
- transportVars['train_wait_center'] = (67 - minut) mod time_mod
|
|
|
+ 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':
|
|
|
- transportVars['train_wait_center'] = (86 - minut) mod time_mod
|
|
|
- transportVars['train_wait_pavlovsk'] = (87 - minut) mod time_mod
|
|
|
+ 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':
|
|
|
- transportVars['train_wait_center'] = (92 - minut) mod time_mod
|
|
|
- transportVars['train_wait_pavlovsk'] = (77 - minut) mod time_mod
|
|
|
+ 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':
|
|
|
- transportVars['train_wait_center'] = (102 - minut) mod time_mod
|
|
|
- transportVars['train_wait_pavlovsk'] = (67 - minut) mod time_mod
|
|
|
+ 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':
|
|
|
- transportVars['train_wait_pavlovsk'] = (62 - minut) mod time_mod
|
|
|
+ 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
|
|
|
|
|
@@ -143,6 +206,151 @@ if $ARGS[0] = 'display_train_timecost':
|
|
|
killvar 'temp_hours'
|
|
|
end
|
|
|
|
|
|
+if $ARGS[0] = 'display_train_schedule':
|
|
|
+ if $ARGS[1] = 'pc':
|
|
|
+ $train_schedule += '<center><h2>Pavlovsk - St. Petersburg</h2></center>'
|
|
|
+ $train_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $train_schedule += '<tr><th></th><th></th><th>Communal</th><th>St. Petersburg</th><th>St. Petersburg</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th></th><th></th><th>Communal</th><th>St. Petersburg</th><th>St. Petersburg</th></tr>'
|
|
|
+ $train_schedule += '<tr><th style="border-right:2px solid black">Pavlovsk</th><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Industrial</th><th>Center</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Pavlovsk</th><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Industrial</th><th style="border-right:2px solid black">Center</th></tr>'
|
|
|
+ $train_schedule += '<tr><td colspan=11 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $train_schedule += '<td><<$th[1]>>:07</td><td><<$th[1]>>:22</td><td><<$th[1]>>:32</td><td><<$th[1]>>:42</td><td><<$th[1]>>:47</td>'
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ $train_schedule += '<td><<$th[4]>>:07</td><td><<$th[4]>>:22</td><td><<$th[4]>>:32</td><td><<$th[4]>>:42</td><td><<$th[4]>>:47</td>'
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+
|
|
|
+ if th[0] >= 4 or th[3] <= 21:
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:22</td><td><<$th[1]>>:37</td><td><<$th[1]>>:47</td><td><<$th[1]>>:57</td><td><<$th[2]>>:02</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 21:
|
|
|
+ $train_schedule += '<td><<$th[4]>>:22</td><td><<$th[4]>>:37</td><td><<$th[4]>>:47</td><td><<$th[4]>>:57</td><td><<$th[5]>>:02</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+ end
|
|
|
+
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] = 0 or th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:37</td><td><<$th[1]>>:52</td><td><<$th[2]>>:02</td><td><<$th[2]>>:12</td><td><<$th[2]>>:17</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ $train_schedule += '<td><<$th[4]>>:22</td><td><<$th[4]>>:37</td><td><<$th[4]>>:47</td><td><<$th[4]>>:57</td><td><<$th[5]>>:02</td></tr>'
|
|
|
+
|
|
|
+ if th[0] >= 4 or th[3] <= 21:
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:52</td><td><<$th[2]>>:07</td><td><<$th[2]>>:17</td><td><<$th[2]>>:27</td><td><<$th[2]>>:32</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 21:
|
|
|
+ $train_schedule += '<td><<$th[4]>>:52</td><td><<$th[5]>>:07</td><td><<$th[5]>>:17</td><td><<$th[5]>>:27</td><td><<$th[5]>>:32</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+ end
|
|
|
+
|
|
|
+ $train_schedule += '<tr><td colspan=11 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 12: jump 'train_schedule_loop1'
|
|
|
+ else
|
|
|
+ $train_schedule += '<center><h2>St. Petersburg - Pavlovsk</h2></center>'
|
|
|
+ $train_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $train_schedule += '<tr><th>St. Petersburg</th><th>St. Petersburg</th><th>Communal</th><th></th><th></th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th>St. Petersburg</th><th>St. Petersburg</th><th>Communal</th><th></th><th></th></tr>'
|
|
|
+ $train_schedule += '<tr><th style="border-right:2px solid black">Center</th><th style="border-right:2px solid black">Industrial</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Gadukino</th><th>Pavlovsk</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Center</th><th style="border-right:2px solid black">Industrial</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Pavlovsk</th></tr>'
|
|
|
+ $train_schedule += '<tr><td colspan=11 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $train_schedule += '<td><<$th[1]>>:02</td><td><<$th[1]>>:07</td><td><<$th[1]>>:17</td><td><<$th[1]>>:27</td><td><<$th[1]>>:42</td>'
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ $train_schedule += '<td><<$th[4]>>:02</td><td><<$th[4]>>:07</td><td><<$th[4]>>:17</td><td><<$th[4]>>:27</td><td><<$th[4]>>:42</td>'
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+
|
|
|
+ if th[0] >= 4 or th[3] <= 21:
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:17</td><td><<$th[1]>>:22</td><td><<$th[1]>>:32</td><td><<$th[1]>>:42</td><td><<$th[1]>>:57</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 21:
|
|
|
+ $train_schedule += '<td><<$th[4]>>:17</td><td><<$th[4]>>:22</td><td><<$th[4]>>:32</td><td><<$th[4]>>:42</td><td><<$th[4]>>:57</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+ end
|
|
|
+
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] = 0 or th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:32</td><td><<$th[1]>>:37</td><td><<$th[1]>>:47</td><td><<$th[1]>>:57</td><td><<$th[2]>>:12</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ $train_schedule += '<td><<$th[4]>>:32</td><td><<$th[4]>>:37</td><td><<$th[4]>>:47</td><td><<$th[4]>>:57</td><td><<$th[5]>>:12</td></tr>'
|
|
|
+
|
|
|
+ if th[0] >= 4 or th[3] <= 21:
|
|
|
+ $train_schedule += '<tr>'
|
|
|
+ if th[0] >= 4:
|
|
|
+ $train_schedule += '<td><<$th[1]>>:47</td><td><<$th[1]>>:52</td><td><<$th[2]>>:02</td><td><<$th[2]>>:12</td><td><<$th[2]>>:27</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 21:
|
|
|
+ $train_schedule += '<td><<$th[4]>>:47</td><td><<$th[4]>>:52</td><td><<$th[5]>>:02</td><td><<$th[5]>>:12</td><td><<$th[5]>>:27</td>'
|
|
|
+ else
|
|
|
+ $train_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $train_schedule += '</tr>'
|
|
|
+ end
|
|
|
+ $train_schedule += '<tr><td colspan=11 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 12: jump 'train_schedule_loop2'
|
|
|
+ end
|
|
|
+ $train_schedule += '</table></center>'
|
|
|
+
|
|
|
+ '<<$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')
|
|
@@ -290,19 +498,19 @@ end
|
|
|
|
|
|
|
|
|
if $ARGS[0] = 'buy_bus_ticket':
|
|
|
- if $ARGS[2] = 'pv':
|
|
|
+ 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] = 'vp':
|
|
|
+ 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] = 'vs':
|
|
|
+ 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'
|
|
@@ -344,33 +552,135 @@ end
|
|
|
|
|
|
if $ARGS[0] = 'set_bus_wait_time':
|
|
|
if $ARGS[1] = 'community':
|
|
|
- transportVars['bus_wait_gadukino'] = (73 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
|
|
|
- transportVars['bus_wait_pavlovsk'] = (61 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_gadukino'] = (63 - minut) mod 20
|
|
|
- transportVars['bus_wait_pavlovsk'] = (73 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_gadukino'] = (78 - minut) mod 20
|
|
|
- transportVars['bus_wait_pavlovsk'] = (78 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_suburbs'] = (75 - minut) mod 20
|
|
|
- transportVars['bus_wait_pavlovsk'] = (65 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_suburbs'] = (75 - minut) mod 20
|
|
|
- transportVars['bus_wait_gadukino'] = (65 - minut) mod 20
|
|
|
+ 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':
|
|
|
- transportVars['bus_wait_suburbs'] = (65 - minut) mod 20
|
|
|
- transportVars['bus_wait_gadukino'] = (75 - minut) mod 20
|
|
|
+ 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
|
|
|
- if hour = 4:
|
|
|
- transportVars['bus_wait_pavlovsk'] += (60 - minut)
|
|
|
- transportVars['bus_wait_gadukino'] += (60 - minut)
|
|
|
- transportVars['bus_wait_suburbs'] += (60 - minut)
|
|
|
- end
|
|
|
end
|
|
|
|
|
|
if $ARGS[0] = 'display_buspass_time':
|
|
@@ -396,6 +706,221 @@ if $ARGS[0] = 'display_bus_timecost':
|
|
|
killvar 'temp_hours'
|
|
|
end
|
|
|
|
|
|
+if $ARGS[0] = 'display_bus_schedule':
|
|
|
+ $bus_schedule = '<center><h4>Bus schedule</h4></center>'
|
|
|
+
|
|
|
+ if $ARGS[1] = 'pg':
|
|
|
+ $bus_schedule += '<center><h2>Pavlovsk - Gadukino</h2></center>'
|
|
|
+ $bus_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $bus_schedule += '<tr><th>Pavlovsk</th><th>Pavlovsk</th><th></th><th></th><th>Construction</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th>Pavlovsk</th><th>Pavlovsk</th><th></th><th>Construction</th><th></th></tr>'
|
|
|
+ $bus_schedule += '<tr><th style="border-right:2px solid black">Community Center</th><th style="border-right:2px solid black">Train Station</th><th style="border-right:2px solid black">Pushkin</th><th style="border-right:2px solid black">Site</th><th>Gadukino</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Community Center</th><th style="border-right:2px solid black">Train Station</th><th style="border-right:2px solid black">Pushkin</th><th style="border-right:2px solid black">Site</th><th style="border-right:2px solid black">Gadukino</th></tr>'
|
|
|
+ $bus_schedule += '<tr><td colspan=11 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:13</td><td><<$th[1]>>:15</td><td><<$th[1]>>:23</td><td><<$th[1]>>:38</td><td><<$th[2]>>:03</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:13</td><td><<$th[4]>>:15</td><td><<$th[4]>>:23</td><td><<$th[4]>>:38</td><td><<$th[5]>>:03</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:33</td><td><<$th[1]>>:35</td><td><<$th[1]>>:43</td><td><<$th[1]>>:58</td><td><<$th[2]>>:23</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:33</td><td><<$th[4]>>:35</td><td><<$th[4]>>:43</td><td><<$th[4]>>:58</td><td><<$th[5]>>:23</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:53</td><td><<$th[1]>>:55</td><td><<$th[2]>>:03</td><td><<$th[2]>>:18</td><td><<$th[2]>>:43</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:53</td><td><<$th[4]>>:55</td><td><<$th[5]>>:03</td><td><<$th[5]>>:18</td><td><<$th[5]>>:43</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr><td colspan=11 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 14: jump 'bus_schedule_loop1'
|
|
|
+ elseif $ARGS[1] = 'gp':
|
|
|
+ $bus_schedule += '<center><h2>Gadukino - Pavlovsk</h2></center>'
|
|
|
+ $bus_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $bus_schedule += '<tr><th></th><th>Construction</th><th></th><th>Pavlovsk</th><th>Pavlovsk</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th></th><th>Construction</th><th></th><th>Pavlovsk</th><th>Pavlovsk</th></tr>'
|
|
|
+ $bus_schedule += '<tr><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Site</th><th style="border-right:2px solid black">Pushkin</th><th style="border-right:2px solid black">Train Station</th><th>Community center</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Site</th><th style="border-right:2px solid black">Pushkin</th><th style="border-right:2px solid black">Train Station</th><th style="border-right:2px solid black">Community center</th></tr>'
|
|
|
+ $bus_schedule += '<tr><td colspan=11 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:13</td><td><<$th[1]>>:38</td><td><<$th[1]>>:53</td><td><<$th[2]>>:01</td><td><<$th[2]>>:03</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:13</td><td><<$th[4]>>:38</td><td><<$th[4]>>:53</td><td><<$th[5]>>:01</td><td><<$th[5]>>:03</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<tr><td><<$th[1]>>:33</td><td><<$th[1]>>:58</td><td><<$th[2]>>:13</td><td><<$th[2]>>:21</td><td><<$th[2]>>:23</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:33</td><td><<$th[4]>>:58</td><td><<$th[5]>>:13</td><td><<$th[5]>>:21</td><td><<$th[5]>>:23</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:53</td><td><<$th[2]>>:18</td><td><<$th[2]>>:33</td><td><<$th[2]>>:41</td><td><<$th[2]>>:43</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:53</td><td><<$th[5]>>:18</td><td><<$th[5]>>:33</td><td><<$th[5]>>:41</td><td><<$th[5]>>:43</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=5></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr><td colspan=11 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 14: jump 'bus_schedule_loop2'
|
|
|
+ elseif $ARGS[1] = 'gs':
|
|
|
+ $bus_schedule += '<center><h2>Gadukino - Suburbs</h2></center>'
|
|
|
+ $bus_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $bus_schedule += '<tr><th></th><th>Communal</th><th></th><th>St. Petersburg</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th></th><th>Communal</th><th></th><th>St. Petersburg</th></tr>'
|
|
|
+ $bus_schedule += '<tr><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Cemetary</th><th>Suburbs</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Gadukino</th><th style="border-right:2px solid black">Village</th><th style="border-right:2px solid black">Cemetary</th><th>Suburbs</th></tr>'
|
|
|
+ $bus_schedule += '<tr><td colspan=9 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:15</td><td><<$th[1]>>:35</td><td><<$th[1]>>:45</td><td><<$th[1]>>:55</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:15</td><td><<$th[4]>>:35</td><td><<$th[4]>>:45</td><td><<$th[4]>>:55</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:35</td><td><<$th[1]>>:55</td><td><<$th[2]>>:05</td><td><<$th[2]>>:15</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:35</td><td><<$th[4]>>:55</td><td><<$th[5]>>:05</td><td><<$th[5]>>:15</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:55</td><td><<$th[5]>>:15</td><td><<$th[5]>>:25</td><td><<$th[5]>>:35</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:55</td><td><<$th[5]>>:15</td><td><<$th[5]>>:25</td><td><<$th[5]>>:35</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr><td colspan=9 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 14: jump 'bus_schedule_loop3'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<center><h2>Suburbs - Gadukino</h2></center>'
|
|
|
+ $bus_schedule += '<br><center><table style="text-align:center">'
|
|
|
+ $bus_schedule += '<tr><th>St. Petersburg</th><th></th><th>Communal</th><th></th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th>St. Petersburg</th><th></th><th>Communal</th><th></th></tr>'
|
|
|
+ $bus_schedule += '<tr><th style="border-right:2px solid black">Suburbs</th><th style="border-right:2px solid black">Cemetary</th><th style="border-right:2px solid black">Village</th><th>Gadukino</th><th style="border-right:2px solid black; border-left:2px solid black"> </th><th style="border-right:2px solid black">Suburbs</th><th style="border-right:2px solid black">Cemetary</th><th style="border-right:2px solid black">Village</th><th>Gadukino</th></tr>'
|
|
|
+ $bus_schedule += '<tr><td colspan=9 style="border-bottom:2px solid black"></td></tr>'
|
|
|
+
|
|
|
+
|
|
|
+ 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 += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:05</td><td><<$th[1]>>:15</td><td><<$th[1]>>:25</td><td><<$th[1]>>:45</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:05</td><td><<$th[4]>>:15</td><td><<$th[4]>>:25</td><td><<$th[4]>>:45</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:25</td><td><<$th[1]>>:35</td><td><<$th[1]>>:45</td><td><<$th[2]>>:05</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:25</td><td><<$th[4]>>:35</td><td><<$th[4]>>:45</td><td><<$th[5]>>:05</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr>'
|
|
|
+ $bus_schedule += '<td><<$th[1]>>:45</td><td><<$th[1]>>:55</td><td><<$th[2]>>:05</td><td><<$th[2]>>:25</td>'
|
|
|
+ $bus_schedule += '<td style="border-right:2px solid black; border-left:2px solid black"> </td>'
|
|
|
+ if th[3] <= 22:
|
|
|
+ $bus_schedule += '<td><<$th[4]>>:45</td><td><<$th[4]>>:55</td><td><<$th[5]>>:05</td><td><<$th[5]>>:25</td>'
|
|
|
+ else
|
|
|
+ $bus_schedule += '<td colspan=4></td>'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</tr>'
|
|
|
+
|
|
|
+ $bus_schedule += '<tr><td colspan=9 style="border-bottom:1px solid black"></td></tr>'
|
|
|
+
|
|
|
+ th[0] += 1
|
|
|
+ if th[0] < 14: jump 'bus_schedule_loop4'
|
|
|
+ end
|
|
|
+ $bus_schedule += '</table></center>'
|
|
|
+
|
|
|
+ '<<$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')
|