Use "Task::UseSkill" Error Help!!

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderator: Moderators

Locked
Message
Author
yuranansam
Noob
Noob
Posts: 9
Joined: 25 Jan 2013, 06:19
Noob?: Yes

Use "Task::UseSkill" Error Help!!

#1 Post by yuranansam »

Code: Select all

sub processAutobuyingstore {
	if ($config{'BuyingStore'} && !AI::isIdle) {
		$timeout{ai_shop}{time} = time;
	}

	if ($config{'BuyingStore'} && AI::isIdle && $conState == 5 && !$char->{sitting} && timeOut($timeout{ai_shop}) && !$buyingstorestarted
		&& $field->baseName eq $config{'lockMap'} && !$taskManager->countTasksByName('OpenBuying')) {
		if ($config{'shop_useSkill'}) {
			my $skill = new Skill(auto => "ALL_BUYING_STORE");

			require Task::UseSkill;
			my $skillTask = new Task::UseSkill(
				actor => $skill->getOwner,
				skill => $skill,
				priority => Task::USER_PRIORITY
			);
			my $task = new Task::Chained(
				name => 'OpenBuying',
				tasks => [
					new Task::ErrorReport(task => $skillTask),
					Task::Timeout->new(
						function => sub {main::OpenBuying()},
						seconds => $timeout{ai_shop_useskill_delay}{timeout} ? $timeout{ai_shop_useskill_delay}{timeout} : 5,
					)
				]
			);
			$taskManager->add($task);
		} else {
			main::OpenBuying();
		}
	}
}
Error: Casting is supposed to be finished now, but nothing happened.

Locked