Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Submissions

Quests::Submissions This is where you submit your quests for review

Reply
 
Thread Tools Display Modes
  #1  
Old 10-01-2009, 11:42 AM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 506
Default Group Teleport in ToFS.

Sadly, I couldn't mirror the functionality of checking one's cursor for a key item at initial entry. Code should be like this:
$client->CastToClient()->GetInv().GetItem(30) == 20033
However, the method GetInv() was returning perl runtime errors. This is nearly an exact replica of the code found in doors.cpp line 211
Code:
const ItemInst *lockpicks = sender->GetInv().GetItem(SLOT_CURSOR);
What does this mean? until resolved, this code will teleport group members only if the key is inside your key ring. (this occurs after you use the key the first time). Once the above is resolved, it will teleport when you first use from cursor, or via key ring.
I use a 40 meter range verification from the location of the player who has the key (mainly because getting the door's location was kind of annoying via script).

Put this in your quests\frozenshadow\player.pl file (probably will have to create it).

Code:
#Tower of Frozen Shadow Group-Based Teleporting on key usage by Shin Noir.
sub EVENT_CLICKDOOR {
    if ($client->IsGrouped()) { #This code is purely for grouped members teleporting.
        my $destx = 0;
        my $desty = 0;
        my $destz = 0;
    	my $d_id = ($doorid % 256);
        if ($d_id == 2 || $d_id == 166) { #First Floor Door
            if ($client->KeyRingCheck(20033)) { # || $client->CastToClient()->GetInv().GetItem(30) == 20033) {
                $destx = 660;
                $desty = 100;
                $destz = 40;
            }
        }
        if  ($d_id == 4 || $d_id == 167) { #Second Floor Door
            if ($client->KeyRingCheck(20034)) {
                $destx = 670;
                $desty = 750;
                $destz = 75;
            }
        }
        if  ($d_id == 16 || $d_id == 165) { #Third Floor Door
            if ($client->KeyRingCheck(20035)) {
                $destx = 170;
                $desty = 755;
                $destz = 175;
                $desth = 0;
            }
        }
        if  ($d_id == 27 || $d_id == 169) { #Fourth Floor Door
            if ($client->KeyRingCheck(20036)) {
                $destx = -150;
                $desty = 160;
                $destz = 217;
            }
        }
        if  ($d_id == 34 || $d_id == 168) { #Fifth Floor Door
            if ($client->KeyRingCheck(20037)) {
                $destx = -320;
                $desty = 725;
                $destz = 12;
            }
        }
        if  ($d_id == 1) { #Sixth Floor Door
            if ($client->KeyRingCheck(20039)) {
                $destx = 20;
                $desty = 250;
                $destz = 355;
            }
    	}
    	if ($destx != 0) { #Key trigger found. Teleport nearby group members.
            my $tmpclient = 0;
        	for ($i = 0; $i < 2000; $i++) { #I would use a cycle of $client->GetGroup()->members[] but was having issues with it!
                $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);
            }
        }
   }
}
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #2  
Old 10-11-2009, 09:07 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Thanks, I added this to the PEQ repo with an added item check.
Reply With Quote
  #3  
Old 01-16-2010, 06:14 AM
OscarGrouch05
Sarnak
 
Join Date: Apr 2008
Posts: 71
Default

cavedue this is what i made up for teleports from bazaar zone
Translocator_Blue.pl
sub TL
{
movepc(1213.00,921.00,3.2; }
}
movepc(88.00,265.00,36.00); }
}

Translocator_Red.pl
sub TL
{
movepc(1212.00,-891.00,3.2; }
}
movepc(261.64,-91.47,36.00); }
}

click on the circle at your feet it'll teleport ya
-----------------------------
for guildlobby
High_Priest_Of_Luclin.pl

#generic soulbinder quest
sub EVENT_SAY {
plugin::soulbinder_say($text);
}

sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 90, $x + 90, $y - 90, $y + 90);
}

sub EVENT_ENTER
{
quest::signal(202273,5); #Qadar
}

High_Priestess_Of_Luclin.pl

#generic soulbinder quest
sub EVENT_SAY {
plugin::soulbinder_say($text);
}

sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 90, $x + 90, $y - 90, $y + 90);
}

sub EVENT_ENTER
{
quest::signal(202273,5); #Qadar
}
Reply With Quote
  #4  
Old 02-24-2010, 06:24 PM
RichardoX
Hill Giant
 
Join Date: Dec 2004
Location: in your closet....
Posts: 169
Default

Great contribution! Good work.
__________________
a hill giant slashes YOU for 25 points of damage!
You have been slain!
LOADING, PLEASE WAIT...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 09:01 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3