View Full Version : assign quest to a door?
lanystvyl
03-03-2011, 04:25 PM
Is it possible to assign a quest to a door more specifically a book that takes you to PoK.
I shut down access to PoK, and when someone clicks on the book I want a pop-up window to open. I saw a global pop-up but not sure how to use it on doors.
I remember in the weeks before the expansion on live they did similar. trying to recreate it.
Randymarsh9
03-03-2011, 05:27 PM
sub EVENT_CLICKDOOR{
is probably what you're looking for. Put that into a player.pl in whatever zones
lanystvyl
03-03-2011, 06:39 PM
like this?
sub EVENT_CLICKDOOR_POKNRKPORT500 {
my $Indent = plugin::PWIndent();
quest::popup("Plane of Knowledge", "$Indent Seems that the language is illegible to you.");
}
Congdar
03-03-2011, 09:17 PM
take a look at the player.pl in skyfire. it is a good example of EVENT_CLICKDOOR. also take a look at this wiki entry
http://www.eqemulator.net/wiki/wikka.php?wakka=QuestPlayerQuestExamples
note the issue with two id's for the same door.
lanystvyl
03-03-2011, 09:22 PM
Edit---
Shouldn't there be a popup.pl in the plugins folder?
Edit--
not sure if this is closer it didn't work.
sub EVENT_CLICKDOOR {
#Nektulos Book, trying to open a window
if($doorid == 77 || $doorid == 333){
my $Indent = plugin::PWIndent();
quest::popup("Plane of Knowledge", "$Indent Seems that the language is illegible to you.");
}
}
Congdar
03-03-2011, 09:30 PM
the log files have some perl errors logged that will help with debugging your script. don't forget to use #reloadpl after your save... I know it's needed for npcs but not sure if it works for doors... maybe a full restart is required.
sorvani
03-03-2011, 09:51 PM
I was playing with the player.pl in BoT trying to make the Agnarr door port up the entire raid and #reloadpl work fine to get the changes active.
lanystvyl
03-03-2011, 10:36 PM
I got a popup to work on an NPC, wondering if the door id is incorrect.
lanystvyl
03-03-2011, 10:48 PM
got it....now I can mess with what goes in it the code ended up looking like this;
sub EVENT_CLICKDOOR {
if($doorid == 78 || $doorid == 334) {
quest::popup("Test", "I am going to start with a very basic line");
}
}
going to mess with it a little but at least it pop's when clicked thanks to all for pointing out the resources.
trevius
03-04-2011, 03:43 AM
Just an FYI, but adding 256 to the door ID and using OR is no longer required such as, "($doorid == 78 || $doorid == 334)". Now, you can just use "($doorid == 78 )", as I corrected the +256 issue a while back.
lanystvyl
03-04-2011, 08:49 AM
thanks trev your awesome :)
ChaosSlayerZ
04-29-2011, 01:07 AM
I follow up question if I may :)
So this is a simple Door click code:
sub EVENT_CLICKDOOR
{
#postorms enter check
if($doorid == 16) {
if($client->GetLevel() >= 55 {
if(quest::has_zone_flag(210) != 1) {
quest::set_zone_flag(210);
$client->Message(15, "You have received a character flag!");
}
}
}
}
it check if you are lev 55, if yes it gives you access flag to enter PoStorms.
this assumes that zone is flag LOCKED to begin with.
If you NOT lev 55, it will bounce you back
1st question:
-player hits lev 55
-players clicks the door
-player gets the flag
-player DIES, looses a level
CAN HE STILL ENTER THE ZONE? He should still have flag from before.
But if I am reading the script right- the level is ALWAYS checked? or not?
But if its always checked, what a point of setting a zone flag?
My 2nd question is, is it possible to create some sort of "bounce back" WITHOUT using flags at all?
So the script will check your level, and only let you in, if level is right - without setting any flags?
thanks!
trevius
04-29-2011, 05:01 AM
Well, you could edit the door itself in the DB and remove the destination zone and instead, add the zoning part into the quest script so you can limit it however you want.
There are multiple ways to rewrite that script to fit whatever need you have. You could add a flag check as an OR with the level check so it lets them back in as long as they are the right level or have the flag. You could also use quest::getlevel(4) to check their max level ever reached instead of checking their current level, which would still allow them in if they lost a level.
ChaosSlayerZ
04-29-2011, 11:09 AM
bah, I totally forgot that door doesn't need to lead anywhere, so I can trigger it off any clickeable object!
thanks Trev, that's solves my issues! =)
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.