Code:
sub EVENT_COMBAT {
if ($combat_state == 1) {
quest::setnexthpevent(75);
quest::setnexthpevent(50);
quest::setnexthpevent(25);
}
}
sub EVENT_HP {
if ($hpevent <= 75) {
$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) {
$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);
}
}
Now only the 75% event goes off. The 3 adds spawn, but at 50% and 25%, nothing happens. Any solution to this? I was thinking maybe taking out the "elsif"?