Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub EVENT_HP {
- my $target = $npc->GetHateRandom(); #gets random hate from the hatelist
- if ($hpevent <= 50 && $hpevent >= 49) { #check to make sure that a nuke or something wont skip the event
- 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.
- if ($target) {
- $npc->SpellFinished(6556, $target); #same spell as above for my sake :P
- }
- }
- if ($hpevent <= 25 && $hpevent >= 24) { #we declared this when mob hit 50%
- 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.
- $npc->SpellFinished(6556, $target);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment