I put this right on the npc script. It will put a marqee in the client window informing them of status update (plugin::MM)
Code:
sub EVENT_SAY {
if ($text=~/hail/i && $status == 0) {
my $actid = $client->AccountID();
UpdateStatus($actid,1);
plugin::MM("Greetings $name Your status has been set to 1.");
}
}
sub UpdateStatus {
my $idargument = $_[0];
my $statuslevel = $_[1];
my $dbh = plugin::MySQL_Connect();
my $query = "UPDATE account SET status = ".$statuslevel." WHERE id = ".$idargument.";";
$dbh->do($query);
$dbh->disconnect();
$client->UpdateAdmin();
}