@@ -57,33 +57,51 @@ std::set<std::string> enter_region_and_read_MMO(
5757 MapRegion region = MapRegion::NONE;
5858 TravelLocation location = TravelLocations::instance ().Fieldlands_Fieldlands ;
5959 Camp camp = Camp::FIELDLANDS_FIELDLANDS;
60+ // When you open the map in a region, the map cursor is initialized at your current location
61+ // on map. But when you land in a region, the initial location is a camp, the map cursor
62+ // will show a text box "xxx Camp - Take a rest or do some crafting". This may occlude some
63+ // MMO question marks. So we have to move the map cursor away after we land in the region.
64+ int map_cursor_move_x = 0 ;
65+ int map_cursor_move_y = 0 ;
66+ const int map_cursor_move_duration = 50 ;
67+
6068 for (size_t i = 0 ; i < 5 ; i++){
6169 if (mmo_name == MMO_NAMES ()[i]){
6270 switch (i){
6371 case 0 :
6472 region = MapRegion::FIELDLANDS;
6573 location = TravelLocations::instance ().Fieldlands_Fieldlands ;
6674 camp = Camp::FIELDLANDS_FIELDLANDS;
75+ map_cursor_move_x = 128 ;
76+ map_cursor_move_y = 0 ;
6777 break ;
6878 case 1 :
6979 region = MapRegion::MIRELANDS;
7080 location = TravelLocations::instance ().Mirelands_Mirelands ;
7181 camp = Camp::MIRELANDS_MIRELANDS;
82+ map_cursor_move_x = 0 ;
83+ map_cursor_move_y = 128 ;
7284 break ;
7385 case 2 :
7486 region = MapRegion::COASTLANDS;
7587 location = TravelLocations::instance ().Coastlands_Beachside ;
7688 camp = Camp::COASTLANDS_BEACHSIDE;
89+ map_cursor_move_x = 0 ;
90+ map_cursor_move_y = 128 ;
7791 break ;
7892 case 3 :
7993 region = MapRegion::HIGHLANDS;
8094 location = TravelLocations::instance ().Highlands_Highlands ;
8195 camp = Camp::HIGHLANDS_HIGHLANDS;
96+ map_cursor_move_x = 128 ;
97+ map_cursor_move_y = 255 ;
8298 break ;
8399 case 4 :
84100 region = MapRegion::ICELANDS;
85101 location = TravelLocations::instance ().Icelands_Snowfields ;
86102 camp = Camp::ICELANDS_SNOWFIELDS;
103+ map_cursor_move_x = 128 ;
104+ map_cursor_move_y = 255 ;
87105 break ;
88106 }
89107 }
@@ -111,7 +129,6 @@ std::set<std::string> enter_region_and_read_MMO(
111129 env.console
112130 );
113131 }
114-
115132 if (zoom_level == 0 ){
116133 pbf_press_button (context, BUTTON_ZR, 50 , 50 );
117134 context.wait_for_all_requests ();
@@ -123,7 +140,7 @@ std::set<std::string> enter_region_and_read_MMO(
123140 }
124141
125142 // Move cursor away so that it does not show a text box that occludes MMO sprites.
126- pbf_move_left_joystick (context, 0 , 0 , 300 , 30 );
143+ pbf_move_left_joystick (context, map_cursor_move_x, map_cursor_move_y, map_cursor_move_duration , 30 );
127144 context.wait_for_all_requests ();
128145
129146 // Fix Missions & Requests tab:
0 commit comments