Guest User

Untitled

a guest
Jun 26th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.87 KB | None | 0 0
  1. sub EVENT_HP {
  2. my $target = $npc->GetHateRandom(); #gets random hate from the hatelist
  3. if ($hpevent <= 50 && $hpevent >= 49) { #check to make sure that a nuke or something wont skip the event
  4. quest::setnexthpevent(25); #this sets the $hpevent values.  you would have to declare this earlier in your script, say when mob is aggroed for the 50% one to kick in, and yeah its by percentages.
  5.      if ($target) {
  6.           $npc->SpellFinished(6556, $target); #same spell as above for my sake :P
  7.           }
  8.      }
  9. if ($hpevent <= 25 && $hpevent >= 24) { #we declared this when mob hit 50%
  10.      if ($target) { #since we are using same target, should work just fine, could redeclare the variable as a different target (random, top etc) but then we would include them within each $hpevent, as opposed to the top of the sub.
  11.           $npc->SpellFinished(6556, $target);
  12.           }
  13.      }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment