Huppy
12-07-2010, 01:39 AM
I've been trying to get this buff bot script (idea from Trevius) to check
for level and not cast the spell if character is not meeting $ulevel.
The script works good, as long as the character is grouped, but if not,
(in the "else"), it doesn't check for level and casts the spell anyways.
My intentions (for example) is not letting the character get a buff like
KEI, when it is less than level 45.
sub EVENT_SAY {
if (($text =~/hail/i)&&{$ulevel=>45}) {
my $Group = $client->GetGroup();
if($Group) {
$Group->CastGroupSpell($npc, 2570)
}
else {
my $GetPlayerID = $client->GetID();
quest::selfcast(2570);
}
quest::say("Incoming KEI for $name");
}
}
for level and not cast the spell if character is not meeting $ulevel.
The script works good, as long as the character is grouped, but if not,
(in the "else"), it doesn't check for level and casts the spell anyways.
My intentions (for example) is not letting the character get a buff like
KEI, when it is less than level 45.
sub EVENT_SAY {
if (($text =~/hail/i)&&{$ulevel=>45}) {
my $Group = $client->GetGroup();
if($Group) {
$Group->CastGroupSpell($npc, 2570)
}
else {
my $GetPlayerID = $client->GetID();
quest::selfcast(2570);
}
quest::say("Incoming KEI for $name");
}
}