View Single Post
  #5  
Old 01-14-2009, 08:45 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

LOL, apparently I was making the MoveGroup quest object up. I don't see it in the list of quest objects. Try MovePC(152,0,0,-31) and verify that it works to move single characters with that script.

I thought that there was a quest object to move groups, but it looks like there are only normal quest:: commands for it. You could try quest::movegrp(152,0,0,-31), but I am not sure that will work if you are using quest objects to get the client. Worth a shot though.

Edit: After looking at the quest objects some more, maybe this one will work:

Code:
$client_search->TeleportGroup($npc, 152, 0, 0, -31);
I haven't messed with the group quest objects much, so you probably need to get the client's group first. If so, maybe something like this would work:

Code:
my $clientgroup = $client_search->GetGroup();
quest::say("I found that client $client_search is in group $clientgroup");
$clientgroup->TeleportGroup($npc, 152, 0, 0, -31);
If that works, let me know, because I have been wanting to figure out how to do that group stuff for a while lol. I just haven't had much time to look into it and didn't really think about doing it this way before. If the above doesn't work for players who aren't in a group, maybe you could do something like this:

Code:
my $clientgroup = $client_search->GetGroup();
if($clientgroup) {
  quest::say("I found that client $client_search is in group $clientgroup");
  $clientgroup->TeleportGroup($npc, 152, 0, 0, -31);
}
else {
  quest::say("I found client $client_search, but they are not grouped");
  $client_search->MovePC(152,0,0,-31);
}
And, if none of the above works, you may need to cast it to client first. So, maybe something like this would work:

Code:
my $gotclient = $client_search->CastToClient();
quest::say("I found client $client_search and cast them to client, which outputs this: $gotclient");

my $clientgroup = $gotclient->GetGroup();
if($clientgroup) {
  quest::say("I found that client $client_search is in group $clientgroup");
  $clientgroup->TeleportGroup($npc, 152, 0, 0, -31);
}
else {
  quest::say("I found client $client_search, but they are not grouped");
  $gotclient->MovePC(152,0,0,-31);
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 01-15-2009 at 05:03 AM..
Reply With Quote