Openkore.com

OpenKore Forums
It is currently 18 Nov 2018, 22:45

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Plan to walk in lock map !
PostPosted: 14 Mar 2011, 00:43 
Offline
Noob
Noob

Joined: 01 Jul 2009, 13:18
Posts: 19
Image

OpenKore version what-will-become-2.1
SVN revision: 7650
Loaded plugins:
plugins/Macro/macro.pl (macro)
plugins/petFeeder.pl (petFeeder)
plugins/planWalk.pl (planLockMapWalk)

Error message:
Cannot load control file planwalk.txt

Stack trace:
Trace begun at C:\KORE\src\Settings.pm line 438
Settings::loadByHandle(55) called at C:\KORE\plugins\planWalk.pl line 66
planLockMapWalk::on_start3('start3', undef, undef) called at src\Plugins.pm line 431
Plugins::callHook('start3') called at src\functions.pl line 287
main::loadDataFiles at src\functions.pl line 80
main::mainLoop at src\Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x12183e4)') called at openkore.pl line 97
main::__start at start.pl line 136

Died at this line:
$filename = $object->{name} || $object->{internalName} if (!defined $filename);
* if ($object->{type} == CONTROL_FILE_TYPE) {
FileNotFoundException->throw(


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 14 Mar 2011, 07:29 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
zCasanova wrote:
Image

OpenKore version what-will-become-2.1
SVN revision: 7650
Loaded plugins:
plugins/Macro/macro.pl (macro)
plugins/petFeeder.pl (petFeeder)
plugins/planWalk.pl (planLockMapWalk)

Error message:
Cannot load control file planwalk.txt

Stack trace:
Trace begun at C:\KORE\src\Settings.pm line 438
Settings::loadByHandle(55) called at C:\KORE\plugins\planWalk.pl line 66
planLockMapWalk::on_start3('start3', undef, undef) called at src\Plugins.pm line 431
Plugins::callHook('start3') called at src\functions.pl line 287
main::loadDataFiles at src\functions.pl line 80
main::mainLoop at src\Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x12183e4)') called at openkore.pl line 97
main::__start at start.pl line 136

Died at this line:
$filename = $object->{name} || $object->{internalName} if (!defined $filename);
* if ($object->{type} == CONTROL_FILE_TYPE) {
FileNotFoundException->throw(

You should add a text file name "planwalk.txt" into your control folder, even a empty text file !
The "planwalk.txt" format like this:
Code:
[cmd_fild06]
365:205
360:96
332:180
365:140
332:180
365:140
360:96

[um_fild02]
195:120
120:205
216:221
294:195
239:290
152:365
298:322
294:195
216:221
120:205
195:65
59:125
35:275
59:125
195:120
294,59
340:203
365:319
363:290
329:95


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 16 Mar 2011, 08:49 
Offline
Noob
Noob

Joined: 01 Jul 2009, 13:18
Posts: 19
Awesome, thanks.


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 19 Mar 2011, 05:01 
Offline
Noob
Noob

Joined: 26 Jun 2010, 15:37
Posts: 8
Location: France
Does this plugin in compatible with CoreLogic.pm revision 7389 ?

I'v got an error with
Code:
!$field->isCity


In revision 7389 I have
Code:
!$cities_lut{$field{name}.'.rsw'}


I try to make some change but without sucess. What's wrong ?

Edit: Finaly, I modify the processRandomWalk function by merge:
Code:
##### RANDOM WALK #####
sub processRandomWalk {
   if (AI::isIdle && (AI::SlaveManager::isIdle()) && $config{route_randomWalk} && !$ai_v{sitAuto_forcedBySitCommand}
      && (!$cities_lut{$field{name}.'.rsw'} || $config{route_randomWalk_inTown})
      && length($field{rawMap}) ) {

      my %hookArgs;
      $hookArgs{prefix} = "pref_RandomWalk";
      $hookArgs{return} = 1;
      Plugins::callHook('pref_RandomWalk', \%hookArgs);

      if ($hookArgs{return}) {
         my ($randX, $randY);
         my $i = 500;
         do {
            $randX = int(rand($field{width} + 1));
            $randX = int($config{'lockMap_x'} - $config{'lockMap_randX'} + rand(2*$config{'lockMap_randX'}+1)) if ($config{'lockMap_x'} ne '' && $config{'lockMap_randX'} ne '');
            $randY = int(rand($field{height} + 1));
            $randY = int($config{'lockMap_y'} - $config{'lockMap_randY'} + rand(2*$config{'lockMap_randY'}+1)) if ($config{'lockMap_y'} ne '' && $config{'lockMap_randY'} ne '');
         } while (--$i && !$field->isWalkable($randX, $randY));
         if (!$i) {
            error T("Invalid coordinates specified for randomWalk (coordinates are unwalkable); randomWalk disabled\n");
            $config{route_randomWalk} = 0;
         } else {
            message TF("Calculating random route to: %s(%s): %s, %s\n", $maps_lut{$field{name}.'.rsw'}, $field{name}, $randX, $randY), "route";
            ai_route($field{name}, $randX, $randY,
               maxRouteTime => $config{route_randomWalk_maxRouteTime},
               attackOnRoute => 2,
               noMapRoute => ($config{route_randomWalk} == 2 ? 1 : 0) );
         }
      }

      $hookArgs{prefix} = "post_RandomWalk";
      $hookArgs{return} = 1;
      Plugins::callHook('post_RandomWalk', \%hookArgs);
   }
}


Last edited by Amarock on 19 Mar 2011, 07:32, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 19 Mar 2011, 06:36 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
Amarock wrote:
Does this plugin in compatible with CoreLogic.pm revision 7389 ?

I'v got an error with
Code:
!$field->isCity


In revision 7389 I have
Code:
!$cities_lut{$field{name}.'.rsw'}


I try to make some change but without sucess. What's wrong ?


The "!$field->isCity" is not my code.
In the "sub processRandomWalk" of src/AI/CoreLogic.pm,
The 2 blocks of codes ad following, is the code I added:
Code:
      my %hookArgs;
      $hookArgs{prefix} = "pref_RandomWalk";
      $hookArgs{return} = 1;
      Plugins::callHook('pref_RandomWalk', \%hookArgs);

      if ($hookArgs{return}) {

And
Code:
      }

      $hookArgs{prefix} = "post_RandomWalk";
      $hookArgs{return} = 1;
      Plugins::callHook('post_RandomWalk', \%hookArgs);


So, could you give me the error message what you got !
And the code lines whet you change.


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 19 Mar 2011, 07:35 
Offline
Noob
Noob

Joined: 26 Jun 2010, 15:37
Posts: 8
Location: France
Sorry, I have edited my post but without send it :?

sofax222, I have merge the existing function with your modification and it work now.

The CoreLogic.pm revision should not be the same.


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 19 Mar 2011, 08:03 
Offline
Developers
Developers

Joined: 24 Nov 2010, 03:08
Posts: 214
Do you still mainten the revision 7386 ?
I start with SVN 7573...
But now, I upgrade to 7677.

So, I think the "!$cities_lut{$field{name}.'.rsw'}" is old code.
now is the "!$field->isCity".


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 19 Mar 2011, 09:28 
Offline
Noob
Noob

Joined: 26 Jun 2010, 15:37
Posts: 8
Location: France
Well, I'm not yet skilled with SVN, I'm thinking I was up to date (most icons are green) but It's seems I'm not.

I'm afraid to update and risk to lost all my configuration :?

Anyway I have to do because the plug-in doesn't work (I'm still with random walk).

Edit: :x I have updated OpenKore to the last version but I'm still in random Walk. There is no error message. :?:

Edit 2:
With
Code:
autoPlanLockMapWalk 1
in config.txt, it's better :geek:


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 05 Apr 2011, 02:59 
Offline
Noob
Noob

Joined: 04 Apr 2011, 18:56
Posts: 9
How do you stop the bot from going in and out of the portal when moving from outside aldeba_in to lockmap with this plugin?
Portal Exists: aldeba_in -> aldebaran (94, 38) - (0)
Calculating lockMap route to: Juno Field
Map Change: aldebaran.gat (197, 68)
Portal Exists: aldebaran -> aldeba_in (197, 70) - (0)
Map Change: aldeba_in.gat (94, 41)
Portal Exists: aldeba_in -> aldebaran (94, 38) - (0)
Calculating lockMap route to: Juno Field(yuno_fild11)
Map Change: aldebaran.gat (197, 68)
Portal Exists: aldebaran -> aldeba_in (197, 70) - (0)
Map Change: aldeba_in.gat (94, 41)
Portal Exists: aldeba_in -> aldebaran (94, 38) - (0)


Top
 Profile  
 
 Post subject: Re: Plan to walk in lock map !
PostPosted: 06 Apr 2011, 06:45 
Offline
Noob
Noob

Joined: 31 Mar 2011, 22:35
Posts: 10
I wander if this plugins use at master bot with setting of FollowBot enable.
When slave bot call master bot,the next route will jump to another one without reach the route destination.
If the slave calls more then the route will jump more.
Will it possible to make it stick the next route without jumping to another one, then try to reach to that destination after slave call complete.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 34 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group