Hmm I haven't had much luck with this kind of coding. Any thing wrong with this code? Guard doesn't say anything at all when in combat.
sub EVENT_COMBAT {
if($combat_state == 1){
my $cur_target = $npc->GetHateTop()->GetTarget();
if($cur_target) {
my $target_name = $cur_target->GetCleanName();
quest::say("Time to die $target_name!");
}
}
}
|