Plan to walk in lock map !
Moderator: Moderators
Re: Plan to walk in lock map !
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(
Re: Plan to walk in lock map !
You should add a text file name "planwalk.txt" into your control folder, even a empty text file !zCasanova wrote:
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(
The "planwalk.txt" format like this:
Code: Select all
[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
Re: Plan to walk in lock map !
Awesome, thanks.
Re: Plan to walk in lock map !
Does this plugin in compatible with CoreLogic.pm revision 7389 ?
I'v got an error with
In revision 7389 I have
I try to make some change but without sucess. What's wrong ?
Edit: Finaly, I modify the processRandomWalk function by merge:
I'v got an error with
Code: Select all
!$field->isCity
Code: Select all
!$cities_lut{$field{name}.'.rsw'}
Edit: Finaly, I modify the processRandomWalk function by merge:
Code: Select all
##### 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.
Re: Plan to walk in lock map !
The "!$field->isCity" is not my code.Amarock wrote:Does this plugin in compatible with CoreLogic.pm revision 7389 ?
I'v got an error withIn revision 7389 I haveCode: Select all
!$field->isCity
I try to make some change but without sucess. What's wrong ?Code: Select all
!$cities_lut{$field{name}.'.rsw'}
In the "sub processRandomWalk" of src/AI/CoreLogic.pm,
The 2 blocks of codes ad following, is the code I added:
Code: Select all
my %hookArgs;
$hookArgs{prefix} = "pref_RandomWalk";
$hookArgs{return} = 1;
Plugins::callHook('pref_RandomWalk', \%hookArgs);
if ($hookArgs{return}) {
Code: Select all
}
$hookArgs{prefix} = "post_RandomWalk";
$hookArgs{return} = 1;
Plugins::callHook('post_RandomWalk', \%hookArgs);
And the code lines whet you change.
Re: Plan to walk in lock map !
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.
sofax222, I have merge the existing function with your modification and it work now.
The CoreLogic.pm revision should not be the same.
Re: Plan to walk in lock map !
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".
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".
Re: Plan to walk in lock map !
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: I have updated OpenKore to the last version but I'm still in random Walk. There is no error message.
Edit 2:
With in config.txt, it's better
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: I have updated OpenKore to the last version but I'm still in random Walk. There is no error message.
Edit 2:
With
Code: Select all
autoPlanLockMapWalk 1
Re: Plan to walk in lock map !
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)
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)
Re: Plan to walk in lock map !
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.
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.