Try changing this:
Code:
SetHP($client->GetMaxHP());
To this:
Code:
$client->SetHP($client->GetMaxHP());
Those HP related objects do work for NPCs and Players. That is why it is in the "mob" section of that wiki page. The "npc" section is for NPCs only, and the "client" section is for clients only, but the "mob" section is for both clients and NPCs.