View Single Post
  #3  
Old 01-30-2009, 09:43 PM
merb
Sarnak
 
Join Date: Jul 2005
Location: Ohio
Posts: 72
Default

So this is basically what I've come up with:

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"?
__________________
Building Server
Legends of Time - Full Custom/Legit Roleplay, need devs
Reply With Quote