[Idle/Unsolved]PKtele plugin ; syntax error
Posted: 06 May 2011, 23:05
i used to resolved the problem by my own but i can't find any ways to resolve it.
so anyone does have new pk tele plugins?
here's my old pk tele
the syntax error! thanks for helping me
so anyone does have new pk tele plugins?
here's my old pk tele
Code: Select all
package PKTele;
use strict;
use Time::HiRes qw(time);
use Globals;
use Plugins;
use Utils;
use Network::Send;
use Log qw(debug message warning error);
Plugins::register('PKTele', 'teleport from PK', \&onUnload);
my $hooks = Plugins::addHooks(
['is_casting', \&hookAvoidSkill, undef],
['packet_skilluse', \&hookAvoidSkill, undef],
['parseMsg/pre', \&hookAttack, undef]
);
sub onUnload {
Plugins::delHooks($hooks);
}
sub hookAvoidSkill {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $sourceID = $args->{sourceID};
my $targetID = $args->{targetID};
my $skillID = $args->{skillID};
if ($targetID eq $accountID &&
$sourceID ne $accountID &&
$players{$sourceID}) {
my $skill = new Skills(id => $skillID);
if (!existsInList($config{pkTele_exceptions},$skill->name)) {
main::useTeleport(1);
}
}
}
sub hookAttack {
return if ($char->{lv} < 51);
my $hookName = shift;
my $args = shift;
my $switch = $args->{switch};
my $msg = $args->{msg};
if ($switch eq "008A") {
# Attack
my ($ID1, $ID2, $tick, $src_speed, $dst_speed, $damage, $param2, $type, $param3) = unpack("x2 a4 a4 a4 L1 L1 s1 S1 C1 S1", $msg);
if ($type == 1) {
# Take item
} elsif ($type == 2) {
# Sit
} elsif ($type == 3) {
# Stand
} else {
# Attack
if ($ID2 eq $accountID &&
!$monsters{$ID1}) {
main::useTeleport(1);
}
}
}
}
return 1;
the syntax error! thanks for helping me