Ahh, I guess it is $npc after all. Maybe I was thinking of what it shows in the wiki as an example for using that object. Here is an example of one of the quests for SH that use SetHP and it definitely works without any bugs:
$npc->SetHP($hp_increase);
The $hp_increase variable in this case is just something we use for calculating how much to heal the NPC for when certain things happen. That should be replaced with the amount of Current (not max) HPs you want the NPC to have. So, if your NPC has a max of 1000 hps, you could set it to half health by doing:
$npc->SetHP(500);
|