# Multiplayer races from free roam, the route's proof (host side, with
# mprace_trip_join.txt): a saved career's free roam -> pause, Quit -> the main
# menu -> LAN, Host LAN Server -> Select Car, the Career category (the career
# car) -> Create Game (Circuit, the first track) -> race (the game's AI
# drives) -> the results -> the LAN Lobby -> the main menu -> Resume Career ->
# the crib -> Return to Explore Mode -> free roam.  The career (0x85AD40,
# 0x8880 bytes) and the profile (0x83A9E0, 0xAB4C bytes) are dumped at every
# step: c<n>.bin, p<n>.bin in the save folder.
#   node web/tools/roam-pair.mjs --base <server> --seed <a career's save tree> --a HostMR:mprace_trip_host.txt
#        --b JoinMR:mprace_trip_join.txt --page play --play-only HostMR --timeout 2400
#        --fetch c0.bin ... --env NFSU2_ROAM_ROOM=<r>
0     bot on
+0    waitroam 6000
+0    bot off
+0    roam smsauto on
+600  careerlist
+0    mark car x:0x863480
+0    peek 0x863480 1
+0    peek 0x83aab8 3
+0    dump roam_0
+0    memdump 0x85ad40 0x8880 /save/c0.bin
+0    memdump 0x83a9e0 0xab4c /save/p0.bin
+0    log TRIP quit to the main menu
+0    tap ESCAPE
+0    waitfe UI_pause.fng 600
+120  tap RIGHT                       # Save (the car stands: not greyed out)
+40   tap RIGHT
+40   tap RIGHT
+40   tap RIGHT
+40   tap RIGHT
+60   tap RETURN                      # Quit
+0    waitfe UI_InGameDialog.fng 600
+60   tap LEFT
+30   tap RETURN                      # Yes
+0    waitfe UI_Main.fng 3000
+300  dump main_0
+0    memdump 0x85ad40 0x8880 /save/c1.bin
+0    memdump 0x83a9e0 0xab4c /save/p1.bin
+0    log TRIP LAN
+0    tap LEFT
+60   dump main_left1
+0    tap LEFT
+60   tap LEFT
+60   tap LEFT
+60   dump main_left4
+0    tap RIGHT
+60   tap RIGHT
+60   tap RIGHT
+60   dump main_lan
+0    tap RETURN
+8000ms dump lan_list
+0    click 0.407 0.919                # Host LAN Server
+0    waitfng UI_PC_LAN.fng 900
+30   tap BACK
+10   tap BACK
+10   tap BACK
+10   tap BACK
+30   type HOSTMR
+60   tap RETURN
+0    waitfng UI_OLMAIN.fng 1500
+300  tap RIGHT
+60   tap RETURN                      # Select Car
+0    waitfng UI_OLCarSelect.fng 900
+180  dump car_0
+0    peek 0x83aac0 1
+0    click 0.570 0.069               # the category's left arrow: Career
+120  dump car_career
+0    peek 0x83aac0 1
+0    tap RETURN
+120  tap LEFT
+30   tap RETURN                      # Yes, race with this vehicle
+120  dump transmission
+0    tap RETURN
+0    waitfng UI_OLMAIN.fng 900
+0    peek 0x83aab8 3
+0    expect x:0x83aab8 == @car
+120  tap LEFT
+60   tap RETURN                      # Lobby
+6000ms log lobby
+0    tap RETURN                      # Create Game
+0    waitfng UI_QRModeSelect.fng 900
+200  dump mode
+0    tap RETURN
+0    waitfng UI_QRTrackSelect.fng 900
+200  dump track
+0    tap RETURN
+0    waitfng UI_QRModeOptions.fng 900
+200  dump options
+0    tap RETURN
+0    waitfng PC_OL_GameRoom.fng 900
+300  dump room_0
+120000ms dump room_1
+0    log start-race
+0    click 0.311 0.172               # Start Race
+3000ms dump start
+0    waitmem 0x008654a4 6 20000
+0    log race-loaded
+0    memdump 0x85ad40 0x8880 /save/c2.bin
+0    memdump 0x83a9e0 0xab4c /save/p2.bin
+0    autopilot on 6000
+0    log race-start
+30000ms dump race_30
+60000ms dump race_90
+0    waitfng UI_PostRaceResults.fng 30000
+0    log results
+180  dump results
+0    memdump 0x85ad40 0x8880 /save/c3.bin
+0    memdump 0x83a9e0 0xab4c /save/p3.bin
+3000ms tap RETURN                   # Continue: the LAN Lobby
+0    waitfng PC_OL_Lobby.fng 1500
+600  dump lobby_back
+0    tap ESCAPE                      # LAN Main
+0    waitfng UI_OLMAIN.fng 900
+300  dump lanmain_back
+0    tap ESCAPE                      # "exit LAN mode?" (the host: "You are hosting a LAN server ...")
+240  dump leave
+0    tap LEFT
+40   tap RETURN                      # Yes
+0    waitfe UI_Main.fng 3000
+300  dump main_back
+0    memdump 0x85ad40 0x8880 /save/c4.bin
+0    memdump 0x83a9e0 0xab4c /save/p4.bin
+0    log TRIP back to the career
+0    tap LEFT
+60   tap LEFT
+60   tap LEFT
+60   tap LEFT
+60   dump main_career
+0    tap RETURN                      # Career
+0    bot on                          # Resume Career, the crib, Return to Explore Mode
+0    waitroam 6000
+0    bot off
+600  careerlist
+0    peek 0x863480 1
+0    dump roam_back
+0    memdump 0x85ad40 0x8880 /save/c5.bin
+0    memdump 0x83a9e0 0xab4c /save/p5.bin
+0    log TRIP END
+60   quit
