-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcomboSpam.pl
More file actions
48 lines (39 loc) · 1 KB
/
comboSpam.pl
File metadata and controls
48 lines (39 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package comboSpam;
use strict;
use Plugins;
use Globals;
use Skills;
use Misc;
use Network;
use Network::Send;
use Utils;
use Time::HiRes qw(time usleep);
Plugins::register('comboSpam', 'spam combo packets', \&on_unload);
my $hook1 = Plugins::addHook('packet/actor_status_active', \&combo);
my $hook2 = Plugins::addHook('AI_pre', \&AI_pre);
my $combo = 0;
my $delay = .2;
my $time = time;
sub on_unload {
# This plugin is about to be unloaded; remove hooks
Plugins::delHook("packet/actor_status_active", $hook1);
Plugins::delHook("AI_pre", $hook1);
}
sub combo {
my ($packet, $args) = @_;
my ($type, $ID, $flag) = @{$args}{qw(type ID flag)};
if ($skillsStatus{$type} eq "Triple Attack Delay") {
$combo = $flag;
}
}
sub AI_pre {
my ($self, $args) = @_;
if ($combo && main::timeOut($time, $delay)) {
sendSkillUse($net, 272, 5, $accountID); # Chain Combo
if ($char->{spirits}) { # Make sure there is a spirit sphere
sendSkillUse($net, 273, 5, $accountID); # Combo Finish
}
$time = time;
}
}
1;