Ah, I just noticed that a task can be interrupted via $task->interrupt, and resumed via $task->resume. This might work! But right now I'm getting a "Task 'Route' (class Task::Route) has status INTERRUPTED, but should be RUNNING" message. Is there any work around?
Code: Select all
OpenKore version what-will-become-2.1
@ai_seq = route
Network state = 5
Network handler = Network::XKore
SVN revision: 7429
Loaded plugins:
plugins/arrowCraft.pl (arrowCraft)
plugins/breakTime.pl (breakTime)
plugins/chatDomains.pl (chatDomains)
plugins/geographer.pl (geographer)
plugins/macro.pl (macro)
plugins/macroinclude.pl (macroinclude)
plugins/monsterDB.pl (monsterDB)
Error message:
Task 'Route' (class Task::Route) has status INTERRUPTED, but should be RUNNING. Object details:
$VAR1 = bless( {
'attackID' => undef,
'time_start' => '1285654028.71441',
'LOSSubRoute' => undef,
'stage' => 'Walk the Route Solution',
'T_priority' => 500,
'dest' => {
'map' => 'iz_dun04',
'pos' => {
'y' => 134,
'x' => 115
}
},
'avoidWalls' => 1,
'ST_autostop' => 1,
'ST_subtask' => bless( {
'giveup' => {
'time' => '1285654029.52629',
'timeout' => '1.5'
},
'T_priority' => 500,
'ST_autofail' => 1,
'start_time' => '1285654029.52629',
'x' => 115,
'ST_autostop' => 1,
'ST_manageMutexes' => undef,
'T_name' => 'Move',
'retry' => {
'time' => '1285654030.03364',
'timeout' => '0.5'
},
'y' => 134,
'interruptionTime' => '1285654030.36972',
'T_status' => 2,
'T_onStop' => bless( [], 'CallbackList' ),
'T_onMutexesChanged' => bless( [], 'CallbackList' ),
'mapChangedHook' => bless( [
\'Network::Receive::map_changed',
3
], 'Plugins::HookHandle' ),
'T_mutexes' => [
'movement'
]
}, 'Task::Move' ),
'ST_manageMutexes' => undef,
'time_step' => '1285654028.71482',
'T_name' => 'Route',
'old_y' => 126,
'T_onStop' => bless( [], 'CallbackList' ),
'T_mutexes' => [
'movement'
],
'noSitAuto' => undef,
'ST_autofail' => 0,
'mapChanged' => undef,
'maxTime' => '75',
'new_y' => 134,
'index' => 15,
'new_x' => 115,
'old_x' => 108,
'interruptionTime' => '1285654030.36973',
'T_status' => 2,
'T_onMutexesChanged' => bless( [], 'CallbackList' ),
'attackOnRoute' => 2,
'mapChangedHook' => bless( [
$VAR1->{'ST_subtask'}{'mapChangedHook'}[0],
2
], 'Plugins::HookHandle' )
}, 'Task::Route' );
Stack trace:
Task 'Route' (class Task::Route) has status INTERRUPTED, but should be RUNNING. Object details:
$VAR1 = bless( {
'attackID' => undef,
'time_start' => '1285654028.71441',
'LOSSubRoute' => undef,
'stage' => 'Walk the Route Solution',
'T_priority' => 500,
'dest' => {
'map' => 'iz_dun04',
'pos' => {
'y' => 134,
'x' => 115
}
},
'avoidWalls' => 1,
'ST_autostop' => 1,
'ST_subtask' => bless( {
'giveup' => {
'time' => '1285654029.52629',
'timeout' => '1.5'
},
'T_priority' => 500,
'ST_autofail' => 1,
'start_time' => '1285654029.52629',
'x' => 115,
'ST_autostop' => 1,
'ST_manageMutexes' => undef,
'T_name' => 'Move',
'retry' => {
'time' => '1285654030.03364',
'timeout' => '0.5'
},
'y' => 134,
'interruptionTime' => '1285654030.36972',
'T_status' => 2,
'T_onStop' => bless( [], 'CallbackList' ),
'T_onMutexesChanged' => bless( [], 'CallbackList' ),
'mapChangedHook' => bless( [
\'Network::Receive::map_changed',
3
], 'Plugins::HookHandle' ),
'T_mutexes' => [
'movement'
]
}, 'Task::Move' ),
'ST_manageMutexes' => undef,
'time_step' => '1285654028.71482',
'T_name' => 'Route',
'old_y' => 126,
'T_onStop' => bless( [], 'CallbackList' ),
'T_mutexes' => [
'movement'
],
'noSitAuto' => undef,
'ST_autofail' => 0,
'mapChanged' => undef,
'maxTime' => '75',
'new_y' => 134,
'index' => 15,
'new_x' => 115,
'old_x' => 108,
'interruptionTime' => '1285654030.36973',
'T_status' => 2,
'T_onMutexesChanged' => bless( [], 'CallbackList' ),
'attackOnRoute' => 2,
'mapChangedHook' => bless( [
$VAR1->{'ST_subtask'}{'mapChangedHook'}[0],
2
], 'Plugins::HookHandle' )
}, 'Task::Route' );
at src/AI/CoreLogic.pm line 739
AI::CoreLogic::processTask('route', 'onError', 'CODE(0x3ea17c4)') called at src/AI/CoreLogic.pm line 88
AI::CoreLogic::iterate() called at src/functions.pl line 749
main::mainLoop_initialized() called at src/functions.pl line 69
main::mainLoop() called at src/Interface.pm line 75
Interface::mainLoop('Interface::Console::Win32=HASH(0x3ff383c)') called at openkore.pl line 97
main::__start() called at start.pl line 125
Thanks...