Bloque Adsense2



Autor Tema: Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -  (Leído 1598 veces)

0 Usuarios y 1 Visitante están viendo este tema.

  • Saludos fullmaniacos !!!
  • Administradores
  • Miembro Supremo
  • *****
  • Puntos: 18179
  • Mensajes: 4417
  • ar
  • Respuestas Mejor Respuesta : 4
    Peor Respuesta : 0
  • Karma: 470
  • Ojala sea un servicio de utilidad !!
    • Full Electronica Bariloche
Acelerador de Bot

Saludos fullmaniacos, encontre en el foro de allbots una version mejorada de un paquete de "codigo" que se incluye en una carpeta del PlugIn Multi, esa carpeta da nombre al titulo del Post , "Hooks".
Lo que el user navedhashmi32@allbots.org nos ofrece es un codigo modificado de tall manera el bot se comporte de manera mucho mas veloz.
Hubo varias versiones y autores de esta modificacion, pero esta es muy buena y por ello me llevó a compartirla con ustedes.
Al testearlo, note a lo menos un 50% mas de velocidad en los procesos, y eso es excelente.

A continuacion pueden ver el codigo :
Código: [Seleccionar]
    <?php
    
//===============================================================================
    //=========================== Debug Codes For The Bot ===========================
    //===============================================================================
    //$this->AddHook('DebugInfos', 'GetInfosDebug');
    //$this->AddHook('DebugInfos', 'DebuginPlugin');

    
function GetInfosDebug($bot)
    {
       if (
$bot->firstrun)
       {
          
$bot->Debug($bot->cfg->_value'tmp_dir\Debug\bot-cfg-_value.txt''bot->cfg->_value');
          
$bot->Debug($bot->xmlsOb->xml'tmp_dir\Debug\bot-xmlsOb-xml.txt''bot->cfg->_value'1);
          
$obj = new Obj($botNULL);
          foreach (
$bot->fobjects as $obj_)
          {
             
$obj->ChangeObj($obj_);
             
$obj->GetDataInspection();
          }
       }
    }

    function 
DebuginPlugin($bot)
    {
    
/*   $fl = fopen('tmp_dir\Debug\building.txt', 'w');
       $obj = new Obj($bot, NULL);
       foreach ($bot->fobjects as $obj_)
       {
          $obj->ChangeObj($obj_);
          $spe = $obj->GetSpecification();
          if ($spe == 'building')
          {
             $data = $obj->GetStateData();
             $rt = $data['ud'];
             $pt = (int)($obj->obj['id']/1000.0/60);
             fwrite($fl, 'itemName : '.$obj->GetName().' state : '.$obj->obj['state'].' rt (min) : '.$rt.' pt (min) : '.$pt."\r\n");
          }
       }
       
       $fl = fopen('tmp_dir\Debug\All Empires & Allies.txt', 'w');
       foreach ($bot->xmlsOb->xml->items->item as $obj)
       {
          if ($obj['className'] == 'Building')
             fwrite($fl, 'itemName : '.$obj['itemName']."\r\n");
       }
       fclose($fl);
       $fl = fopen('tmp_dir\Debug\All E & A -Buildings.txt', 'w');
       foreach ($bot->xmlsOb->gsXML->items->item as $obj)
       {
          if ($obj['className'] == 'Building')
             fwrite($fl, 'itemName : '.$obj['itemName']."\r\n");
       }
       fclose($fl);*/

    
}

    
//===============================================================================
    //===================== Full Your Energy From The Inventory =====================
    //===============================================================================
    
$this->AddHook('FullEnergy''FullYEnergy');

    function 
FullYEnergy($bot) {
       if (
$bot->firstrun)/**/{ return; }

    
$sdata $bot->ld->GetPlSettings("MultiFullEnergy");//sdata;
        
if((int)$sdata->MultiFullEnergy <> 0)/*Settings*/return;
       
       if((int) 
$sdata->FullEnergyR == 1)
       {
       
          
$bot->SendMsg('----Start to full with energy----');//OK;
       
          
if (isset($bot->error_msg )) { $bot -> ReloadConfig(); }
       
          
$timeis00 time();
          
$energy00 $bot->energy;
          
$Energy $sdata->obj;
          
$eaaobj = (int)$sdata->ManyEn;
       
          
$bot->SendMsg('Get ' $eaaobj " " $Energy '...');
       
          
$energyArray=array('EN1','EN2','EN3','EN4','EN5','EN6');
          
$CheckEnergy=false;
       
          foreach(
$bot->cfg->_value['data'][0]['data']['userInfo']['player']['inventory']['items'] as $code=>$nb)
          {
             if (
in_array($code$energyArray))
             {
                
$CheckEnergy=true;// If nothing in inv -> BREAK;
                
break;
             }
          } 
// If load all settings right... continue ( success );
          
if (!$CheckEnergy)
          {
             
$bot->SendMsg("No $Energy found in your inventory");
             
$bot->SendMsg('----Finish to full with energy----');
             return;
          }
          for( 
$n=0$n<$eaaobj$n++ )
          {
          
$bot->GetEnergy($Energy); // Get energy from inventory.;
       
          
if ($bot->energy >= $bot->energyMax)//If Energy is full;
          
{
             
$bot->SendMsg("Your energy is full not add more!!");
             
$bot->SendMsg('----Finish to full with energy----');
             return;
          }
    
//      foreach($bot->cfg->_value['data'][0]['data']['userInfo']['player']['inventory']['items'] as $code=>$nb)
          
if(isset($bot->error_msg))
          {
             
$bot->SendMsg("Some problem(s) with to get energy");
             return;
          }
          
$bot->SendMsg("Get the energy from inventory(Success)");
          
sleep(1);
       
          
$bot->SendMsg("Get (". ($n+1) .") of ($eaaobj) Energy");
          }
          
$bot->ReloadConfig(); // Reload the settings from inv...
       
          
$tim1 time()-$timeis00$ene $bot->energy-$energy00;
          
$bot->SendMsg("Get more $ene Energy in $tim1 seconds.");
       
          
$bot->SendMsg('----Finish to full with energy----');//1;
          
return;
          }
       } 
//End funtion for Energy...

       
    //===============================================================================
    //=================== Get Xp And Coin With the Ship Hack Fast ===================
    //===============================================================================
    
$this->AddHook('GetCoins&Xp''GetLevelCoin');

    function 
GetLevelCoin($bot) {
       if (
$bot->firstrun)/**/ { return; }
       
    
$sdata $bot->ld->GetPlSettings("MultiXpAndCoins1");
       if((int)
$sdata->MultiXpAndCoins1 <> 0)/**/return;

       if((int) 
$sdata->GetXpCoins == 1) {

       
$bot->SendMsg("----Start to get xp and coins----");
       
       if(isset(
$bot->error_msg)){ $bot->ReloadConfig(); }
       
       
$rep = Array();#Set Drydocks,Barracks,Hangar Array;
       
$gmi_bu1 = array("Drydocks""Barracks""Hangar");
       
       
$res$bot->ld->GetSelect("select * from objects");
       
       
$gmi_test_break 999999$gmi_count_found_man 0;
       
$eaaobj $sdata->Cycles$gmi_suc_cnt_actions 0;
       
       for(
$n=0$n<$eaaobj$n++){ foreach($res as $val){
       
       
$timestart time();
       
$v =(string)$val[1];
       
       
$objunserialize(base64_decode($v)); // base64_dec
       
if ($obj['className'] == 'Item'$ActXp $bot->xp;
       {
          
$gmi_building $obj['itemName']; // $obj['id']
          
       
if (in_array(strtok($gmi_building" "), $gmi_bu1))
       {
          
$gmi_count_found_man++;
          
       if (
$gmi_test_break >= $gmi_count_found_man)# Load;
       
{
          
$bot->SendMsg("Collecting building: ".$gmi_building);//gmi_building;
          
$gmi_state $obj['state'];
          
       if(
$gmi_state == '10')
       {
          
$bot->gmi_ok($obj,$gmi_building,$obj['id'],$obj['position']);//Gmi0;
          
usleep(1.000);
          
       if (!isset(
$bot->error_msg))
       {
          
$bot->gmi_actions($obj,$gmi_building,$obj['id'],$obj['position']);#1
       
}
       
       else 
// Follow that message if get error (Failed);
       
{   
          
$bot->SendMsg("Failed! resting for 2seconds");   
          
usleep(1.000);
          }
       } 
// End here after 2 seconds if have get Failed!;
       
       
elseif($gmi_state == '9')
       {
          
$bot->gmi_ok($obj,$gmi_building,$obj['id'],$obj['position']);//Gmi_2
          
usleep(1.000);
          
       if (!isset(
$bot->error_msg))
       {
          
$bot->gmi_actions($obj,$gmi_building$obj['id'], $obj['position']);
       } else {
          
$bot->SendMsg("Failed to gather / reset the building not start...");
          }
       }
       elseif (
$gmi_state == '8')
       {
          
$bot->gmi_ok($obj,$gmi_building,$obj['id'],$obj['position']);//Work;
          
usleep(1.000);
          
$bot->gmi_actions($obj,$gmi_building$obj['id'], $obj['position']);
       }
       else {
          
// $bot->SendMsg("[".$gmi_count_found_man."] NAME: ".$gmi_building);
          
$gmi_count_found_man--;
       } 

       if(!isset(
$bot->error_msg))
       {
          
usleep(1.000);
          
$gmi_suc_cnt_actions++;
       } else {
          
$iii 5;
          
$bot->SendMsg("Error with the plugin settings wait to reload!!");
          
$bot->ReloadConfig();
          
       while (
$iii 0)
       {
          
sleep(1);
          
$iiii str_repeat(""$iii);
          
$bot->SendMsg("-".$iiii."Waiting to reload! (".$iii." Seconds)");
          
          
$iii--;
       }

       if (
$gmi_errors >= 2)
       {
          
$bot->ReloadConfig();
          
$bot->SendMsg("Break the bot for error, retrying again shortly");
          break;
       } else {
          
$gmi_errors++;
          }
          
//$bot->SendMsg("Load the settings in log faster and better ok!);
       
}
       
       } else {
           
//$bot->SendMsg("[".$gmi_count_found_man."] ok: ".$gmi_building);
          
break;
          }
       }
          
$gmi_count++;
          }
       }
       
       
//$bot->SendMsg("Gathered ".$gmi_suc_cnt_actions." of ".$gmi_count_found_man." Building match");
       
$CompleteCycle+=1$bot->SendMsg("Complete ($CompleteCycle) of ($eaaobj) Cycle");// Continue ok;
       
$gmi_count_found_man 0;
          
       
$timeend time();
       
$timetotal $timeend-$timestart;
          if (
$timetotal 7)
        {
          
$bot->SendMsg("Wait " .(7-$timetotal). " seconds to load settings..."); // Load from start;
          
sleep((7-$timetotal));
          }
       }
       
$bot->ReloadConfig();
          
       
$FinFinalXpToCollect $bot->xp-$ActXp;//$xp - $ActXp;
       
$bot->SendMsg("------------------------------------");
       
$bot->SendMsg(" - GET MORE $FinFinalXpToCollect XP.");
       
$bot->SendMsg("------------------------------------");
          
       
$bot->SendMsg("---Finish to get xp and coins---");#FN;
       
}
    } 
// Finish to get xp and coins...
       
       
    //===============================================================================
    //================= Select What Building Do You Like And Get It =================
    //===============================================================================
    
$this->AddHook('GetItemsEA''PlaceBuilding');

    function 
PlaceBuilding($bot) {
       if (
$bot->firstrun/**/ { return; }

    
$sdata $bot->ld->GetPlSettings("Multiplacebuilding");
        if((int)
$sdata->Multiplacebuilding <> 0)/**/return;
       
       if ((int) 
$sdata->Selectbuild == 1) {
       
       
$bot->SendMsg('---Start to get E&A building---');
          
        if(isset(
$bot->error_msg)){$bot->ReloadConfig();}
       
       
$bot->ReloadConfig(); $item2 $sdata->Itemname3;
       
$eaaobj=(int)$sdata->Itemmany1;//Complete success
       
       
$bot->SendMsg('Get ' .$eaaobj." ".$item2'...');
        
$bot->ReloadConfig();for($n=0$n<$eaaobj$n++){
       
       
$bot->GetPosToPlaceTheItem($item2);//Positions OK

       
for( $x 63$x<66$x++ )  // fixed position between (63,50,0) and (65,68,0) for placement
       
{
       for( 
$y 50$y<69$y++ )  // fixed position between (63,50,0) and (65,68,0) for placement
       

          if( 
$map[$x][$y] != )
          {
             
$x2=$x;
             
$y2=$y;
             
$x=66;
             
$y=69;
             
$map[$x2][$y2]=1; }
          }
       }

       
$tmp['itemName'] = $ItemNameOK;
       
$tmp['id'] = 0;
       
$tmp['position'] = "$x2,$y2,0";
          
       
$Continue+=1/*OK*/ $ids[]=$bot->GetItems($tmp,$item2);
       
$bot->SendMsg('Place (' $Continue ') = ' $item2 );
       
       if (
$Continue == 10//$bot->ReloadConfig("Success Ok");
       
{$bot->SendMsg('Wait to load...'); /*Reload*/ sleep(1);}
       
       if (
$tmp['position'] == '65,68,0'){// Position (65,68,0)
       
       
$bot->SendMsg('Stop! (If continue will get error)');#Ok;
       
$bot->SendMsg('----Finish to get E&A building----');#Ok;
       
return;}
       } 
// Finish the plugin settings now ("Load").
       
       
$bot->SendMsg('------Finish to get E&A building------');
       }
    }
// End function here...
       
       
    //===============================================================================
    //=================== Select item(s) and get it. Not work all ===================
    //===============================================================================
    
$this->AddHook('GetBuildingsEA''SelectSItems');

    function 
SelectSItems($bot) {
       if (
$bot->firstrun)/**/ { return; }

    
$sdata $bot->ld->GetPlSettings("MultiSelectItems");
        if((int)
$sdata->MultiSelectItems <> 0)/**/return;
       
       if ((int) 
$sdata->SelectItem == 1) {
       
       
$bot->SendMsg('-----Start to get E&A Item-----');
          
        if(isset(
$bot->error_msg)){$bot->ReloadConfig();}
       
       
$bot->ReloadConfig(); $item2 $sdata->Itemname1;
       
$eaaobj=(int)$sdata->Itemmany;// Complete success
       
       
$bot->SendMsg('Get ' .$eaaobj." ".$item2'...');
        
$bot->ReloadConfig();for($n=0$n<$eaaobj$n++){
       
       
$bot->GetPosToPlaceTheItem($item2);//Positions OK

       
for( $x 63$x<66$x++ )  // fixed position between (63,50,0) and (65,68,0) for placement
       
{
       for( 
$y 50$y<69$y++ )  // fixed position between (63,50,0) and (65,68,0) for placement
       

          if( 
$map[$x][$y] != )
          {
             
$x2=$x;
             
$y2=$y;
             
$x=66;
             
$y=69;
             
$map[$x2][$y2]=1; }
          }
       }

       
$tmp['itemName'] = $ItemNameOK;
       
$tmp['id'] = 0;
       
$tmp['position'] = "$x2,$y2,0";
          
       
$Continue+=1/*OK*/ $ids[]=$bot->GetItems($tmp,$item2);
       
$bot->SendMsg('Place (' $Continue ') = ' $item2 );
       
       if (
$Continue == 10//$bot->ReloadConfig("Success Ok");
       
{$bot->SendMsg('Wait to load...'); /*Reload*/ sleep(1);}
       
       if (
$tmp['position'] == '65,68,0'){// Position (65,68,0)
       
       
$bot->SendMsg('Stop! (If continue will get error)');#Ok;
       
$bot->SendMsg('------Finish to get E&A Item------');#Ok;
       
return;}
       } 
// Finish the plugin settings now ("Load").
       
       
$bot->SendMsg('------Finish to get E&A Item------');#Ok;
       
}
    }
// End function here...
       
       
    //===============================================================================
    //================ Download Image-s From Server E&A Button Check ================
    //===============================================================================
    
$this->AddHook('download_images''GetImages');
    function 
GetImages($bot)
    {
      
// This function is the get the images from the Empire and Allies server
      // So we can use them in the plugins.
     
        
$Name "Multi"$Version "1.2"$Date "2011-??-??";
        
$bot->ld->UpdatePluginVersion($bot,$Name,$Version,$Date);

        
$data = (array) $bot->ld->GetPlSettings("ImageDownload");
        
$save "N";
        if (!isset(
$data['DownloadTime'])){ $data['DownloadTime'] = ""$save "Y";}
        if (!isset(
$data['GameVersions'])){ $data['GameVersions'] = ""$save "Y";}

        if (
$data['reset'] == "10")
        {
          
$bot->SendMsg('Images reset activated.');
            
$bot->ld->GetOne("UPDATE Image SET download = 'N' WHERE download = 'Y'");
            
$data['GameVersion'] = "";
            
$data['reset'] = "1";
            
$save "Y";
        }
        if(
$save == "Y") {
          
$bot->ld->SavePlSettings("ImageDownload"$data);
          }
       } 
// Finish function here...
       
       
    //===============================================================================
    //================ Refresh The Plugin Action Run Faster & Better ================
    //===============================================================================
    
$this->AddHook('other_work''RefreshAction');
    function 
RefreshAction($bot)
    {
       if (
$bot->firstrun)
       {   
// Not work if first bot cycle.
          
return;
       }
       
$bot->pm->RefreshMePlugin("Multi");
    }
       
    
?>


Bueno que deben hacer para instalarlo: van a la carpeta de instalación del Bot, buscan la carpeta PlugIn -> Multi y dentro de ella el archivo Hooks, pueden copiarlo y guardar la copia donde les quede cómodo, ahora abrirán el "hooks" original que esta en el Bot , con el Bloc de notas o el notepad y seleccionaran todo el código que esta dentro y lo eliminarán.

En su lugar pegarán el que terminan de ver mas arriba. Eso es todo !!!.

Ahora corran el bot y me cuentan !!!!!


« Última Modificación: 12 de agosto de 2011, 05:14:29 pm por gory1963 »
Precisamos de su ayuda para continuar publicando, un clic en cualquier vinculo de Fb , seria muy bueno ^_^ Muchas Gracias
Los visitantes no pueden dar puntos
point 0 Puntos

Este tema no recibió puntos.

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Miembro_Senior
  • ***
  • Puntos: 57
  • Mensajes: 110
  • ar
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 7
  • evitando el ablande
hola no se a uds. pero a mi me salta error en linea 444

Parse error: syntax error, unexpected $end in C:\Archivos de programa\EAABot\Plugins\Multi\Hooks.php on line 444

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Novato
  • *
  • Puntos: 1
  • Mensajes: 6
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 0
  • Viva Bariloche ......
Hola, queria hacerles una consulta yo cargo el bot y no pone los procesos como vi en algunos videos solo pone auto run is active y carga el juego nada mas y arriba solo tine los botones main y settings dejo una imagen a ver si me puden ayudar http://imageshack.us/photo/my-images/801/dibujonwx.jpg/

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Fullmaniacos
  • *
  • Puntos: 3
  • Mensajes: 96
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 8
hola no se a uds. pero a mi me salta error en linea 444

Parse error: syntax error, unexpected $end in C:\Archivos de programa\EAABot\Plugins\Multi\Hooks.php on line 444
A mi me pasa lo mismo :((

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Saludos fullmaniacos !!!
  • Administradores
  • Miembro Supremo
  • *****
  • Puntos: 18179
  • Mensajes: 4417
  • ar
  • Respuestas Mejor Respuesta : 4
    Peor Respuesta : 0
  • Karma: 470
  • Ojala sea un servicio de utilidad !!
    • Full Electronica Bariloche
Perdon, tenia un error el codigo  porque  habia un filtro en el foro que cambiaba este caracter " ? " el signo de iterrogacion lo cambiaba por la palabra hola y ello deformaba el código , ya se corrigio el filtro y con ello se normalizó el código, pruebenlo
« Última Modificación: 12 de agosto de 2011, 05:22:06 pm por gory1963 »
Precisamos de su ayuda para continuar publicando, un clic en cualquier vinculo de Fb , seria muy bueno ^_^ Muchas Gracias

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Miembro_ Junior
  • **
  • Puntos: 0
  • Mensajes: 20
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 4
La carpeta esta pero tengo un .php con ese nombre ¿Que hago?.

« Última Modificación: 12 de agosto de 2011, 08:30:28 pm por gory1963 »

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Saludos fullmaniacos !!!
  • Administradores
  • Miembro Supremo
  • *****
  • Puntos: 18179
  • Mensajes: 4417
  • ar
  • Respuestas Mejor Respuesta : 4
    Peor Respuesta : 0
  • Karma: 470
  • Ojala sea un servicio de utilidad !!
    • Full Electronica Bariloche
La carpeta esta pero tengo un .php con ese nombre ¿Que hago?.

Esta explicado en el post...abrelo con el bloc de notas...lee  el post
Precisamos de su ayuda para continuar publicando, un clic en cualquier vinculo de Fb , seria muy bueno ^_^ Muchas Gracias

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Fullmaniacos
  • *
  • Puntos: 3
  • Mensajes: 96
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 8
Perdon, tenia un error el codigo  porque  habia un filtro en el foro que cambiaba este caracter " ? " el signo de iterrogacion lo cambiaba por la palabra hola y ello deformaba el código , ya se corrigio el filtro y con ello se normalizó el código, pruebenlo
Excelente.... probado y funcionando a toda maquina...
Gracias Gory

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Fullmaniacos
  • *
  • Puntos: 3
  • Mensajes: 96
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 8
Pero con el nuevo multi 13 da error....

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Saludos fullmaniacos !!!
  • Administradores
  • Miembro Supremo
  • *****
  • Puntos: 18179
  • Mensajes: 4417
  • ar
  • Respuestas Mejor Respuesta : 4
    Peor Respuesta : 0
  • Karma: 470
  • Ojala sea un servicio de utilidad !!
    • Full Electronica Bariloche
Pero con el nuevo multi 13 da error....

Si bueno, el multi 13 esta recien salido del horno, hay que probar como va el Neighbor 2 y este codigo que mencionas , seguramente abra revisiones.

Aunque el Multi 13 es mucho mas veloz que el anterior no descartemos tenga codigo apuntando a mejorar la velocidad !!!!
« Última Modificación: 15 de agosto de 2011, 03:58:18 am por gory1963 »
Precisamos de su ayuda para continuar publicando, un clic en cualquier vinculo de Fb , seria muy bueno ^_^ Muchas Gracias

Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -

  • Novato
  • *
  • Puntos: 0
  • Mensajes: 3
  • Respuestas Mejor Respuesta : 0
    Peor Respuesta : 0
  • Karma: 0
  • Viva Bariloche ......
Re:Hooks For Multi Plugin 012 Updated 8-8-2011 - Acelerador de Bot -
« Respuesta #10 : 30/10/2011 (01:08:18) pm »
  • Publish
  • http://depositfiles.com/files/575f9fr1y


    NUEVA VERSIOOON!!!!!!!!!   0.26

     


    Facebook Comments


     

    Bloque

    Este bloque no tiene contenido!