EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   $client->movepc? (https://www.eqemulator.org/forums/showthread.php?t=30868)

alphagnome 03-22-2010 06:49 PM

$client->movepc?
 
is there any equivalent client function like quest::movepc? I'm storing an array of client names and basically if a timer expires i want force a movepc on them all.

So basically.

-client enters proximity and added to list.
-timer starts
-if client exit proximity delete from list
-timer expires
-now move anyone still in the list away

so using:
$client = $entity_list->GetClientByName($namefromlist)

I can get the client I just don't know how to move them. Any ideas?

nenelan 03-22-2010 07:25 PM

$client->MovePC(zoneID, x, y, z, ignorerestrictions= 0, summoned= false)

http://www.eqemulator.net/wiki/wikka...a=QuestObjects
Above link has a nice list of all the objects you can use.

alphagnome 03-22-2010 07:34 PM

awesome thanks. are these functions case sensitive?

trevius 03-22-2010 08:01 PM

Yes, all quest objects are case sensitive.

alphagnome 03-22-2010 08:38 PM

hmm it doesnt seem to work.

Code:

$c = $entity_list->GetClientByName($player);

if ($c) {
          quest::say('Trying to move ' . $player);
          $c->MovePC(19, 456, 825, 9);
}

I see the say but no move occurs. Am I doing something wrong? I am using the current peq downloads. Is the function possibly disabled?

trevius 03-22-2010 08:43 PM

If you are using one of the entity list searches, you should just have to do something like this:

Code:

my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist)
 {
          my $ClientName = $ent->GetName();
          quest::say("Trying to move $ClientName.");
          $ent->MovePC(19, 456, 825, 9);
}


alphagnome 03-22-2010 08:59 PM

well I already have the names stored previously that is why I was using GetClientByName. The if($c) passes and I am able to do a $c->GetName() to verify I do indeed have the client but the move just fails. I will modify it to something more like you have and see if anything changes.

Thanks.

alphagnome 03-22-2010 10:56 PM

Quote:

Originally Posted by trevius (Post 185576)
If you are using one of the entity list searches, you should just have to do something like this:

Code:

my @clientlist = $entity_list->GetClientList();
foreach $ent (@clientlist)
 {
          my $ClientName = $ent->GetName();
          quest::say("Trying to move $ClientName.");
          $ent->MovePC(19, 456, 825, 9);
}


Ok I tried it like you said but same result. I don't know if the function is just broken. I guess I'll have to find a different way to do this. Has anyone else successfully used this function?

nenelan 03-22-2010 11:17 PM

Try $ent->MovePC(19, 456, 825, 9, 1);
It seems to require the ignore restrictions 0/1 flag.

alphagnome 03-22-2010 11:31 PM

Quote:

Originally Posted by nenelan (Post 185579)
Try $ent->MovePC(19, 456, 825, 9, 1);
It seems to require the ignore restrictions 0/1 flag.

That was it! you da man! :D

I had tried with $ent->MovePC(19, 456, 825, 9, 0, false); but didn't really know what they were for.

Thanks for the help guys.


All times are GMT -4. The time now is 01:08 PM.

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