View Single Post
  #4  
Old 07-02-2008, 12:56 PM
Striat
Sarnak
 
Join Date: Aug 2006
Posts: 60
Default

You'd obviously need to use a busy script in their somewhere and maybe check entity list for that bosses id to make sure he is up. But, just focusing on the other thing, addloot should work okay last I checked. One way is to use GroupCount. I personally modded it abit on my server to check for names in entity list rather than a quick numeric scan. One problem you may run into is that GroupCount takes into consideration the amount of people in the group regardless of whether they are in the zone or not last I checked. So, say you have a group of 6. But only 2 in the zone. Well, it'd return 6 and thus loot for 6.

There is another way to get aggro and generate a loot counter based on that. I've experienced flaws with pets and how aggro is handled with them.

Another method would be to use player.pl. You could generate a counter that way even. You could then have a global set for boss loot. And used group id as a global and have player.pl check if you're grouped against that group id to port you to the location. And then have a signal to the npc to addloot from the player file. I'll try to post an example later if you run into a problem. I would do it this way if possible to avoid potential error.

A revision including the groupcount could be:

Code:
sub EVENT_SAY {

my $bossmob = $entity_list->GetMobByNpcTypeID(212025);
if ($text =~/Hail/i) {
      if (!$busy && $bossmob) {
      quest::say("Hello, $name, are you [interested] in my challenge?.");
      }
      else {
      quest::say("Sorry, I cannot help you at this time.");
      }
}


if ($text =~/interested/i) {
      if (!$busy && $bossmob) {
      my $group = $client->GetGroup();
      if ($group) {
      my $loot = $group->GroupCount();
      }
      else {
      my $loot = 1;
      }
      quest::movegrp();
      quest::signalwith(212025,$loot,0);
      }
      else {
      quest::say("Sorry, I cannot help you at this time.");
      }
}

}

The Quest on the Boss NPC:
Code:
#NPCID 212025

sub EVENT_SIGNAL {
    quest::addloot(2845,$signal); 

}
Thats a starting point. You'd need to adjust the engaged/not engaged as well as busy variable and removing loot from an encounter when he is not engaged.
Reply With Quote