squevis667
09-02-2011, 12:23 PM
I am having difficulty getting my buffbots to cast Group V2 type spells on players not in a group. If I have the characters ungrouped, the NPC just casts it on themselves. If I have them grouped, the NPC casts it on all of them no problem. My plugins folder is up to date with the latest SVN. Here is the part of the code that does the buffing:
sub EVENT_SAY {
if($text=~/hail/i){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with Ferocity [ferocity] and Spiritual Dominion [dominion] for free.");
}
if($text=~/ferocity/i){
$npc->SetAppearance(0);
$npc->CastSpell(3463, $userid);
quest::say("Casting Ferocity, Good hunting!");
}
if($text=~/dominion/i){
my $Group = $client->GetGroup();
my $GetPlayerID = $client->GetID();
if($Group){
$Group->CastGroupSpell($npc, 3460);
}
else {
$npc->CastSpell(3460, $GetPlayerID);
}
$npc->SetAppearance(0);
quest::say("Casting Spiritual Dominion, Good hunting!");
}
I based this off a snippet that several senior people said worked for their servers. I am running Rev 1887 with Bots. Any idea why this wont work for me?
sub EVENT_SAY {
if($text=~/hail/i){
$npc->SetAppearance(0);
quest::say("Hello $name, I can buff you with Ferocity [ferocity] and Spiritual Dominion [dominion] for free.");
}
if($text=~/ferocity/i){
$npc->SetAppearance(0);
$npc->CastSpell(3463, $userid);
quest::say("Casting Ferocity, Good hunting!");
}
if($text=~/dominion/i){
my $Group = $client->GetGroup();
my $GetPlayerID = $client->GetID();
if($Group){
$Group->CastGroupSpell($npc, 3460);
}
else {
$npc->CastSpell(3460, $GetPlayerID);
}
$npc->SetAppearance(0);
quest::say("Casting Spiritual Dominion, Good hunting!");
}
I based this off a snippet that several senior people said worked for their servers. I am running Rev 1887 with Bots. Any idea why this wont work for me?