-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathavoidGutterLines.pl
More file actions
50 lines (44 loc) · 1.27 KB
/
avoidGutterLines.pl
File metadata and controls
50 lines (44 loc) · 1.27 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
49
50
#############################################################################
# avoidGutterLines plugin by revok
#
# Openkore: http://openkore.com/
# Openkore Brazil: http://openkore.com.br/
#
# 05:15 sexta-feira, 6 de janeiro de 2012
#
# Usage:
# # bRO: Impacto de Tyr
# attackSkillSlot Bowling Bash {
# avoidGutterLines 1
# }
#
# This source code is licensed under the
# GNU General Public License, Version 3.
# See http://www.gnu.org/licenses/gpl.html
#############################################################################
package avoidGutterLines;
use strict;
use Config;
eval "no utf8;";
use Globals;
use Log qw(message warning error debug);
use Misc;
use Plugins;
Plugins::register('avoidGutterLines', 'avoid using bowling bash inside gutterlines', \&onUnload);
my $hooks = Plugins::addHooks(
['avoidGutterLines', \&avoidGutterLines, undef],
);
sub onUnload {
Plugins::delHooks($hooks);
}
sub avoidGutterLines {
my (undef, $args) = @_;
my $prefix = $args->{prefix};
if ($config{$prefix."_avoidGutterLines"}) {
my $pos = main::calcPosition($char);
if ($pos->{x}%40 <= 4 || $pos->{y}%40 <= 4) {
$args->{return} = 0;
}
}
}
return 1;