Try this:
Code:
$g = $client->GetGroup();
if(quest::istaskactive(504) && quest::istaskactivityactive(504,1)) {
if($text=~/hail/i) {
quest::shout("Ahhh the orcses they are after meeez");
#despawn gollum and respawn him at the next location
quest::depop(999303);
#spawn orc lieutants
quest::spawn(999204,0,0,-866.3,357.1,90.3);
#spawn gollum in dif loc
quest::spawn(999303,0,0,-1023.7,-344.3,7.5);
if(!$g) { #No Group
$client->UpdateTaskActivity(504, 1, 1);
quest::shout("It works");
}
## Find Group Members
else {
for($i = 0; $i < $g->GroupCount(); $i++) {
$c = $g->GetMember($i);
if($c) {
# Update the group task
$c->UpdateTaskActivity(504, 1, 1);
quest::shout("It works");
}
}
}
}
}