EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Custom (https://www.eqemulator.org/forums/forumdisplay.php?f=671)
-   -   List players by name and loc in a zone (https://www.eqemulator.org/forums/showthread.php?t=28569)

Capheus 06-14-2009 11:37 AM

List players by name and loc in a zone
 
Always was frustrated by trying to find and get to players in a zone. Tracking only works so good so I took some scriptwork that Kayen did for AE Rampage and Trevius' Thanksgiving event. I assigned this to my bot and it outputs all players in the zone with their locations.

Code:

#list Players by name and location in the zone

sub EVENT_SAY {

  if($text=~/client/i) {
        quest::settimer("pc",2);
        quest::say("Working on it.....");
        }
}

sub EVENT_TIMER {

  if ($timer eq "pc") {
 
  my $list_check = 0;

  for ($list_check = 0; $list_check < 2000; $list_check++) {

  $client_search = $entity_list->GetClientByID($list_check);
   
    if ($client_search) {
            my $cx = int($client_search->GetX());
        my $cy = int($client_search->GetY());
        my $cz = int($client_search->GetZ());
        $person = $client_search->GetCleanName();
        quest::say("$person is at___$cx,___$cy,___$cz");
    }
    }
    }
        quest::stoptimer("pc");
}



All times are GMT -4. The time now is 02:14 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.