Capheus
07-16-2009, 09:06 AM
Another one I put on my bot. This will move you to any player in the zone.
#goto (playername)
sub EVENT_SAY {
if($text=~/goto/i){
$here = 0;
$mee = $client;
$zid = $zoneid;
@word = split /\s+/, $text;
$go = $word[1];
quest::say("Looking for $go...");
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();
if ($person =~ /$go/i) {
$mee->MovePC($zid,$cx,$cy,$cz,0);
$here = 1;
}
}
}
if ($here == 0) {
quest::say("I can't find $go. He/She may not be in the zone anymore.");
}
}
}
#goto (playername)
sub EVENT_SAY {
if($text=~/goto/i){
$here = 0;
$mee = $client;
$zid = $zoneid;
@word = split /\s+/, $text;
$go = $word[1];
quest::say("Looking for $go...");
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();
if ($person =~ /$go/i) {
$mee->MovePC($zid,$cx,$cy,$cz,0);
$here = 1;
}
}
}
if ($here == 0) {
quest::say("I can't find $go. He/She may not be in the zone anymore.");
}
}
}