Buddywarrior wrote...
One is 'You cannot perform that action on a friendly target due to pvp settings'
When you have the following code:
AssignCommand(oCreature, ActionAttack(OBJECT_SELF));
Since you're assigning the command to oCreature, the ActionAttack is telling oCreature to attack itself! If you created a variable called oSelf that that set to be the calling object then you could use ActionAttack(oSelf) instead.
Buddywarrior wrote...
and a too many instructions error. I think my code is checking all areas. How can I solve this?
Let me ask you this: when does oCreature get updated to something BESIDES the first creature in the following code?
object oCreature = GetNearestObject(OBJECT_TYPE_CREATURE, OBJECT_SELF, i);
while (GetIsObjectValid(oCreature)) { AssignCommand(oCreature, ClearAllActions(TRUE)); AssignCommand(oCreature, ActionAttack(OBJECT_SELF)); i++;
}