View Single Post
  #38  
Old 09-23-2008, 02:18 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

Quote:
Originally Posted by James76 View Post
It defaults to 1, which is a nonexistent item. So I set it to 25755, rebooted the servers, and tried the door.
Setting keyitem to 1 is our ghetto way of permalocking a door. So, somebody without the flag cannot open the door.

Quote:
And its telling me that the key required is 25755 but because of the perl code (and the fact I killed the mech dragon for the flag) its still letting me through.
That's correct and intentional. quest::forcedooropen is doing exactly what it should do, open the door when called.

Quote:
And if I click low on the door it doesn't trigger the perl event for some weird reason. But every time I click above the 50% mark of the screen (at any angle) the event_clickdoor fires.
Strange indeed, but at least we have a repeatable procedure to recreate the problem.

Quote:
OK so then I created the key, and clicked low on the door so it wouldn't fire the perl script.. Door opens, added to keyring. Destroying key.. Now clicking high on the door to fire the perl event script.. And the door is opening and then closing because the script fires first and then the door code fires, but because the door is open it sets the door flag to close. So it opens and closes promptly in the same server's game iteration cycle, so you don't get to see it move at all.
Yep, I encountered this issue a while ago. What it comes down to is if a keyitem is set, the player has that key, and there is a Perl script further controlling the door, then it will not open visually. If the player doesn't have the keyitem (like in the case of permalocked 1), or keyitem is set to 0, then Perl will do whatever it needs to do correctly. In cases where we need a script on a door and it also has a keyitem, we set keyitem to 1, and have Perl check for the key. Of course, this key will not be added to the keyring.
Reply With Quote