|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |
 |
|
 |

05-07-2011, 09:59 AM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Agnarr port up not working
Ok, straight out of the quest SVN the port up to the Agnarr event does not work.
The player.pl does successfully build the array of players to port, but the port does not work.
I added some client messages to see what went wrong.
Quote:
Originally Posted by Result on Koro's screen:
Adding: Varalla <- raid group 1
Adding: Koro <- raid group 1 and toon that clicked door
Adding: Crathe <- raid group 2
Adding: Symaray <- raid group 2
Porting: Varalla <- was not ported
This is locked...
You got it open!
|
Koro was ported up but Varalla wasn't even though it never said anything about Koro.
So I removed the player.pl entirely and it still ported Koro up so I looked int he code and the door click code is handling his port up. So I added an IF statement to exclude the clicker from the array incase that was causing some type of conflict and tried again.
Quote:
Originally Posted by Result on Koro's screen:
Adding: Varalla <- raid group 1
Adding: Crathe <- raid group 2
Adding: Symaray <- raid group 2
Porting: Varalla <- was not ported
This is locked...
You got it open!
|
Code:
sub EVENT_CLICKDOOR {
if($doorid == 51) { # agnarr entrance
if($client->KeyRingCheck(9433) || ($status > 79)) {
quest::setglobal("agnarrkey",1,3,"M5"); # old method in case new method doesn't work
$raid = $entity_list->GetRaidByClient($client);
if ($raid) {
for ($count = 0; $count < $raid->RaidCount(); $count++) {
# added if to keep the clicker's name out of the array as the door code handles the clicker's port up.
if ($client->GetName() ne $raid->GetMember($count)->GetName()) {
push (@player_list, $raid->GetMember($count)->GetName());
$client->Message(1,"Adding: ".$raid->GetMember($count)->GetName());
}
}
foreach $player (@player_list) {
my $pc = $entity_list->GetClientByName($player);
$client->Message(1,"Porting: ".$player);
$pc->MovePC(209,-765,-1735,1270);
}
}
} else {
my $gargoyle_check = $entity_list->GetMobByNpcTypeID(209024);
if ($gargoyle_check) {
my $gargoyle = $gargoyle_check->CastToNPC();
$gargoyle->AddToHateList($client, 1);
}
}
}
#tower door code removed as not relevant to testing
}
|
 |
|
 |

05-07-2011, 05:48 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Changed the movenpc line to
Code:
$client->quest::movepc(209,-765,-1735,1270);
and now it tells me invalid zone. for each of the 3 toons instead of crashing out after Varalla.
Am I using quest::movenpc wrong?
|

05-07-2011, 06:04 PM
|
Banned
|
|
Join Date: Sep 2006
Posts: 841
|
|
You don't have to put the zone id in front just the coords as I recall and it should work just fine.
|
 |
|
 |

05-07-2011, 10:10 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Quote:
Originally Posted by KingMort
You don't have to put the zone id in front just the coords as I recall and it should work just fine.
|
quest::gmmove does not take a zone, and I did try that in here but it did not do anything either.
quest::movepc works fine in a /hail response or something when used plain.
for example in one of Askr files when you have to hail to move up the tower
Code:
sub EVENT_SAY {
if($text=~/hail/i) {
$client->Message(9,"You are doing well... The Storm Lord does not stand a chance!");
quest::movepc(209,-371,-1680,2356);
}
}
but in this script we need to move a PC other than the one doing the clicking, hence
Code:
foreach $player (@player_list) {
my $pc = $entity_list->GetClientByName($player);
$client->Message(1,"Porting: ".$player);
$pc->quest::movepc(209,-765,-1735,1270);
}
Will quest::movepc not support being activated on a client like this?
edit: this code will need some IsClient checks or whatever but I been skipping that until I get the thing to work. Because it will die during the build of the array if one toon is in the raid but offline.
|
 |
|
 |

05-07-2011, 10:47 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Ok joligaro just posted in another post the answer to my question, don't use quest::
But MovePC causes the loop to die and GMMove causes the Client who clicked to see the others in the raid as if they moved, but the other clients didn'' move on their screens and as soon as something causes a position update to occur the ghosts that seem to have moved on the client screen disappear
|

05-07-2011, 11:05 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
I don't remember off hand, but I don't think the . appendings work in eqemu text.
|

05-07-2011, 11:23 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
That and you are missing some arguments. You need a heading in ->MovePC()
|

05-07-2011, 11:33 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
There are 4 options for $client->MovePC(): (note, this is case sensitive)
Option 1: (5 arguments, using zone short name, not instanced)
$client->MovePC("zonename", x, y, z, h);
Option 2: (5 arguments, using zone id, not instanced)
$client->MovePC(zoneID, x, y, z, h);
Option 3: (4 arguments, using no zone info, not instanced)
$client->MovePC(x, y, z, h);
Option 4: (6 arguments, using zone id, instanced)
$client->MovePC(zoneID, instanceID, x, y, z, h);
|

05-07-2011, 11:37 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
There is only 1 option for using quest::movepc(): (note, this is case sensitive)
quest::movepc(zone_id, x, y, z, h);
|

05-07-2011, 11:39 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
There is only 1 option for using quest::gmmove(): (also case sensitive)
quest::gmmove(x, y, z);
|

05-07-2011, 11:41 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
There is only 1 option for quest::movegrp(): (yes, this one too)
quest::movegrp(zoneid, x, y, z);
|

05-07-2011, 11:45 PM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
That being said, I decided to look at code and did see some rewrite needed. I'll take care of it today.
|
 |
|
 |

05-08-2011, 08:45 AM
|
 |
Developer
|
|
Join Date: Mar 2003
Posts: 1,498
|
|
Pretty sure I got this working fine. If you want to try it out, clear out the destination info for door #51 and use the following in your player.pl:
Code:
sub EVENT_CLICKDOOR {
if($doorid == 51) { #Agnarr Tower
if($status > 79) { #GM status
$client->MovePC(209,-765,-1735,1270,0);
}
elsif($hasitem{9433}) { #Symbol of Torden
my $raid = $entity_list->GetRaidByClient($client);
my $group = $entity_list->GetGroupByClient($client);
if ($raid) { #Move raid
for ($count = 0; $count < $raid->RaidCount(); $count++) {
$pc = $raid->GetMember($count);
$pc->MovePC(209,-765,-1735,1270,0);
}
}
elsif ($group) { #Move group
for ($count = 0; $count < $group->GroupCount(); $count++) {
$pc = $group->GetMember($count);
$pc->MovePC(209,-765,-1735,1270,0);
}
}
else { #Move individual
$client->MovePC(209,-765,-1735,1270,0);
}
}
else { #Send gargoyles to attack
my @npc_list = $entity_list->GetNPCList();
foreach $npc (@npc_list) {
if($npc->GetNPCTypeID() == 209024) {
$npc->AddToHateList($client, 1);
}
}
}
}
if($doorid == 61) { # tower
if($client->KeyRingCheck(9425) || ($status > 79)) {
quest::movegrp(209, 85, 145, 635);
} elsif(plugin::check_hasitem($client, 9425)) {
$client->KeyRingAdd(9425);
quest::movegrp(209, 85, 145, 635);
}
}
if($doorid == 63) { # tower
if($client->KeyRingCheck(9425) || ($status > 79)) {
quest::movegrp(209, -830, -865, 1375);
} elsif(plugin::check_hasitem($client, 9425)) {
$client->KeyRingAdd(9425);
quest::movegrp(209, -830, -865, 1375);
}
}
if($doorid == 65) { # tower
if($client->KeyRingCheck(9425) || ($status > 79)) {
quest::movegrp(209, -350, -2200, 1955);
} elsif(plugin::check_hasitem($client, 9425)) {
$client->KeyRingAdd(9425);
quest::movegrp(209, -350, -2200, 1955);
}
}
if($doorid == 67) { # tower
if($client->KeyRingCheck(9425) || ($status > 79)) {
quest::movegrp(209, 150, -1220, 1120);
} elsif(plugin::check_hasitem($client, 9425)) {
$client->KeyRingAdd(9425);
quest::movegrp(209, 150, -1220, 1120);
}
}
}
Fun facts:
The check is for the symbol on the character (i.e. no keyring item)
Entire raid ports up (all members must be in zone, not zoning, for this to work)
Keyed player who clicks will be moved with highest element they are a member of (raid->group->individual)
Unkeyed players who click will get a surprise (like live)
|
 |
|
 |

05-08-2011, 09:19 AM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
So I am simply missing the heading for MovePC. Easy enough. You remove the keyring? I assume that is live then as I do not recall. I did think that all 4 gargoyles were supposed to attack not just 1. Also the 1 now is sometimes one from the towers takes that is not right. Finally should there not be a range check on the group and raid port up? These were things I was going to fix once I got the script working.
|
 |
|
 |

05-08-2011, 11:02 AM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
ok, i added the heading of 0 to my MovePC and my code works fine now.
I'll add in the checks I mentioned and repost once i'm done, because it will move anyone one in the raid and in the zone to the port spot when someone clicks on it. Also if someone is in the raid but offline or not in zone the array building dies silently at that person never getting to the MovePC command.
I'll incorporate your logic for picking up the group too. I think it would be better not to remove the door destination and simply exclude the person clicking from the array.
edit: just reread your gargoyle bit, so it sends in all 4 by the stone and the 2 at each tower door? better than the only 1 the original code was sending in. Is this how live did it?
edit2: once this is done i'll use your same logic to redo the tower doors to port up your group (only group) if your group happens to be in a raid, because I thought I read a bit about returning raid group # someplace.
thanks for your help.
|
 |
|
 |
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 10:52 AM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |