There is a sub event that already does that btw... you are just creating extra work for yourself
EVENT_KILLED_MERIT triggers for each client that was given CREDIT for the kill.
Example.. anyone in the raid / group, however, if you want it so that players can just run up and "tag" something while someone else is killing it.. that they get credit.
Meaning a non-grouped player could run around hitting mobs 1 time that other players are fighting and get credit with the way you have it written.
Changing to this would eliminate that.
Code:
sub EVENT_KILLED_MERIT {
if ($ulevel > 19) {
$client->SetEXP($client->GetEXP(), $client->GetAAExp()+1000);
}
}