Tacvi type quest
Alrighty, I'm stumped as to how to get multiple npc's to be able to balance within +|- 10%. I
Code:
sub EVENT_SAY Basically what I am looking for is, how to tell a range between + 10% and -10%... would something like this work? Code:
if($hpcheck <= $hpcheck2 + $hpcheck * .10 && $hpcheck >= $hpcheck2 - $hpcheck2 * .10 ) |
Have a variable to store the actual percentage, then use smart match operator ~~ with range.
I think. I'm not sure of what logic you're looking to use. What is your ultimate goal? Perhaps you explained it clearly the first time, I'm contending a stuffed up and drugged head atm. Is it, you wish to check the condition of the hp of one mob being within 10 percent of the comparison mob? If that's the case, the script/logic will need to take into account what the mobs maximum hp is, which I dont currently see referenced. |
Quote:
|
smart match operator with range operator wasn't working for me. i don't know why. this works, however.
Code:
use 5.012; |
ok, i think i sorted out why. i wasn't enclosing the range in brackets.
Code:
if ( $mid ~~ [ $min .. $max ] ) { say "YAY!"; } |
Damn. yeah I ninja edited, and that's alot cleaner than what I had ultimate wrote out....... which is
Code:
sub EVENT_SAY |
All times are GMT -4. The time now is 10:35 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.