View Single Post
  #11  
Old 06-04-2012, 09:58 PM
nilbog nilbog is offline
Project Manager

nilbog's Avatar

Join Date: Oct 2009
Posts: 14,641
Default

So Tserrina's master key should work for any mirror in the zone? (Including the non-7th floor mirrors?). i.e. Can I zone in, go to right portal, click it with Tserrina's Key and be on floor 2?

In the mirror room on floor 7, must you click the mirrors with keys to be transported to the respective level? Or are no keys required? Should the individual keys be required to click 7th floor mirrors/does Tserrina's key work for these?

Here's an example of a possible script for the doors. Since the click is to move players within the keyholders group, I'm using perl. Script borrowed heavily from Shin Noir on eqemulator.

Code:
sub EVENT_CLICKDOOR {
    if ($client->IsGrouped()) {
        my $destx = 0;
        my $desty = 0;
        my $destz = 0;
        my $d_id = ($doorid % 256);
        if ($d_id == 2) { #First Floor Door 
            if ($oncursor(20033)) {
                $destx = 660;
                $desty = 100;
                $destz = 40;
            }
        }
        if  ($d_id == 4) { #Second Floor Door
            if ($oncursor(20034)) {
                $destx = 670;
                $desty = 750;
                $destz = 75;
            }
        }
        if  ($d_id == 16) { #Third Floor Door
            if ($oncursor(20035)) {
                $destx = 170;
                $desty = 755;
                $destz = 175;
                $desth = 0;
            }
        }
        if  ($d_id == 27) { #Fourth Floor Door
            if ($oncursor(20036)) {
                $destx = -150;
                $desty = 160;
                $destz = 217;
            }
        }
        if  ($d_id == 34) { #Fifth Floor Door
            if ($oncursor(20037)) {
                $destx = -320;
                $desty = 725;
                $destz = 12;
            }
        }
        if  ($d_id == 157) { #6b Gem
            if ($oncursor(20038)) {
                $destx = 20;
                $desty = 250;
                $destz = 355;
            }
        }
        if  ($d_id == 1) { #Left portal on 1st level to 7th
            if ($oncursor(20039)) { #tserrina master key
                $destx = 20;
                $desty = 250;
                $destz = 355;
            }
        }
        if ($destx != 0) {
            my $tmpclient = 0;
            for ($i = 0; $i < 2000; $i++) {
                $tmpclient = $entity_list->GetClientByID($i);
                if (defined($tmpclient)) {
                    if ($tmpclient->GetGroup()->IsGroupMember($client) #Grouped with key holder?
                        && $tmpclient->CalculateDistance($client->GetX(), $client->GetY(), $client->GetZ()) < 40) {
                        $tmpclient->CastToClient()->MovePC(111, $destx, $desty, $destz, 0);
                    }
               }
               undef($tmpclient);
            }
        }
   }
}
If that gives you an idea, I need to be as specific as possible.
Last edited by nilbog; 06-05-2012 at 02:24 PM..