;Separamos iron
    
If %GoldOrTickets = TICKETS
  {
     wait 2s
     msg $,setcatchbag$
event sysmessage EL ID de la bolsa de TICKETS ES %Bolsa2
     Set #LTARGETID %Bolsa2
     Set #LTARGETKIND 1
     wait 1s
     target 4s
     event macro %LastTarget 0
   }

If %separamos = 1
 {
 ;Tenemos 30 segundos para separar lo que falte
  set %septimeout #SCNT + 30
  sigosepara:
     if %septimeout < #SCNT
       goto ahorafundimos
     call SeparaMineral
     if %sepcontrol <> NoSeparado
        goto sigosepara  
 }

ahorafundimos:
;Empezamos a fundir
   for %j 1 %oresdistintos
     {
        set %timeout 0
       call Array GET %j
       if %1 in %quefundir
          {
                ignoreitem reset
                 fundiendo:
           ;Solo fundimos iron ore
                      call keepalive
                  call apuntar %T_ores %3
                  if %1 = -1
                      goto finfundir
                  if %UltimoOre = #FINDID
                       {
                         Set %timeout %timeout + 1
                         wait 2
                        }
                  if %UltimoOre <> #FINDID
                        {
                          Set %timeout 0
                          Set %ultimoOre #FINDID
                       }
                  if %timeout > 30
                        goto acabofundir:
                  Event macro %LastObject
                  ;Se esta haciendo un savegame
                  if WRDSV_A_EN in #SYSMSG
                       wait 24s
                 goto fundiendo
          }
      finfundir:
     }
AcaboFundir:
If %GoldOrTickets = TICKETS
  {
     wait 2s
     msg $,unsetcatchbag$
     wait 2s
     msg $,unsetcatchbag$
     wait 3s

                if WRDSV_A_EN in #SYSMSG
                       wait 24s
   
  }
