View Single Post
  #3  
Old 12-29-2010, 03:01 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Quote:
Originally Posted by joligario View Post
You may be looking for something like this? (Not tested)

Code:
sub EVENT_SAY {
  if (($text=~/hail/i) && ($ulevel<=60)) {
    quest::say("Sorry $name, your level is too low for my buffs.");
  }
  elsif (($text=~/hail/i) && ($ulevel=>61)) {
    my $Group = $client->GetGroup();
    if ($Group) {
      my $Valid = 1;
      for ($count = 0; $count < $Group->GroupCount(); $count++) {
        if ($Group->GetMember($count)-GetLevel() < 61) {
          $Valid = 0;
         }
      }
      if ($Valid == 1) {
        quest::say("Incoming Gallantry for $name's group.");
        $Group->CastGroupSpell($npc, 18323);
      }
      else {
        quest::say("Sorry $name, someone's level in your group is too low for my buffs.");
      }
    }
    else {
      quest::say("Incoming Gallantry for $name");
      quest::selfcast(18248);
    }
  }
}
Thank you joligario. I was just testing this out. The script will cast a single
buff on a toon 61+ when he's not grouped, and also give the "too low"
message to a lower toon that hails, but it won't cast the group buff, or
give any response, no matter what level the toons are in the group.
If the lower toon in the group hails, it gives the right message, but if the
61 toon hails, the npc won't cast or give any response.
I tried it with group toons, lvl 61 and 62, and the npc would not respond
or cast either.
Reply With Quote