Quote:
Originally Posted by trevius
If you want to cast a spell on the entire group, it would be easiest to just get the group and cycle through each member having the NPC cast the spell on them. Though, if you only want group spells to land on the full group (and not single target), it would probably take a bit more work. I am not aware of any current commands to check if a spell is a group spell or not, but it would probably be really easy to add one to the source if needed.
Here is an example script (not tested) that includes a subroutine for casting a spell on the whole group. You could even add the sub into your plugins folder and make it into a plugin instead if you wanted so it can be accessed from any script (using plugin::CastOnGroup(SpellID, MaxDist))..
|
Thanx Trevius. Your right, it would be easiest to just get the group members
to cycle through, getting the buff from the NPC, which I really could live with
that. My whole problem started when using the $npc->CastSpell in a script.
It works fine if the spellid is a single buff (such as Spirit of Eagle). But if I
change the spellid to a group buff (such as Flight of Eagles), the NPC will go
through the anim of casting, but does not actually cast the spell.
The selfcast::(spellid) will work fine with any group buff like KEI, but not the
$npc->CastSpell
This is one of the scripts I am currently using;
sub EVENT_SAY {
if ($text =~/hail/i) {
quest::say("Incoming Clarity for $name");
my $GetPlayerID = $client->GetID();
$npc->CastSpell(1693, $GetPlayerID );
}
}
This script works perfect for any single target spell (SoW, Temp, etc)
But if I change the spellid from 1693 to 2570 (Koadic's Endless Intellect),
The NPC will not cast that spell or any other group spellid.
My goal, to start out with was having an NPC cast the KEI buff using the
$npc->CastSpell only because it casts a full timer buff duration, no matter
what level the character is.
This is when I found out, that command would not cast any group buff.