Got it working, for future reference if anyone needs it:
Code:
sub EVENT_AGGRO {
quest::shout("I was aggroed");
quest::settimer("random_nuke", 8);
quest::settimer("random_dot", 11);
quest::settimer("random_stun", 3);
}
sub EVENT_TIMER {
if ($timer eq "random_stun"){
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
my $RandClient = $entity_list->GetRandomClient($x, $y, $z, 400, 0);
my $RandName = $RandClient->GetName();
my $RandID = $RandClient->GetID();
$npc->CastSpell(5050,$RandID);
quest::shout("Be stunned $RandName");
}
if ($timer eq "random_nuke"){
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
my $RandClient = $entity_list->GetRandomClient($x, $y, $z, 400, 0);
my $RandName = $RandClient->GetName();
my $RandID = $RandClient->GetID();
$npc->CastSpell(5075,$RandID);
quest::shout("Be nuked $RandName");
}
if ($timer eq "random_dot"){
$x = $npc->GetX();
$y = $npc->GetY();
$z = $npc->GetZ();
my $RandClient = $entity_list->GetRandomClient($x, $y, $z, 400, 0);
my $RandName = $RandClient->GetName();
my $RandID = $RandClient->GetID();
$npc->CastSpell(5049,$RandID);
quest::shout("Be dotted $RandName");
}
}