Code:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(75);
}
}
sub EVENT_HP {
if ($hpevent == 75) {
quest::setnexthpevent(50);
$x1 = $npc->GetX();
$y1 = $npc->GetY();
$z1 = $npc->GetZ();
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
}
elsif ($hpevent == 50) {
quest::setnexthpevent(25);
$x1 = $npc->GetX();
$y1 = $npc->GetY();
$z1 = $npc->GetZ();
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
}
elsif ($hpevent == 25) {
$x1 = $npc->GetX();
$y1 = $npc->GetY();
$z1 = $npc->GetZ();
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
quest::spawn(999270,0,0,$x1,$y1,$z1);
}
}