View Single Post
  #2  
Old 06-21-2013, 09:12 AM
Dunge0nMastr
Hill Giant
 
Join Date: Oct 2002
Location: Rockville, MD
Posts: 124
Default

ive had similar issues, my workaround with getting NPCs to cast spells in event situations (boss fights etc) was using this:

Code:
my $target = #see list below

if ($target) {
$npc->SpellFinished(spellid,$target);
}
just use that within, sub event hp, timers, etc.

for targets the list is pretty long of what you can do. but if for example you want top threat, $npc->GetHateTop(); etc. U can dig through the wiki for examples of these objects.

u can also have a single target spell hit everyone in raid regardless of positioning and stuff too (fun for % damage stuff :P).

using:
Code:
	my @Hatelist = $npc->GetHateList();
	foreach $i(@Hatelist) {
		if ($i) {
			my $hent = $i->GetEnt();
			if ($hent) {
				$npc->SpellFinished(spellid,$hent);
				}
			}
		}
so can set up an array for all client entities within the zone, or on the mobs hatelist etc.

for beneficial stuff - buff bots etc. I found the best way to do it was simply use: quest::selfcast(spellid);
__________________
Bront -Server Admin/Owner and Lead Quest Dev for Kildrukaun's Prophecy
http://kpemu.com/
Reply With Quote