Damn. yeah I ninja edited, and that's alot cleaner than what I had ultimate wrote out....... which is
Code:
sub EVENT_SAY
{
if($text=~/Hail/i)
{
my $testmob1 = ($entity_list->GetMobByNpcTypeID(2702460));
my $testmob2 = ($entity_list->GetMobByNpcTypeID(2702461));
my $testmob3 = ($entity_list->GetMobByNpcTypeID(2702462));
my $testmob4 = ($entity_list->GetMobByNpcTypeID(2702463));
my $hpcheck = $testmob1->GetHP();
my $hpcheck2 = $testmob2->GetHP();
my $hpcheck3 = $testmob3->GetHP();
my $hpcheck4 = $testmob4->GetHP();
if($hpcheck <= $hpcheck2 + $hpcheck * .10 && $hpcheck >= $hpcheck2 - $hpcheck * .10 )
{
quest::shout("Getting my Obama on");
}
else
{
quest::shout("We're out the asteroid field now $name");
}
if($hpcheck <= $hpcheck4 + $hpcheck * .10 && $hpcheck >= $hpcheck4 - $hpcheck * .10 )
{
quest::shout("Getting my Samuel L Jackson on");
}
else
{
quest::shout("We're out the asteroid field now $name");
}
if($hpcheck <= $hpcheck3 + $hpcheck * .10 && $hpcheck >= $hpcheck3 - $hpcheck * .10 )
{
quest::shout("Getting my Morgan Freeman on");
}
else
{
quest::shout("We're out the asteroid field now $name");
}
}
}