chooseskill Carto real
set %totalFails 0
set %Par 0
wait 1s
msg $,unsetcatchbag$
wait 2s

AbroMas:
 msg $,usetype 0x14eb 0x30$
  IF N_TMF in #sysmsg
     goto CuentoMapas: 
 wait 17
goto AbroMas:

CuentoMapas:
     wait 1s
     msg $,setcatchbag$
     Set #LTARGETID %Bolsa2
     Set #LTARGETKIND 1
     wait 1s
     target 4s
     event macro 22 0
   wait 2s
for %j 1 %TotalMaps
{
IF N_IN in #sysmsg
   exit
msg $,waitmenu mapa region$
wait 10
     ;Se esta haciendo un savegame
     if WRDSV_A_EN in #SYSMSG
        wait 20s
msg $,usetype 0x14eb$
wait 1s
IF N_IN in #sysmsg
   exit
IF N_TMF in #sysmsg
   exit
wait 6s

     ;Se esta haciendo un savegame
     if WRDSV_A_EN in #SYSMSG
        wait 20s

 if #contkind in WNF_AECB
    {
     click 46 57 r
     wait 10
    }
 if #conttype in XVH
    {
    finditem #CONTID
     if #FINDBAGID = %mochilapr
       {
            call drag #CONTID 777 430 Simple
      }
     wait 2s
     set %par %par + 1
     if %par > 1
       set %par 0

     set %totalFails %totalfails + 1
     if %totalfails > 15
       exit
    }

} 


