Try this for the NPC:
Code:
sub EVENT_SPAWN {
$npc->TempName("");
quest::settimer("armor", 30);
}
sub EVENT_TIMER {
if ($timer eq "armor") {
my @clientlist = $entity_list->GetClientList();
my @itemlist = (0000,0000,0000,0000,0000,0000,0000,0000);
foreach $c (@clientlist) {
if (plugin::check_hasitemequipped($c, @itemlist)) {
$c->Message(315, "Your armor protects you from harm.");
}
else {
$c->CastSpell(7026, $c->GetID());
quest::ze(4, $c->GetCleanName() . " suffers in the throes of anguish.");
}
}
}
}
Try this for the plugin:
Code:
sub check_hasitemequipped {
my $client = shift;
my @itemlist = shift;
foreach $item (@itemlist) {
for ($i = 0; $i <= 22; $i++) {
if ($i == 22) {
$i == 9999;
}
if ($client->GetItemIDAt($i) == $item) {
return 1;
}
}
}
return 0;
}
EDIT: Slot information can be found
here.