So far I managed to accomplished the things I wanted and just spam chain combo and combo finished while attacking.
Code: Select all
package comboSpam;
use strict;
use Time::HiRes qw(time usleep);
use IO::Socket;
use Text::ParseWords;
use Config;
eval "no utf8;";
use bytes;
use Globals;
use Skill;
use Modules;
use Settings;
use Log qw(message warning error debug);
use FileParsers;
use Interface;
use Network::Receive;
use Network::Send;
use Commands;
use Misc;
use Plugins;
use Utils;
use ChatQueue;
use Time::HiRes qw(time usleep);
Plugins::register('comboSpam', 'spam combo packets', \&on_unload);
my $hook1 = Plugins::addHook('AI_pre', \&AI_pre);
my $delay = .2;
my $time = time;
sub on_unload {
Plugins::delHook("AI_pre", $hook1);
}
sub AI_pre {
my ($self, $args) = @_;
if ( AI::action eq "attack") {
if ( main::timeOut($time, $delay)) {
sendSkillUse($net, 272, 5, $accountID);
if ($char->{spirits}) {
sendSkillUse($net, 273, 5, $accountID);
}
$time = time;
}
}
}
Thanks for the help!