Born2rot
08-26-2012, 07:24 PM
So I have a custom pet that is a buff bot that can be summoned from a clicky for 15 seconds. When he spawns he'll AE buff and then if anyone enters or leaves his area he'll buff them as well. It's got a cooldown on it, and it's nice for rebuffing while raiding. My issue is, for some reason he's not depoping anymore when the timer is up. Not sure what was changed. If anyone could help, thanks!
sub EVENT_SPAWN {
my $NPCName = $npc->GetCleanName();
$x = $npc->GetX();
$y = $npc->GetY();
$range = 25;
quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
quest::settimer("killbuff", 15);
quest::shout("WOOOO! Glad to be out of that freaking bottle! I'm sure if I was a dog I'd hump your leg right now I'm so happy! All those near me come get some buffs,
I feel I'm only here for a short time!");
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist)
{
$ent->SpellFinished(5278, $ent);
$ent->SpellFinished(5415, $ent);
$ent->SpellFinished(5312, $ent);
$ent->SpellFinished(5405, $ent);
$ent->SpellFinished(5521, $ent);
$ent->SpellFinished(5365, $ent);
$ent->SpellFinished(278, $ent);
$ent->SpellFinished(939, $ent);
$ent->SpellFinished(3360, $ent);
$ent->SpellFinished(25251, $ent);
}
}
sub EVENT_ENTER
{
quest::say("Feel my power!");
quest::selfcast(5278);
quest::selfcast(5415);
quest::selfcast(5312);
quest::selfcast(5405);
quest::selfcast(5521);
quest::selfcast(5365);
quest::selfcast(278);
quest::selfcast(939);
quest::selfcast(3360);
quest::selfcast(13);
quest::selfcast(25251);
}
}
sub EVENT_EXIT
{
quest::say("Feel my power!");
quest::selfcast(5278);
quest::selfcast(5415);
quest::selfcast(5312);
quest::selfcast(5405);
quest::selfcast(5521);
quest::selfcast(5365);
quest::selfcast(278);
quest::selfcast(939);
quest::selfcast(3360);
quest::selfcast(13);
quest::selfcast(25251);
}
sub EVENT_TIMER {
if($timer eq "killbuff") {
quest::shout("Crap! The magic is pulling me back into that stupid bottle.....!");
quest::depop();
quest::stoptimer("killbuff");
}
}
Goregut
sub EVENT_SPAWN {
my $NPCName = $npc->GetCleanName();
$x = $npc->GetX();
$y = $npc->GetY();
$range = 25;
quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
quest::settimer("killbuff", 15);
quest::shout("WOOOO! Glad to be out of that freaking bottle! I'm sure if I was a dog I'd hump your leg right now I'm so happy! All those near me come get some buffs,
I feel I'm only here for a short time!");
my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist)
{
$ent->SpellFinished(5278, $ent);
$ent->SpellFinished(5415, $ent);
$ent->SpellFinished(5312, $ent);
$ent->SpellFinished(5405, $ent);
$ent->SpellFinished(5521, $ent);
$ent->SpellFinished(5365, $ent);
$ent->SpellFinished(278, $ent);
$ent->SpellFinished(939, $ent);
$ent->SpellFinished(3360, $ent);
$ent->SpellFinished(25251, $ent);
}
}
sub EVENT_ENTER
{
quest::say("Feel my power!");
quest::selfcast(5278);
quest::selfcast(5415);
quest::selfcast(5312);
quest::selfcast(5405);
quest::selfcast(5521);
quest::selfcast(5365);
quest::selfcast(278);
quest::selfcast(939);
quest::selfcast(3360);
quest::selfcast(13);
quest::selfcast(25251);
}
}
sub EVENT_EXIT
{
quest::say("Feel my power!");
quest::selfcast(5278);
quest::selfcast(5415);
quest::selfcast(5312);
quest::selfcast(5405);
quest::selfcast(5521);
quest::selfcast(5365);
quest::selfcast(278);
quest::selfcast(939);
quest::selfcast(3360);
quest::selfcast(13);
quest::selfcast(25251);
}
sub EVENT_TIMER {
if($timer eq "killbuff") {
quest::shout("Crap! The magic is pulling me back into that stupid bottle.....!");
quest::depop();
quest::stoptimer("killbuff");
}
}
Goregut