Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

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

Reply
 
Thread Tools Display Modes
  #1  
Old 10-10-2009, 09:53 AM
nightsta69
Hill Giant
 
Join Date: May 2005
Posts: 134
Default finding doors

is there an easier way to find out a door id other then just lookin in the db, and messin with them 1 by 1?
Reply With Quote
  #2  
Old 10-10-2009, 11:36 AM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Yes.

Add a player.pl file to the zone you're working with and put this code into it:

Code:
sub EVENT_CLICKDOOR {
     $door = $doorid - 256;
     $client->Message(13, "This is door number $door.");
}
Then clicking the doors will show you the proper ID.
Reply With Quote
  #3  
Old 10-10-2009, 12:10 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

ingenious script! but whats with the -256 part?
Reply With Quote
  #4  
Old 10-10-2009, 01:01 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

$doorids for some reason increment the number by 256 automatically. That's why most of the sub EVENT_CLICKDOOR scripts you see automatically account for it by accepting both say door 1 and door 257. Even while using this script you may see an erroneous number, since it'll display the real door ID less 256 (so -255 instead of 1, for example). Just a quirky thing, apparently. KLS originally explained that it was quirky when she introduced player.pl files, but I don't recall any explanation for why it was so.
Reply With Quote
  #5  
Old 10-10-2009, 01:04 PM
So_1337
Dragon
 
Join Date: May 2006
Location: Cincinnati, OH
Posts: 689
Default

Quote:
Originally Posted by KLS
Also I mentioned this in the wiki article but due to a bug somewhere in the door code sometimes the $doorid will return 256 greater than the id the door has in the DB you see I circumvented it by doing if($doorid == x || $doorid == (x+256)) I hope to go back and fix it soon enough though, shouldn't be a huge deal though.
Lots of other stuff on her plate, of course, so the work-around is easy enough to use for now.
Reply With Quote
  #6  
Old 10-10-2009, 02:15 PM
nightsta69
Hill Giant
 
Join Date: May 2005
Posts: 134
Default

awesome, ty for the script.
Reply With Quote
  #7  
Old 05-17-2010, 10:48 AM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default

Ok, got a weird one. Mine are 256 x 2?!

Any thoughts on that? I used this script to debug, found out its +512!

So my door 24 in the database was really 536!
(was happening in PoTimeB)
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #8  
Old 05-17-2010, 12:13 PM
Shin Noir's Avatar
Shin Noir
Legendary Member
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 502
Default

If you check out http://www.eqemulator.org/forums/showthread.php?t=29697 you'll notice my $d_id = ($doorid % 256);
This code can be used e.g.
Code:
sub EVENT_CLICKDOOR {
     $door = ($doorid % 256);
     $client->Message(13, "This is door number $door.");
}
__________________

~Shin Noir
DungeonEQ.com
Reply With Quote
  #9  
Old 05-17-2010, 02:29 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

I have also noticed that if you set a script to specific door with sub EVENT_CLICKDOOR ect where a player clicks it and something happens you need to make sure you use both possible doorid's in an or statement ect

Code:
sub EVENT_CLICKDOOR {

if (($doorid == 1) || ($doorid == 257)) { quest::say("This door is locked"); }

}
Otherwise you will run into odd instances where some players can not open it because it gives them one id instead of the other. I don't know why, but it certainly happens.

Last edited by trevius; 05-17-2010 at 06:32 PM..
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 10:28 PM.


 

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